summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--cervisia/addremovedlg.cpp36
-rw-r--r--cervisia/addremovedlg.h6
-rw-r--r--cervisia/addrepositorydlg.cpp52
-rw-r--r--cervisia/addrepositorydlg.h18
-rw-r--r--cervisia/annotatectl.cpp26
-rw-r--r--cervisia/annotatectl.h4
-rw-r--r--cervisia/annotatedlg.cpp8
-rw-r--r--cervisia/annotatedlg.h4
-rw-r--r--cervisia/annotateview.cpp72
-rw-r--r--cervisia/annotateview.h10
-rw-r--r--cervisia/cervisiapart.cpp402
-rw-r--r--cervisia/cervisiapart.h32
-rw-r--r--cervisia/cervisiashell.cpp26
-rw-r--r--cervisia/cervisiashell.h2
-rw-r--r--cervisia/changelogdlg.cpp42
-rw-r--r--cervisia/changelogdlg.h10
-rw-r--r--cervisia/checkoutdlg.cpp134
-rw-r--r--cervisia/checkoutdlg.h28
-rw-r--r--cervisia/commitdlg.cpp98
-rw-r--r--cervisia/commitdlg.h28
-rw-r--r--cervisia/cvsdir.cpp8
-rw-r--r--cervisia/cvsdir.h4
-rw-r--r--cervisia/cvsinitdlg.cpp32
-rw-r--r--cervisia/cvsinitdlg.h6
-rw-r--r--cervisia/cvsservice/cvsaskpass.cpp6
-rw-r--r--cervisia/cvsservice/cvsjob.cpp62
-rw-r--r--cervisia/cvsservice/cvsjob.h30
-rw-r--r--cervisia/cvsservice/cvsloginjob.cpp16
-rw-r--r--cervisia/cvsservice/cvsloginjob.h20
-rw-r--r--cervisia/cvsservice/cvsservice.cpp136
-rw-r--r--cervisia/cvsservice/cvsservice.h108
-rw-r--r--cervisia/cvsservice/cvsserviceutils.cpp12
-rw-r--r--cervisia/cvsservice/cvsserviceutils.h4
-rw-r--r--cervisia/cvsservice/repository.cpp74
-rw-r--r--cervisia/cvsservice/repository.h22
-rw-r--r--cervisia/cvsservice/sshagent.cpp54
-rw-r--r--cervisia/cvsservice/sshagent.h18
-rw-r--r--cervisia/diffdlg.cpp134
-rw-r--r--cervisia/diffdlg.h32
-rw-r--r--cervisia/diffview.cpp150
-rw-r--r--cervisia/diffview.h50
-rw-r--r--cervisia/dirignorelist.cpp10
-rw-r--r--cervisia/dirignorelist.h6
-rw-r--r--cervisia/editwithmenu.cpp12
-rw-r--r--cervisia/editwithmenu.h8
-rw-r--r--cervisia/entry.h12
-rw-r--r--cervisia/entry_status.cpp6
-rw-r--r--cervisia/entry_status.h2
-rw-r--r--cervisia/entry_status_change.h4
-rw-r--r--cervisia/globalignorelist.cpp18
-rw-r--r--cervisia/globalignorelist.h6
-rw-r--r--cervisia/historydlg.cpp142
-rw-r--r--cervisia/historydlg.h6
-rw-r--r--cervisia/ignorelistbase.cpp18
-rw-r--r--cervisia/ignorelistbase.h8
-rw-r--r--cervisia/logdlg.cpp178
-rw-r--r--cervisia/logdlg.h40
-rw-r--r--cervisia/loginfo.cpp52
-rw-r--r--cervisia/loginfo.h32
-rw-r--r--cervisia/loglist.cpp52
-rw-r--r--cervisia/loglist.h12
-rw-r--r--cervisia/logmessageedit.cpp30
-rw-r--r--cervisia/logmessageedit.h8
-rw-r--r--cervisia/logplainview.cpp64
-rw-r--r--cervisia/logplainview.h10
-rw-r--r--cervisia/logtree.cpp110
-rw-r--r--cervisia/logtree.h32
-rw-r--r--cervisia/main.cpp32
-rw-r--r--cervisia/mergedlg.cpp66
-rw-r--r--cervisia/mergedlg.h14
-rw-r--r--cervisia/misc.cpp106
-rw-r--r--cervisia/misc.h20
-rw-r--r--cervisia/patchoptiondlg.cpp54
-rw-r--r--cervisia/patchoptiondlg.h16
-rw-r--r--cervisia/progressdlg.cpp94
-rw-r--r--cervisia/progressdlg.h14
-rw-r--r--cervisia/protocolview.cpp48
-rw-r--r--cervisia/protocolview.h22
-rw-r--r--cervisia/qttableview.cpp154
-rw-r--r--cervisia/qttableview.h32
-rw-r--r--cervisia/repositories.cpp44
-rw-r--r--cervisia/repositories.h4
-rw-r--r--cervisia/repositorydlg.cpp124
-rw-r--r--cervisia/repositorydlg.h12
-rw-r--r--cervisia/resolvedlg.cpp160
-rw-r--r--cervisia/resolvedlg.h34
-rw-r--r--cervisia/resolvedlg_p.cpp12
-rw-r--r--cervisia/resolvedlg_p.h6
-rw-r--r--cervisia/settingsdlg.cpp94
-rw-r--r--cervisia/settingsdlg.h12
-rw-r--r--cervisia/stringmatcher.cpp24
-rw-r--r--cervisia/stringmatcher.h14
-rw-r--r--cervisia/tagdlg.cpp46
-rw-r--r--cervisia/tagdlg.h12
-rw-r--r--cervisia/tooltip.cpp38
-rw-r--r--cervisia/tooltip.h16
-rw-r--r--cervisia/updatedlg.cpp58
-rw-r--r--cervisia/updatedlg.h12
-rw-r--r--cervisia/updateview.cpp140
-rw-r--r--cervisia/updateview.h40
-rw-r--r--cervisia/updateview_items.cpp128
-rw-r--r--cervisia/updateview_items.h46
-rw-r--r--cervisia/updateview_visitors.cpp4
-rw-r--r--cervisia/watchdlg.cpp46
-rw-r--r--cervisia/watchdlg.h6
-rw-r--r--cervisia/watchersdlg.cpp32
-rw-r--r--cervisia/watchersdlg.h6
-rw-r--r--kapptemplate/kapp/app.cpp50
-rw-r--r--kapptemplate/kapp/app.h8
-rw-r--r--kapptemplate/kapp/app_client.cpp14
-rw-r--r--kapptemplate/kapp/appiface.h2
-rw-r--r--kapptemplate/kapp/apppref.cpp22
-rw-r--r--kapptemplate/kapp/apppref.h6
-rw-r--r--kapptemplate/kapp/appview.cpp28
-rw-r--r--kapptemplate/kapp/appview.h20
-rw-r--r--kapptemplate/kpartapp/app.cpp16
-rw-r--r--kapptemplate/kpartapp/app_part.cpp44
-rw-r--r--kapptemplate/kpartapp/app_part.h6
-rw-r--r--kapptemplate/kpartplugin/plugin_app.cpp16
-rw-r--r--kapptemplate/kpartplugin/plugin_app.h4
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.cpp20
-rw-r--r--kbabel/addons/kfile-plugins/kfile_po.h2
-rw-r--r--kbabel/addons/preview/pothumbcreator.cpp42
-rw-r--r--kbabel/addons/preview/pothumbcreator.h2
-rw-r--r--kbabel/catalogmanager/catalogmanager.cpp440
-rw-r--r--kbabel/catalogmanager/catalogmanager.h54
-rw-r--r--kbabel/catalogmanager/catalogmanagerapp.h8
-rw-r--r--kbabel/catalogmanager/catalogmanageriface.h6
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.cpp532
-rw-r--r--kbabel/catalogmanager/catalogmanagerview.h122
-rw-r--r--kbabel/catalogmanager/catmanlistitem.cpp164
-rw-r--r--kbabel/catalogmanager/catmanlistitem.h60
-rw-r--r--kbabel/catalogmanager/findinfilesdialog.cpp32
-rw-r--r--kbabel/catalogmanager/findinfilesdialog.h16
-rw-r--r--kbabel/catalogmanager/libcvs/cvsdialog.cpp128
-rw-r--r--kbabel/catalogmanager/libcvs/cvsdialog.h36
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.cpp124
-rw-r--r--kbabel/catalogmanager/libcvs/cvshandler.h38
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.cpp120
-rw-r--r--kbabel/catalogmanager/libsvn/svndialog.h34
-rw-r--r--kbabel/catalogmanager/libsvn/svnhandler.cpp152
-rw-r--r--kbabel/catalogmanager/libsvn/svnhandler.h52
-rw-r--r--kbabel/catalogmanager/main.cpp26
-rw-r--r--kbabel/catalogmanager/markpatterndialog.cpp26
-rw-r--r--kbabel/catalogmanager/markpatterndialog.h10
-rw-r--r--kbabel/catalogmanager/multiroughtransdlg.cpp16
-rw-r--r--kbabel/catalogmanager/multiroughtransdlg.h4
-rw-r--r--kbabel/catalogmanager/validateprogress.cpp56
-rw-r--r--kbabel/catalogmanager/validateprogress.h32
-rw-r--r--kbabel/catalogmanager/validateprogresswidget.ui.h4
-rw-r--r--kbabel/common/argextractor.cpp18
-rw-r--r--kbabel/common/argextractor.h18
-rw-r--r--kbabel/common/catalog.cpp570
-rw-r--r--kbabel/common/catalog.h106
-rw-r--r--kbabel/common/catalog_private.h54
-rw-r--r--kbabel/common/catalogfileplugin.h30
-rw-r--r--kbabel/common/catalogitem.cpp96
-rw-r--r--kbabel/common/catalogitem.h48
-rw-r--r--kbabel/common/catalogitem_private.h16
-rw-r--r--kbabel/common/catalogsettings.cpp58
-rw-r--r--kbabel/common/catalogsettings.h60
-rw-r--r--kbabel/common/diff.cpp56
-rw-r--r--kbabel/common/diff.h20
-rw-r--r--kbabel/common/editcmd.cpp10
-rw-r--r--kbabel/common/editcmd.h8
-rw-r--r--kbabel/common/exportplugin.cpp8
-rw-r--r--kbabel/common/findoptions.h10
-rw-r--r--kbabel/common/importplugin.cpp22
-rw-r--r--kbabel/common/importplugin_private.h12
-rw-r--r--kbabel/common/kbabeldatatool.h4
-rw-r--r--kbabel/common/kbmailer.cpp58
-rw-r--r--kbabel/common/kbmailer.h22
-rw-r--r--kbabel/common/kbproject.cpp14
-rw-r--r--kbabel/common/kbproject.h16
-rw-r--r--kbabel/common/kbprojectmanager.cpp10
-rw-r--r--kbabel/common/kbprojectmanager.h12
-rw-r--r--kbabel/common/msgfmt.cpp44
-rw-r--r--kbabel/common/msgfmt.h12
-rw-r--r--kbabel/common/poinfo.cpp172
-rw-r--r--kbabel/common/poinfo.h34
-rw-r--r--kbabel/common/projectsettings.cpp12
-rw-r--r--kbabel/common/projectsettings.h38
-rw-r--r--kbabel/common/regexpextractor.cpp64
-rw-r--r--kbabel/common/regexpextractor.h46
-rw-r--r--kbabel/common/stringdistance.cpp10
-rw-r--r--kbabel/common/stringdistance.h16
-rw-r--r--kbabel/common/tagextractor.cpp4
-rw-r--r--kbabel/commonui/cmdedit.cpp80
-rw-r--r--kbabel/commonui/cmdedit.h28
-rw-r--r--kbabel/commonui/context.cpp88
-rw-r--r--kbabel/commonui/context.h20
-rw-r--r--kbabel/commonui/finddialog.cpp104
-rw-r--r--kbabel/commonui/finddialog.h48
-rw-r--r--kbabel/commonui/kactionselector.cpp146
-rw-r--r--kbabel/commonui/kactionselector.h64
-rw-r--r--kbabel/commonui/klisteditor.ui.h14
-rw-r--r--kbabel/commonui/projectpref.cpp22
-rw-r--r--kbabel/commonui/projectpref.h2
-rw-r--r--kbabel/commonui/projectprefwidgets.cpp468
-rw-r--r--kbabel/commonui/projectprefwidgets.h142
-rw-r--r--kbabel/commonui/projectwizard.cpp24
-rw-r--r--kbabel/commonui/projectwizard.h12
-rw-r--r--kbabel/commonui/roughtransdlg.cpp160
-rw-r--r--kbabel/commonui/roughtransdlg.h22
-rw-r--r--kbabel/commonui/toolaction.cpp40
-rw-r--r--kbabel/commonui/toolaction.h12
-rw-r--r--kbabel/commonui/toolselectionwidget.cpp32
-rw-r--r--kbabel/commonui/toolselectionwidget.h10
-rw-r--r--kbabel/datatools/accelerators/main.cc22
-rw-r--r--kbabel/datatools/accelerators/main.h10
-rw-r--r--kbabel/datatools/arguments/main.cc54
-rw-r--r--kbabel/datatools/arguments/main.h8
-rw-r--r--kbabel/datatools/context/main.cc4
-rw-r--r--kbabel/datatools/context/main.h6
-rw-r--r--kbabel/datatools/equations/main.cc6
-rw-r--r--kbabel/datatools/equations/main.h8
-rw-r--r--kbabel/datatools/length/main.cc22
-rw-r--r--kbabel/datatools/length/main.h8
-rw-r--r--kbabel/datatools/not-translated/main.cc20
-rw-r--r--kbabel/datatools/not-translated/main.h8
-rw-r--r--kbabel/datatools/pluralforms/main.cc6
-rw-r--r--kbabel/datatools/pluralforms/main.h6
-rw-r--r--kbabel/datatools/punctuation/main.cc22
-rw-r--r--kbabel/datatools/punctuation/main.h4
-rw-r--r--kbabel/datatools/regexp/main.cc42
-rw-r--r--kbabel/datatools/regexp/main.h22
-rw-r--r--kbabel/datatools/setfuzzy/main.cc4
-rw-r--r--kbabel/datatools/setfuzzy/main.h4
-rw-r--r--kbabel/datatools/whitespace/main.cc28
-rw-r--r--kbabel/datatools/whitespace/main.h10
-rw-r--r--kbabel/datatools/xml/main.cc42
-rw-r--r--kbabel/datatools/xml/main.h16
-rw-r--r--kbabel/filters/gettext/gettextexport.cpp58
-rw-r--r--kbabel/filters/gettext/gettextexport.h10
-rw-r--r--kbabel/filters/gettext/gettextimport.cpp208
-rw-r--r--kbabel/filters/gettext/gettextimport.h22
-rw-r--r--kbabel/filters/linguist/linguistexport.cpp62
-rw-r--r--kbabel/filters/linguist/linguistexport.h18
-rw-r--r--kbabel/filters/linguist/linguistimport.cpp40
-rw-r--r--kbabel/filters/linguist/linguistimport.h14
-rw-r--r--kbabel/filters/xliff/xliffexport.cpp64
-rw-r--r--kbabel/filters/xliff/xliffexport.h16
-rw-r--r--kbabel/filters/xliff/xliffimport.cpp42
-rw-r--r--kbabel/filters/xliff/xliffimport.h14
-rw-r--r--kbabel/kbabel/charselectview.cpp36
-rw-r--r--kbabel/kbabel/charselectview.h6
-rw-r--r--kbabel/kbabel/commentview.cpp34
-rw-r--r--kbabel/kbabel/commentview.h10
-rw-r--r--kbabel/kbabel/contextview.cpp46
-rw-r--r--kbabel/kbabel/contextview.h4
-rw-r--r--kbabel/kbabel/errorlistview.cpp16
-rw-r--r--kbabel/kbabel/errorlistview.h4
-rw-r--r--kbabel/kbabel/gotodialog.cpp6
-rw-r--r--kbabel/kbabel/gotodialog.h4
-rw-r--r--kbabel/kbabel/headereditor.cpp20
-rw-r--r--kbabel/kbabel/headereditor.h2
-rw-r--r--kbabel/kbabel/hidingmsgedit.cpp52
-rw-r--r--kbabel/kbabel/hidingmsgedit.h42
-rw-r--r--kbabel/kbabel/kbabel.cpp574
-rw-r--r--kbabel/kbabel/kbabel.h50
-rw-r--r--kbabel/kbabel/kbabeliface.h38
-rw-r--r--kbabel/kbabel/kbabelpref.cpp18
-rw-r--r--kbabel/kbabel/kbabelpref.h6
-rw-r--r--kbabel/kbabel/kbabelsplash.cpp32
-rw-r--r--kbabel/kbabel/kbabelsplash.h6
-rw-r--r--kbabel/kbabel/kbabelview.cpp560
-rw-r--r--kbabel/kbabel/kbabelview.h118
-rw-r--r--kbabel/kbabel/kbabelview2.cpp126
-rw-r--r--kbabel/kbabel/kbbookmarkhandler.cpp28
-rw-r--r--kbabel/kbabel/kbbookmarkhandler.h22
-rw-r--r--kbabel/kbabel/kbcatalog.cpp2
-rw-r--r--kbabel/kbabel/kbcatalog.h2
-rw-r--r--kbabel/kbabel/kbcataloglistview.cpp24
-rw-r--r--kbabel/kbabel/kbcataloglistview.h16
-rw-r--r--kbabel/kbabel/kbcataloglistviewitem.cpp32
-rw-r--r--kbabel/kbabel/kbcataloglistviewitem.h26
-rw-r--r--kbabel/kbabel/kbcatalogview.cpp8
-rw-r--r--kbabel/kbabel/kbcatalogview.h6
-rw-r--r--kbabel/kbabel/kbcharselect.cpp24
-rw-r--r--kbabel/kbabel/kbcharselect.h8
-rw-r--r--kbabel/kbabel/kbhighlighting.cpp44
-rw-r--r--kbabel/kbabel/kbhighlighting.h32
-rw-r--r--kbabel/kbabel/main.cpp138
-rw-r--r--kbabel/kbabel/mymultilineedit.cpp300
-rw-r--r--kbabel/kbabel/mymultilineedit.h92
-rw-r--r--kbabel/kbabel/sourceview.cpp12
-rw-r--r--kbabel/kbabel/sourceview.h2
-rw-r--r--kbabel/kbabel/spelldlg.cpp10
-rw-r--r--kbabel/kbabel/spelldlg.h2
-rw-r--r--kbabel/kbabel/taglistview.cpp22
-rw-r--r--kbabel/kbabel/taglistview.h4
-rw-r--r--kbabel/kbabeldict/aboutmoduledlg.cpp4
-rw-r--r--kbabel/kbabeldict/aboutmoduledlg.h4
-rw-r--r--kbabel/kbabeldict/dictchooser.cpp76
-rw-r--r--kbabel/kbabeldict/dictchooser.h28
-rw-r--r--kbabel/kbabeldict/dictionarymenu.cpp44
-rw-r--r--kbabel/kbabeldict/dictionarymenu.h26
-rw-r--r--kbabel/kbabeldict/kbabeldict.cpp10
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.cpp386
-rw-r--r--kbabel/kbabeldict/kbabeldictbox.h126
-rw-r--r--kbabel/kbabeldict/kbabeldictiface.h8
-rw-r--r--kbabel/kbabeldict/kbabeldictview.cpp108
-rw-r--r--kbabel/kbabeldict/kbabeldictview.h24
-rw-r--r--kbabel/kbabeldict/kbabelsplash.cpp32
-rw-r--r--kbabel/kbabeldict/kbabelsplash.h6
-rw-r--r--kbabel/kbabeldict/main.cpp10
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp322
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.cpp122
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/database.h74
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp30
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbscan.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp28
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h4
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp118
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h48
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp86
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp52
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/chunk.h64
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.cpp166
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/database.h82
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp38
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h62
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp44
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h18
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp24
-rw-r--r--kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h2
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/pa_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp84
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h56
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp20
-rw-r--r--kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp52
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/compendiumdata.h44
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp196
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/pocompendium.h58
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp100
-rw-r--r--kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.cpp8
-rw-r--r--kbabel/kbabeldict/modules/tmx/pc_factory.h8
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp94
-rw-r--r--kbabel/kbabeldict/modules/tmx/preferenceswidget.h6
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp164
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendium.h42
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp64
-rw-r--r--kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h52
-rw-r--r--kbabel/kbabeldict/searchengine.cpp40
-rw-r--r--kbabel/kbabeldict/searchengine.h144
-rw-r--r--kbugbuster/backend/bug.cpp64
-rw-r--r--kbugbuster/backend/bug.h30
-rw-r--r--kbugbuster/backend/bugcache.cpp78
-rw-r--r--kbugbuster/backend/bugcache.h18
-rw-r--r--kbugbuster/backend/bugcommand.cpp86
-rw-r--r--kbugbuster/backend/bugcommand.h132
-rw-r--r--kbugbuster/backend/bugdetails.cpp70
-rw-r--r--kbugbuster/backend/bugdetails.h26
-rw-r--r--kbugbuster/backend/bugdetailsimpl.h24
-rw-r--r--kbugbuster/backend/bugdetailsjob.cpp2
-rw-r--r--kbugbuster/backend/bugdetailsjob.h2
-rw-r--r--kbugbuster/backend/bugdetailspart.h14
-rw-r--r--kbugbuster/backend/bugimpl.h6
-rw-r--r--kbugbuster/backend/bugjob.cpp22
-rw-r--r--kbugbuster/backend/bugjob.h12
-rw-r--r--kbugbuster/backend/buglistjob.cpp8
-rw-r--r--kbugbuster/backend/buglistjob.h10
-rw-r--r--kbugbuster/backend/bugmybugsjob.cpp6
-rw-r--r--kbugbuster/backend/bugmybugsjob.h4
-rw-r--r--kbugbuster/backend/bugserver.cpp76
-rw-r--r--kbugbuster/backend/bugserver.h38
-rw-r--r--kbugbuster/backend/bugserverconfig.cpp24
-rw-r--r--kbugbuster/backend/bugserverconfig.h58
-rw-r--r--kbugbuster/backend/bugsystem.cpp118
-rw-r--r--kbugbuster/backend/bugsystem.h52
-rw-r--r--kbugbuster/backend/domprocessor.cpp142
-rw-r--r--kbugbuster/backend/domprocessor.h24
-rw-r--r--kbugbuster/backend/error.h6
-rw-r--r--kbugbuster/backend/htmlparser.cpp80
-rw-r--r--kbugbuster/backend/htmlparser.h36
-rw-r--r--kbugbuster/backend/kbbprefs.cpp16
-rw-r--r--kbugbuster/backend/kbbprefs.h14
-rw-r--r--kbugbuster/backend/mailsender.cpp92
-rw-r--r--kbugbuster/backend/mailsender.h26
-rw-r--r--kbugbuster/backend/package.cpp12
-rw-r--r--kbugbuster/backend/package.h10
-rw-r--r--kbugbuster/backend/packageimpl.h12
-rw-r--r--kbugbuster/backend/packagelistjob.cpp6
-rw-r--r--kbugbuster/backend/packagelistjob.h4
-rw-r--r--kbugbuster/backend/person.cpp12
-rw-r--r--kbugbuster/backend/person.h14
-rw-r--r--kbugbuster/backend/processor.cpp6
-rw-r--r--kbugbuster/backend/processor.h8
-rw-r--r--kbugbuster/backend/rdfprocessor.cpp18
-rw-r--r--kbugbuster/backend/rdfprocessor.h4
-rw-r--r--kbugbuster/backend/smtp.cpp50
-rw-r--r--kbugbuster/backend/smtp.h30
-rw-r--r--kbugbuster/gui/buglvi.cpp24
-rw-r--r--kbugbuster/gui/buglvi.h6
-rw-r--r--kbugbuster/gui/centralwidget.cpp148
-rw-r--r--kbugbuster/gui/centralwidget.h38
-rw-r--r--kbugbuster/gui/cwbugdetails.cpp66
-rw-r--r--kbugbuster/gui/cwbugdetails.h14
-rw-r--r--kbugbuster/gui/cwbugdetailscontainer.cpp76
-rw-r--r--kbugbuster/gui/cwbugdetailscontainer.h4
-rw-r--r--kbugbuster/gui/cwbuglistcontainer.cpp92
-rw-r--r--kbugbuster/gui/cwbuglistcontainer.h32
-rw-r--r--kbugbuster/gui/cwloadingwidget.cpp74
-rw-r--r--kbugbuster/gui/cwloadingwidget.h32
-rw-r--r--kbugbuster/gui/cwsearchwidget.cpp24
-rw-r--r--kbugbuster/gui/cwsearchwidget.h6
-rw-r--r--kbugbuster/gui/kbbbookmarkmanager.h2
-rw-r--r--kbugbuster/gui/kbbmainwindow.cpp170
-rw-r--r--kbugbuster/gui/kbbmainwindow.h22
-rw-r--r--kbugbuster/gui/loadallbugsdlg.cpp20
-rw-r--r--kbugbuster/gui/loadallbugsdlg.h4
-rw-r--r--kbugbuster/gui/messageeditor.cpp36
-rw-r--r--kbugbuster/gui/messageeditor.h8
-rw-r--r--kbugbuster/gui/msginputdialog.cpp76
-rw-r--r--kbugbuster/gui/msginputdialog.h12
-rw-r--r--kbugbuster/gui/packagelvi.cpp10
-rw-r--r--kbugbuster/gui/packagelvi.h14
-rw-r--r--kbugbuster/gui/packageselectdialog.cpp84
-rw-r--r--kbugbuster/gui/packageselectdialog.h28
-rw-r--r--kbugbuster/gui/preferencesdialog.cpp100
-rw-r--r--kbugbuster/gui/preferencesdialog.h24
-rw-r--r--kbugbuster/gui/serverconfigdialog.cpp36
-rw-r--r--kbugbuster/gui/serverconfigdialog.h10
-rw-r--r--kbugbuster/gui/severityselectdialog.cpp18
-rw-r--r--kbugbuster/gui/severityselectdialog.h6
-rw-r--r--kbugbuster/kresources/kcalresource.cpp30
-rw-r--r--kbugbuster/kresources/kcalresource.h10
-rw-r--r--kbugbuster/kresources/kcalresourceconfig.cpp14
-rw-r--r--kbugbuster/kresources/kcalresourceconfig.h2
-rw-r--r--kbugbuster/main.cpp4
-rw-r--r--kcachegrind/kcachegrind/cachegrindloader.cpp100
-rw-r--r--kcachegrind/kcachegrind/callgraphview.cpp476
-rw-r--r--kcachegrind/kcachegrind/callgraphview.h128
-rw-r--r--kcachegrind/kcachegrind/callitem.cpp32
-rw-r--r--kcachegrind/kcachegrind/callitem.h6
-rw-r--r--kcachegrind/kcachegrind/callmapview.cpp108
-rw-r--r--kcachegrind/kcachegrind/callmapview.h34
-rw-r--r--kcachegrind/kcachegrind/callview.cpp50
-rw-r--r--kcachegrind/kcachegrind/callview.h16
-rw-r--r--kcachegrind/kcachegrind/configdlg.cpp172
-rw-r--r--kcachegrind/kcachegrind/configdlg.h20
-rw-r--r--kcachegrind/kcachegrind/configuration.cpp122
-rw-r--r--kcachegrind/kcachegrind/configuration.h28
-rw-r--r--kcachegrind/kcachegrind/costlistitem.cpp30
-rw-r--r--kcachegrind/kcachegrind/costlistitem.h8
-rw-r--r--kcachegrind/kcachegrind/costtypeitem.cpp22
-rw-r--r--kcachegrind/kcachegrind/costtypeitem.h6
-rw-r--r--kcachegrind/kcachegrind/costtypeview.cpp60
-rw-r--r--kcachegrind/kcachegrind/costtypeview.h18
-rw-r--r--kcachegrind/kcachegrind/coverageitem.cpp76
-rw-r--r--kcachegrind/kcachegrind/coverageitem.h14
-rw-r--r--kcachegrind/kcachegrind/coverageview.cpp46
-rw-r--r--kcachegrind/kcachegrind/coverageview.h16
-rw-r--r--kcachegrind/kcachegrind/dumpmanager.cpp2
-rw-r--r--kcachegrind/kcachegrind/dumpmanager.h12
-rw-r--r--kcachegrind/kcachegrind/dumpselection.cpp2
-rw-r--r--kcachegrind/kcachegrind/dumpselection.h4
-rw-r--r--kcachegrind/kcachegrind/functionitem.cpp38
-rw-r--r--kcachegrind/kcachegrind/functionitem.h10
-rw-r--r--kcachegrind/kcachegrind/functionselection.cpp158
-rw-r--r--kcachegrind/kcachegrind/functionselection.h30
-rw-r--r--kcachegrind/kcachegrind/instritem.cpp92
-rw-r--r--kcachegrind/kcachegrind/instritem.h28
-rw-r--r--kcachegrind/kcachegrind/instrview.cpp98
-rw-r--r--kcachegrind/kcachegrind/instrview.h24
-rw-r--r--kcachegrind/kcachegrind/listutils.cpp48
-rw-r--r--kcachegrind/kcachegrind/listutils.h22
-rw-r--r--kcachegrind/kcachegrind/loader.cpp8
-rw-r--r--kcachegrind/kcachegrind/loader.h24
-rw-r--r--kcachegrind/kcachegrind/main.cpp6
-rw-r--r--kcachegrind/kcachegrind/multiview.cpp24
-rw-r--r--kcachegrind/kcachegrind/multiview.h18
-rw-r--r--kcachegrind/kcachegrind/partgraph.cpp38
-rw-r--r--kcachegrind/kcachegrind/partgraph.h22
-rw-r--r--kcachegrind/kcachegrind/partlistitem.cpp30
-rw-r--r--kcachegrind/kcachegrind/partlistitem.h6
-rw-r--r--kcachegrind/kcachegrind/partselection.cpp54
-rw-r--r--kcachegrind/kcachegrind/partselection.h8
-rw-r--r--kcachegrind/kcachegrind/partview.cpp36
-rw-r--r--kcachegrind/kcachegrind/partview.h12
-rw-r--r--kcachegrind/kcachegrind/pool.cpp2
-rw-r--r--kcachegrind/kcachegrind/sourceitem.cpp92
-rw-r--r--kcachegrind/kcachegrind/sourceitem.h24
-rw-r--r--kcachegrind/kcachegrind/sourceview.cpp104
-rw-r--r--kcachegrind/kcachegrind/sourceview.h20
-rw-r--r--kcachegrind/kcachegrind/stackbrowser.cpp6
-rw-r--r--kcachegrind/kcachegrind/stackbrowser.h2
-rw-r--r--kcachegrind/kcachegrind/stackitem.cpp22
-rw-r--r--kcachegrind/kcachegrind/stackitem.h6
-rw-r--r--kcachegrind/kcachegrind/stackselection.cpp40
-rw-r--r--kcachegrind/kcachegrind/stackselection.h6
-rw-r--r--kcachegrind/kcachegrind/subcost.cpp10
-rw-r--r--kcachegrind/kcachegrind/subcost.h4
-rw-r--r--kcachegrind/kcachegrind/tabview.cpp204
-rw-r--r--kcachegrind/kcachegrind/tabview.h66
-rw-r--r--kcachegrind/kcachegrind/toplevel.cpp486
-rw-r--r--kcachegrind/kcachegrind/toplevel.h52
-rw-r--r--kcachegrind/kcachegrind/tracedata.cpp374
-rw-r--r--kcachegrind/kcachegrind/tracedata.h332
-rw-r--r--kcachegrind/kcachegrind/traceitemview.cpp24
-rw-r--r--kcachegrind/kcachegrind/traceitemview.h22
-rw-r--r--kcachegrind/kcachegrind/treemap.cpp338
-rw-r--r--kcachegrind/kcachegrind/treemap.h178
-rw-r--r--kcachegrind/kcachegrind/utils.cpp10
-rw-r--r--kcachegrind/kcachegrind/utils.h12
-rw-r--r--kdeaccounts-plugin/kdeaccountsformat.cpp28
-rw-r--r--kdeaccounts-plugin/kdeaccountsformat.h10
-rw-r--r--kfile-plugins/c++/kfile_cpp.cpp36
-rw-r--r--kfile-plugins/c++/kfile_cpp.h4
-rw-r--r--kfile-plugins/diff/kfile_diff.cpp102
-rw-r--r--kfile-plugins/diff/kfile_diff.h14
-rw-r--r--kfile-plugins/ts/kfile_ts.cpp24
-rw-r--r--kfile-plugins/ts/kfile_ts.h4
-rw-r--r--kioslave/svn/ksvnd/commitdlg.ui.h4
-rw-r--r--kioslave/svn/ksvnd/ksvnd.cpp104
-rw-r--r--kioslave/svn/ksvnd/ksvnd.h24
-rw-r--r--kioslave/svn/svn.cpp226
-rw-r--r--kioslave/svn/svn.h36
-rw-r--r--kioslave/svn/svnhelper/kio_svn_helper.cpp110
-rw-r--r--kioslave/svn/svnhelper/kio_svn_helper.h4
-rw-r--r--kmtrace/demangle.cpp18
-rw-r--r--kmtrace/kmtrace.cpp84
-rw-r--r--kmtrace/match.cpp24
-rw-r--r--kompare/interfaces/kompareinterface.cpp2
-rw-r--r--kompare/interfaces/kompareinterface.h12
-rw-r--r--kompare/kompare_shell.cpp106
-rw-r--r--kompare/kompare_shell.h6
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.cpp82
-rw-r--r--kompare/komparenavtreepart/komparenavtreepart.h66
-rw-r--r--kompare/komparepart/kompare_part.cpp170
-rw-r--r--kompare/komparepart/kompare_part.h18
-rw-r--r--kompare/komparepart/kompare_qsplitter.h86
-rw-r--r--kompare/komparepart/kompareconnectwidget.cpp76
-rw-r--r--kompare/komparepart/kompareconnectwidget.h26
-rw-r--r--kompare/komparepart/komparelistview.cpp114
-rw-r--r--kompare/komparepart/komparelistview.h46
-rw-r--r--kompare/komparepart/kompareprefdlg.cpp4
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.cpp58
-rw-r--r--kompare/komparepart/komparesaveoptionswidget.h8
-rw-r--r--kompare/komparepart/komparesplitter.cpp98
-rw-r--r--kompare/komparepart/komparesplitter.h16
-rw-r--r--kompare/kompareurldialog.cpp26
-rw-r--r--kompare/kompareurldialog.h10
-rw-r--r--kompare/libdialogpages/diffpage.cpp142
-rw-r--r--kompare/libdialogpages/diffpage.h34
-rw-r--r--kompare/libdialogpages/diffsettings.cpp2
-rw-r--r--kompare/libdialogpages/diffsettings.h18
-rw-r--r--kompare/libdialogpages/filespage.cpp36
-rw-r--r--kompare/libdialogpages/filespage.h20
-rw-r--r--kompare/libdialogpages/filessettings.cpp4
-rw-r--r--kompare/libdialogpages/filessettings.h18
-rw-r--r--kompare/libdialogpages/pagebase.cpp24
-rw-r--r--kompare/libdialogpages/pagebase.h8
-rw-r--r--kompare/libdialogpages/settingsbase.cpp4
-rw-r--r--kompare/libdialogpages/settingsbase.h4
-rw-r--r--kompare/libdialogpages/viewpage.cpp68
-rw-r--r--kompare/libdialogpages/viewpage.h8
-rw-r--r--kompare/libdialogpages/viewsettings.cpp18
-rw-r--r--kompare/libdialogpages/viewsettings.h34
-rw-r--r--kompare/libdiff2/cvsdiffparser.cpp22
-rw-r--r--kompare/libdiff2/cvsdiffparser.h4
-rw-r--r--kompare/libdiff2/difference.cpp8
-rw-r--r--kompare/libdiff2/difference.h42
-rw-r--r--kompare/libdiff2/diffhunk.cpp12
-rw-r--r--kompare/libdiff2/diffhunk.h14
-rw-r--r--kompare/libdiff2/diffmodel.cpp38
-rw-r--r--kompare/libdiff2/diffmodel.h66
-rw-r--r--kompare/libdiff2/diffmodellist.h10
-rw-r--r--kompare/libdiff2/diffparser.cpp16
-rw-r--r--kompare/libdiff2/diffparser.h2
-rw-r--r--kompare/libdiff2/kompare.h14
-rw-r--r--kompare/libdiff2/komparemodellist.cpp164
-rw-r--r--kompare/libdiff2/komparemodellist.h52
-rw-r--r--kompare/libdiff2/kompareprocess.cpp44
-rw-r--r--kompare/libdiff2/kompareprocess.h16
-rw-r--r--kompare/libdiff2/levenshteintable.cpp18
-rw-r--r--kompare/libdiff2/parser.cpp20
-rw-r--r--kompare/libdiff2/parser.h6
-rw-r--r--kompare/libdiff2/parserbase.cpp54
-rw-r--r--kompare/libdiff2/parserbase.h60
-rw-r--r--kompare/libdiff2/perforceparser.cpp32
-rw-r--r--kompare/libdiff2/perforceparser.h2
-rw-r--r--kompare/main.cpp4
-rw-r--r--kprofilemethod/kprofilemethod.h6
-rw-r--r--kspy/classinfoview.cpp18
-rw-r--r--kspy/classinfoview.h8
-rw-r--r--kspy/kspy.h2
-rw-r--r--kspy/navview.cpp28
-rw-r--r--kspy/navview.h8
-rw-r--r--kspy/navviewitem.cpp6
-rw-r--r--kspy/navviewitem.h8
-rw-r--r--kspy/propsview.cpp116
-rw-r--r--kspy/propsview.h8
-rw-r--r--kspy/receiversview.cpp30
-rw-r--r--kspy/receiversview.h8
-rw-r--r--kspy/sigslotview.cpp26
-rw-r--r--kspy/sigslotview.h8
-rw-r--r--kspy/spy.cpp44
-rw-r--r--kspy/spy.h10
-rw-r--r--kstartperf/kstartperf.cpp18
-rw-r--r--kuiviewer/kuiviewer.cpp18
-rw-r--r--kuiviewer/kuiviewer.h2
-rw-r--r--kuiviewer/kuiviewer_part.cpp74
-rw-r--r--kuiviewer/kuiviewer_part.h10
-rw-r--r--kuiviewer/main.cpp4
-rw-r--r--kuiviewer/quicreator.cpp14
-rw-r--r--kuiviewer/quicreator.h2
-rw-r--r--kunittest/dcopinterface.h6
-rw-r--r--kunittest/example/module/sampleextra.cpp2
-rw-r--r--kunittest/example/module/samplemodule2.cpp8
-rw-r--r--kunittest/example/module/sampletests.cpp12
-rw-r--r--kunittest/example/module/sampletests.h2
-rw-r--r--kunittest/example/simple/sampletest.cpp8
-rw-r--r--kunittest/runnergui.cpp122
-rw-r--r--kunittest/runnergui.h18
-rw-r--r--kunittest/testerwidget.ui.h12
-rw-r--r--poxml/GettextParser.cpp14
-rw-r--r--poxml/parser.cpp214
-rw-r--r--poxml/parser.h80
-rw-r--r--poxml/po2xml.cpp40
-rw-r--r--poxml/split.cpp14
-rw-r--r--poxml/transxx.cpp38
-rw-r--r--poxml/xml2pot.cpp12
-rw-r--r--scheck/scheck.cpp588
-rw-r--r--scheck/scheck.h110
-rw-r--r--umbrello/umbrello/activitywidget.cpp38
-rw-r--r--umbrello/umbrello/activitywidget.h8
-rw-r--r--umbrello/umbrello/actor.cpp8
-rw-r--r--umbrello/umbrello/actor.h6
-rw-r--r--umbrello/umbrello/actorwidget.cpp18
-rw-r--r--umbrello/umbrello/actorwidget.h6
-rw-r--r--umbrello/umbrello/aligntoolbar.cpp10
-rw-r--r--umbrello/umbrello/aligntoolbar.h6
-rw-r--r--umbrello/umbrello/artifact.cpp10
-rw-r--r--umbrello/umbrello/artifact.h6
-rw-r--r--umbrello/umbrello/artifactwidget.cpp72
-rw-r--r--umbrello/umbrello/artifactwidget.h18
-rw-r--r--umbrello/umbrello/association.cpp74
-rw-r--r--umbrello/umbrello/association.h30
-rw-r--r--umbrello/umbrello/associationwidget.cpp370
-rw-r--r--umbrello/umbrello/associationwidget.h108
-rw-r--r--umbrello/umbrello/associationwidgetlist.h6
-rw-r--r--umbrello/umbrello/attribute.cpp72
-rw-r--r--umbrello/umbrello/attribute.h24
-rw-r--r--umbrello/umbrello/autolayout/autolayoutdlg.cpp12
-rw-r--r--umbrello/umbrello/autolayout/autolayoutdlg.h8
-rw-r--r--umbrello/umbrello/autolayout/simplecanvas.h2
-rw-r--r--umbrello/umbrello/boxwidget.cpp10
-rw-r--r--umbrello/umbrello/boxwidget.h6
-rw-r--r--umbrello/umbrello/classifier.cpp108
-rw-r--r--umbrello/umbrello/classifier.h32
-rw-r--r--umbrello/umbrello/classifiercodedocument.cpp70
-rw-r--r--umbrello/umbrello/classifiercodedocument.h24
-rw-r--r--umbrello/umbrello/classifierlistitem.cpp10
-rw-r--r--umbrello/umbrello/classifierlistitem.h10
-rw-r--r--umbrello/umbrello/classifierwidget.cpp98
-rw-r--r--umbrello/umbrello/classifierwidget.h22
-rw-r--r--umbrello/umbrello/clipboard/idchangelog.h14
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.cpp22
-rw-r--r--umbrello/umbrello/clipboard/umlclipboard.h18
-rw-r--r--umbrello/umbrello/clipboard/umldrag.cpp258
-rw-r--r--umbrello/umbrello/clipboard/umldrag.h46
-rw-r--r--umbrello/umbrello/cmdlineexportallviewsevent.cpp14
-rw-r--r--umbrello/umbrello/cmdlineexportallviewsevent.h8
-rw-r--r--umbrello/umbrello/codeaccessormethod.cpp14
-rw-r--r--umbrello/umbrello/codeaccessormethod.h10
-rw-r--r--umbrello/umbrello/codeaccessormethodlist.h6
-rw-r--r--umbrello/umbrello/codeblock.cpp14
-rw-r--r--umbrello/umbrello/codeblock.h14
-rw-r--r--umbrello/umbrello/codeblockwithcomments.cpp40
-rw-r--r--umbrello/umbrello/codeblockwithcomments.h16
-rw-r--r--umbrello/umbrello/codeclassfield.cpp64
-rw-r--r--umbrello/umbrello/codeclassfield.h22
-rw-r--r--umbrello/umbrello/codeclassfielddeclarationblock.cpp12
-rw-r--r--umbrello/umbrello/codeclassfielddeclarationblock.h8
-rw-r--r--umbrello/umbrello/codeclassfieldlist.h6
-rw-r--r--umbrello/umbrello/codecomment.cpp8
-rw-r--r--umbrello/umbrello/codecomment.h8
-rw-r--r--umbrello/umbrello/codedocument.cpp96
-rw-r--r--umbrello/umbrello/codedocument.h58
-rw-r--r--umbrello/umbrello/codedocumentlist.h6
-rw-r--r--umbrello/umbrello/codegenerationpolicy.cpp72
-rw-r--r--umbrello/umbrello/codegenerationpolicy.h32
-rw-r--r--umbrello/umbrello/codegenerator.cpp152
-rw-r--r--umbrello/umbrello/codegenerator.h46
-rw-r--r--umbrello/umbrello/codegenerators/adawriter.cpp86
-rw-r--r--umbrello/umbrello/codegenerators/adawriter.h16
-rw-r--r--umbrello/umbrello/codegenerators/aswriter.cpp36
-rw-r--r--umbrello/umbrello/codegenerators/aswriter.h6
-rw-r--r--umbrello/umbrello/codegenerators/classifierinfo.h6
-rw-r--r--umbrello/umbrello/codegenerators/codegen_utils.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/codegen_utils.h8
-rw-r--r--umbrello/umbrello/codegenerators/codegenpolicyext.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppcodeclassfield.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/cppcodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/cppcodecomment.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/cppcodecomment.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppcodedocumentation.cpp34
-rw-r--r--umbrello/umbrello/codegenerators/cppcodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationform.cpp46
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationform.h18
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp60
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h44
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp6
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerator.cpp18
-rw-r--r--umbrello/umbrello/codegenerators/cppcodegenerator.h12
-rw-r--r--umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp16
-rw-r--r--umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp28
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp10
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodedocument.cpp62
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodedocument.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp30
-rw-r--r--umbrello/umbrello/codegenerators/cppheadercodeoperation.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppmakecodedocument.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/cppmakecodedocument.h6
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodedocument.h4
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp38
-rw-r--r--umbrello/umbrello/codegenerators/cppsourcecodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/cppwriter.cpp256
-rw-r--r--umbrello/umbrello/codegenerators/cppwriter.h100
-rw-r--r--umbrello/umbrello/codegenerators/csharpwriter.cpp58
-rw-r--r--umbrello/umbrello/codegenerators/csharpwriter.h24
-rw-r--r--umbrello/umbrello/codegenerators/dwriter.cpp148
-rw-r--r--umbrello/umbrello/codegenerators/dwriter.h72
-rw-r--r--umbrello/umbrello/codegenerators/idlwriter.cpp64
-rw-r--r--umbrello/umbrello/codegenerators/idlwriter.h8
-rw-r--r--umbrello/umbrello/codegenerators/javaantcodedocument.cpp42
-rw-r--r--umbrello/umbrello/codegenerators/javaantcodedocument.h16
-rw-r--r--umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp16
-rw-r--r--umbrello/umbrello/codegenerators/javaclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/javaclassifiercodedocument.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp42
-rw-r--r--umbrello/umbrello/codegenerators/javacodeaccessormethod.h6
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfield.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/javacodecomment.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/javacodecomment.h10
-rw-r--r--umbrello/umbrello/codegenerators/javacodedocumentation.cpp34
-rw-r--r--umbrello/umbrello/codegenerators/javacodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp2
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicy.h4
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerator.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/javacodegenerator.h14
-rw-r--r--umbrello/umbrello/codegenerators/javacodeoperation.cpp24
-rw-r--r--umbrello/umbrello/codegenerators/javacodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/javawriter.cpp174
-rw-r--r--umbrello/umbrello/codegenerators/javawriter.h58
-rw-r--r--umbrello/umbrello/codegenerators/jswriter.cpp36
-rw-r--r--umbrello/umbrello/codegenerators/jswriter.h6
-rw-r--r--umbrello/umbrello/codegenerators/pascalwriter.cpp62
-rw-r--r--umbrello/umbrello/codegenerators/pascalwriter.h14
-rw-r--r--umbrello/umbrello/codegenerators/perlwriter.cpp104
-rw-r--r--umbrello/umbrello/codegenerators/perlwriter.h18
-rw-r--r--umbrello/umbrello/codegenerators/php5writer.cpp46
-rw-r--r--umbrello/umbrello/codegenerators/php5writer.h12
-rw-r--r--umbrello/umbrello/codegenerators/phpwriter.cpp44
-rw-r--r--umbrello/umbrello/codegenerators/phpwriter.h12
-rw-r--r--umbrello/umbrello/codegenerators/pythonwriter.cpp58
-rw-r--r--umbrello/umbrello/codegenerators/pythonwriter.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp38
-rw-r--r--umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeaccessormethod.h6
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfield.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfield.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp14
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodecomment.cpp22
-rw-r--r--umbrello/umbrello/codegenerators/rubycodecomment.h10
-rw-r--r--umbrello/umbrello/codegenerators/rubycodedocumentation.cpp32
-rw-r--r--umbrello/umbrello/codegenerators/rubycodedocumentation.h12
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h4
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp8
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h2
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerator.cpp44
-rw-r--r--umbrello/umbrello/codegenerators/rubycodegenerator.h14
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeoperation.cpp52
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeoperation.h4
-rw-r--r--umbrello/umbrello/codegenerators/rubywriter.cpp110
-rw-r--r--umbrello/umbrello/codegenerators/rubywriter.h22
-rw-r--r--umbrello/umbrello/codegenerators/simplecodegenerator.cpp48
-rw-r--r--umbrello/umbrello/codegenerators/simplecodegenerator.h18
-rw-r--r--umbrello/umbrello/codegenerators/sqlwriter.cpp40
-rw-r--r--umbrello/umbrello/codegenerators/sqlwriter.h8
-rw-r--r--umbrello/umbrello/codegenerators/tclwriter.cpp130
-rw-r--r--umbrello/umbrello/codegenerators/tclwriter.h44
-rw-r--r--umbrello/umbrello/codegenerators/xmlcodecomment.cpp12
-rw-r--r--umbrello/umbrello/codegenerators/xmlcodecomment.h6
-rw-r--r--umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp26
-rw-r--r--umbrello/umbrello/codegenerators/xmlelementcodeblock.h20
-rw-r--r--umbrello/umbrello/codegenerators/xmlschemawriter.cpp112
-rw-r--r--umbrello/umbrello/codegenerators/xmlschemawriter.h56
-rw-r--r--umbrello/umbrello/codegenobjectwithtextblocks.cpp42
-rw-r--r--umbrello/umbrello/codegenobjectwithtextblocks.h26
-rw-r--r--umbrello/umbrello/codeimport/adaimport.cpp108
-rw-r--r--umbrello/umbrello/codeimport/adaimport.h14
-rw-r--r--umbrello/umbrello/codeimport/classimport.cpp12
-rw-r--r--umbrello/umbrello/codeimport/classimport.h8
-rw-r--r--umbrello/umbrello/codeimport/cppimport.cpp22
-rw-r--r--umbrello/umbrello/codeimport/cppimport.h8
-rw-r--r--umbrello/umbrello/codeimport/idlimport.cpp86
-rw-r--r--umbrello/umbrello/codeimport/idlimport.h8
-rw-r--r--umbrello/umbrello/codeimport/import_utils.cpp102
-rw-r--r--umbrello/umbrello/codeimport/import_utils.h42
-rw-r--r--umbrello/umbrello/codeimport/javaimport.cpp106
-rw-r--r--umbrello/umbrello/codeimport/javaimport.h18
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.cpp66
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast.h104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp50
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h8
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp146
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h18
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/driver.cpp104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/driver.h104
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/errors.h6
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp92
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lexer.h68
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp12
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/lookup.h14
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/parser.cpp70
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/parser.h16
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp12
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp98
-rw-r--r--umbrello/umbrello/codeimport/kdevcppparser/urlutil.h44
-rw-r--r--umbrello/umbrello/codeimport/nativeimportbase.cpp104
-rw-r--r--umbrello/umbrello/codeimport/nativeimportbase.h46
-rw-r--r--umbrello/umbrello/codeimport/pascalimport.cpp54
-rw-r--r--umbrello/umbrello/codeimport/pascalimport.h2
-rw-r--r--umbrello/umbrello/codeimport/pythonimport.cpp40
-rw-r--r--umbrello/umbrello/codeimport/pythonimport.h4
-rw-r--r--umbrello/umbrello/codemethodblock.cpp40
-rw-r--r--umbrello/umbrello/codemethodblock.h22
-rw-r--r--umbrello/umbrello/codeoperation.cpp24
-rw-r--r--umbrello/umbrello/codeoperation.h16
-rw-r--r--umbrello/umbrello/codeparameter.cpp34
-rw-r--r--umbrello/umbrello/codeparameter.h16
-rw-r--r--umbrello/umbrello/codeviewerstate.h20
-rw-r--r--umbrello/umbrello/component.cpp18
-rw-r--r--umbrello/umbrello/component.h6
-rw-r--r--umbrello/umbrello/componentwidget.cpp30
-rw-r--r--umbrello/umbrello/componentwidget.h6
-rw-r--r--umbrello/umbrello/configurable.cpp8
-rw-r--r--umbrello/umbrello/configurable.h8
-rw-r--r--umbrello/umbrello/datatypewidget.cpp24
-rw-r--r--umbrello/umbrello/datatypewidget.h8
-rw-r--r--umbrello/umbrello/dialog_utils.cpp26
-rw-r--r--umbrello/umbrello/dialog_utils.h26
-rw-r--r--umbrello/umbrello/dialogs/activitydialog.cpp26
-rw-r--r--umbrello/umbrello/dialogs/activitydialog.h16
-rw-r--r--umbrello/umbrello/dialogs/activitypage.cpp94
-rw-r--r--umbrello/umbrello/dialogs/activitypage.h26
-rw-r--r--umbrello/umbrello/dialogs/assocgenpage.cpp30
-rw-r--r--umbrello/umbrello/dialogs/assocgenpage.h32
-rw-r--r--umbrello/umbrello/dialogs/assocpage.cpp48
-rw-r--r--umbrello/umbrello/dialogs/assocpage.h22
-rw-r--r--umbrello/umbrello/dialogs/assocpropdlg.cpp18
-rw-r--r--umbrello/umbrello/dialogs/assocpropdlg.h2
-rw-r--r--umbrello/umbrello/dialogs/assocrolepage.cpp96
-rw-r--r--umbrello/umbrello/dialogs/assocrolepage.h32
-rw-r--r--umbrello/umbrello/dialogs/classgenpage.cpp136
-rw-r--r--umbrello/umbrello/dialogs/classgenpage.h32
-rw-r--r--umbrello/umbrello/dialogs/classifierlistpage.cpp112
-rw-r--r--umbrello/umbrello/dialogs/classifierlistpage.h34
-rw-r--r--umbrello/umbrello/dialogs/classoptionspage.cpp50
-rw-r--r--umbrello/umbrello/dialogs/classoptionspage.h22
-rw-r--r--umbrello/umbrello/dialogs/classpropdlg.cpp64
-rw-r--r--umbrello/umbrello/dialogs/classpropdlg.h6
-rw-r--r--umbrello/umbrello/dialogs/classwizard.cpp24
-rw-r--r--umbrello/umbrello/dialogs/classwizard.h2
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.cpp190
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.h44
-rw-r--r--umbrello/umbrello/dialogs/codegenerationoptionspage.cpp24
-rw-r--r--umbrello/umbrello/dialogs/codegenerationoptionspage.h6
-rw-r--r--umbrello/umbrello/dialogs/codegenerationpolicypage.cpp4
-rw-r--r--umbrello/umbrello/dialogs/codegenerationpolicypage.h4
-rw-r--r--umbrello/umbrello/dialogs/codegenerationwizard.cpp62
-rw-r--r--umbrello/umbrello/dialogs/codegenerationwizard.h10
-rw-r--r--umbrello/umbrello/dialogs/codeviewerdialog.cpp18
-rw-r--r--umbrello/umbrello/dialogs/codeviewerdialog.h14
-rw-r--r--umbrello/umbrello/dialogs/codevieweroptionspage.cpp2
-rw-r--r--umbrello/umbrello/dialogs/codevieweroptionspage.h4
-rw-r--r--umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp6
-rw-r--r--umbrello/umbrello/dialogs/defaultcodegenpolicypage.h8
-rw-r--r--umbrello/umbrello/dialogs/diagramprintpage.cpp66
-rw-r--r--umbrello/umbrello/dialogs/diagramprintpage.h22
-rw-r--r--umbrello/umbrello/dialogs/exportallviewsdialog.cpp14
-rw-r--r--umbrello/umbrello/dialogs/exportallviewsdialog.h6
-rw-r--r--umbrello/umbrello/dialogs/notedialog.cpp20
-rw-r--r--umbrello/umbrello/dialogs/notedialog.h6
-rw-r--r--umbrello/umbrello/dialogs/overwritedialogue.cpp18
-rw-r--r--umbrello/umbrello/dialogs/overwritedialogue.h12
-rw-r--r--umbrello/umbrello/dialogs/parmpropdlg.cpp48
-rw-r--r--umbrello/umbrello/dialogs/parmpropdlg.h42
-rw-r--r--umbrello/umbrello/dialogs/pkgcontentspage.cpp50
-rw-r--r--umbrello/umbrello/dialogs/pkgcontentspage.h22
-rw-r--r--umbrello/umbrello/dialogs/selectopdlg.cpp32
-rw-r--r--umbrello/umbrello/dialogs/selectopdlg.h34
-rw-r--r--umbrello/umbrello/dialogs/settingsdlg.cpp128
-rw-r--r--umbrello/umbrello/dialogs/settingsdlg.h92
-rw-r--r--umbrello/umbrello/dialogs/statedialog.cpp36
-rw-r--r--umbrello/umbrello/dialogs/statedialog.h8
-rw-r--r--umbrello/umbrello/dialogs/umlattributedialog.cpp50
-rw-r--r--umbrello/umbrello/dialogs/umlattributedialog.h18
-rw-r--r--umbrello/umbrello/dialogs/umlentityattributedialog.cpp56
-rw-r--r--umbrello/umbrello/dialogs/umlentityattributedialog.h22
-rw-r--r--umbrello/umbrello/dialogs/umloperationdialog.cpp130
-rw-r--r--umbrello/umbrello/dialogs/umloperationdialog.h38
-rw-r--r--umbrello/umbrello/dialogs/umlroledialog.cpp8
-rw-r--r--umbrello/umbrello/dialogs/umlroledialog.h2
-rw-r--r--umbrello/umbrello/dialogs/umlroleproperties.cpp10
-rw-r--r--umbrello/umbrello/dialogs/umlroleproperties.h2
-rw-r--r--umbrello/umbrello/dialogs/umltemplatedialog.cpp28
-rw-r--r--umbrello/umbrello/dialogs/umltemplatedialog.h12
-rw-r--r--umbrello/umbrello/dialogs/umlviewdialog.cpp34
-rw-r--r--umbrello/umbrello/dialogs/umlviewdialog.h16
-rw-r--r--umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp34
-rw-r--r--umbrello/umbrello/dialogs/umlwidgetcolorpage.h16
-rw-r--r--umbrello/umbrello/docgenerators/docbookgenerator.cpp28
-rw-r--r--umbrello/umbrello/docgenerators/docbookgenerator.h2
-rw-r--r--umbrello/umbrello/docgenerators/main.cpp2
-rw-r--r--umbrello/umbrello/docgenerators/xhtmlgenerator.cpp40
-rw-r--r--umbrello/umbrello/docgenerators/xhtmlgenerator.h2
-rw-r--r--umbrello/umbrello/docwindow.cpp18
-rw-r--r--umbrello/umbrello/docwindow.h10
-rw-r--r--umbrello/umbrello/entity.cpp42
-rw-r--r--umbrello/umbrello/entity.h10
-rw-r--r--umbrello/umbrello/entityattribute.cpp28
-rw-r--r--umbrello/umbrello/entityattribute.h24
-rw-r--r--umbrello/umbrello/entitywidget.cpp32
-rw-r--r--umbrello/umbrello/entitywidget.h8
-rw-r--r--umbrello/umbrello/enum.cpp36
-rw-r--r--umbrello/umbrello/enum.h10
-rw-r--r--umbrello/umbrello/enumliteral.cpp12
-rw-r--r--umbrello/umbrello/enumliteral.h8
-rw-r--r--umbrello/umbrello/enumwidget.cpp34
-rw-r--r--umbrello/umbrello/enumwidget.h8
-rw-r--r--umbrello/umbrello/floatingtextwidget.cpp82
-rw-r--r--umbrello/umbrello/floatingtextwidget.h42
-rw-r--r--umbrello/umbrello/floatingtextwidgetcontroller.cpp12
-rw-r--r--umbrello/umbrello/floatingtextwidgetcontroller.h10
-rw-r--r--umbrello/umbrello/folder.cpp104
-rw-r--r--umbrello/umbrello/folder.h28
-rw-r--r--umbrello/umbrello/forkjoinwidget.cpp22
-rw-r--r--umbrello/umbrello/forkjoinwidget.h12
-rw-r--r--umbrello/umbrello/hierarchicalcodeblock.cpp60
-rw-r--r--umbrello/umbrello/hierarchicalcodeblock.h36
-rw-r--r--umbrello/umbrello/import_rose.cpp110
-rw-r--r--umbrello/umbrello/import_rose.h4
-rw-r--r--umbrello/umbrello/kplayerslideraction.cpp152
-rw-r--r--umbrello/umbrello/kplayerslideraction.h36
-rw-r--r--umbrello/umbrello/kstartuplogo.cpp20
-rw-r--r--umbrello/umbrello/kstartuplogo.h10
-rw-r--r--umbrello/umbrello/linepath.cpp248
-rw-r--r--umbrello/umbrello/linepath.h70
-rw-r--r--umbrello/umbrello/linkwidget.cpp4
-rw-r--r--umbrello/umbrello/linkwidget.h16
-rw-r--r--umbrello/umbrello/listpopupmenu.cpp30
-rw-r--r--umbrello/umbrello/listpopupmenu.h10
-rw-r--r--umbrello/umbrello/main.cpp6
-rw-r--r--umbrello/umbrello/messagewidget.cpp94
-rw-r--r--umbrello/umbrello/messagewidget.h46
-rw-r--r--umbrello/umbrello/messagewidgetcontroller.cpp6
-rw-r--r--umbrello/umbrello/messagewidgetcontroller.h10
-rw-r--r--umbrello/umbrello/messagewidgetlist.h6
-rw-r--r--umbrello/umbrello/model_utils.cpp92
-rw-r--r--umbrello/umbrello/model_utils.h42
-rw-r--r--umbrello/umbrello/node.cpp8
-rw-r--r--umbrello/umbrello/node.h6
-rw-r--r--umbrello/umbrello/nodewidget.cpp28
-rw-r--r--umbrello/umbrello/nodewidget.h6
-rw-r--r--umbrello/umbrello/notewidget.cpp66
-rw-r--r--umbrello/umbrello/notewidget.h20
-rw-r--r--umbrello/umbrello/notewidgetcontroller.cpp6
-rw-r--r--umbrello/umbrello/notewidgetcontroller.h12
-rw-r--r--umbrello/umbrello/object_factory.cpp20
-rw-r--r--umbrello/umbrello/object_factory.h12
-rw-r--r--umbrello/umbrello/objectwidget.cpp58
-rw-r--r--umbrello/umbrello/objectwidget.h20
-rw-r--r--umbrello/umbrello/objectwidgetcontroller.cpp2
-rw-r--r--umbrello/umbrello/objectwidgetcontroller.h2
-rw-r--r--umbrello/umbrello/operation.cpp82
-rw-r--r--umbrello/umbrello/operation.h14
-rw-r--r--umbrello/umbrello/optionstate.h10
-rw-r--r--umbrello/umbrello/ownedcodeblock.cpp10
-rw-r--r--umbrello/umbrello/ownedcodeblock.h10
-rw-r--r--umbrello/umbrello/ownedhierarchicalcodeblock.cpp6
-rw-r--r--umbrello/umbrello/ownedhierarchicalcodeblock.h12
-rw-r--r--umbrello/umbrello/package.cpp18
-rw-r--r--umbrello/umbrello/package.h8
-rw-r--r--umbrello/umbrello/packagewidget.cpp24
-rw-r--r--umbrello/umbrello/packagewidget.h6
-rw-r--r--umbrello/umbrello/petalnode.cpp10
-rw-r--r--umbrello/umbrello/petalnode.h24
-rw-r--r--umbrello/umbrello/petaltree2uml.cpp94
-rw-r--r--umbrello/umbrello/plugin.cpp12
-rw-r--r--umbrello/umbrello/plugin.h12
-rw-r--r--umbrello/umbrello/pluginloader.cpp14
-rw-r--r--umbrello/umbrello/pluginloader.h22
-rw-r--r--umbrello/umbrello/refactoring/refactoringassistant.cpp138
-rw-r--r--umbrello/umbrello/refactoring/refactoringassistant.h26
-rw-r--r--umbrello/umbrello/seqlinewidget.cpp26
-rw-r--r--umbrello/umbrello/seqlinewidget.h14
-rw-r--r--umbrello/umbrello/statewidget.cpp66
-rw-r--r--umbrello/umbrello/statewidget.h28
-rw-r--r--umbrello/umbrello/stereotype.cpp10
-rw-r--r--umbrello/umbrello/stereotype.h6
-rw-r--r--umbrello/umbrello/template.cpp18
-rw-r--r--umbrello/umbrello/template.h14
-rw-r--r--umbrello/umbrello/textblock.cpp78
-rw-r--r--umbrello/umbrello/textblock.h50
-rw-r--r--umbrello/umbrello/textblocklist.h6
-rw-r--r--umbrello/umbrello/toolbarstate.cpp44
-rw-r--r--umbrello/umbrello/toolbarstate.h24
-rw-r--r--umbrello/umbrello/toolbarstatearrow.cpp6
-rw-r--r--umbrello/umbrello/toolbarstatearrow.h4
-rw-r--r--umbrello/umbrello/toolbarstateassociation.cpp10
-rw-r--r--umbrello/umbrello/toolbarstateassociation.h4
-rw-r--r--umbrello/umbrello/toolbarstatemessages.cpp8
-rw-r--r--umbrello/umbrello/toolbarstatemessages.h6
-rw-r--r--umbrello/umbrello/uml.cpp312
-rw-r--r--umbrello/umbrello/uml.h50
-rw-r--r--umbrello/umbrello/umlassociationlist.h6
-rw-r--r--umbrello/umbrello/umlattributelist.h10
-rw-r--r--umbrello/umbrello/umlcanvasobject.cpp14
-rw-r--r--umbrello/umbrello/umlcanvasobject.h8
-rw-r--r--umbrello/umbrello/umlclassifierlist.h6
-rw-r--r--umbrello/umbrello/umlclassifierlistitemlist.h10
-rw-r--r--umbrello/umbrello/umldoc.cpp330
-rw-r--r--umbrello/umbrello/umldoc.h72
-rw-r--r--umbrello/umbrello/umlentityattributelist.h10
-rw-r--r--umbrello/umbrello/umlenumliterallist.h6
-rw-r--r--umbrello/umbrello/umllistview.cpp262
-rw-r--r--umbrello/umbrello/umllistview.h54
-rw-r--r--umbrello/umbrello/umllistviewitem.cpp76
-rw-r--r--umbrello/umbrello/umllistviewitem.h28
-rw-r--r--umbrello/umbrello/umllistviewitemlist.h6
-rw-r--r--umbrello/umbrello/umlnamespace.cpp18
-rw-r--r--umbrello/umbrello/umlnamespace.h14
-rw-r--r--umbrello/umbrello/umlobject.cpp106
-rw-r--r--umbrello/umbrello/umlobject.h66
-rw-r--r--umbrello/umbrello/umlobjectlist.h10
-rw-r--r--umbrello/umbrello/umloperationlist.h6
-rw-r--r--umbrello/umbrello/umlpackagelist.h6
-rw-r--r--umbrello/umbrello/umlrole.cpp34
-rw-r--r--umbrello/umbrello/umlrole.h10
-rw-r--r--umbrello/umbrello/umlstereotypelist.h6
-rw-r--r--umbrello/umbrello/umltemplatelist.h6
-rw-r--r--umbrello/umbrello/umlview.cpp340
-rw-r--r--umbrello/umbrello/umlview.h108
-rw-r--r--umbrello/umbrello/umlviewcanvas.cpp8
-rw-r--r--umbrello/umbrello/umlviewcanvas.h6
-rw-r--r--umbrello/umbrello/umlviewimageexporter.cpp16
-rw-r--r--umbrello/umbrello/umlviewimageexporter.h6
-rw-r--r--umbrello/umbrello/umlviewimageexporterall.cpp14
-rw-r--r--umbrello/umbrello/umlviewimageexportermodel.cpp152
-rw-r--r--umbrello/umbrello/umlviewimageexportermodel.h46
-rw-r--r--umbrello/umbrello/umlviewlist.h4
-rw-r--r--umbrello/umbrello/umlwidget.cpp150
-rw-r--r--umbrello/umbrello/umlwidget.h96
-rw-r--r--umbrello/umbrello/umlwidgetcontroller.cpp50
-rw-r--r--umbrello/umbrello/umlwidgetcontroller.h68
-rw-r--r--umbrello/umbrello/umlwidgetlist.h6
-rw-r--r--umbrello/umbrello/usecase.cpp8
-rw-r--r--umbrello/umbrello/usecase.h6
-rw-r--r--umbrello/umbrello/usecasewidget.cpp18
-rw-r--r--umbrello/umbrello/usecasewidget.h6
-rw-r--r--umbrello/umbrello/widget_factory.cpp8
-rw-r--r--umbrello/umbrello/widget_factory.h6
-rw-r--r--umbrello/umbrello/widget_utils.cpp20
-rw-r--r--umbrello/umbrello/widget_utils.h8
-rw-r--r--umbrello/umbrello/widgetbase.cpp20
-rw-r--r--umbrello/umbrello/widgetbase.h24
-rw-r--r--umbrello/umbrello/worktoolbar.cpp26
-rw-r--r--umbrello/umbrello/worktoolbar.h26
1102 files changed, 23558 insertions, 23558 deletions
diff --git a/cervisia/addremovedlg.cpp b/cervisia/addremovedlg.cpp
index 108ac80e..9bd3671b 100644
--- a/cervisia/addremovedlg.cpp
+++ b/cervisia/addremovedlg.cpp
@@ -20,52 +20,52 @@
#include "addremovedlg.h"
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <klocale.h>
-AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char* name)
- : KDialogBase(parent, name, true, QString::null,
+AddRemoveDialog::AddRemoveDialog(ActionType action, TQWidget* parent, const char* name)
+ : KDialogBase(parent, name, true, TQString::null,
Ok | Cancel | Help, Ok, true)
{
setCaption( (action==Add)? i18n("CVS Add") :
(action==AddBinary)? i18n("CVS Add Binary") :
i18n("CVS Remove") );
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QLabel *textlabel = new QLabel
+ TQLabel *textlabel = new QLabel
( (action==Add)? i18n("Add the following files to the repository:") :
(action==AddBinary)? i18n("Add the following binary files to the repository:") :
i18n("Remove the following files from the repository:") ,
mainWidget );
layout->addWidget(textlabel);
- m_listBox = new QListBox(mainWidget);
- m_listBox->setSelectionMode(QListBox::NoSelection);
+ m_listBox = new TQListBox(mainWidget);
+ m_listBox->setSelectionMode(TQListBox::NoSelection);
layout->addWidget(m_listBox, 5);
// Add warning message to dialog when user wants to remove a file
if (action==Remove)
{
- QBoxLayout *warningLayout = new QHBoxLayout;
+ TQBoxLayout *warningLayout = new QHBoxLayout;
- QLabel *warningIcon = new QLabel(mainWidget);
+ TQLabel *warningIcon = new TQLabel(mainWidget);
KIconLoader *loader = kapp->iconLoader();
warningIcon->setPixmap(loader->loadIcon("messagebox_warning", KIcon::NoGroup,
KIcon::SizeMedium, KIcon::DefaultState,
0, true));
warningLayout->addWidget(warningIcon);
- QLabel *warningText = new QLabel(i18n("This will also remove the files from "
+ TQLabel *warningText = new TQLabel(i18n("This will also remove the files from "
"your local working copy."), mainWidget);
warningLayout->addWidget(warningText);
@@ -81,15 +81,15 @@ AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char*
}
-void AddRemoveDialog::setFileList(const QStringList& files)
+void AddRemoveDialog::setFileList(const TQStringList& files)
{
// the dot for the root directory is hard to see, so
// we convert it to the absolut path
if( files.find(".") != files.end() )
{
- QStringList copy(files);
+ TQStringList copy(files);
int idx = copy.findIndex(".");
- copy[idx] = QFileInfo(".").absFilePath();
+ copy[idx] = TQFileInfo(".").absFilePath();
m_listBox->insertStringList(copy);
}
diff --git a/cervisia/addremovedlg.h b/cervisia/addremovedlg.h
index 06b98260..735199ab 100644
--- a/cervisia/addremovedlg.h
+++ b/cervisia/addremovedlg.h
@@ -35,12 +35,12 @@ class AddRemoveDialog : public KDialogBase
public:
enum ActionType { Add, AddBinary, Remove };
- explicit AddRemoveDialog(ActionType action, QWidget* parent=0, const char* name=0);
+ explicit AddRemoveDialog(ActionType action, TQWidget* parent=0, const char* name=0);
- void setFileList(const QStringList& files);
+ void setFileList(const TQStringList& files);
private:
- QListBox* m_listBox;
+ TQListBox* m_listBox;
};
#endif
diff --git a/cervisia/addrepositorydlg.cpp b/cervisia/addrepositorydlg.cpp
index d1d24cb0..c370b02a 100644
--- a/cervisia/addrepositorydlg.cpp
+++ b/cervisia/addrepositorydlg.cpp
@@ -21,10 +21,10 @@
#include "addrepositorydlg.h"
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kconfig.h>
#include <klineedit.h>
@@ -32,17 +32,17 @@
#include <knuminput.h>
-AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo,
- QWidget* parent, const char* name)
+AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const TQString& repo,
+ TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("Add Repository"),
Ok | Cancel, Ok, true)
, partConfig(cfg)
{
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QLabel* repo_label = new QLabel(i18n("&Repository:"), mainWidget);
+ TQLabel* repo_label = new TQLabel(i18n("&Repository:"), mainWidget);
layout->addWidget(repo_label);
repo_edit = new KLineEdit(mainWidget);
@@ -55,14 +55,14 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo,
}
layout->addWidget(repo_edit);
- QLabel* rsh_label = new QLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget);
+ TQLabel* rsh_label = new TQLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget);
layout->addWidget(rsh_label);
rsh_edit = new KLineEdit(mainWidget);
rsh_label->setBuddy(rsh_edit);
layout->addWidget(rsh_edit);
- QLabel* server_label = new QLabel(i18n("Invoke this program on the server side:"),
+ TQLabel* server_label = new TQLabel(i18n("Invoke this program on the server side:"),
mainWidget);
layout->addWidget(server_label);
@@ -70,24 +70,24 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo,
server_label->setBuddy(server_edit);
layout->addWidget(server_edit);
- QHBox* compressionBox = new QHBox(mainWidget);
- m_useDifferentCompression = new QCheckBox(i18n("Use different &compression level:"), compressionBox);
+ TQHBox* compressionBox = new TQHBox(mainWidget);
+ m_useDifferentCompression = new TQCheckBox(i18n("Use different &compression level:"), compressionBox);
m_compressionLevel = new KIntNumInput(compressionBox);
m_compressionLevel->setRange(0, 9, 1, false);
layout->addWidget(compressionBox);
- m_retrieveCvsignoreFile = new QCheckBox(i18n("Download cvsignore file from "
+ m_retrieveCvsignoreFile = new TQCheckBox(i18n("Download cvsignore file from "
"server"), mainWidget);
layout->addWidget(m_retrieveCvsignoreFile);
- connect( repo_edit, SIGNAL(textChanged(const QString&)),
- this, SLOT(repoChanged()) );
- connect( m_useDifferentCompression, SIGNAL(toggled(bool)),
- this, SLOT(compressionToggled(bool)) );
+ connect( repo_edit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(repoChanged()) );
+ connect( m_useDifferentCompression, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(compressionToggled(bool)) );
repoChanged();
- QSize size = configDialogSize(partConfig, "AddRepositoryDialog");
+ TQSize size = configDialogSize(partConfig, "AddRepositoryDialog");
resize(size);
}
@@ -98,13 +98,13 @@ AddRepositoryDialog::~AddRepositoryDialog()
}
-void AddRepositoryDialog::setRsh(const QString& rsh)
+void AddRepositoryDialog::setRsh(const TQString& rsh)
{
rsh_edit->setText(rsh);
}
-void AddRepositoryDialog::setServer(const QString& server)
+void AddRepositoryDialog::setServer(const TQString& server)
{
server_edit->setText(server);
}
@@ -134,19 +134,19 @@ void AddRepositoryDialog::setRetrieveCvsignoreFile(bool enabled)
}
-QString AddRepositoryDialog::repository() const
+TQString AddRepositoryDialog::repository() const
{
return repo_edit->text();
}
-QString AddRepositoryDialog::rsh() const
+TQString AddRepositoryDialog::rsh() const
{
return rsh_edit->text();
}
-QString AddRepositoryDialog::server() const
+TQString AddRepositoryDialog::server() const
{
return server_edit->text();
}
@@ -167,7 +167,7 @@ bool AddRepositoryDialog::retrieveCvsignoreFile() const
}
-void AddRepositoryDialog::setRepository(const QString& repo)
+void AddRepositoryDialog::setRepository(const TQString& repo)
{
setCaption(i18n("Repository Settings"));
@@ -178,7 +178,7 @@ void AddRepositoryDialog::setRepository(const QString& repo)
void AddRepositoryDialog::repoChanged()
{
- QString repo = repository();
+ TQString repo = repository();
rsh_edit->setEnabled((!repo.startsWith(":pserver:"))
&& repo.contains(":"));
m_useDifferentCompression->setEnabled(repo.contains(":"));
diff --git a/cervisia/addrepositorydlg.h b/cervisia/addrepositorydlg.h
index 8fbf66fd..bd759e6f 100644
--- a/cervisia/addrepositorydlg.h
+++ b/cervisia/addrepositorydlg.h
@@ -35,19 +35,19 @@ class AddRepositoryDialog : public KDialogBase
Q_OBJECT
public:
- AddRepositoryDialog(KConfig& cfg, const QString& repo, QWidget* parent = 0,
+ AddRepositoryDialog(KConfig& cfg, const TQString& repo, TQWidget* parent = 0,
const char* name = 0);
virtual ~AddRepositoryDialog();
- void setRepository(const QString& repo);
- void setRsh(const QString& rsh);
- void setServer(const QString& server);
+ void setRepository(const TQString& repo);
+ void setRsh(const TQString& rsh);
+ void setServer(const TQString& server);
void setCompression(int compression);
void setRetrieveCvsignoreFile(bool enabled);
- QString repository() const;
- QString rsh() const;
- QString server() const;
+ TQString repository() const;
+ TQString rsh() const;
+ TQString server() const;
int compression() const;
bool retrieveCvsignoreFile() const;
@@ -59,8 +59,8 @@ private:
KLineEdit* repo_edit;
KLineEdit* rsh_edit;
KLineEdit* server_edit;
- QCheckBox* m_useDifferentCompression;
- QCheckBox* m_retrieveCvsignoreFile;
+ TQCheckBox* m_useDifferentCompression;
+ TQCheckBox* m_retrieveCvsignoreFile;
KIntNumInput* m_compressionLevel;
KConfig& partConfig;
};
diff --git a/cervisia/annotatectl.cpp b/cervisia/annotatectl.cpp
index 31f95f84..f74735e3 100644
--- a/cervisia/annotatectl.cpp
+++ b/cervisia/annotatectl.cpp
@@ -19,8 +19,8 @@
#include "annotatectl.h"
-#include <qdatetime.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
#include <dcopref.h>
#include <klocale.h>
@@ -36,14 +36,14 @@ using namespace Cervisia;
struct AnnotateController::Private
{
- typedef QMap<QString, QString> RevisionCommentMap;
+ typedef TQMap<TQString, TQString> RevisionCommentMap;
RevisionCommentMap comments; // maps comment to a revision
CvsService_stub* cvsService;
AnnotateDialog* dialog;
ProgressDialog* progress;
- bool execute(const QString& fileName, const QString& revision);
+ bool execute(const TQString& fileName, const TQString& revision);
void parseCvsLogOutput();
void parseCvsAnnotateOutput();
};
@@ -65,7 +65,7 @@ AnnotateController::~AnnotateController()
}
-void AnnotateController::showDialog(const QString& fileName, const QString& revision)
+void AnnotateController::showDialog(const TQString& fileName, const TQString& revision)
{
if( !d->execute(fileName, revision) )
{
@@ -84,7 +84,7 @@ void AnnotateController::showDialog(const QString& fileName, const QString& revi
}
-bool AnnotateController::Private::execute(const QString& fileName, const QString& revision)
+bool AnnotateController::Private::execute(const TQString& fileName, const TQString& revision)
{
DCOPRef job = cvsService->annotate(fileName, revision);
if( !cvsService->ok() )
@@ -98,7 +98,7 @@ bool AnnotateController::Private::execute(const QString& fileName, const QString
void AnnotateController::Private::parseCvsLogOutput()
{
- QString line, comment, rev;
+ TQString line, comment, rev;
enum { Begin, Tags, Admin, Revision,
Author, Branches, Comment, Finished } state;
@@ -140,7 +140,7 @@ void AnnotateController::Private::parseCvsLogOutput()
else if( line == "=============================================================================" )
state = Finished;
if( state == Comment )
- comment += QString("\n") + line;
+ comment += TQString("\n") + line;
else
comments[rev] = comment;
break;
@@ -162,13 +162,13 @@ void AnnotateController::Private::parseCvsLogOutput()
void AnnotateController::Private::parseCvsAnnotateOutput()
{
LogInfo logInfo;
- QString rev, content, line;
- QString oldRevision = "";
+ TQString rev, content, line;
+ TQString oldRevision = "";
bool odd = false;
while( progress->getLine(line) )
{
- QString dateString = line.mid(23, 9);
+ TQString dateString = line.mid(23, 9);
if( !dateString.isEmpty() )
logInfo.m_dateTime.setTime_t(KRFCDate::parseDate(dateString), Qt::UTC);
@@ -182,8 +182,8 @@ void AnnotateController::Private::parseCvsAnnotateOutput()
if( rev == oldRevision )
{
- logInfo.m_author = QString::null;
- rev = QString::null;
+ logInfo.m_author = TQString::null;
+ rev = TQString::null;
}
else
{
diff --git a/cervisia/annotatectl.h b/cervisia/annotatectl.h
index d6b76437..eb8c98f0 100644
--- a/cervisia/annotatectl.h
+++ b/cervisia/annotatectl.h
@@ -20,7 +20,7 @@
#ifndef ANNOTATECTL_H
#define ANNOTATECTL_H
-#include <qstring.h>
+#include <tqstring.h>
class AnnotateDialog;
class CvsService_stub;
@@ -33,7 +33,7 @@ public:
AnnotateController(AnnotateDialog* dialog, CvsService_stub* cvsService);
~AnnotateController();
- void showDialog(const QString& fileName, const QString& revision = QString::null);
+ void showDialog(const TQString& fileName, const TQString& revision = TQString::null);
private:
struct Private;
diff --git a/cervisia/annotatedlg.cpp b/cervisia/annotatedlg.cpp
index 40b0d555..86b64b43 100644
--- a/cervisia/annotatedlg.cpp
+++ b/cervisia/annotatedlg.cpp
@@ -23,8 +23,8 @@
#include "annotateview.h"
-AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name)
- : KDialogBase(parent, name, false, QString::null,
+AnnotateDialog::AnnotateDialog(KConfig& cfg, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, false, TQString::null,
Close | Help, Close, true)
, partConfig(cfg)
{
@@ -35,7 +35,7 @@ AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name)
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "AnnotateDialog");
+ TQSize size = configDialogSize(partConfig, "AnnotateDialog");
resize(size);
}
@@ -47,7 +47,7 @@ AnnotateDialog::~AnnotateDialog()
void AnnotateDialog::addLine(const Cervisia::LogInfo& logInfo,
- const QString& content, bool odd)
+ const TQString& content, bool odd)
{
annotate->addLine(logInfo, content, odd);
}
diff --git a/cervisia/annotatedlg.h b/cervisia/annotatedlg.h
index 48299cf3..dda738aa 100644
--- a/cervisia/annotatedlg.h
+++ b/cervisia/annotatedlg.h
@@ -39,11 +39,11 @@ class AnnotateDialog : public KDialogBase
{
public:
- explicit AnnotateDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit AnnotateDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~AnnotateDialog();
- void addLine(const Cervisia::LogInfo& logInfo, const QString& content,
+ void addLine(const Cervisia::LogInfo& logInfo, const TQString& content,
bool odd);
private:
diff --git a/cervisia/annotateview.cpp b/cervisia/annotateview.cpp
index 594ca936..58d8d407 100644
--- a/cervisia/annotateview.cpp
+++ b/cervisia/annotateview.cpp
@@ -19,8 +19,8 @@
#include "annotateview.h"
-#include <qheader.h>
-#include <qpainter.h>
+#include <tqheader.h>
+#include <tqpainter.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -37,16 +37,16 @@ public:
enum { LineNumberColumn, AuthorColumn, ContentColumn };
AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo,
- const QString &content, bool odd, int linenumber);
+ const TQString &content, bool odd, int linenumber);
- virtual int compare(QListViewItem *item, int col, bool ascending) const;
- virtual int width(const QFontMetrics &, const QListView *, int col) const;
- virtual QString text(int col) const;
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ virtual int compare(TQListViewItem *item, int col, bool ascending) const;
+ virtual int width(const TQFontMetrics &, const TQListView *, int col) const;
+ virtual TQString text(int col) const;
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
private:
LogInfo m_logInfo;
- QString m_content;
+ TQString m_content;
bool m_odd;
int m_lineNumber;
friend class AnnotateView;
@@ -59,8 +59,8 @@ const int AnnotateViewItem::BORDER = 4;
AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo,
- const QString &content, bool odd, int linenumber)
- : QListViewItem(parent)
+ const TQString &content, bool odd, int linenumber)
+ : TQListViewItem(parent)
, m_logInfo(logInfo)
, m_content(content)
, m_odd(odd)
@@ -68,7 +68,7 @@ AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo,
{}
-int AnnotateViewItem::compare(QListViewItem *item, int, bool) const
+int AnnotateViewItem::compare(TQListViewItem *item, int, bool) const
{
int linenum1 = m_lineNumber;
int linenum2 = static_cast<AnnotateViewItem*>(item)->m_lineNumber;
@@ -77,30 +77,30 @@ int AnnotateViewItem::compare(QListViewItem *item, int, bool) const
}
-QString AnnotateViewItem::text(int col) const
+TQString AnnotateViewItem::text(int col) const
{
switch (col)
{
case LineNumberColumn:
- return QString::number(m_lineNumber);
+ return TQString::number(m_lineNumber);
case AuthorColumn:
if( m_logInfo.m_author.isNull() )
- return QString::null;
+ return TQString::null;
else
- return (m_logInfo.m_author + QChar(' ') + m_logInfo.m_revision);
+ return (m_logInfo.m_author + TQChar(' ') + m_logInfo.m_revision);
case ContentColumn:
return m_content;
default:
;
};
- return QString::null;
+ return TQString::null;
}
-void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int width, int align)
+void AnnotateViewItem::paintCell(TQPainter *p, const TQColorGroup &, int col, int width, int align)
{
- QColor backgroundColor;
+ TQColor backgroundColor;
switch (col)
{
@@ -117,7 +117,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int
p->fillRect(0, 0, width, height(), backgroundColor);
- QString str = text(col);
+ TQString str = text(col);
if (str.isEmpty())
return;
@@ -129,7 +129,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int
-int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) const
+int AnnotateViewItem::width(const TQFontMetrics &fm, const TQListView *, int col) const
{
return fm.width(text(col)) + 2*BORDER;
}
@@ -137,30 +137,30 @@ int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col)
/*!
@todo The dummy column (remaining space eater) doesn't work
- caused by a bug in QHeader::adjustHeaderSize() in Qt <= 3.0.4.
+ caused by a bug in TQHeader::adjustHeaderSize() in Qt <= 3.0.4.
*/
-AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name)
- : QListView(parent, name, WRepaintNoErase | WResizeNoErase)
+AnnotateView::AnnotateView(KConfig &cfg, TQWidget *parent, const char *name)
+ : TQListView(parent, name, WRepaintNoErase | WResizeNoErase)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
setAllColumnsShowFocus(true);
setShowToolTips(false);
setSelectionMode(NoSelection);
header()->hide();
// setResizeMode(LastColumn);
- addColumn(QString::null);
- addColumn(QString::null);
- addColumn(QString::null);
+ addColumn(TQString::null);
+ addColumn(TQString::null);
+ addColumn(TQString::null);
setSorting(AnnotateViewItem::LineNumberColumn);
setColumnAlignment(AnnotateViewItem::LineNumberColumn, Qt::AlignRight);
ToolTip* toolTip = new ToolTip(viewport());
- connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)),
- this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&)));
+ connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)),
+ this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&)));
KConfigGroupSaver cs(&cfg, "LookAndFeel");
setFont(cfg.readFontEntry("AnnotateFont"));
@@ -168,23 +168,23 @@ AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name)
-void AnnotateView::addLine(const LogInfo& logInfo, const QString& content,
+void AnnotateView::addLine(const LogInfo& logInfo, const TQString& content,
bool odd)
{
new AnnotateViewItem(this, logInfo, content, odd, childCount()+1);
}
-QSize AnnotateView::sizeHint() const
+TQSize AnnotateView::sizeHint() const
{
- QFontMetrics fm(fontMetrics());
- return QSize(100 * fm.width("0"), 10 * fm.lineSpacing());
+ TQFontMetrics fm(fontMetrics());
+ return TQSize(100 * fm.width("0"), 10 * fm.lineSpacing());
}
-void AnnotateView::slotQueryToolTip(const QPoint& viewportPos,
- QRect& viewportRect,
- QString& text)
+void AnnotateView::slotQueryToolTip(const TQPoint& viewportPos,
+ TQRect& viewportRect,
+ TQString& text)
{
if (const AnnotateViewItem* item = static_cast<AnnotateViewItem*>(itemAt(viewportPos)))
{
diff --git a/cervisia/annotateview.h b/cervisia/annotateview.h
index be74d430..f0ae7e21 100644
--- a/cervisia/annotateview.h
+++ b/cervisia/annotateview.h
@@ -22,7 +22,7 @@
#define ANNOTATEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
class KConfig;
@@ -40,16 +40,16 @@ class AnnotateView : public QListView
public:
- explicit AnnotateView( KConfig &cfg, QWidget *parent=0, const char *name=0 );
+ explicit AnnotateView( KConfig &cfg, TQWidget *parent=0, const char *name=0 );
- void addLine(const Cervisia::LogInfo& logInfo, const QString& content,
+ void addLine(const Cervisia::LogInfo& logInfo, const TQString& content,
bool odd);
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
private slots:
- void slotQueryToolTip(const QPoint&, QRect&, QString&);
+ void slotQueryToolTip(const TQPoint&, TQRect&, TQString&);
};
diff --git a/cervisia/cervisiapart.cpp b/cervisia/cervisiapart.cpp
index 56b37ece..df166d7a 100644
--- a/cervisia/cervisiapart.cpp
+++ b/cervisia/cervisiapart.cpp
@@ -18,12 +18,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qmessagebox.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqmessagebox.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
+#include <tqtooltip.h>
#include <kaboutdata.h>
#include <kaction.h>
#include <kapplication.h>
@@ -80,8 +80,8 @@ using Cervisia::TagDialog;
K_EXPORT_COMPONENT_FACTORY( libcervisiapart, CervisiaFactory )
-CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList& /*args*/ )
+CervisiaPart::CervisiaPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList& /*args*/ )
: KParts::ReadOnlyPart( parent, name )
, hasRunningJob( false )
, opt_hideFiles( false )
@@ -109,9 +109,9 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
m_browserExt = new CervisiaBrowserExtension( this );
// start the cvs DCOP service
- QString error;
- QCString appId;
- if( KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, &appId) )
+ TQString error;
+ TQCString appId;
+ if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) )
{
KMessageBox::sorry(0, i18n("Starting cvsservice failed with message: ") +
error, "Cervisia");
@@ -125,31 +125,31 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
conf->setGroup("LookAndFeel");
bool splitHorz = conf->readBoolEntry("SplitHorizontally",true);
- // When we couldn't start the DCOP service, we just display a QLabel with
+ // When we couldn't start the DCOP service, we just display a TQLabel with
// an explaination
if( cvsService )
{
- Orientation o = splitHorz ? QSplitter::Vertical
- : QSplitter::Horizontal;
- splitter = new QSplitter(o, parentWidget, widgetName);
+ Orientation o = splitHorz ? TQSplitter::Vertical
+ : TQSplitter::Horizontal;
+ splitter = new TQSplitter(o, parentWidget, widgetName);
// avoid PartManager's warning that Part's window can't handle focus
- splitter->setFocusPolicy( QWidget::StrongFocus );
+ splitter->setFocusPolicy( TQWidget::StrongFocus );
update = new UpdateView(*config(), splitter);
- update->setFocusPolicy( QWidget::StrongFocus );
+ update->setFocusPolicy( TQWidget::StrongFocus );
update->setFocus();
- connect( update, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(popupRequested(KListView*, QListViewItem*, const QPoint&)) );
- connect( update, SIGNAL(fileOpened(QString)),
- this, SLOT(openFile(QString)) );
+ connect( update, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(popupRequested(KListView*, TQListViewItem*, const TQPoint&)) );
+ connect( update, TQT_SIGNAL(fileOpened(TQString)),
+ this, TQT_SLOT(openFile(TQString)) );
protocol = new ProtocolView(appId, splitter);
- protocol->setFocusPolicy( QWidget::StrongFocus );
+ protocol->setFocusPolicy( TQWidget::StrongFocus );
setWidget(splitter);
}
else
- setWidget(new QLabel(i18n("This KPart is non-functional, because the "
+ setWidget(new TQLabel(i18n("This KPart is non-functional, because the "
"cvs DCOP service could not be started."),
parentWidget));
@@ -157,12 +157,12 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName,
{
setupActions();
readSettings();
- connect( update, SIGNAL( selectionChanged() ), this, SLOT( updateActions() ) );
+ connect( update, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateActions() ) );
}
setXMLFile( "cervisiaui.rc" );
- QTimer::singleShot(0, this, SLOT(slotSetupStatusBar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSetupStatusBar()));
}
CervisiaPart::~CervisiaPart()
@@ -212,10 +212,10 @@ bool CervisiaPart::openURL( const KURL &u )
void CervisiaPart::slotSetupStatusBar()
{
// create the active filter indicator and add it to the statusbar
- filterLabel = new QLabel("UR", m_statusBar->statusBar());
+ filterLabel = new TQLabel("UR", m_statusBar->statusBar());
filterLabel->setFixedSize(filterLabel->sizeHint());
filterLabel->setText("");
- QToolTip::add(filterLabel,
+ TQToolTip::add(filterLabel,
i18n("F - All files are hidden, the tree shows only folders\n"
"N - All up-to-date files are hidden\n"
"R - All removed files are hidden"));
@@ -225,7 +225,7 @@ void CervisiaPart::slotSetupStatusBar()
void CervisiaPart::setupActions()
{
KAction *action;
- QString hint;
+ TQString hint;
actionCollection()->setHighlightingEnabled(true);
@@ -233,81 +233,81 @@ void CervisiaPart::setupActions()
// File Menu
//
action = new KAction( i18n("O&pen Sandbox..."), "fileopen", CTRL+Key_O,
- this, SLOT( slotOpenSandbox() ),
+ this, TQT_SLOT( slotOpenSandbox() ),
actionCollection(), "file_open" );
hint = i18n("Opens a CVS working folder in the main window");
action->setToolTip( hint );
action->setWhatsThis( hint );
recent = new KRecentFilesAction( i18n("Recent Sandboxes"), 0,
- this, SLOT( openURL( const KURL & ) ),
+ this, TQT_SLOT( openURL( const KURL & ) ),
actionCollection(), "file_open_recent" );
action = new KAction( i18n("&Insert ChangeLog Entry..."), 0,
- this, SLOT( slotChangeLog() ),
+ this, TQT_SLOT( slotChangeLog() ),
actionCollection(), "insert_changelog_entry" );
hint = i18n("Inserts a new intro into the file ChangeLog in the toplevel folder");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Update"), "vcs_update", CTRL+Key_U,
- this, SLOT( slotUpdate() ),
+ this, TQT_SLOT( slotUpdate() ),
actionCollection(), "file_update" );
hint = i18n("Updates (cvs update) the selected files and folders");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Status"), "vcs_status", Key_F5,
- this, SLOT( slotStatus() ),
+ this, TQT_SLOT( slotStatus() ),
actionCollection(), "file_status" );
hint = i18n("Updates the status (cvs -n update) of the selected files and folders");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Edit"), 0,
- this, SLOT( slotOpen() ),
+ this, TQT_SLOT( slotOpen() ),
actionCollection(), "file_edit" );
hint = i18n("Opens the marked file for editing");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Reso&lve..."), 0,
- this, SLOT( slotResolve() ),
+ this, TQT_SLOT( slotResolve() ),
actionCollection(), "file_resolve" );
hint = i18n("Opens the resolve dialog with the selected file");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Commit..."), "vcs_commit", Key_NumberSign,
- this, SLOT( slotCommit() ),
+ this, TQT_SLOT( slotCommit() ),
actionCollection(), "file_commit" );
hint = i18n("Commits the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Add to Repository..."), "vcs_add", Key_Insert,
- this, SLOT( slotAdd() ),
+ this, TQT_SLOT( slotAdd() ),
actionCollection(), "file_add" );
hint = i18n("Adds (cvs add) the selected files to the repository");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Add &Binary..."), 0,
- this, SLOT( slotAddBinary() ),
+ this, TQT_SLOT( slotAddBinary() ),
actionCollection(), "file_add_binary" );
hint = i18n("Adds (cvs -kb add) the selected files as binaries to the repository");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Remove From Repository..."), "vcs_remove", Key_Delete,
- this, SLOT( slotRemove() ),
+ this, TQT_SLOT( slotRemove() ),
actionCollection(), "file_remove" );
hint = i18n("Removes (cvs remove) the selected files from the repository");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Rever&t"), 0,
- this, SLOT( slotRevert() ),
+ this, TQT_SLOT( slotRevert() ),
actionCollection(), "file_revert_local_changes" );
hint = i18n("Reverts (cvs update -C) the selected files (only cvs 1.11)");
action->setToolTip( hint );
@@ -315,14 +315,14 @@ void CervisiaPart::setupActions()
// context menu only
action = new KAction( i18n("&Properties"), 0,
- this, SLOT( slotFileProperties() ),
+ this, TQT_SLOT( slotFileProperties() ),
actionCollection(), "file_properties" );
//
// View Menu
//
action = new KAction( i18n("Stop"), "stop", Key_Escape,
- protocol, SLOT(cancelJob()),
+ protocol, TQT_SLOT(cancelJob()),
actionCollection(), "stop_job" );
action->setEnabled( false );
hint = i18n("Stops any running sub-processes");
@@ -331,7 +331,7 @@ void CervisiaPart::setupActions()
action = new KAction( i18n("Browse &Log..."), CTRL+Key_L,
- this, SLOT(slotBrowseLog()),
+ this, TQT_SLOT(slotBrowseLog()),
actionCollection(), "view_log" );
hint = i18n("Shows the revision tree of the selected file");
action->setToolTip( hint );
@@ -339,46 +339,46 @@ void CervisiaPart::setupActions()
#if 0
action = new KAction( i18n("Browse Multi-File Log..."), 0,
- this, SLOT(slotBrowseMultiLog()),
+ this, TQT_SLOT(slotBrowseMultiLog()),
actionCollection() );
#endif
action = new KAction( i18n("&Annotate..."), CTRL+Key_A,
- this, SLOT(slotAnnotate()),
+ this, TQT_SLOT(slotAnnotate()),
actionCollection(), "view_annotate" );
hint = i18n("Shows a blame-annotated view of the selected file");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Difference to Repository (BASE)..."), "vcs_diff", CTRL+Key_D,
- this, SLOT(slotDiffBase()),
+ this, TQT_SLOT(slotDiffBase()),
actionCollection(), "view_diff_base" );
hint = i18n("Shows the differences of the selected file to the checked out version (tag BASE)");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Difference to Repository (HEAD)..."), "vcs_diff", CTRL+Key_H,
- this, SLOT(slotDiffHead()),
+ this, TQT_SLOT(slotDiffHead()),
actionCollection(), "view_diff_head" );
hint = i18n("Shows the differences of the selected file to the newest version in the repository (tag HEAD)");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Last &Change..."), 0,
- this, SLOT(slotLastChange()),
+ this, TQT_SLOT(slotLastChange()),
actionCollection(), "view_last_change" );
hint = i18n("Shows the differences between the last two revisions of the selected file");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&History..."), 0,
- this, SLOT(slotHistory()),
+ this, TQT_SLOT(slotHistory()),
actionCollection(), "view_history" );
hint = i18n("Shows the CVS history as reported by the server");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Unfold File Tree"), 0,
- this , SLOT(slotUnfoldTree()),
+ this , TQT_SLOT(slotUnfoldTree()),
actionCollection(), "view_unfold_tree" );
hint = i18n("Opens all branches of the file tree");
@@ -386,7 +386,7 @@ void CervisiaPart::setupActions()
action->setWhatsThis( hint );
action = new KAction( i18n("&Fold File Tree"), 0,
- this, SLOT(slotFoldTree()),
+ this, TQT_SLOT(slotFoldTree()),
actionCollection(), "view_fold_tree" );
hint = i18n("Closes all branches of the file tree");
action->setToolTip( hint );
@@ -396,98 +396,98 @@ void CervisiaPart::setupActions()
// Advanced Menu
//
action = new KAction( i18n("&Tag/Branch..."), 0,
- this, SLOT(slotCreateTag()),
+ this, TQT_SLOT(slotCreateTag()),
actionCollection(), "create_tag" );
hint = i18n("Creates a tag or branch for the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Delete Tag..."), 0,
- this, SLOT(slotDeleteTag()),
+ this, TQT_SLOT(slotDeleteTag()),
actionCollection(), "delete_tag" );
hint = i18n("Deletes a tag from the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Update to Tag/Date..."), 0,
- this, SLOT(slotUpdateToTag()),
+ this, TQT_SLOT(slotUpdateToTag()),
actionCollection(), "update_to_tag" );
hint = i18n("Updates the selected files to a given tag, branch or date");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Update to &HEAD"), 0,
- this, SLOT(slotUpdateToHead()),
+ this, TQT_SLOT(slotUpdateToHead()),
actionCollection(), "update_to_head" );
hint = i18n("Updates the selected files to the HEAD revision");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Merge..."), 0,
- this, SLOT(slotMerge()),
+ this, TQT_SLOT(slotMerge()),
actionCollection(), "merge" );
hint = i18n("Merges a branch or a set of modifications into the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Add Watch..."), 0,
- this, SLOT(slotAddWatch()),
+ this, TQT_SLOT(slotAddWatch()),
actionCollection(), "add_watch" );
hint = i18n("Adds a watch for the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Remove Watch..."), 0,
- this, SLOT(slotRemoveWatch()),
+ this, TQT_SLOT(slotRemoveWatch()),
actionCollection(), "remove_watch" );
hint = i18n("Removes a watch from the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Show &Watchers"), 0,
- this, SLOT(slotShowWatchers()),
+ this, TQT_SLOT(slotShowWatchers()),
actionCollection(), "show_watchers" );
hint = i18n("Shows the watchers of the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Ed&it Files"), 0,
- this, SLOT(slotEdit()),
+ this, TQT_SLOT(slotEdit()),
actionCollection(), "edit_files" );
hint = i18n("Edits (cvs edit) the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("U&nedit Files"), 0,
- this, SLOT(slotUnedit()),
+ this, TQT_SLOT(slotUnedit()),
actionCollection(), "unedit_files" );
hint = i18n("Unedits (cvs unedit) the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Show &Editors"), 0,
- this, SLOT(slotShowEditors()),
+ this, TQT_SLOT(slotShowEditors()),
actionCollection(), "show_editors" );
hint = i18n("Shows the editors of the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Lock Files"), 0,
- this, SLOT(slotLock()),
+ this, TQT_SLOT(slotLock()),
actionCollection(), "lock_files" );
hint = i18n("Locks the selected files, so that others cannot modify them");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Unl&ock Files"), 0,
- this, SLOT(slotUnlock()),
+ this, TQT_SLOT(slotUnlock()),
actionCollection(), "unlock_files" );
hint = i18n("Unlocks the selected files");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Create &Patch Against Repository..."), 0,
- this, SLOT(slotMakePatch()),
+ this, TQT_SLOT(slotMakePatch()),
actionCollection(), "make_patch" );
hint = i18n("Creates a patch from the modifications in your sandbox");
action->setToolTip( hint );
@@ -497,25 +497,25 @@ void CervisiaPart::setupActions()
// Repository Menu
//
action = new KAction( i18n("&Create..."), 0,
- this, SLOT(slotCreateRepository()),
+ this, TQT_SLOT(slotCreateRepository()),
actionCollection(), "repository_create" );
action = new KAction( i18n("&Checkout..."), 0,
- this, SLOT(slotCheckout()),
+ this, TQT_SLOT(slotCheckout()),
actionCollection(), "repository_checkout" );
hint = i18n("Allows you to checkout a module from a repository");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Import..."), 0,
- this, SLOT(slotImport()),
+ this, TQT_SLOT(slotImport()),
actionCollection(), "repository_import" );
hint = i18n("Allows you to import a module into a repository");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("&Repositories..."), 0,
- this, SLOT(slotRepositories()),
+ this, TQT_SLOT(slotRepositories()),
actionCollection(), "show_repositories" );
hint = i18n("Configures a list of repositories you regularly use");
action->setToolTip( hint );
@@ -525,7 +525,7 @@ void CervisiaPart::setupActions()
// Settings menu
//
KToggleAction* toggaction = new KToggleAction( i18n("Hide All &Files"), 0,
- this, SLOT(slotHideFiles()),
+ this, TQT_SLOT(slotHideFiles()),
actionCollection(), "settings_hide_files" );
toggaction->setCheckedState(i18n("Show All &Files"));
hint = i18n("Determines whether only folders are shown");
@@ -533,7 +533,7 @@ void CervisiaPart::setupActions()
toggaction->setWhatsThis( hint );
toggaction = new KToggleAction( i18n("Hide Unmodified Files"), 0,
- this, SLOT(slotHideUpToDate()),
+ this, TQT_SLOT(slotHideUpToDate()),
actionCollection(), "settings_hide_uptodate" );
toggaction->setCheckedState(i18n("Show Unmodified Files"));
hint = i18n("Determines whether files with status up-to-date or "
@@ -542,7 +542,7 @@ void CervisiaPart::setupActions()
toggaction->setWhatsThis( hint );
toggaction = new KToggleAction( i18n("Hide Removed Files"), 0,
- this, SLOT(slotHideRemoved()),
+ this, TQT_SLOT(slotHideRemoved()),
actionCollection(), "settings_hide_removed" );
toggaction->setCheckedState(i18n("Show Removed Files"));
hint = i18n("Determines whether removed files are hidden");
@@ -550,7 +550,7 @@ void CervisiaPart::setupActions()
toggaction->setWhatsThis( hint );
toggaction = new KToggleAction( i18n("Hide Non-CVS Files"), 0,
- this, SLOT(slotHideNotInCVS()),
+ this, TQT_SLOT(slotHideNotInCVS()),
actionCollection(), "settings_hide_notincvs" );
toggaction->setCheckedState(i18n("Show Non-CVS Files"));
hint = i18n("Determines whether files not in CVS are hidden");
@@ -558,7 +558,7 @@ void CervisiaPart::setupActions()
toggaction->setWhatsThis( hint );
toggaction = new KToggleAction( i18n("Hide Empty Folders"), 0,
- this, SLOT(slotHideEmptyDirectories()),
+ this, TQT_SLOT(slotHideEmptyDirectories()),
actionCollection(), "settings_hide_empty_directories" );
toggaction->setCheckedState(i18n("Show Empty Folders"));
hint = i18n("Determines whether folders without visible entries are hidden");
@@ -566,42 +566,42 @@ void CervisiaPart::setupActions()
toggaction->setWhatsThis( hint );
action = new KToggleAction( i18n("Create &Folders on Update"), 0,
- this, SLOT(slotCreateDirs()),
+ this, TQT_SLOT(slotCreateDirs()),
actionCollection(), "settings_create_dirs" );
hint = i18n("Determines whether updates create folders");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KToggleAction( i18n("&Prune Empty Folders on Update"), 0,
- this, SLOT(slotPruneDirs()),
+ this, TQT_SLOT(slotPruneDirs()),
actionCollection(), "settings_prune_dirs" );
hint = i18n("Determines whether updates remove empty folders");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KToggleAction( i18n("&Update Recursively"), 0,
- this, SLOT(slotUpdateRecursive()),
+ this, TQT_SLOT(slotUpdateRecursive()),
actionCollection(), "settings_update_recursively" );
hint = i18n("Determines whether updates are recursive");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KToggleAction( i18n("C&ommit && Remove Recursively"), 0,
- this, SLOT(slotCommitRecursive()),
+ this, TQT_SLOT(slotCommitRecursive()),
actionCollection(), "settings_commit_recursively" );
hint = i18n("Determines whether commits and removes are recursive");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KToggleAction( i18n("Do cvs &edit Automatically When Necessary"), 0,
- this, SLOT(slotDoCVSEdit()),
+ this, TQT_SLOT(slotDoCVSEdit()),
actionCollection(), "settings_do_cvs_edit" );
hint = i18n("Determines whether automatic cvs editing is active");
action->setToolTip( hint );
action->setWhatsThis( hint );
action = new KAction( i18n("Configure Cervisia..."), "configure", 0,
- this, SLOT(slotConfigure()),
+ this, TQT_SLOT(slotConfigure()),
actionCollection(), "configure_cervisia" );
hint = i18n("Allows you to configure the Cervisia KPart");
action->setToolTip( hint );
@@ -610,11 +610,11 @@ void CervisiaPart::setupActions()
//
// Help Menu
//
- action = KStdAction::help( this, SLOT(slotHelp()),
+ action = KStdAction::help( this, TQT_SLOT(slotHelp()),
actionCollection() );
action = new KAction( i18n("CVS &Manual"), 0,
- this, SLOT(slotCVSInfo()),
+ this, TQT_SLOT(slotCVSInfo()),
actionCollection(), "help_cvs_manual" );
hint = i18n("Opens the help browser with the CVS documentation");
action->setToolTip( hint );
@@ -624,18 +624,18 @@ void CervisiaPart::setupActions()
// Folder context menu
//
toggaction = new KToggleAction( i18n("Unfold Folder"), 0,
- this, SLOT( slotUnfoldFolder() ),
+ this, TQT_SLOT( slotUnfoldFolder() ),
actionCollection(), "unfold_folder" );
toggaction->setCheckedState(i18n("Fold Folder"));
- //action = KStdAction::aboutApp( this, SLOT(aboutCervisia()),
+ //action = KStdAction::aboutApp( this, TQT_SLOT(aboutCervisia()),
// actionCollection(), "help_about_cervisia" );
}
-void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& p)
+void CervisiaPart::popupRequested(KListView*, TQListViewItem* item, const TQPoint& p)
{
- QString xmlName = "context_popup";
+ TQString xmlName = "context_popup";
if( isDirItem(item) && update->fileSelection().isEmpty() )
{
@@ -644,7 +644,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint&
action->setChecked(item->isOpen());
}
- if( QPopupMenu* popup = static_cast<QPopupMenu*>(hostContainer(xmlName)) )
+ if( TQPopupMenu* popup = static_cast<TQPopupMenu*>(hostContainer(xmlName)) )
{
if( isFileItem(item) )
{
@@ -659,7 +659,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint&
}
// get name of selected file
- QString selectedFile;
+ TQString selectedFile;
update->getSingleSelection(&selectedFile);
if( !selectedFile.isEmpty() )
@@ -710,7 +710,7 @@ void CervisiaPart::updateActions()
void CervisiaPart::aboutCervisia()
{
- QString aboutstr(i18n("Cervisia %1\n"
+ TQString aboutstr(i18n("Cervisia %1\n"
"(Using KDE %2)\n"
"\n"
"Copyright (c) 1999-2002\n"
@@ -725,7 +725,7 @@ void CervisiaPart::aboutCervisia()
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"See the ChangeLog file for a list of contributors."));
- QMessageBox::about(0, i18n("About Cervisia"),
+ TQMessageBox::about(0, i18n("About Cervisia"),
aboutstr.arg(CERVISIA_VERSION).arg(KDE_VERSION_STRING));
}
@@ -755,7 +755,7 @@ KAboutData* CervisiaPart::createAboutData()
void CervisiaPart::slotOpenSandbox()
{
- QString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(),
+ TQString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(),
i18n("Open Sandbox"));
if (dirname.isEmpty())
return;
@@ -778,34 +778,34 @@ void CervisiaPart::slotChangeLog()
void CervisiaPart::slotOpen()
{
- QStringList filenames = update->fileSelection();
+ TQStringList filenames = update->fileSelection();
if (filenames.isEmpty())
return;
openFiles(filenames);
}
-void CervisiaPart::openFile(QString filename)
+void CervisiaPart::openFile(TQString filename)
{
- QStringList files;
+ TQStringList files;
files << filename;
openFiles(files);
}
-void CervisiaPart::openFiles(const QStringList &filenames)
+void CervisiaPart::openFiles(const TQStringList &filenames)
{
// call cvs edit automatically?
if( opt_doCVSEdit )
{
- QStringList files;
+ TQStringList files;
// only edit read-only files
- QStringList::ConstIterator it = filenames.begin();
- QStringList::ConstIterator end = filenames.end();
+ TQStringList::ConstIterator it = filenames.begin();
+ TQStringList::ConstIterator end = filenames.end();
for( ; it != end; ++it )
{
- if( !QFileInfo(*it).isWritable() )
+ if( !TQFileInfo(*it).isWritable() )
files << *it;
}
@@ -820,10 +820,10 @@ void CervisiaPart::openFiles(const QStringList &filenames)
}
// Now open the files by using KRun
- QDir dir(sandbox);
+ TQDir dir(sandbox);
- QStringList::ConstIterator it = filenames.begin();
- QStringList::ConstIterator end = filenames.end();
+ TQStringList::ConstIterator it = filenames.begin();
+ TQStringList::ConstIterator end = filenames.end();
for( ; it != end; ++it )
{
KURL u;
@@ -836,7 +836,7 @@ void CervisiaPart::openFiles(const QStringList &filenames)
void CervisiaPart::slotResolve()
{
- QString filename;
+ TQString filename;
update->getSingleSelection(&filename);
if (filename.isEmpty())
return;
@@ -858,14 +858,14 @@ void CervisiaPart::slotUpdate()
void CervisiaPart::slotStatus()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
// Bug #105097: Embedded in Konqueror, all Cervisia tabs share
// a common current directory. This confuses UpdateView. That's
// why we always change the current directory here.
- QDir::setCurrent(sandbox);
+ TQDir::setCurrent(sandbox);
update->prepareJob(opt_updateRecursive, UpdateView::UpdateNoAct);
@@ -873,17 +873,17 @@ void CervisiaPart::slotStatus()
opt_createDirs, opt_pruneDirs);
// get command line from cvs job
- QString cmdline;
+ TQString cmdline;
DCOPReply reply = cvsJob.call("cvsCommand()");
if( reply.isValid() )
- reply.get<QString>(cmdline);
+ reply.get<TQString>(cmdline);
if( protocol->startJob(true) )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) );
}
}
@@ -894,7 +894,7 @@ void CervisiaPart::slotUpdateToTag()
if (l->exec())
{
- QString tagopt;
+ TQString tagopt;
if (l->byTag())
{
tagopt = "-r ";
@@ -930,7 +930,7 @@ void CervisiaPart::slotMerge()
if (dlg.exec())
{
- QString tagopt;
+ TQString tagopt;
if (dlg.byBranch())
{
tagopt = "-j ";
@@ -951,7 +951,7 @@ void CervisiaPart::slotMerge()
void CervisiaPart::slotCommit()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
@@ -968,7 +968,7 @@ void CervisiaPart::slotCommit()
if( list.isEmpty() )
return;
- QString msg = dlg.logMessage();
+ TQString msg = dlg.logMessage();
if( !recentCommits.contains( msg ) )
{
recentCommits.prepend( msg );
@@ -986,14 +986,14 @@ void CervisiaPart::slotCommit()
opt_commitRecursive);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
m_jobType = Commit;
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) );
}
}
}
@@ -1019,13 +1019,13 @@ void CervisiaPart::slotRemove()
void CervisiaPart::slotFileProperties()
{
- QString filename;
+ TQString filename;
update->getSingleSelection(&filename);
if( filename.isEmpty() )
return;
// Create URL from selected filename
- QDir dir(sandbox);
+ TQDir dir(sandbox);
KURL u;
u.setPath(dir.absFilePath(filename));
@@ -1035,16 +1035,16 @@ void CervisiaPart::slotFileProperties()
}
-void CervisiaPart::updateSandbox(const QString &extraopt)
+void CervisiaPart::updateSandbox(const TQString &extraopt)
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
// Bug #105097: Embedded in Konqueror, all Cervisia tabs share
// a common current directory. This confuses UpdateView. That's
// why we always change the current directory here.
- QDir::setCurrent(sandbox);
+ TQDir::setCurrent(sandbox);
update->prepareJob(opt_updateRecursive, UpdateView::Update);
@@ -1052,24 +1052,24 @@ void CervisiaPart::updateSandbox(const QString &extraopt)
opt_createDirs, opt_pruneDirs, extraopt);
// get command line from cvs job
- QString cmdline;
+ TQString cmdline;
DCOPReply reply = cvsJob.call("cvsCommand()");
if( reply.isValid() )
- reply.get<QString>(cmdline);
+ reply.get<TQString>(cmdline);
if( protocol->startJob(true) )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) );
}
}
void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action)
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
@@ -1100,25 +1100,25 @@ void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action)
}
// get command line from cvs job
- QString cmdline;
+ TQString cmdline;
DCOPReply reply = cvsJob.call("cvsCommand()");
if( reply.isValid() )
- reply.get<QString>(cmdline);
+ reply.get<TQString>(cmdline);
if (protocol->startJob())
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- update, SLOT(finishJob(bool, int)) );
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ update, TQT_SLOT(finishJob(bool, int)) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
}
void CervisiaPart::slotBrowseLog()
{
- QString filename;
+ TQString filename;
update->getSingleSelection(&filename);
if (filename.isEmpty())
return;
@@ -1135,7 +1135,7 @@ void CervisiaPart::slotBrowseLog()
#if 0
void CervisiaPart::slotBrowseMultiLog()
{
- QStrList list = update->multipleSelection();
+ TQStrList list = update->multipleSelection();
if (!list.isEmpty())
{
// Non-modal dialog
@@ -1151,7 +1151,7 @@ void CervisiaPart::slotBrowseMultiLog()
void CervisiaPart::slotAnnotate()
{
- QString filename;
+ TQString filename;
update->getSingleSelection(&filename);
if (filename.isEmpty())
@@ -1166,13 +1166,13 @@ void CervisiaPart::slotAnnotate()
void CervisiaPart::slotDiffBase()
{
- showDiff(QString::fromLatin1("BASE"));
+ showDiff(TQString::fromLatin1("BASE"));
}
void CervisiaPart::slotDiffHead()
{
- showDiff(QString::fromLatin1("HEAD"));
+ showDiff(TQString::fromLatin1("HEAD"));
}
@@ -1190,7 +1190,7 @@ void CervisiaPart::slotRemoveWatch()
void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action)
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
@@ -1206,13 +1206,13 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action)
cvsJob = cvsService->removeWatch(list, dlg.events());
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
}
@@ -1220,7 +1220,7 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action)
void CervisiaPart::slotShowWatchers()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
@@ -1235,100 +1235,100 @@ void CervisiaPart::slotShowWatchers()
void CervisiaPart::slotEdit()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
DCOPRef cvsJob = cvsService->edit(list);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
void CervisiaPart::slotUnedit()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
DCOPRef cvsJob = cvsService->unedit(list);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
void CervisiaPart::slotLock()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
DCOPRef cvsJob = cvsService->lock(list);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
void CervisiaPart::slotUnlock()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
DCOPRef cvsJob = cvsService->unlock(list);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
void CervisiaPart::slotShowEditors()
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
DCOPRef cvsJob = cvsService->editors(list);
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
@@ -1339,8 +1339,8 @@ void CervisiaPart::slotMakePatch()
if( optionDlg.exec() == KDialogBase::Rejected )
return;
- QString format = optionDlg.formatOption();
- QString diffOptions = optionDlg.diffOptions();
+ TQString format = optionDlg.formatOption();
+ TQString diffOptions = optionDlg.diffOptions();
DCOPRef job = cvsService->makePatch(diffOptions, format);
if( !cvsService->ok() )
@@ -1350,14 +1350,14 @@ void CervisiaPart::slotMakePatch()
if( !dlg.execute() )
return;
- QString fileName = KFileDialog::getSaveFileName();
+ TQString fileName = KFileDialog::getSaveFileName();
if( fileName.isEmpty() )
return;
if( !Cervisia::CheckOverwrite(fileName) )
return;
- QFile f(fileName);
+ TQFile f(fileName);
if( !f.open(IO_WriteOnly) )
{
KMessageBox::sorry(widget(),
@@ -1366,8 +1366,8 @@ void CervisiaPart::slotMakePatch()
return;
}
- QTextStream t(&f);
- QString line;
+ TQTextStream t(&f);
+ TQString line;
while( dlg.getLine(line) )
t << line << '\n';
@@ -1389,13 +1389,13 @@ void CervisiaPart::slotImport()
dlg.useModificationTime());
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
@@ -1409,13 +1409,13 @@ void CervisiaPart::slotCreateRepository()
DCOPRef cvsJob = cvsService->createRepository(dlg.directory());
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
@@ -1432,13 +1432,13 @@ void CervisiaPart::slotCheckout()
dlg.alias(), dlg.exportOnly(), dlg.recursive());
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
@@ -1464,7 +1464,7 @@ void CervisiaPart::slotDeleteTag()
void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action)
{
- QStringList list = update->multipleSelection();
+ TQStringList list = update->multipleSelection();
if (list.isEmpty())
return;
@@ -1482,13 +1482,13 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action)
dlg.forceTag());
// get command line from cvs job
- QString cmdline = cvsJob.call("cvsCommand()");
+ TQString cmdline = cvsJob.call("cvsCommand()");
if( protocol->startJob() )
{
showJobStart(cmdline);
- connect( protocol, SIGNAL(jobFinished(bool, int)),
- this, SLOT(slotJobFinished()) );
+ connect( protocol, TQT_SIGNAL(jobFinished(bool, int)),
+ this, TQT_SLOT(slotJobFinished()) );
}
}
}
@@ -1497,7 +1497,7 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action)
void CervisiaPart::slotLastChange()
{
- QString filename, revA, revB;
+ TQString filename, revA, revB;
update->getSingleSelection(&filename, &revA);
if (filename.isEmpty())
return;
@@ -1520,7 +1520,7 @@ void CervisiaPart::slotLastChange()
return;
}
revB = revA.left(pos+1);
- revB += QString::number(lastnumber-1);
+ revB += TQString::number(lastnumber-1);
// Non-modal dialog
DiffDialog *l = new DiffDialog(*config());
@@ -1635,25 +1635,25 @@ void CervisiaPart::slotConfigure()
conf->setGroup("LookAndFeel");
bool splitHorz = conf->readBoolEntry("SplitHorizontally",true);
splitter->setOrientation( splitHorz ?
- QSplitter::Vertical :
- QSplitter::Horizontal);
+ TQSplitter::Vertical :
+ TQSplitter::Horizontal);
}
void CervisiaPart::slotHelp()
{
emit setStatusBarText( i18n("Invoking help on Cervisia") );
- KApplication::startServiceByDesktopName("khelpcenter", QString("help:/cervisia/index.html"));
+ KApplication::startServiceByDesktopName("khelpcenter", TQString("help:/cervisia/index.html"));
}
void CervisiaPart::slotCVSInfo()
{
emit setStatusBarText( i18n("Invoking help on CVS") );
- KApplication::startServiceByDesktopName("khelpcenter", QString("info:/cvs/Top"));
+ KApplication::startServiceByDesktopName("khelpcenter", TQString("info:/cvs/Top"));
}
-void CervisiaPart::showJobStart(const QString &cmdline)
+void CervisiaPart::showJobStart(const TQString &cmdline)
{
hasRunningJob = true;
actionCollection()->action( "stop_job" )->setEnabled( true );
@@ -1663,9 +1663,9 @@ void CervisiaPart::showJobStart(const QString &cmdline)
}
-void CervisiaPart::showDiff(const QString& revision)
+void CervisiaPart::showDiff(const TQString& revision)
{
- QString fileName;
+ TQString fileName;
update->getSingleSelection(&fileName);
if (fileName.isEmpty())
@@ -1673,7 +1673,7 @@ void CervisiaPart::showDiff(const QString& revision)
// Non-modal dialog
DiffDialog *l = new DiffDialog(*config());
- if (l->parseCvsDiff(cvsService, fileName, revision, QString::null))
+ if (l->parseCvsDiff(cvsService, fileName, revision, TQString::null))
l->show();
else
delete l;
@@ -1687,8 +1687,8 @@ void CervisiaPart::slotJobFinished()
emit setStatusBarText( i18n("Done") );
updateActions();
- disconnect( protocol, SIGNAL(receivedLine(QString)),
- update, SLOT(processUpdateLine(QString)) );
+ disconnect( protocol, TQT_SIGNAL(receivedLine(TQString)),
+ update, TQT_SLOT(processUpdateLine(TQString)) );
if( m_jobType == Commit )
{
@@ -1700,7 +1700,7 @@ void CervisiaPart::slotJobFinished()
}
-bool CervisiaPart::openSandbox(const QString &dirname)
+bool CervisiaPart::openSandbox(const TQString &dirname)
{
// Do we have a cvs service?
if( !cvsService )
@@ -1720,7 +1720,7 @@ bool CervisiaPart::openSandbox(const QString &dirname)
"Cervisia");
// remove path from recent sandbox menu
- QFileInfo fi(dirname);
+ TQFileInfo fi(dirname);
recent->removeURL( KURL::fromPathOrURL(fi.absFilePath()) );
return false;
@@ -1751,7 +1751,7 @@ bool CervisiaPart::openSandbox(const QString &dirname)
Cervisia::GlobalIgnoreList().retrieveServerIgnoreList(cvsService,
repository);
- QDir::setCurrent(sandbox);
+ TQDir::setCurrent(sandbox);
update->openDirectory(sandbox);
setFilter();
@@ -1790,7 +1790,7 @@ void CervisiaPart::setFilter()
filter = UpdateView::Filter(filter | UpdateView::NoEmptyDirectories);
update->setFilter(filter);
- QString str;
+ TQString str;
if (opt_hideFiles)
str = "F";
else
@@ -1862,7 +1862,7 @@ void CervisiaPart::readSettings()
int splitterpos2 = config->readNumEntry("Splitter Pos 2", 0);
if (splitterpos1)
{
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << splitterpos1;
sizes << splitterpos2;
splitter->setSizes(sizes);
@@ -1887,7 +1887,7 @@ void CervisiaPart::writeSettings()
config->writeEntry("Hide Removed Files", opt_hideRemoved);
config->writeEntry("Hide Non CVS Files", opt_hideNotInCVS);
config->writeEntry("Hide Empty Directories", opt_hideEmptyDirectories);
- QValueList<int> sizes = splitter->sizes();
+ TQValueList<int> sizes = splitter->sizes();
config->writeEntry("Splitter Pos 1", sizes[0]);
config->writeEntry("Splitter Pos 2", sizes[1]);
diff --git a/cervisia/cervisiapart.h b/cervisia/cervisiapart.h
index e5881a8d..3a68abc1 100644
--- a/cervisia/cervisiapart.h
+++ b/cervisia/cervisiapart.h
@@ -55,8 +55,8 @@ class CervisiaPart : public KParts::ReadOnlyPart
Q_OBJECT
public:
- CervisiaPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name=0, const QStringList& args = QStringList());
+ CervisiaPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name=0, const TQStringList& args = TQStringList());
virtual ~CervisiaPart();
/**
@@ -64,7 +64,7 @@ public:
*/
static KConfig *config();
- QString sandBox() const { return sandbox; }
+ TQString sandBox() const { return sandbox; }
static KAboutData* createAboutData();
@@ -73,9 +73,9 @@ public slots:
virtual bool openFile() { return true; }
virtual bool openURL( const KURL & );
- void openFile(QString filename);
- void openFiles(const QStringList &filenames);
- void popupRequested(KListView*, QListViewItem*, const QPoint&);
+ void openFile(TQString filename);
+ void openFiles(const TQStringList &filenames);
+ void popupRequested(KListView*, TQListViewItem*, const TQPoint&);
void updateActions();
void aboutCervisia();
@@ -156,25 +156,25 @@ private:
void readSettings();
void writeSettings();
- bool openSandbox(const QString &dirname);
- void updateSandbox(const QString &extraopt = QString::null);
+ bool openSandbox(const TQString &dirname);
+ void updateSandbox(const TQString &extraopt = TQString::null);
void addOrRemove(AddRemoveDialog::ActionType action);
void addOrRemoveWatch(WatchDialog::ActionType action);
void createOrDeleteTag(Cervisia::TagDialog::ActionType action);
- void showJobStart(const QString &command);
- void showDiff(const QString& revision);
+ void showJobStart(const TQString &command);
+ void showDiff(const TQString& revision);
void setFilter();
UpdateView *update;
ProtocolView *protocol;
bool hasRunningJob;
- QSplitter *splitter;
+ TQSplitter *splitter;
- QString sandbox;
- QString repository;
+ TQString sandbox;
+ TQString repository;
- QString changelogstr;
- QStringList recentCommits;
+ TQString changelogstr;
+ TQStringList recentCommits;
bool opt_hideFiles, opt_hideUpToDate, opt_hideRemoved, opt_hideNotInCVS, opt_hideEmptyDirectories;
bool opt_createDirs, opt_pruneDirs;
bool opt_updateRecursive, opt_commitRecursive, opt_doCVSEdit;
@@ -185,7 +185,7 @@ private:
CvsService_stub* cvsService;
KParts::StatusBarExtension* m_statusBar;
CervisiaBrowserExtension* m_browserExt;
- QLabel* filterLabel;
+ TQLabel* filterLabel;
int m_editWithId;
Cervisia::EditWithMenu* m_currentEditMenu;
diff --git a/cervisia/cervisiashell.cpp b/cervisia/cervisiashell.cpp
index 33dac96c..eb0518e2 100644
--- a/cervisia/cervisiashell.cpp
+++ b/cervisia/cervisiashell.cpp
@@ -62,15 +62,15 @@ CervisiaShell::CervisiaShell( const char *name )
// Magic needed for status texts
//
actionCollection()->setHighlightingEnabled(true);
- connect( actionCollection(), SIGNAL( actionStatusText(const QString &) ),
- statusBar(), SLOT( message(const QString &) ) );
- connect( actionCollection(), SIGNAL( clearStatusText() ),
- statusBar(), SLOT( clear() ) );
+ connect( actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ),
+ statusBar(), TQT_SLOT( message(const TQString &) ) );
+ connect( actionCollection(), TQT_SIGNAL( clearStatusText() ),
+ statusBar(), TQT_SLOT( clear() ) );
m_part->actionCollection()->setHighlightingEnabled(true);
- connect( m_part->actionCollection(), SIGNAL( actionStatusText(const QString &) ),
- statusBar(), SLOT( message(const QString &) ) );
- connect( m_part->actionCollection(), SIGNAL( clearStatusText() ),
- statusBar(), SLOT( clear() ) );
+ connect( m_part->actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ),
+ statusBar(), TQT_SLOT( message(const TQString &) ) );
+ connect( m_part->actionCollection(), TQT_SIGNAL( clearStatusText() ),
+ statusBar(), TQT_SLOT( clear() ) );
createGUI( m_part );
@@ -92,19 +92,19 @@ void CervisiaShell::setupActions()
{
setStandardToolBarMenuEnabled( true );
- KAction *action = KStdAction::configureToolbars( this, SLOT(slotConfigureToolBars()),
+ KAction *action = KStdAction::configureToolbars( this, TQT_SLOT(slotConfigureToolBars()),
actionCollection() );
- QString hint = i18n("Allows you to configure the toolbar");
+ TQString hint = i18n("Allows you to configure the toolbar");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::keyBindings( this, SLOT(slotConfigureKeys()),
+ action = KStdAction::keyBindings( this, TQT_SLOT(slotConfigureKeys()),
actionCollection() );
hint = i18n("Allows you to customize the keybindings");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::quit( kapp, SLOT( quit() ), actionCollection() );
+ action = KStdAction::quit( kapp, TQT_SLOT( quit() ), actionCollection() );
hint = i18n("Exits Cervisia");
action->setToolTip( hint );
action->setWhatsThis( hint );
@@ -161,7 +161,7 @@ void CervisiaShell::slotConfigureToolBars()
{
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg( factory() );
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
diff --git a/cervisia/cervisiashell.h b/cervisia/cervisiashell.h
index 6e19ce1d..e96e15d9 100644
--- a/cervisia/cervisiashell.h
+++ b/cervisia/cervisiashell.h
@@ -60,7 +60,7 @@ private:
void writeSettings();
KParts::ReadOnlyPart* m_part;
- QString m_lastOpenDir;
+ TQString m_lastOpenDir;
};
diff --git a/cervisia/changelogdlg.cpp b/cervisia/changelogdlg.cpp
index 902a40f3..49476610 100644
--- a/cervisia/changelogdlg.cpp
+++ b/cervisia/changelogdlg.cpp
@@ -21,8 +21,8 @@
#include "changelogdlg.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kconfig.h>
#include <kglobalsettings.h>
#include <klocale.h>
@@ -31,16 +31,16 @@
#include "misc.h"
-static inline QString DateStringISO8601()
+static inline TQString DateStringISO8601()
{
- return QDate::currentDate().toString(Qt::ISODate);
+ return TQDate::currentDate().toString(Qt::ISODate);
}
ChangeLogDialog::Options *ChangeLogDialog::options = 0;
-ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name)
+ChangeLogDialog::ChangeLogDialog(KConfig& cfg, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Edit ChangeLog"),
Ok | Cancel, Ok, true)
, partConfig(cfg)
@@ -51,16 +51,16 @@ ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name
edit->setFont(cfg.readFontEntry("ChangeLogFont"));
edit->setFocus();
- edit->setWordWrap(QTextEdit::NoWrap);
- edit->setTextFormat(QTextEdit::PlainText);
+ edit->setWordWrap(TQTextEdit::NoWrap);
+ edit->setTextFormat(TQTextEdit::PlainText);
edit->setCheckSpellingEnabled(true);
- QFontMetrics const fm(edit->fontMetrics());
+ TQFontMetrics const fm(edit->fontMetrics());
edit->setMinimumSize(fm.width('0') * 80,
fm.lineSpacing() * 20);
setMainWidget(edit);
- QSize size = configDialogSize(partConfig, "ChangeLogDialog");
+ TQSize size = configDialogSize(partConfig, "ChangeLogDialog");
resize(size);
}
@@ -74,7 +74,7 @@ ChangeLogDialog::~ChangeLogDialog()
void ChangeLogDialog::slotOk()
{
// Write changelog
- QFile f(fname);
+ TQFile f(fname);
if (!f.open(IO_ReadWrite))
{
KMessageBox::sorry(this,
@@ -83,7 +83,7 @@ void ChangeLogDialog::slotOk()
return;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
stream << edit->text();
f.close();
@@ -91,11 +91,11 @@ void ChangeLogDialog::slotOk()
}
-bool ChangeLogDialog::readFile(const QString &filename)
+bool ChangeLogDialog::readFile(const TQString &filename)
{
fname = filename;
- if (!QFile::exists(filename))
+ if (!TQFile::exists(filename))
{
if (KMessageBox::warningContinueCancel(this,
i18n("A ChangeLog file does not exist. Create one?"),
@@ -105,7 +105,7 @@ bool ChangeLogDialog::readFile(const QString &filename)
}
else
{
- QFile f(filename);
+ TQFile f(filename);
if (!f.open(IO_ReadWrite))
{
KMessageBox::sorry(this,
@@ -113,13 +113,13 @@ bool ChangeLogDialog::readFile(const QString &filename)
"Cervisia");
return false;
}
- QTextStream stream(&f);
+ TQTextStream stream(&f);
edit->setText(stream.read());
f.close();
}
KConfigGroupSaver cs(&partConfig, "General");
- const QString username = partConfig.readEntry("Username", Cervisia::UserName());
+ const TQString username = partConfig.readEntry("Username", Cervisia::UserName());
edit->insertParagraph("", 0);
edit->insertParagraph("\t* ", 0);
@@ -131,13 +131,13 @@ bool ChangeLogDialog::readFile(const QString &filename)
}
-QString ChangeLogDialog::message()
+TQString ChangeLogDialog::message()
{
int no = 0;
// Find first line which begins with non-whitespace
while (no < edit->lines())
{
- QString str = edit->text(no);
+ TQString str = edit->text(no);
if (!str.isEmpty() && !str[0].isSpace())
break;
++no;
@@ -146,17 +146,17 @@ QString ChangeLogDialog::message()
// Skip empty lines
while (no < edit->lines())
{
- QString str = edit->text(no);
+ TQString str = edit->text(no);
if( str.isEmpty() || str == " " )
break;
++no;
}
- QString res;
+ TQString res;
// Use all lines until one which begins with non-whitespace
// Remove tabs or 8 whitespace at beginning of each line
while (no < edit->lines())
{
- QString str = edit->text(no);
+ TQString str = edit->text(no);
if (!str.isEmpty() && !str[0].isSpace())
break;
if (!str.isEmpty() && str[0] == '\t')
diff --git a/cervisia/changelogdlg.h b/cervisia/changelogdlg.h
index 6c1aa3e3..ee7b8fc4 100644
--- a/cervisia/changelogdlg.h
+++ b/cervisia/changelogdlg.h
@@ -31,23 +31,23 @@ class KConfig;
class ChangeLogDialog : public KDialogBase
{
public:
- explicit ChangeLogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit ChangeLogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~ChangeLogDialog();
- bool readFile(const QString &fileName);
- QString message();
+ bool readFile(const TQString &fileName);
+ TQString message();
protected:
virtual void slotOk();
private:
struct Options {
- QSize size;
+ TQSize size;
};
static Options *options;
- QString fname;
+ TQString fname;
KTextEdit *edit;
KConfig& partConfig;
};
diff --git a/cervisia/checkoutdlg.cpp b/cervisia/checkoutdlg.cpp
index 85a8b0a8..32885e8e 100644
--- a/cervisia/checkoutdlg.cpp
+++ b/cervisia/checkoutdlg.cpp
@@ -21,12 +21,12 @@
#include "checkoutdlg.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kprocess.h>
#include <kfiledialog.h>
#include <klineedit.h>
@@ -43,9 +43,9 @@ using Cervisia::IsValidTag;
CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
- ActionType action, QWidget* parent,
+ ActionType action, TQWidget* parent,
const char* name)
- : KDialogBase(parent, name, true, QString::null,
+ : KDialogBase(parent, name, true, TQString::null,
Ok | Cancel | Help, Ok, true)
, act(action)
, partConfig(cfg)
@@ -53,91 +53,91 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
{
setCaption( (action==Checkout)? i18n("CVS Checkout") : i18n("CVS Import") );
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QGridLayout* grid = new QGridLayout(layout);
+ TQGridLayout* grid = new TQGridLayout(layout);
grid->setColStretch(0, 1);
grid->setColStretch(1, 20);
for( int i = 0; i < ((action==Checkout)? 4 : 10); ++i )
grid->setRowStretch(i, 0);
- repo_combo = new QComboBox(true, mainWidget);
+ repo_combo = new TQComboBox(true, mainWidget);
repo_combo->setFocus();
// make sure combobox is smaller than the screen
- repo_combo->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ repo_combo->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
grid->addWidget(repo_combo, 0, 1);
- QLabel* repo_label = new QLabel(repo_combo, i18n("&Repository:"), mainWidget);
+ TQLabel* repo_label = new TQLabel(repo_combo, i18n("&Repository:"), mainWidget);
grid->addWidget(repo_label, 0, 0, AlignLeft | AlignVCenter);
if( action == Import )
{
module_edit = new KLineEdit(mainWidget);
grid->addWidget(module_edit, 1, 1);
- QLabel* module_label = new QLabel(module_edit, i18n("&Module:"), mainWidget);
+ TQLabel* module_label = new TQLabel(module_edit, i18n("&Module:"), mainWidget);
grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter);
}
else
{
- module_combo = new QComboBox(true, mainWidget);
+ module_combo = new TQComboBox(true, mainWidget);
- QPushButton* module_button = new QPushButton(i18n("Fetch &List"), mainWidget);
- connect( module_button, SIGNAL(clicked()),
- this, SLOT(moduleButtonClicked()) );
+ TQPushButton* module_button = new TQPushButton(i18n("Fetch &List"), mainWidget);
+ connect( module_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(moduleButtonClicked()) );
- QBoxLayout* module_layout = new QHBoxLayout();
+ TQBoxLayout* module_layout = new TQHBoxLayout();
grid->addLayout(module_layout, 1, 1);
module_layout->addWidget(module_combo, 10);
module_layout->addWidget(module_button, 0, AlignVCenter);
- QLabel* module_label = new QLabel(module_combo, i18n("&Module:"), mainWidget);
+ TQLabel* module_label = new TQLabel(module_combo, i18n("&Module:"), mainWidget);
grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter);
- branchCombo = new QComboBox(true, mainWidget);
+ branchCombo = new TQComboBox(true, mainWidget);
- QPushButton* branchButton = new QPushButton(i18n("Fetch &List"), mainWidget);
- connect( branchButton, SIGNAL(clicked()),
- this, SLOT(branchButtonClicked()) );
+ TQPushButton* branchButton = new TQPushButton(i18n("Fetch &List"), mainWidget);
+ connect( branchButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(branchButtonClicked()) );
- QBoxLayout* branchLayout = new QHBoxLayout();
+ TQBoxLayout* branchLayout = new TQHBoxLayout();
grid->addLayout(branchLayout, 2, 1);
branchLayout->addWidget(branchCombo, 10);
branchLayout->addWidget(branchButton, 0, AlignVCenter);
- QLabel* branch_label = new QLabel(branchCombo, i18n("&Branch tag:"),
+ TQLabel* branch_label = new TQLabel(branchCombo, i18n("&Branch tag:"),
mainWidget);
grid->addWidget(branch_label, 2, 0, AlignLeft | AlignVCenter);
- connect( branchCombo, SIGNAL( textChanged( const QString&)),
- this, SLOT( branchTextChanged() ));
+ connect( branchCombo, TQT_SIGNAL( textChanged( const TQString&)),
+ this, TQT_SLOT( branchTextChanged() ));
- recursive_box = new QCheckBox(i18n("Re&cursive checkout"), mainWidget);
+ recursive_box = new TQCheckBox(i18n("Re&cursive checkout"), mainWidget);
grid->addMultiCellWidget(recursive_box, 6, 6, 0, 1);
}
workdir_edit = new KLineEdit(mainWidget);
- workdir_edit->setText(QDir::homeDirPath());
+ workdir_edit->setText(TQDir::homeDirPath());
workdir_edit->setMinimumWidth(fontMetrics().width('X') * 40);
KURLCompletion* comp = new KURLCompletion();
workdir_edit->setCompletionObject(comp);
workdir_edit->setAutoDeleteCompletionObject(true);
- connect( workdir_edit, SIGNAL(returnPressed(const QString&)),
- comp, SLOT(addItem(const QString&)) );
+ connect( workdir_edit, TQT_SIGNAL(returnPressed(const TQString&)),
+ comp, TQT_SLOT(addItem(const TQString&)) );
- QPushButton* dir_button = new QPushButton("...", mainWidget);
- connect( dir_button, SIGNAL(clicked()),
- this, SLOT(dirButtonClicked()) );
+ TQPushButton* dir_button = new TQPushButton("...", mainWidget);
+ connect( dir_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirButtonClicked()) );
dir_button->setFixedWidth(30);
- QBoxLayout* workdir_layout = new QHBoxLayout();
+ TQBoxLayout* workdir_layout = new TQHBoxLayout();
grid->addLayout(workdir_layout, (action==Import)? 2 : 3, 1);
workdir_layout->addWidget(workdir_edit, 10);
workdir_layout->addWidget(dir_button, 0, AlignVCenter);
- QLabel* workdir_label = new QLabel(workdir_edit, i18n("Working &folder:"),
+ TQLabel* workdir_label = new TQLabel(workdir_edit, i18n("Working &folder:"),
mainWidget);
grid->addWidget(workdir_label, (action==Import)? 2 : 3, 0, AlignLeft | AlignVCenter);
@@ -146,35 +146,35 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
vendortag_edit = new KLineEdit(mainWidget);
grid->addWidget(vendortag_edit, 3, 1);
- QLabel* vendortag_label = new QLabel(vendortag_edit, i18n("&Vendor tag:"),
+ TQLabel* vendortag_label = new TQLabel(vendortag_edit, i18n("&Vendor tag:"),
mainWidget);
grid->addWidget(vendortag_label, 3, 0, AlignLeft | AlignVCenter);
releasetag_edit = new KLineEdit(mainWidget);
grid->addWidget(releasetag_edit, 4, 1);
- QLabel* releasetag_label = new QLabel(releasetag_edit, i18n("&Release tag:"),
+ TQLabel* releasetag_label = new TQLabel(releasetag_edit, i18n("&Release tag:"),
mainWidget);
grid->addWidget(releasetag_label, 4, 0, AlignLeft | AlignVCenter);
ignore_edit = new KLineEdit(mainWidget);
grid->addWidget(ignore_edit, 5, 1);
- QLabel* ignore_label = new QLabel(ignore_edit, i18n("&Ignore files:"),
+ TQLabel* ignore_label = new TQLabel(ignore_edit, i18n("&Ignore files:"),
mainWidget);
grid->addWidget(ignore_label, 5, 0, AlignLeft | AlignVCenter);
comment_edit = new KLineEdit(mainWidget);
grid->addWidget(comment_edit, 6, 1);
- QLabel* comment_label = new QLabel(comment_edit, i18n("&Comment:"),
+ TQLabel* comment_label = new TQLabel(comment_edit, i18n("&Comment:"),
mainWidget);
grid->addWidget(comment_label, 6, 0, AlignLeft | AlignVCenter);
- binary_box = new QCheckBox(i18n("Import as &binaries"), mainWidget);
+ binary_box = new TQCheckBox(i18n("Import as &binaries"), mainWidget);
grid->addMultiCellWidget(binary_box, 7, 7, 0, 1);
- m_useModificationTimeBox = new QCheckBox(
+ m_useModificationTimeBox = new TQCheckBox(
i18n("Use file's modification time as time of import"), mainWidget);
grid->addMultiCellWidget(m_useModificationTimeBox, 8, 8, 0, 1);
}
@@ -183,20 +183,20 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
alias_edit = new KLineEdit(mainWidget);
grid->addWidget(alias_edit, 4, 1);
- QLabel* alias_label = new QLabel(alias_edit, i18n("Chec&k out as:"), mainWidget);
+ TQLabel* alias_label = new TQLabel(alias_edit, i18n("Chec&k out as:"), mainWidget);
grid->addWidget(alias_label, 4, 0, AlignLeft | AlignVCenter);
- export_box = new QCheckBox(i18n("Ex&port only"), mainWidget);
+ export_box = new TQCheckBox(i18n("Ex&port only"), mainWidget);
grid->addMultiCellWidget(export_box, 5, 5, 0, 1);
}
- QStringList list1 = Repositories::readCvsPassFile();
- QStringList::ConstIterator it1;
+ TQStringList list1 = Repositories::readCvsPassFile();
+ TQStringList::ConstIterator it1;
for (it1 = list1.begin(); it1 != list1.end(); ++it1)
repo_combo->insertItem(*it1);
- QStringList list2 = Repositories::readConfigFile();
- QStringList::ConstIterator it2;
+ TQStringList list2 = Repositories::readConfigFile();
+ TQStringList::ConstIterator it2;
for (it2 = list2.begin(); it2 != list2.end(); ++it2)
if (!list1.contains(*it2))
repo_combo->insertItem(*it2);
@@ -207,54 +207,54 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service,
}
-QString CheckoutDialog::workingDirectory() const
+TQString CheckoutDialog::workingDirectory() const
{
return workdir_edit->text();
}
-QString CheckoutDialog::repository() const
+TQString CheckoutDialog::repository() const
{
return repo_combo->currentText();
}
-QString CheckoutDialog::module() const
+TQString CheckoutDialog::module() const
{
return act==Import? module_edit->text() : module_combo->currentText();
}
-QString CheckoutDialog::branch() const
+TQString CheckoutDialog::branch() const
{
return branchCombo->currentText();
}
-QString CheckoutDialog::vendorTag() const
+TQString CheckoutDialog::vendorTag() const
{
return vendortag_edit->text();
}
-QString CheckoutDialog::releaseTag() const
+TQString CheckoutDialog::releaseTag() const
{
return releasetag_edit->text();
}
-QString CheckoutDialog::ignoreFiles() const
+TQString CheckoutDialog::ignoreFiles() const
{
return ignore_edit->text();
}
-QString CheckoutDialog::comment() const
+TQString CheckoutDialog::comment() const
{
return comment_edit->text();
}
-QString CheckoutDialog::alias() const
+TQString CheckoutDialog::alias() const
{
return alias_edit->text();
}
@@ -284,7 +284,7 @@ bool CheckoutDialog::recursive() const
void CheckoutDialog::slotOk()
{
- QFileInfo fi(workingDirectory());
+ TQFileInfo fi(workingDirectory());
if (!fi.exists() || !fi.isDir())
{
KMessageBox::information(this, i18n("Please choose an existing working folder."));
@@ -330,7 +330,7 @@ void CheckoutDialog::slotOk()
void CheckoutDialog::dirButtonClicked()
{
- QString dir = KFileDialog::getExistingDirectory(workdir_edit->text());
+ TQString dir = KFileDialog::getExistingDirectory(workdir_edit->text());
if (!dir.isEmpty())
workdir_edit->setText(dir);
}
@@ -347,7 +347,7 @@ void CheckoutDialog::moduleButtonClicked()
return;
module_combo->clear();
- QString str;
+ TQString str;
while (dlg.getLine(str))
{
if (str.left(12) == "Unknown host")
@@ -358,7 +358,7 @@ void CheckoutDialog::moduleButtonClicked()
pos = str.find('\t');
if (pos == -1)
pos = str.length();
- QString module( str.left(pos).stripWhiteSpace() );
+ TQString module( str.left(pos).stripWhiteSpace() );
if ( !module.isEmpty() )
module_combo->insertItem(module);
}
@@ -367,7 +367,7 @@ void CheckoutDialog::moduleButtonClicked()
void CheckoutDialog::branchButtonClicked()
{
- QStringList branchTagList;
+ TQStringList branchTagList;
if( repository().isEmpty() )
{
@@ -386,12 +386,12 @@ void CheckoutDialog::branchButtonClicked()
if( !cvsService->ok() )
return;
- ProgressDialog dlg(this, "Remote Log", cvsJob, QString::null,
+ ProgressDialog dlg(this, "Remote Log", cvsJob, TQString::null,
i18n("CVS Remote Log"));
if( !dlg.execute() )
return;
- QString line;
+ TQString line;
while( dlg.getLine(line) )
{
int colonPos;
@@ -401,7 +401,7 @@ void CheckoutDialog::branchButtonClicked()
if( (colonPos = line.find(':', 1)) < 0 )
continue;
- const QString tag = line.mid(1, colonPos - 1);
+ const TQString tag = line.mid(1, colonPos - 1);
if( !branchTagList.contains(tag) )
branchTagList.push_back(tag);
}
diff --git a/cervisia/checkoutdlg.h b/cervisia/checkoutdlg.h
index 33f95f2b..20fd9cfd 100644
--- a/cervisia/checkoutdlg.h
+++ b/cervisia/checkoutdlg.h
@@ -40,17 +40,17 @@ public:
enum ActionType { Checkout, Import };
CheckoutDialog( KConfig& cfg, CvsService_stub* service, ActionType action,
- QWidget *parent=0, const char *name=0 );
-
- QString workingDirectory() const;
- QString repository() const;
- QString module() const;
- QString branch() const;
- QString vendorTag() const;
- QString releaseTag() const;
- QString ignoreFiles() const;
- QString comment() const;
- QString alias() const;
+ TQWidget *parent=0, const char *name=0 );
+
+ TQString workingDirectory() const;
+ TQString repository() const;
+ TQString module() const;
+ TQString branch() const;
+ TQString vendorTag() const;
+ TQString releaseTag() const;
+ TQString ignoreFiles() const;
+ TQString comment() const;
+ TQString alias() const;
bool importBinary() const;
bool useModificationTime() const;
bool exportOnly() const;
@@ -69,12 +69,12 @@ private:
void saveUserInput();
void restoreUserInput();
- QComboBox *repo_combo, *module_combo, *branchCombo;
+ TQComboBox *repo_combo, *module_combo, *branchCombo;
KLineEdit *module_edit, *workdir_edit;
KLineEdit *comment_edit;
KLineEdit *vendortag_edit, *releasetag_edit, *ignore_edit, *alias_edit;
- QCheckBox *binary_box, *export_box, *recursive_box;
- QCheckBox* m_useModificationTimeBox;
+ TQCheckBox *binary_box, *export_box, *recursive_box;
+ TQCheckBox* m_useModificationTimeBox;
ActionType act;
KConfig& partConfig;
diff --git a/cervisia/commitdlg.cpp b/cervisia/commitdlg.cpp
index 53c91ba7..4fdaca68 100644
--- a/cervisia/commitdlg.cpp
+++ b/cervisia/commitdlg.cpp
@@ -20,13 +20,13 @@
#include "commitdlg.h"
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qheader.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqheader.h>
#include <klistview.h>
#include <kconfig.h>
#include <klocale.h>
@@ -39,31 +39,31 @@
class CommitListItem : public QCheckListItem
{
public:
- CommitListItem(QListView* parent, const QString& text, const QString fileName)
- : QCheckListItem(parent, text, QCheckListItem::CheckBox)
+ CommitListItem(TQListView* parent, const TQString& text, const TQString fileName)
+ : TQCheckListItem(parent, text, TQCheckListItem::CheckBox)
, m_fileName(fileName)
{
}
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
private:
- QString m_fileName;
+ TQString m_fileName;
};
CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("CVS Commit"),
Ok | Cancel | Help | User1, Ok, true)
, partConfig(cfg)
, cvsService(service)
{
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QLabel *textlabel = new QLabel( i18n("Commit the following &files:"), mainWidget );
+ TQLabel *textlabel = new TQLabel( i18n("Commit the following &files:"), mainWidget );
layout->addWidget(textlabel);
m_fileList = new KListView(mainWidget);
@@ -71,23 +71,23 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service,
m_fileList->setFullWidth(true);
m_fileList->header()->hide();
textlabel->setBuddy(m_fileList);
- connect( m_fileList, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(fileSelected(QListViewItem*)));
- connect( m_fileList, SIGNAL(selectionChanged()),
- this, SLOT(fileHighlighted()) );
+ connect( m_fileList, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(fileSelected(TQListViewItem*)));
+ connect( m_fileList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(fileHighlighted()) );
layout->addWidget(m_fileList, 5);
- QLabel *archivelabel = new QLabel(i18n("Older &messages:"), mainWidget);
+ TQLabel *archivelabel = new TQLabel(i18n("Older &messages:"), mainWidget);
layout->addWidget(archivelabel);
- combo = new QComboBox(mainWidget);
+ combo = new TQComboBox(mainWidget);
archivelabel->setBuddy(combo);
- connect( combo, SIGNAL(activated(int)), this, SLOT(comboActivated(int)) );
+ connect( combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(comboActivated(int)) );
// make sure that combobox is smaller than the screen
- combo->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ combo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
layout->addWidget(combo);
- QLabel *messagelabel = new QLabel(i18n("&Log message:"), mainWidget);
+ TQLabel *messagelabel = new TQLabel(i18n("&Log message:"), mainWidget);
layout->addWidget(messagelabel);
edit = new Cervisia::LogMessageEdit(mainWidget);
@@ -97,20 +97,20 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service,
edit->setMinimumSize(400, 100);
layout->addWidget(edit, 10);
- m_useTemplateChk = new QCheckBox(i18n("Use log message &template"), mainWidget);
+ m_useTemplateChk = new TQCheckBox(i18n("Use log message &template"), mainWidget);
layout->addWidget(m_useTemplateChk);
- connect( m_useTemplateChk, SIGNAL(clicked()), this, SLOT(useTemplateClicked()) );
+ connect( m_useTemplateChk, TQT_SIGNAL(clicked()), this, TQT_SLOT(useTemplateClicked()) );
checkForTemplateFile();
setButtonGuiItem(User1, KGuiItem(i18n("&Diff"), "vcs_diff"));
enableButton(User1, false);
- connect( this, SIGNAL(user1Clicked()),
- this, SLOT(diffClicked()) );
+ connect( this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT(diffClicked()) );
setHelp("commitingfiles");
- QSize size = configDialogSize(partConfig, "CommitDialog");
+ TQSize size = configDialogSize(partConfig, "CommitDialog");
resize(size);
}
@@ -124,16 +124,16 @@ CommitDialog::~CommitDialog()
}
-void CommitDialog::setFileList(const QStringList &list)
+void CommitDialog::setFileList(const TQStringList &list)
{
- QString currentDirName = QFileInfo(QChar('.')).absFilePath();
+ TQString currentDirName = TQFileInfo(TQChar('.')).absFilePath();
- QStringList::ConstIterator it = list.begin();
+ TQStringList::ConstIterator it = list.begin();
for( ; it != list.end(); ++it )
{
// the dot for the root directory is hard to see, so
// we convert it to the absolut path
- QString text = (*it != "." ? *it : currentDirName);
+ TQString text = (*it != "." ? *it : currentDirName);
edit->compObj()->addItem(text);
CommitListItem* item = new CommitListItem(m_fileList, text, *it);
@@ -142,11 +142,11 @@ void CommitDialog::setFileList(const QStringList &list)
}
-QStringList CommitDialog::fileList() const
+TQStringList CommitDialog::fileList() const
{
- QStringList files;
+ TQStringList files;
- QListViewItemIterator it(m_fileList, QListViewItemIterator::Checked);
+ TQListViewItemIterator it(m_fileList, TQListViewItemIterator::Checked);
for( ; it.current(); ++it )
{
CommitListItem* item = static_cast<CommitListItem*>(it.current());
@@ -157,7 +157,7 @@ QStringList CommitDialog::fileList() const
}
-void CommitDialog::setLogMessage(const QString &msg)
+void CommitDialog::setLogMessage(const TQString &msg)
{
edit->setText(msg);
@@ -166,25 +166,25 @@ void CommitDialog::setLogMessage(const QString &msg)
}
-QString CommitDialog::logMessage() const
+TQString CommitDialog::logMessage() const
{
return edit->text();
}
-void CommitDialog::setLogHistory(const QStringList &list)
+void CommitDialog::setLogHistory(const TQStringList &list)
{
commits = list;
combo->insertItem(i18n("Current"));
- for ( QStringList::ConstIterator it = list.begin();
+ for ( TQStringList::ConstIterator it = list.begin();
it != list.end(); ++it )
{
if( (*it).isEmpty() )
continue;
- QString txt = *it;
+ TQString txt = *it;
int index = txt.find('\n', 0);
if ( index != -1 ) // Fetch first line
{
@@ -216,7 +216,7 @@ void CommitDialog::comboActivated(int index)
}
-void CommitDialog::fileSelected(QListViewItem* item)
+void CommitDialog::fileSelected(TQListViewItem* item)
{
// double click on empty space?
if( !item )
@@ -235,7 +235,7 @@ void CommitDialog::fileHighlighted()
void CommitDialog::diffClicked()
{
- QListViewItem* item = m_fileList->selectedItem();
+ TQListViewItem* item = m_fileList->selectedItem();
if( !item )
return;
@@ -243,7 +243,7 @@ void CommitDialog::diffClicked()
}
-void CommitDialog::showDiffDialog(const QString& fileName)
+void CommitDialog::showDiffDialog(const TQString& fileName)
{
DiffDialog *l = new DiffDialog(partConfig, this, "diffdialog");
@@ -275,13 +275,13 @@ void CommitDialog::useTemplateClicked()
void CommitDialog::checkForTemplateFile()
{
- QString filename = QDir::current().absPath() + "/CVS/Template";
- if( QFile::exists(filename) )
+ TQString filename = TQDir::current().absPath() + "/CVS/Template";
+ if( TQFile::exists(filename) )
{
- QFile f(filename);
+ TQFile f(filename);
if( f.open(IO_ReadOnly) )
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
m_templateText = stream.read();
f.close();
@@ -307,7 +307,7 @@ void CommitDialog::checkForTemplateFile()
void CommitDialog::addTemplateText()
{
edit->append(m_templateText);
- edit->moveCursor(QTextEdit::MoveHome, false);
+ edit->moveCursor(TQTextEdit::MoveHome, false);
edit->ensureCursorVisible();
}
diff --git a/cervisia/commitdlg.h b/cervisia/commitdlg.h
index fe3d9acf..c9bd44b5 100644
--- a/cervisia/commitdlg.h
+++ b/cervisia/commitdlg.h
@@ -22,7 +22,7 @@
#ifndef COMMITDLG_H
#define COMMITDLG_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
namespace Cervisia { class LogMessageEdit; }
@@ -39,40 +39,40 @@ class CommitDialog : public KDialogBase
Q_OBJECT
public:
- CommitDialog( KConfig& cfg, CvsService_stub* service, QWidget *parent=0,
+ CommitDialog( KConfig& cfg, CvsService_stub* service, TQWidget *parent=0,
const char *name=0 );
virtual ~CommitDialog();
- void setFileList(const QStringList &list);
- QStringList fileList() const;
- void setLogMessage(const QString &msg);
- QString logMessage() const;
- void setLogHistory(const QStringList &list);
+ void setFileList(const TQStringList &list);
+ TQStringList fileList() const;
+ void setLogMessage(const TQString &msg);
+ TQString logMessage() const;
+ void setLogHistory(const TQStringList &list);
private slots:
void comboActivated(int);
- void fileSelected(QListViewItem* item);
+ void fileSelected(TQListViewItem* item);
void fileHighlighted();
void diffClicked();
void useTemplateClicked();
private:
- void showDiffDialog(const QString& fileName);
+ void showDiffDialog(const TQString& fileName);
void checkForTemplateFile();
void addTemplateText();
void removeTemplateText();
KListView* m_fileList;
Cervisia::LogMessageEdit* edit;
- QComboBox *combo;
- QStringList commits;
+ TQComboBox *combo;
+ TQStringList commits;
int current_index;
- QString current_text;
+ TQString current_text;
int highlightedFile;
- QCheckBox* m_useTemplateChk;
- QString m_templateText;
+ TQCheckBox* m_useTemplateChk;
+ TQString m_templateText;
KConfig& partConfig;
CvsService_stub* cvsService; // for diff dialog
diff --git a/cervisia/cvsdir.cpp b/cervisia/cvsdir.cpp
index 263fd704..20f2994d 100644
--- a/cervisia/cvsdir.cpp
+++ b/cervisia/cvsdir.cpp
@@ -25,16 +25,16 @@
using namespace Cervisia;
-CvsDir::CvsDir(const QString &path)
- : QDir( path, 0, QDir::Name,
- QDir::All | QDir::Hidden | QDir::NoSymLinks )
+CvsDir::CvsDir(const TQString &path)
+ : TQDir( path, 0, TQDir::Name,
+ TQDir::All | TQDir::Hidden | TQDir::NoSymLinks )
{}
const QFileInfoList *CvsDir::entryInfoList() const
{
DirIgnoreList ignorelist(absPath());
- const QFileInfoList *fulllist = QDir::entryInfoList();
+ const QFileInfoList *fulllist = TQDir::entryInfoList();
if (!fulllist)
return 0;
diff --git a/cervisia/cvsdir.h b/cervisia/cvsdir.h
index 8f732163..2b9cd9ce 100644
--- a/cervisia/cvsdir.h
+++ b/cervisia/cvsdir.h
@@ -21,13 +21,13 @@
#ifndef CVSDIR_H
#define CVSDIR_H
-#include <qdir.h>
+#include <tqdir.h>
class CvsDir : public QDir
{
public:
- explicit CvsDir(const QString &path);
+ explicit CvsDir(const TQString &path);
const QFileInfoList *entryInfoList() const;
diff --git a/cervisia/cvsinitdlg.cpp b/cervisia/cvsinitdlg.cpp
index 9de80759..cf0b4641 100644
--- a/cervisia/cvsinitdlg.cpp
+++ b/cervisia/cvsinitdlg.cpp
@@ -19,9 +19,9 @@
#include "cvsinitdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kfiledialog.h>
#include <klineedit.h>
@@ -32,17 +32,17 @@
using Cervisia::CvsInitDialog;
-CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name)
+CvsInitDialog::CvsInitDialog(TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("Create New Repository (cvs init)"),
Ok | Cancel, Ok, true)
{
- QFrame* mainWidget = makeMainWidget();
- QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQFrame* mainWidget = makeMainWidget();
+ TQVBoxLayout* mainLayout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QLabel* dirLabel = new QLabel(i18n("Repository folder:"), mainWidget);
+ TQLabel* dirLabel = new TQLabel(i18n("Repository folder:"), mainWidget);
mainLayout->addWidget(dirLabel);
- QHBoxLayout* dirLayout = new QHBoxLayout(mainLayout);
+ TQHBoxLayout* dirLayout = new TQHBoxLayout(mainLayout);
m_directoryEdit = new KLineEdit(mainWidget);
m_directoryEdit->setFocus();
@@ -54,14 +54,14 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name)
dirLabel->setBuddy(m_directoryEdit);
dirLayout->addWidget(m_directoryEdit);
- QPushButton* dirButton = new QPushButton("...", mainWidget);
+ TQPushButton* dirButton = new TQPushButton("...", mainWidget);
dirButton->setFixedWidth(30);
dirLayout->addWidget(dirButton);
- connect( dirButton, SIGNAL(clicked()),
- this, SLOT(dirButtonClicked()) );
- connect( m_directoryEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(lineEditTextChanged(const QString&)));
+ connect( dirButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirButtonClicked()) );
+ connect( m_directoryEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(lineEditTextChanged(const TQString&)));
enableButton(Ok, false);
@@ -69,7 +69,7 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name)
}
-QString CvsInitDialog::directory() const
+TQString CvsInitDialog::directory() const
{
return m_directoryEdit->text();
}
@@ -77,13 +77,13 @@ QString CvsInitDialog::directory() const
void CvsInitDialog::dirButtonClicked()
{
- QString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text());
+ TQString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text());
if( !dir.isEmpty() )
m_directoryEdit->setText(dir);
}
-void CvsInitDialog::lineEditTextChanged(const QString& text)
+void CvsInitDialog::lineEditTextChanged(const TQString& text)
{
enableButton(Ok, !text.stripWhiteSpace().isEmpty());
}
diff --git a/cervisia/cvsinitdlg.h b/cervisia/cvsinitdlg.h
index 007617a7..9ca35ad0 100644
--- a/cervisia/cvsinitdlg.h
+++ b/cervisia/cvsinitdlg.h
@@ -34,13 +34,13 @@ class CvsInitDialog : public KDialogBase
Q_OBJECT
public:
- CvsInitDialog(QWidget* parent = 0, const char* name = 0);
+ CvsInitDialog(TQWidget* parent = 0, const char* name = 0);
- QString directory() const;
+ TQString directory() const;
private slots:
void dirButtonClicked();
- void lineEditTextChanged(const QString& text);
+ void lineEditTextChanged(const TQString& text);
private:
KLineEdit* m_directoryEdit;
diff --git a/cervisia/cvsservice/cvsaskpass.cpp b/cervisia/cvsservice/cvsaskpass.cpp
index 01903f02..13660c7e 100644
--- a/cervisia/cvsservice/cvsaskpass.cpp
+++ b/cervisia/cvsservice/cvsaskpass.cpp
@@ -18,7 +18,7 @@
*
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -56,8 +56,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv)
return 1;
// parse repository name from the passed argument
- QString prompt = KCmdLineArgs::parsedArgs()->arg(0);
- QRegExp rx("(.*@.*)'s password:");
+ TQString prompt = KCmdLineArgs::parsedArgs()->arg(0);
+ TQRegExp rx("(.*@.*)'s password:");
int pos = rx.search(prompt);
KPasswordDialog dlg(KPasswordDialog::Password, false, 0);
diff --git a/cervisia/cvsservice/cvsjob.cpp b/cervisia/cvsservice/cvsjob.cpp
index e73e0abc..3f4f06fe 100644
--- a/cervisia/cvsservice/cvsjob.cpp
+++ b/cervisia/cvsservice/cvsjob.cpp
@@ -20,7 +20,7 @@
#include "cvsjob.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -37,26 +37,26 @@ struct CvsJob::Private
~Private() { delete childproc; }
KProcess* childproc;
- QString server;
- QString rsh;
- QString directory;
+ TQString server;
+ TQString rsh;
+ TQString directory;
bool isRunning;
- QStringList outputLines;
+ TQStringList outputLines;
};
CvsJob::CvsJob(unsigned jobNum)
- : QObject()
+ : TQObject()
, DCOPObject()
, d(new Private)
{
- QString objId("CvsJob" + QString::number(jobNum));
+ TQString objId("CvsJob" + TQString::number(jobNum));
setObjId(objId.local8Bit());
}
-CvsJob::CvsJob(const QString& objId)
- : QObject()
+CvsJob::CvsJob(const TQString& objId)
+ : TQObject()
, DCOPObject()
, d(new Private)
{
@@ -76,19 +76,19 @@ void CvsJob::clearCvsCommand()
}
-void CvsJob::setRSH(const QString& rsh)
+void CvsJob::setRSH(const TQString& rsh)
{
d->rsh = rsh;
}
-void CvsJob::setServer(const QString& server)
+void CvsJob::setServer(const TQString& server)
{
d->server = server;
}
-void CvsJob::setDirectory(const QString& directory)
+void CvsJob::setDirectory(const TQString& directory)
{
d->directory = directory;
}
@@ -100,7 +100,7 @@ bool CvsJob::isRunning() const
}
-CvsJob& CvsJob::operator<<(const QString& arg)
+CvsJob& CvsJob::operator<<(const TQString& arg)
{
*d->childproc << arg;
return *this;
@@ -114,39 +114,39 @@ CvsJob& CvsJob::operator<<(const char* arg)
}
-CvsJob& CvsJob::operator<<(const QCString& arg)
+CvsJob& CvsJob::operator<<(const TQCString& arg)
{
*d->childproc << arg;
return *this;
}
-CvsJob& CvsJob::operator<<(const QStringList& args)
+CvsJob& CvsJob::operator<<(const TQStringList& args)
{
*d->childproc << args;
return *this;
}
-QString CvsJob::cvsCommand() const
+TQString CvsJob::cvsCommand() const
{
- QString command;
+ TQString command;
- const QValueList<QCString>& args(d->childproc->args());
- for (QValueList<QCString>::const_iterator it = args.begin(), itEnd = args.end();
+ const TQValueList<TQCString>& args(d->childproc->args());
+ for (TQValueList<TQCString>::const_iterator it = args.begin(), itEnd = args.end();
it != itEnd; ++it)
{
if (!command.isEmpty())
command += ' ';
- command += QFile::decodeName(*it);
+ command += TQFile::decodeName(*it);
}
return command;
}
-QStringList CvsJob::output() const
+TQStringList CvsJob::output() const
{
return d->outputLines;
}
@@ -176,12 +176,12 @@ bool CvsJob::execute()
if( !d->directory.isEmpty() )
d->childproc->setWorkingDirectory(d->directory);
- connect(d->childproc, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited()));
- connect(d->childproc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(d->childproc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- SLOT(slotReceivedStderr(KProcess*, char*, int)) );
+ connect(d->childproc, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited()));
+ connect(d->childproc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(d->childproc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) );
kdDebug(8051) << "Execute cvs command: " << cvsCommand() << endl;
@@ -212,10 +212,10 @@ void CvsJob::slotReceivedStdout(KProcess* proc, char* buffer, int buflen)
{
Q_UNUSED(proc);
- QString output = QString::fromLocal8Bit(buffer, buflen);
+ TQString output = TQString::fromLocal8Bit(buffer, buflen);
// accumulate output
- d->outputLines += QStringList::split("\n", output);
+ d->outputLines += TQStringList::split("\n", output);
emit receivedStdout(output);
}
@@ -225,10 +225,10 @@ void CvsJob::slotReceivedStderr(KProcess* proc, char* buffer, int buflen)
{
Q_UNUSED(proc);
- QString output = QString::fromLocal8Bit(buffer, buflen);
+ TQString output = TQString::fromLocal8Bit(buffer, buflen);
// accumulate output
- d->outputLines += QStringList::split("\n", output);
+ d->outputLines += TQStringList::split("\n", output);
emit receivedStderr(output);
}
diff --git a/cervisia/cvsservice/cvsjob.h b/cervisia/cvsservice/cvsjob.h
index 85d9b1fd..88aaa9fb 100644
--- a/cervisia/cvsservice/cvsjob.h
+++ b/cervisia/cvsservice/cvsjob.h
@@ -21,33 +21,33 @@
#ifndef CVSJOB_H
#define CVSJOB_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
class KProcess;
-class KDE_EXPORT CvsJob : public QObject, public DCOPObject
+class KDE_EXPORT CvsJob : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
public:
explicit CvsJob(unsigned jobNum);
- explicit CvsJob(const QString& objId);
+ explicit CvsJob(const TQString& objId);
virtual ~CvsJob();
void clearCvsCommand();
- void setRSH(const QString& rsh);
- void setServer(const QString& server);
- void setDirectory(const QString& directory);
+ void setRSH(const TQString& rsh);
+ void setServer(const TQString& server);
+ void setDirectory(const TQString& directory);
- CvsJob& operator<<(const QString& arg);
+ CvsJob& operator<<(const TQString& arg);
CvsJob& operator<<(const char* arg);
- CvsJob& operator<<(const QCString& arg);
- CvsJob& operator<<(const QStringList& args);
+ CvsJob& operator<<(const TQCString& arg);
+ CvsJob& operator<<(const TQStringList& args);
k_dcop:
bool execute();
@@ -60,14 +60,14 @@ k_dcop:
*
* @return The current cvs command. Can be null if not set.
*/
- QString cvsCommand() const;
+ TQString cvsCommand() const;
- QStringList output() const;
+ TQStringList output() const;
k_dcop_signals:
void jobExited(bool normalExit, int status);
- void receivedStdout(const QString& buffer);
- void receivedStderr(const QString& buffer);
+ void receivedStdout(const TQString& buffer);
+ void receivedStderr(const TQString& buffer);
private slots:
void slotProcessExited();
diff --git a/cervisia/cvsservice/cvsloginjob.cpp b/cervisia/cvsservice/cvsloginjob.cpp
index 5ffe0d17..ad6f9176 100644
--- a/cervisia/cvsservice/cvsloginjob.cpp
+++ b/cervisia/cvsservice/cvsloginjob.cpp
@@ -36,7 +36,7 @@ CvsLoginJob::CvsLoginJob(unsigned jobNum)
: DCOPObject()
, m_Proc(0)
{
- QString objId("CvsLoginJob" + QString::number(jobNum));
+ TQString objId("CvsLoginJob" + TQString::number(jobNum));
setObjId(objId.local8Bit());
m_Proc = new PtyProcess;
@@ -49,13 +49,13 @@ CvsLoginJob::~CvsLoginJob()
}
-void CvsLoginJob::setServer(const QString& server)
+void CvsLoginJob::setServer(const TQString& server)
{
m_Server = server;
}
-void CvsLoginJob::setCvsClient(const QCString& cvsClient)
+void CvsLoginJob::setCvsClient(const TQCString& cvsClient)
{
m_CvsClient = cvsClient;
@@ -64,7 +64,7 @@ void CvsLoginJob::setCvsClient(const QCString& cvsClient)
}
-void CvsLoginJob::setRepository(const QCString& repository)
+void CvsLoginJob::setRepository(const TQCString& repository)
{
m_Arguments += "-d";
m_Arguments += repository;
@@ -74,7 +74,7 @@ void CvsLoginJob::setRepository(const QCString& repository)
bool CvsLoginJob::execute()
{
- static QCString repository;
+ static TQCString repository;
int res = m_Proc->exec(m_CvsClient, m_Arguments);
if( res < 0 )
@@ -86,7 +86,7 @@ bool CvsLoginJob::execute()
bool result = false;
while( true )
{
- QCString line = m_Proc->readLine();
+ TQCString line = m_Proc->readLine();
if( line.isNull() )
{
return result;
@@ -113,7 +113,7 @@ bool CvsLoginJob::execute()
// TODO: We really should display the repository name. Unfortunately
// the dialog doesn't show part of the repository name, because
// it's too long. :-(
- QCString password;
+ TQCString password;
int res = KPasswordDialog::getPassword(password, i18n("Please type "
"in your password for the repository below."));
if( res == KPasswordDialog::Accepted )
@@ -150,7 +150,7 @@ bool CvsLoginJob::execute()
}
-QStringList CvsLoginJob::output()
+TQStringList CvsLoginJob::output()
{
return m_output;
}
diff --git a/cervisia/cvsservice/cvsloginjob.h b/cervisia/cvsservice/cvsloginjob.h
index 7aae928f..71291175 100644
--- a/cervisia/cvsservice/cvsloginjob.h
+++ b/cervisia/cvsservice/cvsloginjob.h
@@ -21,8 +21,8 @@
#ifndef CVSLOGINJOB_H
#define CVSLOGINJOB_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
#include <kdesu/process.h>
@@ -36,22 +36,22 @@ public:
explicit CvsLoginJob(unsigned jobNum);
virtual ~CvsLoginJob();
- void setServer(const QString& server);
+ void setServer(const TQString& server);
- void setCvsClient(const QCString& cvsClient);
- void setRepository(const QCString& repository);
+ void setCvsClient(const TQCString& cvsClient);
+ void setRepository(const TQCString& repository);
k_dcop:
bool execute();
- QStringList output();
+ TQStringList output();
private:
PtyProcess* m_Proc;
- QString m_Server;
- QString m_Rsh;
- QCString m_CvsClient;
+ TQString m_Server;
+ TQString m_Rsh;
+ TQCString m_CvsClient;
QCStringList m_Arguments;
- QStringList m_output;
+ TQStringList m_output;
};
diff --git a/cervisia/cvsservice/cvsservice.cpp b/cervisia/cvsservice/cvsservice.cpp
index 4a4c830b..aa64bb4b 100644
--- a/cervisia/cvsservice/cvsservice.cpp
+++ b/cervisia/cvsservice/cvsservice.cpp
@@ -20,8 +20,8 @@
#include "cvsservice.h"
-#include <qintdict.h>
-#include <qstring.h>
+#include <tqintdict.h>
+#include <tqstring.h>
#include <dcopref.h>
#include <dcopclient.h>
@@ -54,11 +54,11 @@ struct CvsService::Private
CvsJob* singleCvsJob; // non-concurrent cvs job, like update or commit
DCOPRef singleJobRef; // DCOP reference to non-concurrent cvs job
- QIntDict<CvsJob> cvsJobs; // concurrent cvs jobs, like diff or annotate
- QIntDict<CvsLoginJob> loginJobs;
+ TQIntDict<CvsJob> cvsJobs; // concurrent cvs jobs, like diff or annotate
+ TQIntDict<CvsLoginJob> loginJobs;
unsigned lastJobId;
- QCString appId; // cache the DCOP clients app id
+ TQCString appId; // cache the DCOP clients app id
Repository* repository;
@@ -111,7 +111,7 @@ CvsService::~CvsService()
}
-DCOPRef CvsService::add(const QStringList& files, bool isBinary)
+DCOPRef CvsService::add(const TQStringList& files, bool isBinary)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -131,7 +131,7 @@ DCOPRef CvsService::add(const QStringList& files, bool isBinary)
}
-DCOPRef CvsService::addWatch(const QStringList& files, int events)
+DCOPRef CvsService::addWatch(const TQStringList& files, int events)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -157,7 +157,7 @@ DCOPRef CvsService::addWatch(const QStringList& files, int events)
}
-DCOPRef CvsService::annotate(const QString& fileName, const QString& revision)
+DCOPRef CvsService::annotate(const TQString& fileName, const TQString& revision)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -167,8 +167,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision)
// assemble the command line
// (cvs log [FILE] && cvs annotate [-r rev] [FILE])
- QString quotedName = KProcess::quote(fileName);
- QString cvsClient = d->repository->cvsClient();
+ TQString quotedName = KProcess::quote(fileName);
+ TQString cvsClient = d->repository->cvsClient();
*job << "(" << cvsClient << "log" << quotedName << "&&"
<< cvsClient << "annotate";
@@ -186,8 +186,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision)
}
-DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag,
+DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag,
bool pruneDirs)
{
if( d->hasRunningJob() )
@@ -216,9 +216,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor
}
-DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag,
- bool pruneDirs, const QString& alias, bool exportOnly)
+DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag,
+ bool pruneDirs, const TQString& alias, bool exportOnly)
{
if( d->hasRunningJob() )
return DCOPRef();
@@ -251,9 +251,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor
return d->setupNonConcurrentJob(&repo);
}
-DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag,
- bool pruneDirs, const QString& alias, bool exportOnly,
+DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag,
+ bool pruneDirs, const TQString& alias, bool exportOnly,
bool recursive)
{
if( d->hasRunningJob() )
@@ -290,7 +290,7 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor
return d->setupNonConcurrentJob(&repo);
}
-DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessage,
+DCOPRef CvsService::commit(const TQStringList& files, const TQString& commitMessage,
bool recursive)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
@@ -312,7 +312,7 @@ DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessag
}
-DCOPRef CvsService::createRepository(const QString& repository)
+DCOPRef CvsService::createRepository(const TQString& repository)
{
if( d->hasRunningJob() )
return DCOPRef();
@@ -330,7 +330,7 @@ DCOPRef CvsService::createRepository(const QString& repository)
}
-DCOPRef CvsService::createTag(const QStringList& files, const QString& tag,
+DCOPRef CvsService::createTag(const TQStringList& files, const TQString& tag,
bool branch, bool force)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
@@ -355,7 +355,7 @@ DCOPRef CvsService::createTag(const QStringList& files, const QString& tag,
}
-DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag,
+DCOPRef CvsService::deleteTag(const TQStringList& files, const TQString& tag,
bool branch, bool force)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
@@ -380,8 +380,8 @@ DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag,
}
-DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository,
- const QString& outputFile)
+DCOPRef CvsService::downloadCvsIgnoreFile(const TQString& repository,
+ const TQString& outputFile)
{
Repository repo(repository);
@@ -399,9 +399,9 @@ DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository,
}
-DCOPRef CvsService::downloadRevision(const QString& fileName,
- const QString& revision,
- const QString& outputFile)
+DCOPRef CvsService::downloadRevision(const TQString& fileName,
+ const TQString& revision,
+ const TQString& outputFile)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -423,11 +423,11 @@ DCOPRef CvsService::downloadRevision(const QString& fileName,
}
-DCOPRef CvsService::downloadRevision(const QString& fileName,
- const QString& revA,
- const QString& outputFileA,
- const QString& revB,
- const QString& outputFileB)
+DCOPRef CvsService::downloadRevision(const TQString& fileName,
+ const TQString& revA,
+ const TQString& outputFileA,
+ const TQString& revB,
+ const TQString& outputFileB)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -450,19 +450,19 @@ DCOPRef CvsService::downloadRevision(const QString& fileName,
}
-DCOPRef CvsService::diff(const QString& fileName, const QString& revA,
- const QString& revB, const QString& diffOptions,
+DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA,
+ const TQString& revB, const TQString& diffOptions,
unsigned contextLines)
{
// cvs diff [DIFFOPTIONS] -U CONTEXTLINES [-r REVA] {-r REVB] [FILE]
- QString format = "-U" + QString::number(contextLines);
+ TQString format = "-U" + TQString::number(contextLines);
return diff(fileName, revA, revB, diffOptions, format);
}
-DCOPRef CvsService::diff(const QString& fileName, const QString& revA,
- const QString& revB, const QString& diffOptions,
- const QString& format)
+DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA,
+ const TQString& revB, const TQString& diffOptions,
+ const TQString& format)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -488,7 +488,7 @@ DCOPRef CvsService::diff(const QString& fileName, const QString& revA,
}
-DCOPRef CvsService::edit(const QStringList& files)
+DCOPRef CvsService::edit(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -504,7 +504,7 @@ DCOPRef CvsService::edit(const QStringList& files)
}
-DCOPRef CvsService::editors(const QStringList& files)
+DCOPRef CvsService::editors(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -537,10 +537,10 @@ DCOPRef CvsService::history()
}
-DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
- const QString& module, const QString& ignoreList,
- const QString& comment, const QString& vendorTag,
- const QString& releaseTag, bool importAsBinary)
+DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& ignoreList,
+ const TQString& comment, const TQString& vendorTag,
+ const TQString& releaseTag, bool importAsBinary)
{
if( d->hasRunningJob() )
return DCOPRef();
@@ -558,11 +558,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
if( importAsBinary )
*d->singleCvsJob << "-kb";
- const QString ignore = ignoreList.stripWhiteSpace();
+ const TQString ignore = ignoreList.stripWhiteSpace();
if( !ignore.isEmpty() )
*d->singleCvsJob << "-I" << KProcess::quote(ignore);
- QString logMessage = comment.stripWhiteSpace();
+ TQString logMessage = comment.stripWhiteSpace();
logMessage.prepend("\"");
logMessage.append("\"");
*d->singleCvsJob << "-m" << logMessage;
@@ -573,10 +573,10 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
}
-DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
- const QString& module, const QString& ignoreList,
- const QString& comment, const QString& vendorTag,
- const QString& releaseTag, bool importAsBinary,
+DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& ignoreList,
+ const TQString& comment, const TQString& vendorTag,
+ const TQString& releaseTag, bool importAsBinary,
bool useModificationTime)
{
if( d->hasRunningJob() )
@@ -598,11 +598,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
if( useModificationTime )
*d->singleCvsJob << "-d";
- const QString ignore = ignoreList.stripWhiteSpace();
+ const TQString ignore = ignoreList.stripWhiteSpace();
if( !ignore.isEmpty() )
*d->singleCvsJob << "-I" << KProcess::quote(ignore);
- QString logMessage = comment.stripWhiteSpace();
+ TQString logMessage = comment.stripWhiteSpace();
logMessage.prepend("\"");
logMessage.append("\"");
*d->singleCvsJob << "-m" << logMessage;
@@ -613,7 +613,7 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository,
}
-DCOPRef CvsService::lock(const QStringList& files)
+DCOPRef CvsService::lock(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -629,7 +629,7 @@ DCOPRef CvsService::lock(const QStringList& files)
}
-DCOPRef CvsService::log(const QString& fileName)
+DCOPRef CvsService::log(const TQString& fileName)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -646,7 +646,7 @@ DCOPRef CvsService::log(const QString& fileName)
}
-DCOPRef CvsService::login(const QString& repository)
+DCOPRef CvsService::login(const TQString& repository)
{
if( repository.isEmpty() )
return DCOPRef();
@@ -672,7 +672,7 @@ DCOPRef CvsService::login(const QString& repository)
}
-DCOPRef CvsService::logout(const QString& repository)
+DCOPRef CvsService::logout(const TQString& repository)
{
if( repository.isEmpty() )
return DCOPRef();
@@ -704,7 +704,7 @@ DCOPRef CvsService::makePatch()
}
-DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format)
+DCOPRef CvsService::makePatch(const TQString& diffOptions, const TQString& format)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -722,7 +722,7 @@ DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format)
}
-DCOPRef CvsService::moduleList(const QString& repository)
+DCOPRef CvsService::moduleList(const TQString& repository)
{
Repository repo(repository);
@@ -745,7 +745,7 @@ DCOPRef CvsService::moduleList(const QString& repository)
}
-DCOPRef CvsService::remove(const QStringList& files, bool recursive)
+DCOPRef CvsService::remove(const TQStringList& files, bool recursive)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -765,7 +765,7 @@ DCOPRef CvsService::remove(const QStringList& files, bool recursive)
}
-DCOPRef CvsService::removeWatch(const QStringList& files, int events)
+DCOPRef CvsService::removeWatch(const TQStringList& files, int events)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -791,7 +791,7 @@ DCOPRef CvsService::removeWatch(const QStringList& files, int events)
}
-DCOPRef CvsService::rlog(const QString& repository, const QString& module,
+DCOPRef CvsService::rlog(const TQString& repository, const TQString& module,
bool recursive)
{
Repository repo(repository);
@@ -819,7 +819,7 @@ DCOPRef CvsService::rlog(const QString& repository, const QString& module,
}
-DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive,
+DCOPRef CvsService::simulateUpdate(const TQStringList& files, bool recursive,
bool createDirs, bool pruneDirs)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
@@ -846,7 +846,7 @@ DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive,
}
-DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInfo)
+DCOPRef CvsService::status(const TQStringList& files, bool recursive, bool tagInfo)
{
if( !d->hasWorkingCopy() )
return DCOPRef();
@@ -871,7 +871,7 @@ DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInf
}
-DCOPRef CvsService::unedit(const QStringList& files)
+DCOPRef CvsService::unedit(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -888,7 +888,7 @@ DCOPRef CvsService::unedit(const QStringList& files)
}
-DCOPRef CvsService::unlock(const QStringList& files)
+DCOPRef CvsService::unlock(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -904,8 +904,8 @@ DCOPRef CvsService::unlock(const QStringList& files)
}
-DCOPRef CvsService::update(const QStringList& files, bool recursive,
- bool createDirs, bool pruneDirs, const QString& extraOpt)
+DCOPRef CvsService::update(const TQStringList& files, bool recursive,
+ bool createDirs, bool pruneDirs, const TQString& extraOpt)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
@@ -932,7 +932,7 @@ DCOPRef CvsService::update(const QStringList& files, bool recursive,
}
-DCOPRef CvsService::watchers(const QStringList& files)
+DCOPRef CvsService::watchers(const TQStringList& files)
{
if( !d->hasWorkingCopy() || d->hasRunningJob() )
return DCOPRef();
diff --git a/cervisia/cvsservice/cvsservice.h b/cervisia/cvsservice/cvsservice.h
index a472ca09..1cabfe99 100644
--- a/cervisia/cvsservice/cvsservice.h
+++ b/cervisia/cvsservice/cvsservice.h
@@ -21,7 +21,7 @@
#ifndef CVSSERVICE_H
#define CVSSERVICE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopref.h>
#include <dcopobject.h>
@@ -47,11 +47,11 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef add(const QStringList& files, bool isBinary);
+ DCOPRef add(const TQStringList& files, bool isBinary);
/**
*/
- DCOPRef addWatch(const QStringList& files, int events);
+ DCOPRef addWatch(const TQStringList& files, int events);
/**
* Shows information on who last modified each line of a file and when.
@@ -62,7 +62,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef annotate(const QString& fileName, const QString& revision);
+ DCOPRef annotate(const TQString& fileName, const TQString& revision);
/**
* Checks out a module from the repository into a working copy.
@@ -76,8 +76,8 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag, bool pruneDirs);
+ DCOPRef checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag, bool pruneDirs);
/**
* Checks out a module from the repository into a working copy.
@@ -94,9 +94,9 @@ k_dcop:
* null reference.
*/
//### KDE4: merge with above checkout() method
- DCOPRef checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag, bool pruneDirs,
- const QString& alias, bool exportOnly);
+ DCOPRef checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag, bool pruneDirs,
+ const TQString& alias, bool exportOnly);
/**
* Checks out a module from the repository into a working copy.
@@ -113,9 +113,9 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef checkout(const QString& workingDir, const QString& repository,
- const QString& module, const QString& tag, bool pruneDirs,
- const QString& alias, bool exportOnly, bool recursive);
+ DCOPRef checkout(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& tag, bool pruneDirs,
+ const TQString& alias, bool exportOnly, bool recursive);
/**
*
@@ -127,7 +127,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef commit(const QStringList& files, const QString& commitMessage,
+ DCOPRef commit(const TQStringList& files, const TQString& commitMessage,
bool recursive);
/**
@@ -135,33 +135,33 @@ k_dcop:
*
* @param repository
*/
- DCOPRef createRepository(const QString& repository);
+ DCOPRef createRepository(const TQString& repository);
/**
*/
- DCOPRef createTag(const QStringList& files, const QString& tag,
+ DCOPRef createTag(const TQStringList& files, const TQString& tag,
bool branch, bool force);
/**
*/
- DCOPRef deleteTag(const QStringList& files, const QString& tag,
+ DCOPRef deleteTag(const TQStringList& files, const TQString& tag,
bool branch, bool force);
/**
*/
- DCOPRef downloadCvsIgnoreFile(const QString& repository,
- const QString& outputFile);
+ DCOPRef downloadCvsIgnoreFile(const TQString& repository,
+ const TQString& outputFile);
/**
*/
- DCOPRef downloadRevision(const QString& fileName, const QString& revision,
- const QString& outputFile);
+ DCOPRef downloadRevision(const TQString& fileName, const TQString& revision,
+ const TQString& outputFile);
/**
*/
- DCOPRef downloadRevision(const QString& fileName, const QString& revA,
- const QString& outputFileA, const QString& revB,
- const QString& outputFileB);
+ DCOPRef downloadRevision(const TQString& fileName, const TQString& revA,
+ const TQString& outputFileA, const TQString& revB,
+ const TQString& outputFileB);
/**
*
@@ -174,8 +174,8 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef diff(const QString& fileName, const QString& revA,
- const QString& revB, const QString& diffOptions,
+ DCOPRef diff(const TQString& fileName, const TQString& revA,
+ const TQString& revB, const TQString& diffOptions,
unsigned contextLines);
/**
@@ -189,19 +189,19 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef diff(const QString& fileName, const QString& revA,
- const QString& revB, const QString& diffOptions,
- const QString& format);
+ DCOPRef diff(const TQString& fileName, const TQString& revA,
+ const TQString& revB, const TQString& diffOptions,
+ const TQString& format);
/**
* @param files
*/
- DCOPRef edit(const QStringList& files);
+ DCOPRef edit(const TQStringList& files);
/**
* @param files
*/
- DCOPRef editors(const QStringList& files);
+ DCOPRef editors(const TQStringList& files);
/**
* Shows a history of activity (like checkouts, commits, etc) in the
@@ -216,26 +216,26 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef import(const QString& workingDir, const QString& repository,
- const QString& module, const QString& ignoreList,
- const QString& comment, const QString& vendorTag,
- const QString& releaseTag, bool importAsBinary);
+ DCOPRef import(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& ignoreList,
+ const TQString& comment, const TQString& vendorTag,
+ const TQString& releaseTag, bool importAsBinary);
/**
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
//### KDE4: merge with above import() method
- DCOPRef import(const QString& workingDir, const QString& repository,
- const QString& module, const QString& ignoreList,
- const QString& comment, const QString& vendorTag,
- const QString& releaseTag, bool importAsBinary,
+ DCOPRef import(const TQString& workingDir, const TQString& repository,
+ const TQString& module, const TQString& ignoreList,
+ const TQString& comment, const TQString& vendorTag,
+ const TQString& releaseTag, bool importAsBinary,
bool useModificationTime);
/**
* @param files
*/
- DCOPRef lock(const QStringList& files);
+ DCOPRef lock(const TQStringList& files);
/**
* Shows log messages for a file.
@@ -245,7 +245,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef log(const QString& fileName);
+ DCOPRef log(const TQString& fileName);
/**
* @param repository
@@ -253,7 +253,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef login(const QString& repository);
+ DCOPRef login(const TQString& repository);
/**
* @param repository
@@ -261,7 +261,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef logout(const QString& repository);
+ DCOPRef logout(const TQString& repository);
/**
*/
@@ -270,7 +270,7 @@ k_dcop:
/**
*/
//### KDE4: merge with above makePatch() method
- DCOPRef makePatch(const QString& diffOptions, const QString& format);
+ DCOPRef makePatch(const TQString& diffOptions, const TQString& format);
/**
* @param repository
@@ -278,7 +278,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef moduleList(const QString& repository);
+ DCOPRef moduleList(const TQString& repository);
/**
* Deletes files from the local working copy and schedules them to be
@@ -291,15 +291,15 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef remove(const QStringList& files, bool recursive);
+ DCOPRef remove(const TQStringList& files, bool recursive);
/**
*/
- DCOPRef removeWatch(const QStringList& files, int events);
+ DCOPRef removeWatch(const TQStringList& files, int events);
/**
*/
- DCOPRef rlog(const QString& repository, const QString& module,
+ DCOPRef rlog(const TQString& repository, const TQString& module,
bool recursive);
/**
@@ -314,7 +314,7 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef simulateUpdate(const QStringList& files, bool recursive,
+ DCOPRef simulateUpdate(const TQStringList& files, bool recursive,
bool createDirs, bool pruneDirs);
/**
@@ -327,17 +327,17 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef status(const QStringList& files, bool recursive, bool tagInfo);
+ DCOPRef status(const TQStringList& files, bool recursive, bool tagInfo);
/**
* @param files
*/
- DCOPRef unedit(const QStringList& files);
+ DCOPRef unedit(const TQStringList& files);
/**
* @param files
*/
- DCOPRef unlock(const QStringList& files);
+ DCOPRef unlock(const TQStringList& files);
/**
* Merges changes from the repository into the files of the
@@ -353,13 +353,13 @@ k_dcop:
* @return A DCOP reference to the cvs job or in case of failure a
* null reference.
*/
- DCOPRef update(const QStringList& files, bool recursive, bool createDirs,
- bool pruneDirs, const QString& extraOpt);
+ DCOPRef update(const TQStringList& files, bool recursive, bool createDirs,
+ bool pruneDirs, const TQString& extraOpt);
/**
* @param files
*/
- DCOPRef watchers(const QStringList& files);
+ DCOPRef watchers(const TQStringList& files);
/**
* Quits the DCOP service.
diff --git a/cervisia/cvsservice/cvsserviceutils.cpp b/cervisia/cvsservice/cvsserviceutils.cpp
index de2f38a7..33585f49 100644
--- a/cervisia/cvsservice/cvsserviceutils.cpp
+++ b/cervisia/cvsservice/cvsserviceutils.cpp
@@ -20,17 +20,17 @@
#include "cvsserviceutils.h"
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kprocess.h>
-QString CvsServiceUtils::joinFileList(const QStringList& files)
+TQString CvsServiceUtils::joinFileList(const TQStringList& files)
{
- QString result;
+ TQString result;
- QStringList::ConstIterator it = files.begin();
- QStringList::ConstIterator end = files.end();
+ TQStringList::ConstIterator it = files.begin();
+ TQStringList::ConstIterator end = files.end();
for( ; it != end; ++it )
{
diff --git a/cervisia/cvsservice/cvsserviceutils.h b/cervisia/cvsservice/cvsserviceutils.h
index 26f29b5b..98feceb8 100644
--- a/cervisia/cvsservice/cvsserviceutils.h
+++ b/cervisia/cvsservice/cvsserviceutils.h
@@ -29,10 +29,10 @@ namespace CvsServiceUtils
{
/**
- * Joins a list of file names to one QString and quotes
+ * Joins a list of file names to one TQString and quotes
* each name properly for usage with KProcess.
*/
-QString joinFileList(const QStringList& files);
+TQString joinFileList(const TQStringList& files);
}
diff --git a/cervisia/cvsservice/repository.cpp b/cervisia/cvsservice/repository.cpp
index 1a911140..d5f06ef4 100644
--- a/cervisia/cvsservice/repository.cpp
+++ b/cervisia/cvsservice/repository.cpp
@@ -20,9 +20,9 @@
#include "repository.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -36,14 +36,14 @@ struct Repository::Private
{
Private() : compressionLevel(0) {}
- QString configFileName;
+ TQString configFileName;
- QString workingCopy;
- QString location;
+ TQString workingCopy;
+ TQString location;
- QString client;
- QString rsh;
- QString server;
+ TQString client;
+ TQString rsh;
+ TQString server;
int compressionLevel;
bool retrieveCvsignoreFile;
@@ -54,7 +54,7 @@ struct Repository::Private
Repository::Repository()
- : QObject()
+ : TQObject()
, DCOPObject("CvsRepository")
, d(new Private)
{
@@ -64,14 +64,14 @@ Repository::Repository()
// so we watch it for changes
d->configFileName = locate("config", "cvsservicerc");
KDirWatch* fileWatcher = new KDirWatch(this);
- connect(fileWatcher, SIGNAL(dirty(const QString&)),
- this, SLOT(slotConfigDirty(const QString&)));
+ connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)),
+ this, TQT_SLOT(slotConfigDirty(const TQString&)));
fileWatcher->addFile(d->configFileName);
}
-Repository::Repository(const QString& repository)
- : QObject()
+Repository::Repository(const TQString& repository)
+ : TQObject()
, DCOPObject()
, d(new Private)
{
@@ -83,8 +83,8 @@ Repository::Repository(const QString& repository)
// so we watch it for changes
d->configFileName = locate("config", "cvsservicerc");
KDirWatch* fileWatcher = new KDirWatch(this);
- connect(fileWatcher, SIGNAL(dirty(const QString&)),
- this, SLOT(slotConfigDirty(const QString&)));
+ connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)),
+ this, TQT_SLOT(slotConfigDirty(const TQString&)));
fileWatcher->addFile(d->configFileName);
}
@@ -95,9 +95,9 @@ Repository::~Repository()
}
-QString Repository::cvsClient() const
+TQString Repository::cvsClient() const
{
- QString client(d->client);
+ TQString client(d->client);
// suppress reading of the '.cvsrc' file
client += " -f";
@@ -105,52 +105,52 @@ QString Repository::cvsClient() const
// we don't need the command line option if there is no compression level set
if( d->compressionLevel > 0 )
{
- client += " -z" + QString::number(d->compressionLevel) + " ";
+ client += " -z" + TQString::number(d->compressionLevel) + " ";
}
return client;
}
-QString Repository::clientOnly() const
+TQString Repository::clientOnly() const
{
return d->client;
}
-QString Repository::rsh() const
+TQString Repository::rsh() const
{
return d->rsh;
}
-QString Repository::server() const
+TQString Repository::server() const
{
return d->server;
}
-bool Repository::setWorkingCopy(const QString& dirName)
+bool Repository::setWorkingCopy(const TQString& dirName)
{
- const QFileInfo fi(dirName);
- const QString path = fi.absFilePath();
+ const TQFileInfo fi(dirName);
+ const TQString path = fi.absFilePath();
// is this really a cvs-controlled directory?
- const QFileInfo cvsDirInfo(path + "/CVS");
+ const TQFileInfo cvsDirInfo(path + "/CVS");
if( !cvsDirInfo.exists() || !cvsDirInfo.isDir() ||
- !QFile::exists( cvsDirInfo.filePath() + "/Entries" ) ||
- !QFile::exists( cvsDirInfo.filePath() + "/Repository" ) ||
- !QFile::exists( cvsDirInfo.filePath() + "/Root" ) )
+ !TQFile::exists( cvsDirInfo.filePath() + "/Entries" ) ||
+ !TQFile::exists( cvsDirInfo.filePath() + "/Repository" ) ||
+ !TQFile::exists( cvsDirInfo.filePath() + "/Root" ) )
return false;
d->workingCopy = path;
- d->location = QString::null;
+ d->location = TQString::null;
// determine path to the repository
- QFile rootFile(path + "/CVS/Root");
+ TQFile rootFile(path + "/CVS/Root");
if( rootFile.open(IO_ReadOnly) )
{
- QTextStream stream(&rootFile);
+ TQTextStream stream(&rootFile);
d->location = stream.readLine();
}
rootFile.close();
@@ -163,20 +163,20 @@ bool Repository::setWorkingCopy(const QString& dirName)
ssh.addSshIdentities();
}
- QDir::setCurrent(path);
+ TQDir::setCurrent(path);
d->readConfig();
return true;
}
-QString Repository::workingCopy() const
+TQString Repository::workingCopy() const
{
return d->workingCopy;
}
-QString Repository::location() const
+TQString Repository::location() const
{
return d->location;
}
@@ -188,7 +188,7 @@ bool Repository::retrieveCvsignoreFile() const
}
-void Repository::slotConfigDirty(const QString& fileName)
+void Repository::slotConfigDirty(const TQString& fileName)
{
if( fileName == d->configFileName )
{
@@ -223,7 +223,7 @@ void Repository::Private::readConfig()
//
// In order to be able to read this group, we then have to manually add
// the port number to it.
- QString repositoryGroup = QString::fromLatin1("Repository-") + location;
+ TQString repositoryGroup = TQString::fromLatin1("Repository-") + location;
if( !config->hasGroup(repositoryGroup) )
{
// find the position of the first path separator
diff --git a/cervisia/cvsservice/repository.h b/cervisia/cvsservice/repository.h
index e77754bb..0c6ed8a9 100644
--- a/cervisia/cvsservice/repository.h
+++ b/cervisia/cvsservice/repository.h
@@ -21,7 +21,7 @@
#ifndef REPOSITORY_H
#define REPOSITORY_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
class QString;
@@ -31,14 +31,14 @@ class QString;
* Represents a local or remote cvs repository with
* its repository-specific configuration data.
*/
-class KDE_EXPORT Repository : public QObject, public DCOPObject
+class KDE_EXPORT Repository : public TQObject, public DCOPObject
{
K_DCOP
Q_OBJECT
public:
Repository();
- explicit Repository(const QString& repository);
+ explicit Repository(const TQString& repository);
~Repository();
/**
@@ -47,11 +47,11 @@ public:
*
* @return A cvs command (including path).
*/
- QString cvsClient() const;
+ TQString cvsClient() const;
/**
*/
- QString clientOnly() const;
+ TQString clientOnly() const;
/**
* Remote shell command line client which should be used to
@@ -60,7 +60,7 @@ public:
*
* @return The remote shell client. Can be null if not set.
*/
- QString rsh() const;
+ TQString rsh() const;
/**
* Program to start on the server side when accessing a remote
@@ -68,7 +68,7 @@ public:
*
* @return The server program. Can be null if not set.
*/
- QString server() const;
+ TQString server() const;
k_dcop:
/**
@@ -76,14 +76,14 @@ k_dcop:
*
* @param dirName path to the local working copy directory.
*/
- bool setWorkingCopy(const QString& dirName);
+ bool setWorkingCopy(const TQString& dirName);
/**
* Path to the current working copy.
*
* @return The working copy directory. Can be null if not set.
*/
- QString workingCopy() const;
+ TQString workingCopy() const;
/**
* Path and method to access the current cvs repository.
@@ -91,14 +91,14 @@ k_dcop:
*
* @return The path and method to access the cvs repository.
*/
- QString location() const;
+ TQString location() const;
/**
*/
bool retrieveCvsignoreFile() const;
private slots:
- void slotConfigDirty(const QString& fileName);
+ void slotConfigDirty(const TQString& fileName);
private:
struct Private;
diff --git a/cervisia/cvsservice/sshagent.cpp b/cervisia/cvsservice/sshagent.cpp
index fe50dce8..4f8abd25 100644
--- a/cervisia/cvsservice/sshagent.cpp
+++ b/cervisia/cvsservice/sshagent.cpp
@@ -20,7 +20,7 @@
#include "sshagent.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -32,12 +32,12 @@
// initialize static member variables
bool SshAgent::m_isRunning = false;
bool SshAgent::m_isOurAgent = false;
-QString SshAgent::m_authSock = QString::null;
-QString SshAgent::m_pid = QString::null;
+TQString SshAgent::m_authSock = TQString::null;
+TQString SshAgent::m_pid = TQString::null;
-SshAgent::SshAgent(QObject* parent, const char* name)
- : QObject(parent, name)
+SshAgent::SshAgent(TQObject* parent, const char* name)
+ : TQObject(parent, name)
{
}
@@ -61,11 +61,11 @@ bool SshAgent::querySshAgent()
kdDebug(8051) << "SshAgent::querySshAgent(): ssh-agent already exists"
<< endl;
- m_pid = QString::fromLocal8Bit(pid);
+ m_pid = TQString::fromLocal8Bit(pid);
char* sock = ::getenv("SSH_AUTH_SOCK");
if( sock )
- m_authSock = QString::fromLocal8Bit(sock);
+ m_authSock = TQString::fromLocal8Bit(sock);
m_isOurAgent = false;
m_isRunning = true;
@@ -99,10 +99,10 @@ bool SshAgent::addSshIdentities()
proc << "ssh-add";
- connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
proc.start(KProcess::DontCare, KProcess::AllOutput);
@@ -137,14 +137,14 @@ void SshAgent::slotProcessExited(KProcess*)
{
kdDebug(8051) << "SshAgent::slotProcessExited(): ENTER" << endl;
- QRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);");
- QRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);");
+ TQRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);");
+ TQRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);");
- QRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*");
- QRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*");
+ TQRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*");
+ TQRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*");
- QStringList::Iterator it = m_outputLines.begin();
- QStringList::Iterator end = m_outputLines.end();
+ TQStringList::Iterator it = m_outputLines.begin();
+ TQStringList::Iterator end = m_outputLines.end();
for( ; it != end; ++it )
{
if( m_pid.isEmpty() )
@@ -191,8 +191,8 @@ void SshAgent::slotReceivedStdout(KProcess* proc, char* buffer, int buflen)
{
Q_UNUSED(proc);
- QString output = QString::fromLocal8Bit(buffer, buflen);
- m_outputLines += QStringList::split("\n", output);
+ TQString output = TQString::fromLocal8Bit(buffer, buflen);
+ m_outputLines += TQStringList::split("\n", output);
kdDebug(8051) << "SshAgent::slotReceivedStdout(): output = " << output << endl;
}
@@ -202,8 +202,8 @@ void SshAgent::slotReceivedStderr(KProcess* proc, char* buffer, int buflen)
{
Q_UNUSED(proc);
- QString output = QString::fromLocal8Bit(buffer, buflen);
- m_outputLines += QStringList::split("\n", output);
+ TQString output = TQString::fromLocal8Bit(buffer, buflen);
+ m_outputLines += TQStringList::split("\n", output);
kdDebug(8051) << "SshAgent::slotReceivedStderr(): output = " << output << endl;
}
@@ -217,12 +217,12 @@ bool SshAgent::startSshAgent()
proc << "ssh-agent";
- connect(&proc, SIGNAL(processExited(KProcess*)),
- SLOT(slotProcessExited(KProcess*)));
- connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- SLOT(slotReceivedStderr(KProcess*, char*, int)) );
+ connect(&proc, TQT_SIGNAL(processExited(KProcess*)),
+ TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) );
proc.start(KProcess::NotifyOnExit, KProcess::All);
diff --git a/cervisia/cvsservice/sshagent.h b/cervisia/cvsservice/sshagent.h
index beb0e488..3de23076 100644
--- a/cervisia/cvsservice/sshagent.h
+++ b/cervisia/cvsservice/sshagent.h
@@ -21,9 +21,9 @@
#ifndef SSHAGENT_H
#define SSHAGENT_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KProcess;
@@ -33,7 +33,7 @@ class SshAgent : public QObject
Q_OBJECT
public:
- SshAgent(QObject* parent = 0, const char* name = 0);
+ SshAgent(TQObject* parent = 0, const char* name = 0);
~SshAgent();
bool querySshAgent();
@@ -41,8 +41,8 @@ public:
void killSshAgent();
bool isRunning() const { return m_isRunning; }
- QString pid() const { return m_pid; }
- QString authSock() const { return m_authSock; }
+ TQString pid() const { return m_pid; }
+ TQString authSock() const { return m_authSock; }
private slots:
void slotProcessExited(KProcess*);
@@ -52,12 +52,12 @@ private slots:
private:
bool startSshAgent();
- QStringList m_outputLines;
+ TQStringList m_outputLines;
static bool m_isRunning;
static bool m_isOurAgent;
- static QString m_authSock;
- static QString m_pid;
+ static TQString m_authSock;
+ static TQString m_pid;
};
diff --git a/cervisia/diffdlg.cpp b/cervisia/diffdlg.cpp
index 8dcb5bdf..fadb6582 100644
--- a/cervisia/diffdlg.cpp
+++ b/cervisia/diffdlg.cpp
@@ -19,14 +19,14 @@
#include "diffdlg.h"
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qkeycode.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqkeycode.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kfiledialog.h>
#include <klocale.h>
@@ -41,19 +41,19 @@
#include "diffview.h"
-DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool modal)
- : KDialogBase(parent, name, modal, QString::null,
+DiffDialog::DiffDialog(KConfig& cfg, TQWidget *parent, const char *name, bool modal)
+ : KDialogBase(parent, name, modal, TQString::null,
Close | Help | User1, Close, true, KStdGuiItem::saveAs())
, partConfig(cfg)
{
items.setAutoDelete(true);
markeditem = -1;
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QGridLayout *pairlayout = new QGridLayout(layout);
+ TQGridLayout *pairlayout = new TQGridLayout(layout);
pairlayout->setRowStretch(0, 0);
pairlayout->setRowStretch(1, 1);
pairlayout->setColStretch(1, 0);
@@ -61,10 +61,10 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod
pairlayout->setColStretch(0, 10);
pairlayout->setColStretch(2, 10);
- revlabel1 = new QLabel(mainWidget);
+ revlabel1 = new TQLabel(mainWidget);
pairlayout->addWidget(revlabel1, 0, 0);
- revlabel2 = new QLabel(mainWidget);
+ revlabel2 = new TQLabel(mainWidget);
pairlayout->addWidget(revlabel2, 0, 2);
diff1 = new DiffView(cfg, true, false, mainWidget);
@@ -79,29 +79,29 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod
diff1->setPartner(diff2);
diff2->setPartner(diff1);
- syncbox = new QCheckBox(i18n("Synchronize scroll bars"), mainWidget);
+ syncbox = new TQCheckBox(i18n("Synchronize scroll bars"), mainWidget);
syncbox->setChecked(true);
- connect( syncbox, SIGNAL(toggled(bool)),
- this, SLOT(toggleSynchronize(bool)) );
+ connect( syncbox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(toggleSynchronize(bool)) );
- itemscombo = new QComboBox(mainWidget);
- itemscombo->insertItem(QString::null);
- connect( itemscombo, SIGNAL(activated(int)),
- this, SLOT(comboActivated(int)) );
+ itemscombo = new TQComboBox(mainWidget);
+ itemscombo->insertItem(TQString::null);
+ connect( itemscombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(comboActivated(int)) );
- nofnlabel = new QLabel(mainWidget);
+ nofnlabel = new TQLabel(mainWidget);
// avoids auto resize when the text is changed
nofnlabel->setMinimumWidth(fontMetrics().width(i18n("%1 differences").arg(10000)));
- backbutton = new QPushButton(QString::fromLatin1("&<<"), mainWidget);
- connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) );
+ backbutton = new TQPushButton(TQString::fromLatin1("&<<"), mainWidget);
+ connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) );
- forwbutton = new QPushButton(QString::fromLatin1("&>>"), mainWidget);
- connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) );
+ forwbutton = new TQPushButton(TQString::fromLatin1("&>>"), mainWidget);
+ connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) );
- connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) );
- QBoxLayout *buttonlayout = new QHBoxLayout(layout);
+ TQBoxLayout *buttonlayout = new TQHBoxLayout(layout);
buttonlayout->addWidget(syncbox, 0);
buttonlayout->addStretch(4);
buttonlayout->addWidget(itemscombo);
@@ -115,7 +115,7 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "DiffDialog");
+ TQSize size = configDialogSize(partConfig, "DiffDialog");
resize(size);
KConfigGroupSaver cs(&partConfig, "DiffDialog");
@@ -132,7 +132,7 @@ DiffDialog::~DiffDialog()
}
-void DiffDialog::keyPressEvent(QKeyEvent *e)
+void DiffDialog::keyPressEvent(TQKeyEvent *e)
{
switch (e->key())
{
@@ -171,9 +171,9 @@ void DiffDialog::comboActivated(int index)
}
-static void interpretRegion(QString line, int *linenoA, int *linenoB)
+static void interpretRegion(TQString line, int *linenoA, int *linenoB)
{
- QRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" );
+ TQRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" );
if (!region.exactMatch(line))
return;
@@ -183,24 +183,24 @@ static void interpretRegion(QString line, int *linenoA, int *linenoB)
}
-static QString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB)
+static TQString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB)
{
int lineendA = linenoA+linecountA-1;
int lineendB = linenoB+linecountB-1;
- QString res;
+ TQString res;
if (linecountB == 0)
- res = QString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1);
+ res = TQString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1);
else if (linecountA == 0)
- res = QString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB);
+ res = TQString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB);
else if (linenoA == lineendA)
if (linenoB == lineendB)
- res = QString("%1c%2").arg(linenoA).arg(linenoB);
+ res = TQString("%1c%2").arg(linenoA).arg(linenoB);
else
- res = QString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB);
+ res = TQString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB);
else if (linenoB == lineendB)
- res = QString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB);
+ res = TQString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB);
else
- res = QString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB);
+ res = TQString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB);
return res;
@@ -216,10 +216,10 @@ public:
};
-bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName,
- const QString &revA, const QString &revB)
+bool DiffDialog::parseCvsDiff(CvsService_stub* service, const TQString& fileName,
+ const TQString &revA, const TQString &revB)
{
- QStringList linesA, linesB;
+ TQStringList linesA, linesB;
int linenoA, linenoB;
setCaption(i18n("CVS Diff: %1").arg(fileName));
@@ -238,14 +238,14 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName,
// place, but this design at least makes the handling trans-
// parent for the calling routines
- QString extdiff = partConfig.readPathEntry("ExternalDiff");
+ TQString extdiff = partConfig.readPathEntry("ExternalDiff");
if (!extdiff.isEmpty())
{
callExternalDiff(extdiff, service, fileName, revA, revB);
return false;
}
- const QString diffOptions = partConfig.readEntry("DiffOptions");
+ const TQString diffOptions = partConfig.readEntry("DiffOptions");
const unsigned contextLines = partConfig.readUnsignedNumEntry("ContextLines", 65535);
DCOPRef job = service->diff(fileName, revA, revB, diffOptions, contextLines);
@@ -259,7 +259,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName,
// remember diff output for "save as" action
m_diffOutput = dlg.getOutput();
- QString line;
+ TQString line;
while ( dlg.getLine(line) && !line.startsWith("+++"))
;
@@ -278,7 +278,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName,
if (line.length() < 1)
continue;
- QChar marker = line[0];
+ TQChar marker = line[0];
line.remove(0, 1);
if (marker == '-')
@@ -312,7 +312,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName,
void DiffDialog::newDiffHunk(int& linenoA, int& linenoB,
- const QStringList& linesA, const QStringList& linesB)
+ const TQStringList& linesA, const TQStringList& linesB)
{
DiffItem *item = new DiffItem;
item->linenoA = linenoA+1;
@@ -321,12 +321,12 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB,
item->linecountB = linesB.count();
items.append(item);
- const QString region = regionAsString(linenoA+1, linesA.count(),
+ const TQString region = regionAsString(linenoA+1, linesA.count(),
linenoB+1, linesB.count());
itemscombo->insertItem(region);
- QStringList::ConstIterator itA = linesA.begin();
- QStringList::ConstIterator itB = linesB.begin();
+ TQStringList::ConstIterator itA = linesA.begin();
+ TQStringList::ConstIterator itB = linesB.begin();
while (itA != linesA.end() || itB != linesB.end())
{
if (itA != linesA.end())
@@ -351,22 +351,22 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB,
}
-void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* service,
- const QString& fileName, const QString &revA,
- const QString &revB)
+void DiffDialog::callExternalDiff(const TQString& extdiff, CvsService_stub* service,
+ const TQString& fileName, const TQString &revA,
+ const TQString &revB)
{
- QString extcmdline = extdiff;
+ TQString extcmdline = extdiff;
extcmdline += " ";
- // create suffix for temporary file (used QFileInfo to remove path from file name)
- const QString suffix = "-" + QFileInfo(fileName).fileName();
+ // create suffix for temporary file (used TQFileInfo to remove path from file name)
+ const TQString suffix = "-" + TQFileInfo(fileName).fileName();
DCOPRef job;
if (!revA.isEmpty() && !revB.isEmpty())
{
// We're comparing two revisions
- QString revAFilename = tempFileName(suffix+QString("-")+revA);
- QString revBFilename = tempFileName(suffix+QString("-")+revB);
+ TQString revAFilename = tempFileName(suffix+TQString("-")+revA);
+ TQString revBFilename = tempFileName(suffix+TQString("-")+revB);
// download the files for revision A and B
job = service->downloadRevision(fileName, revA, revAFilename,
@@ -381,14 +381,14 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi
else
{
// We're comparing to a file, and perhaps one revision
- QString revAFilename = tempFileName(suffix+QString("-")+revA);
+ TQString revAFilename = tempFileName(suffix+TQString("-")+revA);
job = service->downloadRevision(fileName, revA, revAFilename);
if( !service->ok() )
return;
extcmdline += KProcess::quote(revAFilename);
extcmdline += " ";
- extcmdline += KProcess::quote(QFileInfo(fileName).absFilePath());
+ extcmdline += KProcess::quote(TQFileInfo(fileName).absFilePath());
}
ProgressDialog dlg(this, "Diff", job, "diff");
@@ -406,7 +406,7 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi
void DiffDialog::updateNofN()
{
- QString str;
+ TQString str;
if (markeditem >= 0)
str = i18n("%1 of %2").arg(markeditem+1).arg(items.count());
else
@@ -477,14 +477,14 @@ void DiffDialog::forwClicked()
void DiffDialog::saveAsClicked()
{
- QString fileName = KFileDialog::getSaveFileName(QString::null, QString::null, this);
+ TQString fileName = KFileDialog::getSaveFileName(TQString::null, TQString::null, this);
if( fileName.isEmpty() )
return;
if( !Cervisia::CheckOverwrite(fileName, this) )
return;
- QFile f(fileName);
+ TQFile f(fileName);
if( !f.open(IO_WriteOnly) )
{
KMessageBox::sorry(this,
@@ -493,8 +493,8 @@ void DiffDialog::saveAsClicked()
return;
}
- QTextStream ts(&f);
- QStringList::Iterator it = m_diffOutput.begin();
+ TQTextStream ts(&f);
+ TQStringList::Iterator it = m_diffOutput.begin();
for( ; it != m_diffOutput.end(); ++it )
ts << *it << "\n";
diff --git a/cervisia/diffdlg.h b/cervisia/diffdlg.h
index 25407c96..f234b36c 100644
--- a/cervisia/diffdlg.h
+++ b/cervisia/diffdlg.h
@@ -21,7 +21,7 @@
#ifndef DIFFDLG_H
#define DIFFDLG_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
@@ -40,16 +40,16 @@ class DiffDialog : public KDialogBase
public:
- explicit DiffDialog( KConfig& config, QWidget *parent=0, const char *name=0,
+ explicit DiffDialog( KConfig& config, TQWidget *parent=0, const char *name=0,
bool modal=false );
virtual ~DiffDialog();
- bool parseCvsDiff(CvsService_stub* service, const QString &fileName,
- const QString &revA, const QString &revB);
+ bool parseCvsDiff(CvsService_stub* service, const TQString &fileName,
+ const TQString &revA, const TQString &revB);
protected:
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
private slots:
void toggleSynchronize(bool b);
@@ -59,24 +59,24 @@ private slots:
void saveAsClicked();
private:
- void newDiffHunk(int& linenoA, int& linenoB, const QStringList& linesA,
- const QStringList& linesB);
- void callExternalDiff(const QString& extdiff, CvsService_stub* service,
- const QString& fileName, const QString& revA,
- const QString& revB);
+ void newDiffHunk(int& linenoA, int& linenoB, const TQStringList& linesA,
+ const TQStringList& linesB);
+ void callExternalDiff(const TQString& extdiff, CvsService_stub* service,
+ const TQString& fileName, const TQString& revA,
+ const TQString& revB);
void updateNofN();
void updateHighlight(int newitem);
- QLabel *revlabel1, *revlabel2, *nofnlabel;
- QCheckBox *syncbox;
- QComboBox *itemscombo;
- QPushButton *backbutton, *forwbutton;
+ TQLabel *revlabel1, *revlabel2, *nofnlabel;
+ TQCheckBox *syncbox;
+ TQComboBox *itemscombo;
+ TQPushButton *backbutton, *forwbutton;
DiffView *diff1, *diff2;
- QPtrList<DiffItem> items;
+ TQPtrList<DiffItem> items;
int markeditem;
KConfig& partConfig;
- QStringList m_diffOutput;
+ TQStringList m_diffOutput;
};
#endif
diff --git a/cervisia/diffview.cpp b/cervisia/diffview.cpp
index 1892880e..597ec97f 100644
--- a/cervisia/diffview.cpp
+++ b/cervisia/diffview.cpp
@@ -20,11 +20,11 @@
#include "diffview.h"
-#include <qpainter.h>
-#include <qscrollbar.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqscrollbar.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -36,14 +36,14 @@
class DiffViewItem
{
public:
- QString line;
+ TQString line;
DiffView::DiffType type;
bool inverted;
int no;
};
-int DiffViewItemList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int DiffViewItemList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
return (static_cast<DiffViewItem*>(item1)->no
== static_cast<DiffViewItem*>(item2)->no)? 0 : 1;
@@ -54,7 +54,7 @@ const int DiffView::BORDER = 7;
DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: QtTableView(parent, name, WRepaintNoErase)
, partConfig(cfg)
{
@@ -62,13 +62,13 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker,
setNumCols( 1 + (withlinenos?1:0) + (withmarker?1:0) );
setTableFlags( Tbl_autoVScrollBar|Tbl_autoHScrollBar|
Tbl_smoothVScrolling );
- setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
+ setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
setBackgroundMode( PaletteBase );
setWFlags( WResizeNoErase );
partConfig.setGroup("LookAndFeel");
setFont(partConfig.readFontEntry("DiffFont"));
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
setCellHeight(fm.lineSpacing());
setCellWidth(0);
textwidth = 0;
@@ -81,19 +81,19 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker,
marker = withmarker;
partConfig.setGroup("Colors");
- QColor defaultColor=QColor(237, 190, 190);
+ TQColor defaultColor=TQColor(237, 190, 190);
diffChangeColor=partConfig.readColorEntry("DiffChange",&defaultColor);
- defaultColor=QColor(190, 190, 237);
+ defaultColor=TQColor(190, 190, 237);
diffInsertColor=partConfig.readColorEntry("DiffInsert",&defaultColor);
- defaultColor=QColor(190, 237, 190);
+ defaultColor=TQColor(190, 237, 190);
diffDeleteColor=partConfig.readColorEntry("DiffDelete",&defaultColor);
}
-void DiffView::setFont(const QFont &font)
+void DiffView::setFont(const TQFont &font)
{
QtTableView::setFont(font);
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
setCellHeight(fm.lineSpacing());
}
@@ -103,14 +103,14 @@ void DiffView::setPartner(DiffView *other)
partner = other;
if (partner)
{
- connect( verticalScrollBar(), SIGNAL(valueChanged(int)),
- SLOT(vertPositionChanged(int)) );
- connect( verticalScrollBar(), SIGNAL(sliderMoved(int)),
- SLOT(vertPositionChanged(int)) );
- connect( horizontalScrollBar(), SIGNAL(valueChanged(int)),
- SLOT(horzPositionChanged(int)) );
- connect( horizontalScrollBar(), SIGNAL(sliderMoved(int)),
- SLOT(horzPositionChanged(int)) );
+ connect( verticalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(vertPositionChanged(int)) );
+ connect( verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)),
+ TQT_SLOT(vertPositionChanged(int)) );
+ connect( horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(horzPositionChanged(int)) );
+ connect( horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)),
+ TQT_SLOT(horzPositionChanged(int)) );
}
}
@@ -137,7 +137,7 @@ void DiffView::removeAtOffset(int offset)
}
-void DiffView::insertAtOffset(const QString &line, DiffType type, int offset)
+void DiffView::insertAtOffset(const TQString &line, DiffType type, int offset)
{
DiffViewItem *item = new DiffViewItem;
item->line = line;
@@ -159,12 +159,12 @@ void DiffView::setCenterOffset(int offset)
}
-void DiffView::addLine(const QString &line, DiffType type, int no)
+void DiffView::addLine(const TQString &line, DiffType type, int no)
{
- QFont f(font());
+ TQFont f(font());
f.setBold(true);
- QFontMetrics fmbold(f);
- QFontMetrics fm(font());
+ TQFontMetrics fmbold(f);
+ TQFontMetrics fm(font());
// calculate textwidth based on 'line' where tabs are expanded
@@ -172,9 +172,9 @@ void DiffView::addLine(const QString &line, DiffType type, int no)
// *Please note*
// For some fonts, e.g. "Clean", is fm.maxWidth() greater than
// fmbold.maxWidth().
- QString copy(line);
+ TQString copy(line);
const int numTabs = copy.contains('\t', false);
- copy.replace( QRegExp("\t"), "");
+ copy.replace( TQRegExp("\t"), "");
const int tabSize = m_tabWidth * QMAX(fm.maxWidth(), fmbold.maxWidth());
const int copyWidth = QMAX(fm.width(copy), fmbold.width(copy));
@@ -190,7 +190,7 @@ void DiffView::addLine(const QString &line, DiffType type, int no)
}
-QString DiffView::stringAtOffset(int offset)
+TQString DiffView::stringAtOffset(int offset)
{
if (offset >= (int)items.count())
{
@@ -236,21 +236,21 @@ void DiffView::setCenterLine(int lineno)
}
-QString DiffView::stringAtLine(int lineno)
+TQString DiffView::stringAtLine(int lineno)
{
int pos;
if ( (pos = findLine(lineno)) != -1 )
return items.at(pos)->line;
else
- return QString();
+ return TQString();
}
-QByteArray DiffView::compressedContent()
+TQByteArray DiffView::compressedContent()
{
- QByteArray res(items.count());
+ TQByteArray res(items.count());
- QPtrListIterator<DiffViewItem> it(items);
+ TQPtrListIterator<DiffViewItem> it(items);
int i=0;
for (; it.current(); ++it)
{
@@ -273,12 +273,12 @@ int DiffView::cellWidth(int col)
{
if (col == 0 && linenos)
{
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
return fm.width("10000");
}
else if (marker && (col == 0 || col == 1))
{
- QFontMetrics fm( fontMetrics() );
+ TQFontMetrics fm( fontMetrics() );
return QMAX(QMAX( fm.width(i18n("Delete")),
fm.width(i18n("Insert"))),
fm.width(i18n("Change")))+2*BORDER;
@@ -293,16 +293,16 @@ int DiffView::cellWidth(int col)
}
-QSize DiffView::sizeHint() const
+TQSize DiffView::sizeHint() const
{
- QFontMetrics fm(font());
- return QSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 );
+ TQFontMetrics fm(font());
+ return TQSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 );
}
-void DiffView::paintCell(QPainter *p, int row, int col)
+void DiffView::paintCell(TQPainter *p, int row, int col)
{
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
p->setTabStops(m_tabWidth * fm.maxWidth());
DiffViewItem *item = items.at(row);
@@ -310,13 +310,13 @@ void DiffView::paintCell(QPainter *p, int row, int col)
int width = cellWidth(col);
int height = cellHeight();
- QColor backgroundColor;
+ TQColor backgroundColor;
bool inverted;
int align;
int innerborder;
- QString str;
+ TQString str;
- QFont oldFont(p->font());
+ TQFont oldFont(p->font());
if (item->type==Separator)
{
backgroundColor = KGlobalSettings::highlightColor();
@@ -326,7 +326,7 @@ void DiffView::paintCell(QPainter *p, int row, int col)
innerborder = 0;
if (col == (linenos?1:0) + (marker?1:0))
str = item->line;
- QFont f(oldFont);
+ TQFont f(oldFont);
f.setBold(true);
p->setFont(f);
}
@@ -351,7 +351,7 @@ void DiffView::paintCell(QPainter *p, int row, int col)
innerborder = BORDER;
str = (item->type==Change)? i18n("Change")
: (item->type==Insert)? i18n("Insert")
- : (item->type==Delete)? i18n("Delete") : QString::null;
+ : (item->type==Delete)? i18n("Delete") : TQString::null;
}
else
{
@@ -371,7 +371,7 @@ void DiffView::paintCell(QPainter *p, int row, int col)
{
p->setPen(backgroundColor);
backgroundColor = KGlobalSettings::textColor();
- QFont f(oldFont);
+ TQFont f(oldFont);
f.setBold(true);
p->setFont(f);
}
@@ -382,23 +382,23 @@ void DiffView::paintCell(QPainter *p, int row, int col)
}
-void DiffView::wheelEvent(QWheelEvent *e)
+void DiffView::wheelEvent(TQWheelEvent *e)
{
- QApplication::sendEvent(verticalScrollBar(), e);
+ TQApplication::sendEvent(verticalScrollBar(), e);
}
-DiffZoomWidget::DiffZoomWidget(KConfig& cfg, QWidget *parent, const char *name)
- : QFrame(parent, name)
+DiffZoomWidget::DiffZoomWidget(KConfig& cfg, TQWidget *parent, const char *name)
+ : TQFrame(parent, name)
{
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
cfg.setGroup("Colors");
- QColor defaultColor=QColor(237, 190, 190);
+ TQColor defaultColor=TQColor(237, 190, 190);
diffChangeColor=cfg.readColorEntry("DiffChange",&defaultColor);
- defaultColor=QColor(190, 190, 237);
+ defaultColor=TQColor(190, 190, 237);
diffInsertColor=cfg.readColorEntry("DiffInsert",&defaultColor);
- defaultColor=QColor(190, 237, 190);
+ defaultColor=TQColor(190, 237, 190);
diffDeleteColor=cfg.readColorEntry("DiffDelete",&defaultColor);
}
@@ -410,49 +410,49 @@ DiffZoomWidget::~DiffZoomWidget()
void DiffZoomWidget::setDiffView(DiffView *view)
{
diffview = view;
- QScrollBar *sb = const_cast<QScrollBar*>(diffview->scrollBar());
+ TQScrollBar *sb = const_cast<TQScrollBar*>(diffview->scrollBar());
sb->installEventFilter(this);
}
-QSize DiffZoomWidget::sizeHint() const
+TQSize DiffZoomWidget::sizeHint() const
{
- return QSize(25, style().pixelMetric(QStyle::PM_ScrollBarExtent, this));
+ return TQSize(25, style().pixelMetric(TQStyle::PM_ScrollBarExtent, this));
}
-bool DiffZoomWidget::eventFilter(QObject *o, QEvent *e)
+bool DiffZoomWidget::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::Show
- || e->type() == QEvent::Hide
- || e->type() == QEvent::Resize)
+ if (e->type() == TQEvent::Show
+ || e->type() == TQEvent::Hide
+ || e->type() == TQEvent::Resize)
repaint();
- return QFrame::eventFilter(o, e);
+ return TQFrame::eventFilter(o, e);
}
-void DiffZoomWidget::paintEvent(QPaintEvent *)
+void DiffZoomWidget::paintEvent(TQPaintEvent *)
{
- const QScrollBar* scrollBar = diffview->scrollBar();
+ const TQScrollBar* scrollBar = diffview->scrollBar();
if (!scrollBar)
return;
// only y and height are important
- const QRect scrollBarGroove(scrollBar->isVisible()
- ? style().querySubControlMetrics(QStyle::CC_ScrollBar,
+ const TQRect scrollBarGroove(scrollBar->isVisible()
+ ? style().querySubControlMetrics(TQStyle::CC_ScrollBar,
scrollBar,
- QStyle::SC_ScrollBarGroove)
+ TQStyle::SC_ScrollBarGroove)
: rect());
// draw rectangles at the positions of the differences
- const QByteArray& lineTypes(diffview->compressedContent());
+ const TQByteArray& lineTypes(diffview->compressedContent());
- QPixmap pixbuf(width(), scrollBarGroove.height());
+ TQPixmap pixbuf(width(), scrollBarGroove.height());
pixbuf.fill(KGlobalSettings::baseColor());
- QPainter p(&pixbuf, this);
+ TQPainter p(&pixbuf, this);
if (const unsigned int numberOfLines = lineTypes.size())
{
const double scale(((double) scrollBarGroove.height()) / numberOfLines);
@@ -468,7 +468,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *)
for (++index; index < numberOfLines && lineType == lineTypes[index]; ++index)
;
- QColor color;
+ TQColor color;
switch (lineType)
{
case 'C':
@@ -491,7 +491,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *)
const int yPos2(qRound(index * scale));
const int areaHeight((yPos2 != yPos1) ? yPos2 - yPos1 : 1);
- p.fillRect(0, yPos1, pixbuf.width(), areaHeight, QBrush(color));
+ p.fillRect(0, yPos1, pixbuf.width(), areaHeight, TQBrush(color));
}
}
}
diff --git a/cervisia/diffview.h b/cervisia/diffview.h
index b79c7189..160dd2cd 100644
--- a/cervisia/diffview.h
+++ b/cervisia/diffview.h
@@ -24,18 +24,18 @@
#include "qttableview.h"
-#include <qptrcollection.h>
-#include <qptrlist.h>
+#include <tqptrcollection.h>
+#include <tqptrlist.h>
class KConfig;
class DiffViewItem;
-class DiffViewItemList : public QPtrList<DiffViewItem>
+class DiffViewItemList : public TQPtrList<DiffViewItem>
{
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
};
@@ -47,7 +47,7 @@ public:
enum DiffType { Change, Insert, Delete, Neutral, Unchanged, Separator };
DiffView( KConfig& cfg, bool withlinenos, bool withmarker,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
void setPartner(DiffView *other);
@@ -60,23 +60,23 @@ public:
void prior()
{ setTopCell(topCell()-viewHeight()/cellHeight()); }
- void addLine(const QString &line, DiffType type, int no=-1);
- QString stringAtLine(int lineno);
+ void addLine(const TQString &line, DiffType type, int no=-1);
+ TQString stringAtLine(int lineno);
void setCenterLine(int lineno);
void setInverted(int lineno, bool inverted);
int count();
void removeAtOffset(int offset);
- void insertAtOffset(const QString &line, DiffType type, int offset);
+ void insertAtOffset(const TQString &line, DiffType type, int offset);
void setCenterOffset(int offset);
- QString stringAtOffset(int offset);
- QByteArray compressedContent();
+ TQString stringAtOffset(int offset);
+ TQByteArray compressedContent();
- virtual void setFont(const QFont &font);
+ virtual void setFont(const TQFont &font);
virtual int cellWidth(int col);
- virtual QSize sizeHint() const;
- virtual void paintCell(QPainter *p, int row, int col);
- virtual void wheelEvent(QWheelEvent *);
- const QScrollBar *scrollBar() const
+ virtual TQSize sizeHint() const;
+ virtual void paintCell(TQPainter *p, int row, int col);
+ virtual void wheelEvent(TQWheelEvent *);
+ const TQScrollBar *scrollBar() const
{ return verticalScrollBar(); }
protected slots:
@@ -92,9 +92,9 @@ private:
DiffView *partner;
static const int BORDER;
- QColor diffChangeColor;
- QColor diffInsertColor;
- QColor diffDeleteColor;
+ TQColor diffChangeColor;
+ TQColor diffInsertColor;
+ TQColor diffDeleteColor;
int m_tabWidth;
KConfig& partConfig;
@@ -106,22 +106,22 @@ class DiffZoomWidget : public QFrame
Q_OBJECT
public:
- DiffZoomWidget(KConfig& cfg, QWidget *parent=0, const char *name=0);
+ DiffZoomWidget(KConfig& cfg, TQWidget *parent=0, const char *name=0);
~DiffZoomWidget();
void setDiffView(DiffView *view);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
protected:
- void paintEvent(QPaintEvent *);
- bool eventFilter(QObject *, QEvent *e);
+ void paintEvent(TQPaintEvent *);
+ bool eventFilter(TQObject *, TQEvent *e);
private:
DiffView *diffview;
- QColor diffChangeColor;
- QColor diffInsertColor;
- QColor diffDeleteColor;
+ TQColor diffChangeColor;
+ TQColor diffInsertColor;
+ TQColor diffDeleteColor;
};
#endif
diff --git a/cervisia/dirignorelist.cpp b/cervisia/dirignorelist.cpp
index d6ffcf2d..d6c91a36 100644
--- a/cervisia/dirignorelist.cpp
+++ b/cervisia/dirignorelist.cpp
@@ -19,18 +19,18 @@
#include "dirignorelist.h"
using namespace Cervisia;
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
-DirIgnoreList::DirIgnoreList(const QString& path)
+DirIgnoreList::DirIgnoreList(const TQString& path)
{
addEntriesFromFile(path + "/.cvsignore");
}
-void DirIgnoreList::addEntry(const QString& entry)
+void DirIgnoreList::addEntry(const TQString& entry)
{
- if (entry != QChar('!'))
+ if (entry != TQChar('!'))
{
m_stringMatcher.add(entry);
}
@@ -41,7 +41,7 @@ void DirIgnoreList::addEntry(const QString& entry)
}
-bool DirIgnoreList::matches(const QFileInfo* fi) const
+bool DirIgnoreList::matches(const TQFileInfo* fi) const
{
return m_stringMatcher.match(fi->fileName());
}
diff --git a/cervisia/dirignorelist.h b/cervisia/dirignorelist.h
index 41f82982..d1af9d5e 100644
--- a/cervisia/dirignorelist.h
+++ b/cervisia/dirignorelist.h
@@ -33,12 +33,12 @@ namespace Cervisia
class DirIgnoreList : public IgnoreListBase
{
public:
- explicit DirIgnoreList(const QString& path);
+ explicit DirIgnoreList(const TQString& path);
- virtual bool matches(const QFileInfo* fi) const;
+ virtual bool matches(const TQFileInfo* fi) const;
private:
- virtual void addEntry(const QString& entry);
+ virtual void addEntry(const TQString& entry);
StringMatcher m_stringMatcher;
};
diff --git a/cervisia/editwithmenu.cpp b/cervisia/editwithmenu.cpp
index 9ca0f14b..d7d1044a 100644
--- a/cervisia/editwithmenu.cpp
+++ b/cervisia/editwithmenu.cpp
@@ -19,7 +19,7 @@
#include "editwithmenu.h"
using namespace Cervisia;
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kmimetype.h>
@@ -27,8 +27,8 @@ using namespace Cervisia;
#include <kurl.h>
-EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent)
- : QObject(parent)
+EditWithMenu::EditWithMenu(const KURL& url, TQWidget* parent)
+ : TQObject(parent)
, m_menu(0)
, m_url(url)
{
@@ -43,21 +43,21 @@ EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent)
if( !m_offers.isEmpty() )
{
- m_menu = new QPopupMenu();
+ m_menu = new TQPopupMenu();
KTrader::OfferList::ConstIterator it = m_offers.begin();
for( int i = 0 ; it != m_offers.end(); ++it, ++i )
{
int id = m_menu->insertItem(SmallIcon((*it)->icon()),
(*it)->name(),
- this, SLOT(itemActivated(int)));
+ this, TQT_SLOT(itemActivated(int)));
m_menu->setItemParameter(id, i);
}
}
}
-QPopupMenu* EditWithMenu::menu()
+TQPopupMenu* EditWithMenu::menu()
{
return m_menu;
}
diff --git a/cervisia/editwithmenu.h b/cervisia/editwithmenu.h
index f78b7a2e..bd513412 100644
--- a/cervisia/editwithmenu.h
+++ b/cervisia/editwithmenu.h
@@ -19,7 +19,7 @@
#ifndef EDITWITHMENU_H
#define EDITWITHMENU_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ktrader.h>
#include <kurl.h>
@@ -35,15 +35,15 @@ class EditWithMenu : public QObject
Q_OBJECT
public:
- EditWithMenu(const KURL& url, QWidget* parent);
- QPopupMenu* menu();
+ EditWithMenu(const KURL& url, TQWidget* parent);
+ TQPopupMenu* menu();
private slots:
void itemActivated(int);
private:
KTrader::OfferList m_offers;
- QPopupMenu* m_menu;
+ TQPopupMenu* m_menu;
KURL m_url;
};
diff --git a/cervisia/entry.h b/cervisia/entry.h
index 875885d0..f3705d35 100644
--- a/cervisia/entry.h
+++ b/cervisia/entry.h
@@ -21,8 +21,8 @@
#define CERVISIA_ENTRY_H
-#include <qdatetime.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
#include "entry_status.h"
@@ -50,7 +50,7 @@ struct Entry
/**
* The name of this entry (without path).
*/
- QString m_name;
+ TQString m_name;
/**
* The type of this entry.
@@ -65,17 +65,17 @@ struct Entry
/**
* The revision of this entry.
*/
- QString m_revision;
+ TQString m_revision;
/**
* The modification date/time of this entry (in user's local time).
*/
- QDateTime m_dateTime;
+ TQDateTime m_dateTime;
/**
* The tag/branch of this entry.
*/
- QString m_tag;
+ TQString m_tag;
};
diff --git a/cervisia/entry_status.cpp b/cervisia/entry_status.cpp
index 8ad624fa..00ff3b32 100644
--- a/cervisia/entry_status.cpp
+++ b/cervisia/entry_status.cpp
@@ -19,7 +19,7 @@
#include "entry_status.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -28,9 +28,9 @@ namespace Cervisia
{
-QString toString(EntryStatus entryStatus)
+TQString toString(EntryStatus entryStatus)
{
- QString result;
+ TQString result;
switch (entryStatus)
{
case LocallyModified:
diff --git a/cervisia/entry_status.h b/cervisia/entry_status.h
index 634e0a04..9d1562ef 100644
--- a/cervisia/entry_status.h
+++ b/cervisia/entry_status.h
@@ -55,7 +55,7 @@ enum EntryStatus
*
* @return The translated string.
*/
-QString toString(EntryStatus entryStatus);
+TQString toString(EntryStatus entryStatus);
} // namespace Cervisia
diff --git a/cervisia/entry_status_change.h b/cervisia/entry_status_change.h
index 63b5f089..3518eed8 100644
--- a/cervisia/entry_status_change.h
+++ b/cervisia/entry_status_change.h
@@ -21,7 +21,7 @@
#define CERVISIA_ENTRY_STATUS_CHANGE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "entry_status.h"
@@ -39,7 +39,7 @@ struct EntryStatusChange
/**
* The name of the changed entry (including the path inside the repository / working copy).
*/
- QString m_name;
+ TQString m_name;
/**
* The new status of the entry.
diff --git a/cervisia/globalignorelist.cpp b/cervisia/globalignorelist.cpp
index 6d905fc7..b3834a42 100644
--- a/cervisia/globalignorelist.cpp
+++ b/cervisia/globalignorelist.cpp
@@ -19,7 +19,7 @@
#include "globalignorelist.h"
using namespace Cervisia;
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <ktempfile.h>
#include <stdlib.h> // for getenv()
@@ -39,14 +39,14 @@ GlobalIgnoreList::GlobalIgnoreList()
}
-bool GlobalIgnoreList::matches(const QFileInfo* fi) const
+bool GlobalIgnoreList::matches(const TQFileInfo* fi) const
{
return m_stringMatcher.match(fi->fileName());
}
void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService,
- const QString& repository)
+ const TQString& repository)
{
KTempFile tmpFile;
tmpFile.setAutoDelete(true);
@@ -68,9 +68,9 @@ void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService,
}
-void GlobalIgnoreList::addEntry(const QString& entry)
+void GlobalIgnoreList::addEntry(const TQString& entry)
{
- if (entry != QChar('!'))
+ if (entry != TQChar('!'))
{
m_stringMatcher.add(entry);
}
@@ -81,7 +81,7 @@ void GlobalIgnoreList::addEntry(const QString& entry)
// Bug #89215:
// Make sure '.' and '..' are always in the ignore list, so
// UpdateDirItem::maybeScanDir() doesn't loop endlessly.
- addEntriesFromString(QString::fromLatin1(". .."));
+ addEntriesFromString(TQString::fromLatin1(". .."));
}
}
@@ -92,9 +92,9 @@ void GlobalIgnoreList::setup()
.nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\
*.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$";
- addEntriesFromString(QString::fromLatin1(ignorestr));
- addEntriesFromString(QString::fromLocal8Bit(::getenv("CVSIGNORE")));
- addEntriesFromFile(QDir::homeDirPath() + "/.cvsignore");
+ addEntriesFromString(TQString::fromLatin1(ignorestr));
+ addEntriesFromString(TQString::fromLocal8Bit(::getenv("CVSIGNORE")));
+ addEntriesFromFile(TQDir::homeDirPath() + "/.cvsignore");
m_isInitialized = true;
}
diff --git a/cervisia/globalignorelist.h b/cervisia/globalignorelist.h
index b8f72664..2cde8c8f 100644
--- a/cervisia/globalignorelist.h
+++ b/cervisia/globalignorelist.h
@@ -35,14 +35,14 @@ class GlobalIgnoreList : public IgnoreListBase
public:
GlobalIgnoreList();
- virtual bool matches(const QFileInfo* fi) const;
+ virtual bool matches(const TQFileInfo* fi) const;
void retrieveServerIgnoreList(CvsService_stub* cvsService,
- const QString& repository);
+ const TQString& repository);
private:
void setup();
- virtual void addEntry(const QString& entry);
+ virtual void addEntry(const TQString& entry);
static StringMatcher m_stringMatcher;
static bool m_isInitialized;
diff --git a/cervisia/historydlg.cpp b/cervisia/historydlg.cpp
index 35eb5e01..4eb9cca5 100644
--- a/cervisia/historydlg.cpp
+++ b/cervisia/historydlg.cpp
@@ -20,11 +20,11 @@
#include "historydlg.h"
-#include <qcheckbox.h>
-#include <qdatetime.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <klineedit.h>
#include <klistview.h>
@@ -36,14 +36,14 @@
#include "progressdlg.h"
-static QDateTime parseDate(const QString& date, const QString& _time, const QString& offset)
+static TQDateTime parseDate(const TQString& date, const TQString& _time, const TQString& offset)
{
// cvs history only prints hh:mm but parseDateISO8601 needs hh:mm:ss
- QString time(_time);
+ TQString time(_time);
if( time.contains(':') == 1 )
time += ":00";
- QDateTime dateTime;
+ TQDateTime dateTime;
dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time + offset));
return dateTime;
@@ -56,13 +56,13 @@ public:
enum { Date, Event, Author, Revision, File, Path };
- HistoryItem(QListView *parent, const QDateTime& date)
- : QListViewItem(parent), m_date(date)
+ HistoryItem(TQListView *parent, const TQDateTime& date)
+ : TQListViewItem(parent), m_date(date)
{}
- virtual int compare(QListViewItem* i, int col, bool) const;
+ virtual int compare(TQListViewItem* i, int col, bool) const;
- virtual QString text(int col) const;
+ virtual TQString text(int col) const;
bool isCommit();
bool isCheckout();
@@ -71,11 +71,11 @@ public:
private:
- const QDateTime m_date;
+ const TQDateTime m_date;
};
-int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const
+int HistoryItem::compare(TQListViewItem* i, int col, bool ascending) const
{
const HistoryItem* pItem = static_cast<HistoryItem*>(i);
@@ -89,23 +89,23 @@ int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const
iResult = ::compareRevisions(text(Revision), pItem->text(Revision));
break;
default:
- iResult = QListViewItem::compare(i, col, ascending);
+ iResult = TQListViewItem::compare(i, col, ascending);
}
return iResult;
}
-QString HistoryItem::text(int col) const
+TQString HistoryItem::text(int col) const
{
- QString sText;
+ TQString sText;
switch (col)
{
case Date:
sText = KGlobal::locale()->formatDateTime(m_date);
break;
default:
- sText = QListViewItem::text(col);
+ sText = TQListViewItem::text(col);
}
return sText;
@@ -138,17 +138,17 @@ bool HistoryItem::isOther()
}
-HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name)
- : KDialogBase(parent, name, false, QString::null,
+HistoryDialog::HistoryDialog(KConfig& cfg, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, false, TQString::null,
Close | Help, ButtonCode(0), true)
, partConfig(cfg)
{
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
listview = new KListView(mainWidget);
- listview->setSelectionMode(QListView::NoSelection);
+ listview->setSelectionMode(TQListView::NoSelection);
listview->setAllColumnsShowFocus(true);
listview->setShowSortIndicator(true);
listview->setSorting(HistoryItem::Date, false);
@@ -161,23 +161,23 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name)
listview->setFocus();
layout->addWidget(listview, 1);
- commit_box = new QCheckBox(i18n("Show c&ommit events"), mainWidget);
+ commit_box = new TQCheckBox(i18n("Show c&ommit events"), mainWidget);
commit_box->setChecked(true);
- checkout_box = new QCheckBox(i18n("Show ch&eckout events"), mainWidget);
+ checkout_box = new TQCheckBox(i18n("Show ch&eckout events"), mainWidget);
checkout_box->setChecked(true);
- tag_box = new QCheckBox(i18n("Show &tag events"), mainWidget);
+ tag_box = new TQCheckBox(i18n("Show &tag events"), mainWidget);
tag_box->setChecked(true);
- other_box = new QCheckBox(i18n("Show &other events"), mainWidget);
+ other_box = new TQCheckBox(i18n("Show &other events"), mainWidget);
other_box->setChecked(true);
- onlyuser_box = new QCheckBox(i18n("Only &user:"), mainWidget);
+ onlyuser_box = new TQCheckBox(i18n("Only &user:"), mainWidget);
- onlyfilenames_box = new QCheckBox(i18n("Only &filenames matching:"), mainWidget);
+ onlyfilenames_box = new TQCheckBox(i18n("Only &filenames matching:"), mainWidget);
- onlydirnames_box = new QCheckBox(i18n("Only &folders matching:"), mainWidget);
+ onlydirnames_box = new TQCheckBox(i18n("Only &folders matching:"), mainWidget);
user_edit = new KLineEdit(mainWidget);
user_edit->setEnabled(false);
@@ -188,34 +188,34 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name)
dirname_edit = new KLineEdit(mainWidget);
dirname_edit->setEnabled(false);
- connect( onlyuser_box, SIGNAL(toggled(bool)),
- this, SLOT(toggled(bool)) );
- connect( onlyfilenames_box, SIGNAL(toggled(bool)),
- this, SLOT(toggled(bool)) );
- connect( onlydirnames_box, SIGNAL(toggled(bool)),
- this, SLOT(toggled(bool)) );
- connect( commit_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( checkout_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( tag_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( other_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( onlyuser_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( onlyfilenames_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( onlydirnames_box, SIGNAL(toggled(bool)),
- this, SLOT(choiceChanged()) );
- connect( user_edit, SIGNAL(returnPressed()),
- this, SLOT(choiceChanged()) );
- connect( filename_edit, SIGNAL(returnPressed()),
- this, SLOT(choiceChanged()) );
- connect( dirname_edit, SIGNAL(returnPressed()),
- this, SLOT(choiceChanged()) );
-
- QGridLayout *grid = new QGridLayout(layout);
+ connect( onlyuser_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(toggled(bool)) );
+ connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(toggled(bool)) );
+ connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(toggled(bool)) );
+ connect( commit_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( checkout_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( tag_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( other_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( onlyuser_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( user_edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( filename_edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(choiceChanged()) );
+ connect( dirname_edit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(choiceChanged()) );
+
+ TQGridLayout *grid = new TQGridLayout(layout);
grid->setColStretch(0, 1);
grid->setColStretch(1, 0);
grid->setColStretch(2, 4);
@@ -239,14 +239,14 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name)
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "HistoryDialog");
+ TQSize size = configDialogSize(partConfig, "HistoryDialog");
resize(size);
// without this restoreLayout() can't change the column widths
for (int i = 0; i < listview->columns(); ++i)
- listview->setColumnWidthMode(i, QListView::Manual);
+ listview->setColumnWidthMode(i, TQListView::Manual);
- listview->restoreLayout(&partConfig, QString::fromLatin1("HistoryListView"));
+ listview->restoreLayout(&partConfig, TQString::fromLatin1("HistoryListView"));
}
@@ -254,15 +254,15 @@ HistoryDialog::~HistoryDialog()
{
saveDialogSize(partConfig, "HistoryDialog");
- listview->saveLayout(&partConfig, QString::fromLatin1("HistoryListView"));
+ listview->saveLayout(&partConfig, TQString::fromLatin1("HistoryListView"));
}
void HistoryDialog::choiceChanged()
{
- const QString author(user_edit->text());
- const QRegExp fileMatcher(filename_edit->text(), true, true);
- const QRegExp pathMatcher(dirname_edit->text(), true, true);
+ const TQString author(user_edit->text());
+ const TQRegExp fileMatcher(filename_edit->text(), true, true);
+ const TQRegExp pathMatcher(dirname_edit->text(), true, true);
const bool showCommitEvents(commit_box->isChecked());
const bool showCheckoutEvents(checkout_box->isChecked());
@@ -272,7 +272,7 @@ void HistoryDialog::choiceChanged()
const bool filterByFile(onlyfilenames_box->isChecked() && !fileMatcher.isEmpty());
const bool filterByPath(onlydirnames_box->isChecked() && !pathMatcher.isEmpty());
- QListViewItemIterator it(listview);
+ TQListViewItemIterator it(listview);
for (; it.current(); ++it)
{
HistoryItem *item = static_cast<HistoryItem*>(it.current());
@@ -320,15 +320,15 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService)
if( !dlg.execute() )
return false;
- QString line;
+ TQString line;
while( dlg.getLine(line) )
{
- const QStringList list(splitLine(line));
+ const TQStringList list(splitLine(line));
const int listSize(list.size());
if( listSize < 6)
continue;
- QString cmd = list[0];
+ TQString cmd = list[0];
if( cmd.length() != 1 )
continue;
@@ -349,7 +349,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService)
if( ncol != (int)list.count() )
continue;
- QString event;
+ TQString event;
switch( cmd_code )
{
case 'O': event = i18n("Checkout "); break;
@@ -366,7 +366,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService)
default: event = i18n("Unknown ");
}
- const QDateTime date(parseDate(list[1], list[2], list[3]));
+ const TQDateTime date(parseDate(list[1], list[2], list[3]));
HistoryItem *item = new HistoryItem(listview, date);
item->setText(HistoryItem::Event, event);
diff --git a/cervisia/historydlg.h b/cervisia/historydlg.h
index ac2241d2..2b44a75b 100644
--- a/cervisia/historydlg.h
+++ b/cervisia/historydlg.h
@@ -37,7 +37,7 @@ class HistoryDialog : public KDialogBase
Q_OBJECT
public:
- explicit HistoryDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit HistoryDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~HistoryDialog();
bool parseHistory(CvsService_stub* cvsService);
@@ -48,8 +48,8 @@ private slots:
private:
KListView *listview;
- QCheckBox *commit_box, *checkout_box, *tag_box, *other_box;
- QCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box;
+ TQCheckBox *commit_box, *checkout_box, *tag_box, *other_box;
+ TQCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box;
KLineEdit *user_edit, *filename_edit, *dirname_edit;
KConfig& partConfig;
};
diff --git a/cervisia/ignorelistbase.cpp b/cervisia/ignorelistbase.cpp
index 27b3d159..74036d25 100644
--- a/cervisia/ignorelistbase.cpp
+++ b/cervisia/ignorelistbase.cpp
@@ -19,28 +19,28 @@
#include "ignorelistbase.h"
using namespace Cervisia;
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
-void IgnoreListBase::addEntriesFromString(const QString& str)
+void IgnoreListBase::addEntriesFromString(const TQString& str)
{
- QStringList entries = QStringList::split(' ', str);
- for( QStringList::iterator it = entries.begin(); it != entries.end(); ++it )
+ TQStringList entries = TQStringList::split(' ', str);
+ for( TQStringList::iterator it = entries.begin(); it != entries.end(); ++it )
{
addEntry(*it);
}
}
-void IgnoreListBase::addEntriesFromFile(const QString& name)
+void IgnoreListBase::addEntriesFromFile(const TQString& name)
{
- QFile file(name);
+ TQFile file(name);
if( file.open(IO_ReadOnly) )
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while( !stream.eof() )
{
addEntriesFromString(stream.readLine());
diff --git a/cervisia/ignorelistbase.h b/cervisia/ignorelistbase.h
index 9d166796..f9534bca 100644
--- a/cervisia/ignorelistbase.h
+++ b/cervisia/ignorelistbase.h
@@ -32,14 +32,14 @@ class IgnoreListBase
public:
virtual ~IgnoreListBase() {}
- virtual bool matches(const QFileInfo* fi) const = 0;
+ virtual bool matches(const TQFileInfo* fi) const = 0;
protected:
- void addEntriesFromString(const QString& str);
- void addEntriesFromFile(const QString& name);
+ void addEntriesFromString(const TQString& str);
+ void addEntriesFromFile(const TQString& name);
private:
- virtual void addEntry(const QString& entry) = 0;
+ virtual void addEntry(const TQString& entry) = 0;
};
diff --git a/cervisia/logdlg.cpp b/cervisia/logdlg.cpp
index 41a0751c..28b3078e 100644
--- a/cervisia/logdlg.cpp
+++ b/cervisia/logdlg.cpp
@@ -21,15 +21,15 @@
#include "logdlg.h"
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtextedit.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtextedit.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -57,8 +57,8 @@
#include "patchoptiondlg.h"
-LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name)
- : KDialogBase(parent, name, false, QString::null,
+LogDialog::LogDialog(KConfig& cfg, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, false, TQString::null,
Ok | Apply | Close | Help | User1 | User2 | User3, Close, true,
KGuiItem(i18n("&Annotate")),
KGuiItem(i18n("&Diff"), "vcs_diff"),
@@ -66,16 +66,16 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name)
, cvsService(0)
, partConfig(cfg)
{
- QSplitter *splitter = new QSplitter(Qt::Vertical, this);
+ TQSplitter *splitter = new TQSplitter(Qt::Vertical, this);
setMainWidget(splitter);
tree = new LogTreeView(this);
- connect( tree, SIGNAL(revisionClicked(QString,bool)),
- this, SLOT(revisionSelected(QString,bool)) );
+ connect( tree, TQT_SIGNAL(revisionClicked(TQString,bool)),
+ this, TQT_SLOT(revisionSelected(TQString,bool)) );
- QWidget* listWidget = new QWidget(this);
- QVBoxLayout* listLayout = new QVBoxLayout(listWidget);
- QHBoxLayout* searchLayout = new QHBoxLayout(listLayout);
+ TQWidget* listWidget = new TQWidget(this);
+ TQVBoxLayout* listLayout = new TQVBoxLayout(listWidget);
+ TQHBoxLayout* searchLayout = new TQHBoxLayout(listLayout);
searchLayout->setMargin(KDialog::spacingHint());
searchLayout->setSpacing(KDialog::spacingHint());
@@ -83,45 +83,45 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name)
listLayout->addWidget(list, 1);
KListViewSearchLine* searchLine = new KListViewSearchLine(listWidget, list);
- QLabel* searchLabel = new QLabel(searchLine, i18n("S&earch:"), listWidget);
+ TQLabel* searchLabel = new TQLabel(searchLine, i18n("S&earch:"), listWidget);
searchLayout->addWidget(searchLabel);
searchLayout->addWidget(searchLine, 1);
- connect( list, SIGNAL(revisionClicked(QString,bool)),
- this, SLOT(revisionSelected(QString,bool)) );
+ connect( list, TQT_SIGNAL(revisionClicked(TQString,bool)),
+ this, TQT_SLOT(revisionSelected(TQString,bool)) );
plain = new LogPlainView(this);
- connect( plain, SIGNAL(revisionClicked(QString,bool)),
- this, SLOT(revisionSelected(QString,bool)) );
+ connect( plain, TQT_SIGNAL(revisionClicked(TQString,bool)),
+ this, TQT_SLOT(revisionSelected(TQString,bool)) );
- tabWidget = new QTabWidget(splitter);
+ tabWidget = new TQTabWidget(splitter);
tabWidget->addTab(tree, i18n("&Tree"));
tabWidget->addTab(listWidget, i18n("&List"));
tabWidget->addTab(plain, i18n("CVS &Output"));
- connect(tabWidget, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
+ connect(tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
- QWhatsThis::add(tree, i18n("Choose revision A by clicking with the left "
+ TQWhatsThis::add(tree, i18n("Choose revision A by clicking with the left "
"mouse button,\nrevision B by clicking with "
"the middle mouse button."));
items.setAutoDelete(true);
tags.setAutoDelete(true);
- QWidget *mainWidget = new QWidget(splitter);
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQWidget *mainWidget = new TQWidget(splitter);
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
for (int i = 0; i < 2; ++i)
{
if ( i == 1 )
{
- QFrame *frame = new QFrame(mainWidget);
- frame->setFrameStyle(QFrame::HLine | QFrame::Sunken);
+ TQFrame *frame = new TQFrame(mainWidget);
+ frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken);
layout->addWidget(frame);
}
- QGridLayout *grid = new QGridLayout(layout);
+ TQGridLayout *grid = new TQGridLayout(layout);
grid->setRowStretch(0, 0);
grid->setRowStretch(1, 0);
grid->setRowStretch(2, 1);
@@ -131,69 +131,69 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name)
grid->setColStretch(3, 1);
grid->setColStretch(4, 2);
- QString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:");
- QLabel *versionlabel = new QLabel(versionident, mainWidget);
+ TQString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:");
+ TQLabel *versionlabel = new TQLabel(versionident, mainWidget);
grid->addWidget(versionlabel, 0, 0);
- revbox[i] = new QLabel(mainWidget);
- revbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ revbox[i] = new TQLabel(mainWidget);
+ revbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
grid->addWidget(revbox[i], 0, 1, Qt::AlignVCenter);
- QLabel *selectlabel = new QLabel(i18n("Select by tag:"), mainWidget);
+ TQLabel *selectlabel = new TQLabel(i18n("Select by tag:"), mainWidget);
grid->addWidget(selectlabel, 0, 2);
- tagcombo[i] = new QComboBox(mainWidget);
- QFontMetrics fm(tagcombo[i]->fontMetrics());
+ tagcombo[i] = new TQComboBox(mainWidget);
+ TQFontMetrics fm(tagcombo[i]->fontMetrics());
tagcombo[i]->setMinimumWidth(fm.width("X")*20);
grid->addWidget(tagcombo[i], 0, 3);
- QLabel *authorlabel = new QLabel(i18n("Author:"), mainWidget);
+ TQLabel *authorlabel = new TQLabel(i18n("Author:"), mainWidget);
grid->addWidget(authorlabel, 1, 0);
- authorbox[i] = new QLabel(mainWidget);
- authorbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ authorbox[i] = new TQLabel(mainWidget);
+ authorbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
grid->addWidget(authorbox[i], 1, 1);
- QLabel *datelabel = new QLabel(i18n("Date:"), mainWidget);
+ TQLabel *datelabel = new TQLabel(i18n("Date:"), mainWidget);
grid->addWidget(datelabel, 1, 2);
- datebox[i] = new QLabel(mainWidget);
- datebox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ datebox[i] = new TQLabel(mainWidget);
+ datebox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
grid->addWidget(datebox[i], 1, 3);
- QLabel *commentlabel = new QLabel(i18n("Comment/Tags:"), mainWidget);
+ TQLabel *commentlabel = new TQLabel(i18n("Comment/Tags:"), mainWidget);
grid->addWidget(commentlabel, 2, 0);
- commentbox[i] = new QTextEdit(mainWidget);
+ commentbox[i] = new TQTextEdit(mainWidget);
commentbox[i]->setReadOnly(true);
commentbox[i]->setTextFormat(Qt::PlainText);
fm = commentbox[i]->fontMetrics();
commentbox[i]->setMinimumHeight(2*fm.lineSpacing()+10);
grid->addMultiCellWidget(commentbox[i], 2, 2, 1, 3);
- tagsbox[i] = new QTextEdit(mainWidget);
+ tagsbox[i] = new TQTextEdit(mainWidget);
tagsbox[i]->setReadOnly(true);
tagsbox[i]->setMinimumHeight(2*fm.lineSpacing()+10);
grid->addWidget(tagsbox[i], 2, 4);
}
- QWhatsThis::add(revbox[0], i18n("This revision is used when you click "
+ TQWhatsThis::add(revbox[0], i18n("This revision is used when you click "
"Annotate.\nIt is also used as the first "
"item of a Diff operation."));
- QWhatsThis::add(revbox[1], i18n("This revision is used as the second "
+ TQWhatsThis::add(revbox[1], i18n("This revision is used as the second "
"item of a Diff operation."));
- connect( tagcombo[0], SIGNAL(activated(int)),
- this, SLOT(tagASelected(int)) );
- connect( tagcombo[1], SIGNAL(activated(int)),
- this, SLOT(tagBSelected(int)) );
+ connect( tagcombo[0], TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(tagASelected(int)) );
+ connect( tagcombo[1], TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(tagBSelected(int)) );
- connect( this, SIGNAL(user1Clicked()),
- this, SLOT(annotateClicked()) );
- connect( this, SIGNAL(user2Clicked()),
- this, SLOT(diffClicked()) );
- connect( this, SIGNAL(user3Clicked()),
- this, SLOT(findClicked()) );
+ connect( this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT(annotateClicked()) );
+ connect( this, TQT_SIGNAL(user2Clicked()),
+ this, TQT_SLOT(diffClicked()) );
+ connect( this, TQT_SIGNAL(user3Clicked()),
+ this, TQT_SLOT(findClicked()) );
setButtonGuiItem(Ok, KGuiItem(i18n("to view something", "&View"),"fileopen"));
setButtonGuiItem(Apply, KGuiItem(i18n("Create Patch...")));
@@ -201,7 +201,7 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name)
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "LogDialog");
+ TQSize size = configDialogSize(partConfig, "LogDialog");
resize(size);
KConfigGroupSaver cs(&partConfig, "LogDialog");
@@ -220,9 +220,9 @@ LogDialog::~LogDialog()
}
-bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
+bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName)
{
- QString rev;
+ TQString rev;
Cervisia::LogInfo logInfo;
@@ -245,7 +245,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
// process cvs log output
state = Begin;
- QString line;
+ TQString line;
while( dlg.getLine(line) )
{
switch( state )
@@ -257,10 +257,10 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
case Tags:
if( line[0] == '\t' )
{
- const QStringList strlist(splitLine(line, ':'));
+ const TQStringList strlist(splitLine(line, ':'));
rev = strlist[1].simplifyWhiteSpace();
- const QString tag(strlist[0].simplifyWhiteSpace());
- QString branchpoint;
+ const TQString tag(strlist[0].simplifyWhiteSpace());
+ TQString branchpoint;
int pos1, pos2;
if( (pos2 = rev.findRev('.')) > 0 &&
(pos1 = rev.findRev('.', pos2-1)) > 0 &&
@@ -298,15 +298,15 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
break;
case Author:
{
- QStringList strList = QStringList::split(";", line);
+ TQStringList strList = TQStringList::split(";", line);
// convert date into ISO format (YYYY-MM-DDTHH:MM:SS)
int len = strList[0].length();
- QString dateTimeStr = strList[0].right(len-6); // remove 'date: '
+ TQString dateTimeStr = strList[0].right(len-6); // remove 'date: '
dateTimeStr.replace('/', '-');
- QString date = dateTimeStr.section(' ', 0, 0);
- QString time = dateTimeStr.section(' ', 1, 1);
+ TQString date = dateTimeStr.section(' ', 0, 0);
+ TQString time = dateTimeStr.section(' ', 1, 1);
logInfo.m_dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time));
logInfo.m_author = strList[1].section(':', 1, 1).stripWhiteSpace();
@@ -335,7 +335,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
else
{
// Create tagcomment
- QString branchrev;
+ TQString branchrev;
int pos1, pos2;
// 1.60.x.y => revision belongs to branch 1.60.0.x
if( (pos2 = rev.findRev('.')) > 0 &&
@@ -343,7 +343,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
branchrev = rev.left(pos2);
// Build Cervisia::TagInfo for logInfo
- QPtrListIterator<LogDialogTagInfo> it(tags);
+ TQPtrListIterator<LogDialogTagInfo> it(tags);
for( ; it.current(); ++it )
{
if( rev == it.current()->rev )
@@ -380,12 +380,12 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName)
}
}
- tagcombo[0]->insertItem(QString::null);
- tagcombo[1]->insertItem(QString::null);
- QPtrListIterator<LogDialogTagInfo> it(tags);
+ tagcombo[0]->insertItem(TQString::null);
+ tagcombo[1]->insertItem(TQString::null);
+ TQPtrListIterator<LogDialogTagInfo> it(tags);
for( ; it.current(); ++it )
{
- QString str = it.current()->tag;
+ TQString str = it.current()->tag;
if( !it.current()->branchpoint.isEmpty() )
str += i18n(" (Branchpoint)");
tagcombo[0]->insertItem(str);
@@ -412,15 +412,15 @@ void LogDialog::slotOk()
}
// retrieve the selected revision
- QString revision;
+ TQString revision;
if( !selectionA.isEmpty() )
revision = selectionA;
else
revision = selectionB;
// create a temporary file
- const QString suffix("-" + revision + "-" + QFileInfo(filename).fileName());
- const QString tempFileName(::tempFileName(suffix));
+ const TQString suffix("-" + revision + "-" + TQFileInfo(filename).fileName());
+ const TQString tempFileName(::tempFileName(suffix));
// retrieve the file with the selected revision from cvs
// and save the content into the temporary file
@@ -432,7 +432,7 @@ void LogDialog::slotOk()
if( dlg.execute() )
{
// make file read-only
- chmod(QFile::encodeName(tempFileName), 0400);
+ chmod(TQFile::encodeName(tempFileName), 0400);
// open file in preferred editor
KURL url;
@@ -456,8 +456,8 @@ void LogDialog::slotApply()
if( optionDlg.exec() == KDialogBase::Rejected )
return;
- QString format = optionDlg.formatOption();
- QString diffOptions = optionDlg.diffOptions();
+ TQString format = optionDlg.formatOption();
+ TQString diffOptions = optionDlg.diffOptions();
DCOPRef job = cvsService->diff(filename, selectionA, selectionB, diffOptions,
format);
@@ -468,14 +468,14 @@ void LogDialog::slotApply()
if( !dlg.execute() )
return;
- QString fileName = KFileDialog::getSaveFileName();
+ TQString fileName = KFileDialog::getSaveFileName();
if( fileName.isEmpty() )
return;
if( !Cervisia::CheckOverwrite(fileName) )
return;
- QFile f(fileName);
+ TQFile f(fileName);
if( !f.open(IO_WriteOnly) )
{
KMessageBox::sorry(this,
@@ -484,8 +484,8 @@ void LogDialog::slotApply()
return;
}
- QTextStream t(&f);
- QString line;
+ TQTextStream t(&f);
+ TQString line;
while( dlg.getLine(line) )
t << line << '\n';
@@ -528,9 +528,9 @@ void LogDialog::annotateClicked()
}
-void LogDialog::revisionSelected(QString rev, bool rmb)
+void LogDialog::revisionSelected(TQString rev, bool rmb)
{
- QPtrListIterator<Cervisia::LogInfo> it(items);
+ TQPtrListIterator<Cervisia::LogInfo> it(items);
for (; it.current(); ++it)
if (it.current()->m_revision == rev)
{
@@ -607,7 +607,7 @@ void LogDialog::tagBSelected(int n)
}
-void LogDialog::tabChanged(QWidget* w)
+void LogDialog::tabChanged(TQWidget* w)
{
bool isPlainView = (w == plain);
showButton(User3, isPlainView);
diff --git a/cervisia/logdlg.h b/cervisia/logdlg.h
index c5cce4b3..ad50f6e4 100644
--- a/cervisia/logdlg.h
+++ b/cervisia/logdlg.h
@@ -25,7 +25,7 @@
#include "loginfo.h"
-#include <qptrlist.h>
+#include <tqptrlist.h>
class LogListView;
@@ -43,9 +43,9 @@ class CvsService_stub;
class LogDialogTagInfo
{
public:
- QString rev;
- QString tag;
- QString branchpoint;
+ TQString rev;
+ TQString tag;
+ TQString branchpoint;
};
@@ -54,11 +54,11 @@ class LogDialog : public KDialogBase
Q_OBJECT
public:
- explicit LogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit LogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~LogDialog();
- bool parseCvsLog(CvsService_stub* service, const QString& fileName);
+ bool parseCvsLog(CvsService_stub* service, const TQString& fileName);
protected slots:
void slotOk();
@@ -68,30 +68,30 @@ private slots:
void findClicked();
void diffClicked();
void annotateClicked();
- void revisionSelected(QString rev, bool rmb);
+ void revisionSelected(TQString rev, bool rmb);
void tagASelected(int n);
void tagBSelected(int n);
- void tabChanged(QWidget* w);
+ void tabChanged(TQWidget* w);
private:
void tagSelected(LogDialogTagInfo* tag, bool rmb);
void updateButtons();
- QString filename;
- QPtrList<Cervisia::LogInfo> items;
- QPtrList<LogDialogTagInfo> tags;
- QString selectionA;
- QString selectionB;
+ TQString filename;
+ TQPtrList<Cervisia::LogInfo> items;
+ TQPtrList<LogDialogTagInfo> tags;
+ TQString selectionA;
+ TQString selectionB;
LogTreeView *tree;
LogListView *list;
LogPlainView *plain;
- QTabWidget *tabWidget;
- QLabel *revbox[2];
- QLabel *authorbox[2];
- QLabel *datebox[2];
- QTextEdit *commentbox[2];
- QTextEdit *tagsbox[2];
- QComboBox *tagcombo[2];
+ TQTabWidget *tabWidget;
+ TQLabel *revbox[2];
+ TQLabel *authorbox[2];
+ TQLabel *datebox[2];
+ TQTextEdit *commentbox[2];
+ TQTextEdit *tagsbox[2];
+ TQComboBox *tagcombo[2];
CvsService_stub* cvsService;
KConfig& partConfig;
diff --git a/cervisia/loginfo.cpp b/cervisia/loginfo.cpp
index 49f7efb2..b97ff1f0 100644
--- a/cervisia/loginfo.cpp
+++ b/cervisia/loginfo.cpp
@@ -19,7 +19,7 @@
#include "loginfo.h"
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kglobal.h>
#include <klocale.h>
@@ -29,19 +29,19 @@ namespace Cervisia
{
-TagInfo::TagInfo(const QString& name, Type type)
+TagInfo::TagInfo(const TQString& name, Type type)
: m_name(name),
m_type(type)
{
}
-QString TagInfo::toString(bool prefixWithType) const
+TQString TagInfo::toString(bool prefixWithType) const
{
- QString text;
+ TQString text;
if (prefixWithType)
{
- text += typeToString() + QString::fromLatin1(": ");
+ text += typeToString() + TQString::fromLatin1(": ");
}
text += m_name;
@@ -49,9 +49,9 @@ QString TagInfo::toString(bool prefixWithType) const
}
-QString TagInfo::typeToString() const
+TQString TagInfo::typeToString() const
{
- QString text;
+ TQString text;
switch (m_type)
{
case Branch:
@@ -69,41 +69,41 @@ QString TagInfo::typeToString() const
}
-QString LogInfo::createToolTipText(bool showTime) const
+TQString LogInfo::createToolTipText(bool showTime) const
{
- QString text(QString::fromLatin1("<nobr><b>"));
- text += QStyleSheet::escape(m_revision);
- text += QString::fromLatin1("</b>&nbsp;&nbsp;");
- text += QStyleSheet::escape(m_author);
- text += QString::fromLatin1("&nbsp;&nbsp;<b>");
- text += QStyleSheet::escape(dateTimeToString(showTime));
- text += QString::fromLatin1("</b></nobr>");
+ TQString text(TQString::fromLatin1("<nobr><b>"));
+ text += TQStyleSheet::escape(m_revision);
+ text += TQString::fromLatin1("</b>&nbsp;&nbsp;");
+ text += TQStyleSheet::escape(m_author);
+ text += TQString::fromLatin1("&nbsp;&nbsp;<b>");
+ text += TQStyleSheet::escape(dateTimeToString(showTime));
+ text += TQString::fromLatin1("</b></nobr>");
if (!m_comment.isEmpty())
{
- text += QString::fromLatin1("<pre>");
- text += QStyleSheet::escape(m_comment);
- text += QString::fromLatin1("</pre>");
+ text += TQString::fromLatin1("<pre>");
+ text += TQStyleSheet::escape(m_comment);
+ text += TQString::fromLatin1("</pre>");
}
if (!m_tags.isEmpty())
{
- text += QString::fromLatin1("<i>");
+ text += TQString::fromLatin1("<i>");
for (TTagInfoSeq::const_iterator it = m_tags.begin();
it != m_tags.end(); ++it)
{
if (it != m_tags.begin() || m_comment.isEmpty())
- text += QString::fromLatin1("<br>");
- text += QStyleSheet::escape((*it).toString());
+ text += TQString::fromLatin1("<br>");
+ text += TQStyleSheet::escape((*it).toString());
}
- text += QString::fromLatin1("</i>");
+ text += TQString::fromLatin1("</i>");
}
return text;
}
-QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const
+TQString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const
{
if( showTime )
return KGlobal::locale()->formatDateTime(m_dateTime, shortFormat);
@@ -112,11 +112,11 @@ QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const
}
-QString LogInfo::tagsToString(unsigned int types,
+TQString LogInfo::tagsToString(unsigned int types,
unsigned int prefixWithType,
- const QString& separator) const
+ const TQString& separator) const
{
- QString text;
+ TQString text;
for (TTagInfoSeq::const_iterator it = m_tags.begin();
it != m_tags.end(); ++it)
{
diff --git a/cervisia/loginfo.h b/cervisia/loginfo.h
index e4eb7071..92c67312 100644
--- a/cervisia/loginfo.h
+++ b/cervisia/loginfo.h
@@ -21,9 +21,9 @@
#define CERVISIA_LOGINFO_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace Cervisia
@@ -58,7 +58,7 @@ struct TagInfo
Tag = 1 << 2
};
- explicit TagInfo(const QString& name = QString::null, Type type = Tag);
+ explicit TagInfo(const TQString& name = TQString::null, Type type = Tag);
/**
* @param prefixWithType prefix the string with the type of the tag
@@ -66,17 +66,17 @@ struct TagInfo
*
* @return tag as string.
*/
- QString toString(bool prefixWithType = true) const;
+ TQString toString(bool prefixWithType = true) const;
/**
* @return type of tag as string.
*/
- QString typeToString() const;
+ TQString typeToString() const;
/**
* The name of the tag.
*/
- QString m_name;
+ TQString m_name;
/**
* The type of the tag.
@@ -91,14 +91,14 @@ struct TagInfo
*/
struct LogInfo
{
- typedef QValueList<TagInfo> TTagInfoSeq;
+ typedef TQValueList<TagInfo> TTagInfoSeq;
/**
* @param showTime show commit time in tooltip.
*
* @return rich text formatted tooltip text.
*/
- QString createToolTipText(bool showTime = true) const;
+ TQString createToolTipText(bool showTime = true) const;
/**
* Calls KLocale::formatDateTime() to create a formatted string.
@@ -108,7 +108,7 @@ struct LogInfo
*
* @return The date/time formatted to the user's locale's conventions.
*/
- QString dateTimeToString(bool showTime = true, bool shortFormat = true) const;
+ TQString dateTimeToString(bool showTime = true, bool shortFormat = true) const;
enum
{
@@ -126,29 +126,29 @@ struct LogInfo
*
* @return string of joined tags.
*/
- QString tagsToString(unsigned int types = AllTagTypes,
+ TQString tagsToString(unsigned int types = AllTagTypes,
unsigned int prefixWithType = AllTagTypes,
- const QString& separator = QString(QChar('\n'))) const;
+ const TQString& separator = TQString(TQChar('\n'))) const;
/**
* The revision of this entry.
*/
- QString m_revision;
+ TQString m_revision;
/**
* The author who committed.
*/
- QString m_author;
+ TQString m_author;
/**
* The commit message.
*/
- QString m_comment;
+ TQString m_comment;
/**
* The date/time of the commit.
*/
- QDateTime m_dateTime;
+ TQDateTime m_dateTime;
/**
* Sequence of tags of this entry.
diff --git a/cervisia/loglist.cpp b/cervisia/loglist.cpp
index 101dd3d7..833a2429 100644
--- a/cervisia/loglist.cpp
+++ b/cervisia/loglist.cpp
@@ -20,8 +20,8 @@
#include "loglist.h"
-#include <qapplication.h>
-#include <qkeycode.h>
+#include <tqapplication.h>
+#include <tqkeycode.h>
#include <klocale.h>
#include "loginfo.h"
@@ -35,19 +35,19 @@ public:
enum { Revision, Author, Date, Branch, Comment, Tags };
- LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo);
+ LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo);
- virtual int compare(QListViewItem* i, int col, bool) const;
+ virtual int compare(TQListViewItem* i, int col, bool) const;
private:
- static QString truncateLine(const QString &s);
+ static TQString truncateLine(const TQString &s);
Cervisia::LogInfo m_logInfo;
friend class LogListView;
};
-LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo)
+LogListViewItem::LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo)
: KListViewItem(list),
m_logInfo(logInfo)
{
@@ -69,15 +69,15 @@ LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logIn
setText(Tags, logInfo.tagsToString(Cervisia::TagInfo::Tag,
Cervisia::LogInfo::NoTagType,
- QString::fromLatin1(", ")));
+ TQString::fromLatin1(", ")));
}
-QString LogListViewItem::truncateLine(const QString &s)
+TQString LogListViewItem::truncateLine(const TQString &s)
{
int pos;
- QString res = s.simplifyWhiteSpace();
+ TQString res = s.simplifyWhiteSpace();
if ( (pos = res.find('\n')) != -1 )
res = res.left(pos) + "...";
@@ -85,7 +85,7 @@ QString LogListViewItem::truncateLine(const QString &s)
}
-int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const
+int LogListViewItem::compare(TQListViewItem* i, int col, bool ascending) const
{
const LogListViewItem* item = static_cast<LogListViewItem*>(i);
@@ -99,14 +99,14 @@ int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const
iResult = ::compare(m_logInfo.m_dateTime, item->m_logInfo.m_dateTime);
break;
default:
- iResult = QListViewItem::compare(i, col, ascending);
+ iResult = TQListViewItem::compare(i, col, ascending);
}
return iResult;
}
-LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name)
+LogListView::LogListView(KConfig& cfg, TQWidget *parent, const char *name)
: KListView(parent, name)
, partConfig(cfg)
{
@@ -124,20 +124,20 @@ LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name)
Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport());
- connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)),
- this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&)));
+ connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)),
+ this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&)));
// without this restoreLayout() can't change the column widths
for (int i = 0; i < columns(); ++i)
setColumnWidthMode(i, Manual);
- restoreLayout(&partConfig, QString::fromLatin1("LogList view"));
+ restoreLayout(&partConfig, TQString::fromLatin1("LogList view"));
}
LogListView::~LogListView()
{
- saveLayout(&partConfig, QString::fromLatin1("LogList view"));
+ saveLayout(&partConfig, TQString::fromLatin1("LogList view"));
}
@@ -147,9 +147,9 @@ void LogListView::addRevision(const Cervisia::LogInfo& logInfo)
}
-void LogListView::setSelectedPair(const QString &selectionA, const QString &selectionB)
+void LogListView::setSelectedPair(const TQString &selectionA, const TQString &selectionB)
{
- for ( QListViewItem *item = firstChild(); item;
+ for ( TQListViewItem *item = firstChild(); item;
item = item->nextSibling() )
{
LogListViewItem *i = static_cast<LogListViewItem*>(item);
@@ -158,7 +158,7 @@ void LogListView::setSelectedPair(const QString &selectionA, const QString &sele
}
}
-void LogListView::contentsMousePressEvent(QMouseEvent *e)
+void LogListView::contentsMousePressEvent(TQMouseEvent *e)
{
// Retrieve selected item
const LogListViewItem* selItem
@@ -167,7 +167,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e)
return;
// Retrieve revision
- const QString revision = selItem->text(LogListViewItem::Revision);
+ const TQString revision = selItem->text(LogListViewItem::Revision);
if ( e->button() == LeftButton )
{
@@ -182,7 +182,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e)
}
-void LogListView::keyPressEvent(QKeyEvent *e)
+void LogListView::keyPressEvent(TQKeyEvent *e)
{
switch (e->key()) {
case Key_A:
@@ -203,9 +203,9 @@ void LogListView::keyPressEvent(QKeyEvent *e)
case Key_Next:
case Key_Prior:
if (e->state() == 0)
- QListView::keyPressEvent(e);
+ TQListView::keyPressEvent(e);
else
- QApplication::postEvent(this, new QKeyEvent(QEvent::KeyPress, e->key(), e->ascii(), 0));
+ TQApplication::postEvent(this, new TQKeyEvent(TQEvent::KeyPress, e->key(), e->ascii(), 0));
break;
default:
// Ignore Key_Enter, Key_Return
@@ -214,9 +214,9 @@ void LogListView::keyPressEvent(QKeyEvent *e)
}
-void LogListView::slotQueryToolTip(const QPoint& viewportPos,
- QRect& viewportRect,
- QString& text)
+void LogListView::slotQueryToolTip(const TQPoint& viewportPos,
+ TQRect& viewportRect,
+ TQString& text)
{
if (const LogListViewItem* item = static_cast<LogListViewItem*>(itemAt(viewportPos)))
{
diff --git a/cervisia/loglist.h b/cervisia/loglist.h
index dc2bca08..3c608ea8 100644
--- a/cervisia/loglist.h
+++ b/cervisia/loglist.h
@@ -41,22 +41,22 @@ class LogListView : public KListView
Q_OBJECT
public:
- explicit LogListView( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit LogListView( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~LogListView();
void addRevision(const Cervisia::LogInfo& logInfo);
- void setSelectedPair(const QString &selectionA, const QString &selectionB);
+ void setSelectedPair(const TQString &selectionA, const TQString &selectionB);
signals:
- void revisionClicked(QString rev, bool rmb);
+ void revisionClicked(TQString rev, bool rmb);
protected:
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
private slots:
- void slotQueryToolTip(const QPoint&, QRect&, QString&);
+ void slotQueryToolTip(const TQPoint&, TQRect&, TQString&);
private:
diff --git a/cervisia/logmessageedit.cpp b/cervisia/logmessageedit.cpp
index 33599409..f861c873 100644
--- a/cervisia/logmessageedit.cpp
+++ b/cervisia/logmessageedit.cpp
@@ -22,11 +22,11 @@
#include "logmessageedit.h"
using Cervisia::LogMessageEdit;
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kaccel.h>
-LogMessageEdit::LogMessageEdit(QWidget* parent)
+LogMessageEdit::LogMessageEdit(TQWidget* parent)
: KTextEdit(parent)
, KCompletionBase()
, m_completing(false)
@@ -36,18 +36,18 @@ LogMessageEdit::LogMessageEdit(QWidget* parent)
completionObject();
// a mouse click stops the completion process
- connect( this, SIGNAL(clicked(int, int)), SLOT(stopCompletion()) );
+ connect( this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(stopCompletion()) );
}
-void LogMessageEdit::setCompletedText(const QString& match)
+void LogMessageEdit::setCompletedText(const TQString& match)
{
int para, index;
getCursorPosition(&para, &index);
- QString paragraphText = text(para);
+ TQString paragraphText = text(para);
int length = index - m_completionStartPos;
- QString word = match.right(match.length() - length);
+ TQString word = match.right(match.length() - length);
insert(word);
@@ -62,12 +62,12 @@ void LogMessageEdit::setCompletedText(const QString& match)
}
-void LogMessageEdit::setCompletedItems(const QStringList&)
+void LogMessageEdit::setCompletedItems(const TQStringList&)
{
}
-void LogMessageEdit::keyPressEvent(QKeyEvent* event)
+void LogMessageEdit::keyPressEvent(TQKeyEvent* event)
{
bool noModifier = (event->state() == NoButton ||
event->state() == ShiftButton ||
@@ -75,7 +75,7 @@ void LogMessageEdit::keyPressEvent(QKeyEvent* event)
if( noModifier )
{
- QString keycode = event->text();
+ TQString keycode = event->text();
if( !keycode.isEmpty() && keycode.unicode()->isPrint() )
{
KTextEdit::keyPressEvent(event);
@@ -155,16 +155,16 @@ void LogMessageEdit::tryCompletion()
int para, index;
getCursorPosition(&para, &index);
- QString paragraphText = text(para);
+ TQString paragraphText = text(para);
if( paragraphText.at(index).isSpace() )
{
if( !m_completing )
m_completionStartPos = paragraphText.findRev(' ', index-1) + 1;
int length = index - m_completionStartPos;
- QString word = paragraphText.mid(m_completionStartPos, length);
+ TQString word = paragraphText.mid(m_completionStartPos, length);
- QString match = compObj()->makeCompletion(word);
+ TQString match = compObj()->makeCompletion(word);
if( !match.isNull() && match != word )
{
setCompletedText(match);
@@ -184,15 +184,15 @@ void LogMessageEdit::rotateMatches(KeyBindingType type)
if( completionObj && m_completing &&
(type == PrevCompletionMatch || type == NextCompletionMatch) )
{
- QString match = (type == PrevCompletionMatch) ? completionObj->previousMatch()
+ TQString match = (type == PrevCompletionMatch) ? completionObj->previousMatch()
: completionObj->nextMatch();
int para, index;
getCursorPosition(&para, &index);
- QString paragraphText = text(para);
+ TQString paragraphText = text(para);
- QString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos);
+ TQString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos);
if( match.isNull() || match == word )
return;
diff --git a/cervisia/logmessageedit.h b/cervisia/logmessageedit.h
index 05de18fa..c27865b6 100644
--- a/cervisia/logmessageedit.h
+++ b/cervisia/logmessageedit.h
@@ -35,13 +35,13 @@ class LogMessageEdit : public KTextEdit, public KCompletionBase
Q_OBJECT
public:
- explicit LogMessageEdit(QWidget* parent);
+ explicit LogMessageEdit(TQWidget* parent);
- virtual void setCompletedText(const QString& match);
- virtual void setCompletedItems(const QStringList& items);
+ virtual void setCompletedText(const TQString& match);
+ virtual void setCompletedItems(const TQStringList& items);
protected:
- void keyPressEvent(QKeyEvent* event);
+ void keyPressEvent(TQKeyEvent* event);
private slots:
void stopCompletion();
diff --git a/cervisia/logplainview.cpp b/cervisia/logplainview.cpp
index ca28f8b0..413180af 100644
--- a/cervisia/logplainview.cpp
+++ b/cervisia/logplainview.cpp
@@ -19,9 +19,9 @@
#include "logplainview.h"
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqstylesheet.h>
#include <kfind.h>
#include <kfinddialog.h>
#include <klocale.h>
@@ -31,7 +31,7 @@
using namespace Cervisia;
-LogPlainView::LogPlainView(QWidget* parent, const char* name)
+LogPlainView::LogPlainView(TQWidget* parent, const char* name)
: KTextBrowser(parent, name)
, m_find(0)
, m_findPos(0)
@@ -48,76 +48,76 @@ LogPlainView::~LogPlainView()
void LogPlainView::addRevision(const LogInfo& logInfo)
{
- setTextFormat(QStyleSheet::RichText);
+ setTextFormat(TQStyleSheet::RichText);
// assemble revision information lines
- QString logEntry;
+ TQString logEntry;
- logEntry += "<b>" + i18n("revision %1").arg(QStyleSheet::escape(logInfo.m_revision)) +
+ logEntry += "<b>" + i18n("revision %1").arg(TQStyleSheet::escape(logInfo.m_revision)) +
"</b>";
- logEntry += " &nbsp;[<a href=\"revA#" + QStyleSheet::escape(logInfo.m_revision) + "\">" +
+ logEntry += " &nbsp;[<a href=\"revA#" + TQStyleSheet::escape(logInfo.m_revision) + "\">" +
i18n("Select for revision A") +
"</a>]";
- logEntry += " [<a href=\"revB#" + QStyleSheet::escape(logInfo.m_revision) + "\">" +
+ logEntry += " [<a href=\"revB#" + TQStyleSheet::escape(logInfo.m_revision) + "\">" +
i18n("Select for revision B") +
"</a>]<br>";
logEntry += "<i>" +
- i18n("date: %1; author: %2").arg(QStyleSheet::escape(logInfo.dateTimeToString()))
- .arg(QStyleSheet::escape(logInfo.m_author)) +
+ i18n("date: %1; author: %2").arg(TQStyleSheet::escape(logInfo.dateTimeToString()))
+ .arg(TQStyleSheet::escape(logInfo.m_author)) +
"</i>";
append(logEntry);
- setTextFormat(QStyleSheet::PlainText);
+ setTextFormat(TQStyleSheet::PlainText);
- const QChar newline('\n');
+ const TQChar newline('\n');
// split comment in separate lines
- QStringList lines = QStringList::split(newline, logInfo.m_comment, true);
+ TQStringList lines = TQStringList::split(newline, logInfo.m_comment, true);
append(newline);
- QStringList::Iterator it = lines.begin();
- QStringList::Iterator end = lines.end();
+ TQStringList::Iterator it = lines.begin();
+ TQStringList::Iterator end = lines.end();
for( ; it != end; ++it )
{
- append((*it).isEmpty() ? QString(newline) : *it);
+ append((*it).isEmpty() ? TQString(newline) : *it);
}
append(newline);
- setTextFormat(QStyleSheet::RichText);
+ setTextFormat(TQStyleSheet::RichText);
for( LogInfo::TTagInfoSeq::const_iterator it = logInfo.m_tags.begin();
it != logInfo.m_tags.end(); ++it )
{
- append("<i>" + QStyleSheet::escape((*it).toString()) + "</i>");
+ append("<i>" + TQStyleSheet::escape((*it).toString()) + "</i>");
}
// add an empty line when we had tags or branches
if( !logInfo.m_tags.empty() )
{
- setTextFormat(QStyleSheet::PlainText);
+ setTextFormat(TQStyleSheet::PlainText);
append(newline);
}
// add horizontal line
- setTextFormat(QStyleSheet::RichText);
+ setTextFormat(TQStyleSheet::RichText);
append("<hr>");
}
-void LogPlainView::searchText(int options, const QString& pattern)
+void LogPlainView::searchText(int options, const TQString& pattern)
{
m_find = new KFind(pattern, options, this);
- connect(m_find, SIGNAL(highlight(const QString&, int, int)),
- this, SLOT(searchHighlight(const QString&, int, int)));
- connect(m_find, SIGNAL(findNext()),
- this, SLOT(findNext()));
+ connect(m_find, TQT_SIGNAL(highlight(const TQString&, int, int)),
+ this, TQT_SLOT(searchHighlight(const TQString&, int, int)));
+ connect(m_find, TQT_SIGNAL(findNext()),
+ this, TQT_SLOT(findNext()));
m_findPos = 0;
if( options & KFindDialog::FromCursor )
{
- const QPoint pos(contentsX(), contentsY());
+ const TQPoint pos(contentsX(), contentsY());
m_findPos = paragraphAt(pos);
}
@@ -133,8 +133,8 @@ void LogPlainView::scrollToTop()
void LogPlainView::findNext()
{
- static const QRegExp breakLineTag("<br[^>]*>");
- static const QRegExp htmlTags("<[^>]*>");
+ static const TQRegExp breakLineTag("<br[^>]*>");
+ static const TQRegExp htmlTags("<[^>]*>");
KFind::Result res = KFind::NoMatch;
@@ -142,7 +142,7 @@ void LogPlainView::findNext()
{
if( m_find->needData() )
{
- QString richText = text(m_findPos);
+ TQString richText = text(m_findPos);
// replace <br/> with '\n'
richText.replace(breakLineTag, "\n");
@@ -181,14 +181,14 @@ void LogPlainView::findNext()
}
-void LogPlainView::searchHighlight(const QString& text, int index, int length)
+void LogPlainView::searchHighlight(const TQString& text, int index, int length)
{
Q_UNUSED(text);
setSelection(m_findPos, index, m_findPos, index + length);
}
-void LogPlainView::setSource(const QString& name)
+void LogPlainView::setSource(const TQString& name)
{
if( name.isEmpty() )
return;
diff --git a/cervisia/logplainview.h b/cervisia/logplainview.h
index f5da46a5..37e60f7b 100644
--- a/cervisia/logplainview.h
+++ b/cervisia/logplainview.h
@@ -36,23 +36,23 @@ class LogPlainView : public KTextBrowser
Q_OBJECT
public:
- explicit LogPlainView(QWidget* parent = 0, const char* name = 0);
+ explicit LogPlainView(TQWidget* parent = 0, const char* name = 0);
~LogPlainView();
void addRevision(const Cervisia::LogInfo& logInfo);
- void searchText(int options, const QString& pattern);
+ void searchText(int options, const TQString& pattern);
signals:
- void revisionClicked(QString rev, bool rmb);
+ void revisionClicked(TQString rev, bool rmb);
public slots:
void scrollToTop();
void findNext();
- void searchHighlight(const QString& text, int index, int length);
+ void searchHighlight(const TQString& text, int index, int length);
protected:
- virtual void setSource(const QString& name);
+ virtual void setSource(const TQString& name);
private:
KFind* m_find;
diff --git a/cervisia/logtree.cpp b/cervisia/logtree.cpp
index 1b5258ad..d0e8e6d2 100644
--- a/cervisia/logtree.cpp
+++ b/cervisia/logtree.cpp
@@ -20,7 +20,7 @@
#include "logtree.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
#include <kglobalsettings.h>
@@ -43,7 +43,7 @@ class LogTreeItem
{
public:
Cervisia::LogInfo m_logInfo;
- QString branchpoint;
+ TQString branchpoint;
bool firstonbranch;
int row;
int col;
@@ -59,13 +59,13 @@ public:
};
-LogTreeView::LogTreeView(QWidget *parent, const char *name)
- : QTable(parent, name)
+LogTreeView::LogTreeView(TQWidget *parent, const char *name)
+ : TQTable(parent, name)
{
if (!static_initialized)
{
static_initialized = true;
- QFontMetrics fm( fontMetrics() );
+ TQFontMetrics fm( fontMetrics() );
static_width = fm.width("1234567890") + 2*BORDER + 2*INSPACE;
static_height = 2*fm.height() + 2*BORDER + 3*INSPACE;
}
@@ -73,14 +73,14 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name)
setNumCols(0);
setNumRows(0);
setReadOnly(true);
- setFocusStyle(QTable::FollowStyle);
- setSelectionMode(QTable::NoSelection);
+ setFocusStyle(TQTable::FollowStyle);
+ setSelectionMode(TQTable::NoSelection);
setShowGrid(false);
horizontalHeader()->hide();
setTopMargin(0);
verticalHeader()->hide();
setLeftMargin(0);
- setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
+ setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
setBackgroundMode(PaletteBase);
setFocusPolicy(NoFocus);
@@ -92,16 +92,16 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name)
Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport());
- connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)),
- this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&)));
+ connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)),
+ this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&)));
}
void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
{
- QString branchpoint, branchrev;
+ TQString branchpoint, branchrev;
- const QString rev(logInfo.m_revision);
+ const TQString rev(logInfo.m_revision);
// find branch
int pos1, pos2;
@@ -133,7 +133,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
// look whether we have revisions on this branch
// shift them up
int row=-1, col=-1;
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for (; it.current(); ++it)
{
if (branchrev == (it.current()->m_logInfo.m_revision).left(branchrev.length()))
@@ -145,7 +145,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
// Are we at the top of the widget?
if (row == 0)
{
- QPtrListIterator<LogTreeItem> it2(items);
+ TQPtrListIterator<LogTreeItem> it2(items);
for (; it2.current(); ++it2)
it2.current()->row++;
setNumRows(numRows()+1);
@@ -158,13 +158,13 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
{
// Ok, so we must open a new branch
// Let's find the branch point
- QPtrListIterator<LogTreeItem> it3(items);
+ TQPtrListIterator<LogTreeItem> it3(items);
for (it3.toLast(); it3.current(); --it3)
{
if (branchpoint == it3.current()->m_logInfo.m_revision)
{
// Move existing branches to the right
- QPtrListIterator<LogTreeItem> it4(items);
+ TQPtrListIterator<LogTreeItem> it4(items);
for (; it4.current(); ++it4)
if (it4.current()->col > it3.current()->col)
{
@@ -175,7 +175,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
col = it3.current()->col+1;
if (row == -1)
{
- QPtrListIterator<LogTreeItem> it5(items);
+ TQPtrListIterator<LogTreeItem> it5(items);
for (; it5.current(); ++it5)
it5.current()->row++;
setNumRows(numRows()+1);
@@ -198,7 +198,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
#if 0
cout << "Dump: " << endl;
cout << "Rows: " << numRows() << "Cols: " << numCols() << endl;
- QPtrListIterator<LogTreeItem> it5(items);
+ TQPtrListIterator<LogTreeItem> it5(items);
for (; it5.current(); ++it5)
{
cout << "Rev: "<< it5.current()->rev << endl;
@@ -213,12 +213,12 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo)
void LogTreeView::collectConnections()
{
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for (; it.current(); ++it)
{
- QString rev = it.current()->m_logInfo.m_revision;
+ TQString rev = it.current()->m_logInfo.m_revision;
- QPtrListIterator<LogTreeItem> it2(items);
+ TQPtrListIterator<LogTreeItem> it2(items);
for (it2=it,++it2; it2.current(); ++it2)
if (it2.current()->branchpoint == rev &&
it2.current()->firstonbranch)
@@ -232,9 +232,9 @@ void LogTreeView::collectConnections()
}
-void LogTreeView::setSelectedPair(QString selectionA, QString selectionB)
+void LogTreeView::setSelectedPair(TQString selectionA, TQString selectionB)
{
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for(; it.current(); ++it)
{
bool oldstate = it.current()->selected;
@@ -249,17 +249,17 @@ void LogTreeView::setSelectedPair(QString selectionA, QString selectionB)
}
-QSize LogTreeView::sizeHint() const
+TQSize LogTreeView::sizeHint() const
{
- return QSize(2 * static_width, 3 * static_height);
+ return TQSize(2 * static_width, 3 * static_height);
}
-QString LogTreeView::text(int row, int col) const
+TQString LogTreeView::text(int row, int col) const
{
LogTreeItem* item = 0;
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for( ; it.current(); ++it )
{
if( it.current()->col == col && it.current()->row == row )
@@ -269,7 +269,7 @@ QString LogTreeView::text(int row, int col) const
}
}
- QString text;
+ TQString text;
if( item && !item->m_logInfo.m_author.isNull() )
text = item->m_logInfo.createToolTipText();
@@ -278,8 +278,8 @@ QString LogTreeView::text(int row, int col) const
}
-void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr,
- bool selected, const QColorGroup& cg)
+void LogTreeView::paintCell(TQPainter *p, int row, int col, const TQRect& cr,
+ bool selected, const TQColorGroup& cg)
{
Q_UNUSED(selected)
Q_UNUSED(cr)
@@ -290,7 +290,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr,
followed = false;
item = 0;
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for(; it.current(); ++it)
{
int itcol = it.current()->col;
@@ -300,7 +300,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr,
if (itrow == row && itcol == col)
item = it.current();
}
- QPtrListIterator<LogTreeConnection> it2(connections);
+ TQPtrListIterator<LogTreeConnection> it2(connections);
for (; it2.current(); ++it2)
{
int itcol1 = it2.current()->start->col;
@@ -321,7 +321,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr,
}
-void LogTreeView::paintConnector(QPainter *p,
+void LogTreeView::paintConnector(TQPainter *p,
int row, int col, bool followed, bool branched)
{
const int midx = columnWidth(col) / 2;
@@ -333,17 +333,17 @@ void LogTreeView::paintConnector(QPainter *p,
}
-QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo,
+TQSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo,
int* authorHeight,
int* tagsHeight) const
{
- const QFontMetrics fm(fontMetrics());
+ const TQFontMetrics fm(fontMetrics());
- const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag,
+ const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag,
Cervisia::TagInfo::Branch));
- const QSize r1 = fm.size(AlignCenter, logInfo.m_revision);
- const QSize r3 = fm.size(AlignCenter, logInfo.m_author);
+ const TQSize r1 = fm.size(AlignCenter, logInfo.m_revision);
+ const TQSize r3 = fm.size(AlignCenter, logInfo.m_author);
if (authorHeight)
*authorHeight = r3.height();
@@ -353,7 +353,7 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo,
if (!tags.isEmpty())
{
- const QSize r2 = fm.size(AlignCenter, tags);
+ const TQSize r2 = fm.size(AlignCenter, tags);
infoWidth = kMax(infoWidth, r2.width());
infoHeight += r2.height() + INSPACE;
if (tagsHeight)
@@ -366,24 +366,24 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo,
}
infoWidth += 2 * INSPACE;
- return QSize(infoWidth, infoHeight);
+ return TQSize(infoWidth, infoHeight);
}
-void LogTreeView::paintRevisionCell(QPainter *p,
+void LogTreeView::paintRevisionCell(TQPainter *p,
int row, int col,
const Cervisia::LogInfo& logInfo,
bool followed, bool branched, bool selected)
{
int authorHeight;
int tagsHeight;
- const QSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight));
- const QSize cellSize(columnWidth(col), rowHeight(row));
+ const TQSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight));
+ const TQSize cellSize(columnWidth(col), rowHeight(row));
const int midx(cellSize.width() / 2);
const int midy(cellSize.height() / 2);
- QRect rect(QPoint((cellSize.width() - infoSize.width()) / 2,
+ TQRect rect(TQPoint((cellSize.width() - infoSize.width()) / 2,
(cellSize.height() - infoSize.height()) / 2),
infoSize);
@@ -412,12 +412,12 @@ void LogTreeView::paintRevisionCell(QPainter *p,
p->drawText(rect, AlignHCenter, logInfo.m_author);
rect.setY(rect.y() + authorHeight + INSPACE);
- const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag,
+ const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag,
Cervisia::TagInfo::Branch));
if (!tags.isEmpty())
{
- const QFont font(p->font());
- QFont underline(font);
+ const TQFont font(p->font());
+ TQFont underline(font);
underline.setUnderline(true);
p->setFont(underline);
@@ -431,7 +431,7 @@ void LogTreeView::paintRevisionCell(QPainter *p,
}
-void LogTreeView::contentsMousePressEvent(QMouseEvent *e)
+void LogTreeView::contentsMousePressEvent(TQMouseEvent *e)
{
if ( e->button() == MidButton ||
e->button() == LeftButton)
@@ -439,7 +439,7 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e)
int row = rowAt( e->pos().y() );
int col = columnAt( e->pos().x() );
- QPtrListIterator<LogTreeItem> it(items);
+ TQPtrListIterator<LogTreeItem> it(items);
for(; it.current(); ++it)
if (it.current()->row == row
&& it.current()->col == col)
@@ -462,11 +462,11 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e)
void LogTreeView::recomputeCellSizes ()
{
// Compute maximum for each column and row
- for (QPtrListIterator<LogTreeItem> it(items); it.current(); ++it)
+ for (TQPtrListIterator<LogTreeItem> it(items); it.current(); ++it)
{
const LogTreeItem *item = it.current();
- const QSize cellSize(computeSize(item->m_logInfo) + QSize(2 * BORDER, 2 * BORDER));
+ const TQSize cellSize(computeSize(item->m_logInfo) + TQSize(2 * BORDER, 2 * BORDER));
setColumnWidth(item->col, kMax(columnWidth(item->col), cellSize.width()));
setRowHeight(item->row, kMax(rowHeight(item->row), cellSize.height()));
@@ -476,11 +476,11 @@ void LogTreeView::recomputeCellSizes ()
}
-void LogTreeView::slotQueryToolTip(const QPoint& viewportPos,
- QRect& viewportRect,
- QString& tipText)
+void LogTreeView::slotQueryToolTip(const TQPoint& viewportPos,
+ TQRect& viewportRect,
+ TQString& tipText)
{
- const QPoint contentsPos(viewportToContents(viewportPos));
+ const TQPoint contentsPos(viewportToContents(viewportPos));
const int column(columnAt(contentsPos.x()));
const int row(rowAt(contentsPos.y()));
diff --git a/cervisia/logtree.h b/cervisia/logtree.h
index 9ab505bc..360a1a99 100644
--- a/cervisia/logtree.h
+++ b/cervisia/logtree.h
@@ -23,9 +23,9 @@
#define LOGTREE_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
-#include <qtable.h>
+#include <tqtable.h>
class LogTreeItem;
@@ -37,8 +37,8 @@ struct LogInfo;
}
-typedef QPtrList<LogTreeItem> LogTreeItemList;
-typedef QPtrList<LogTreeConnection> LogTreeConnectionList;
+typedef TQPtrList<LogTreeItem> LogTreeItemList;
+typedef TQPtrList<LogTreeConnection> LogTreeConnectionList;
class LogTreeView : public QTable
@@ -46,34 +46,34 @@ class LogTreeView : public QTable
Q_OBJECT
public:
- explicit LogTreeView( QWidget *parent=0, const char *name=0 );
+ explicit LogTreeView( TQWidget *parent=0, const char *name=0 );
void addRevision(const Cervisia::LogInfo& logInfo);
- void setSelectedPair(QString selectionA, QString selectionB);
+ void setSelectedPair(TQString selectionA, TQString selectionB);
void collectConnections();
void recomputeCellSizes();
- virtual void paintCell(QPainter *p, int row, int col, const QRect& cr,
- bool selected, const QColorGroup& cg);
+ virtual void paintCell(TQPainter *p, int row, int col, const TQRect& cr,
+ bool selected, const TQColorGroup& cg);
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
- virtual QString text(int row, int col) const;
+ virtual TQString text(int row, int col) const;
signals:
- void revisionClicked(QString rev, bool rmb);
+ void revisionClicked(TQString rev, bool rmb);
protected:
- virtual void contentsMousePressEvent(QMouseEvent *e);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
private slots:
- void slotQueryToolTip(const QPoint&, QRect&, QString&);
+ void slotQueryToolTip(const TQPoint&, TQRect&, TQString&);
private:
- QSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const;
- void paintRevisionCell(QPainter *p, int row, int col, const Cervisia::LogInfo& logInfo,
+ TQSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const;
+ void paintRevisionCell(TQPainter *p, int row, int col, const Cervisia::LogInfo& logInfo,
bool followed, bool branched, bool selected);
- void paintConnector(QPainter *p, int row, int col, bool followed, bool branched);
+ void paintConnector(TQPainter *p, int row, int col, bool followed, bool branched);
LogTreeItemList items;
LogTreeConnectionList connections;
diff --git a/cervisia/main.cpp b/cervisia/main.cpp
index e8e6a505..9d6e181d 100644
--- a/cervisia/main.cpp
+++ b/cervisia/main.cpp
@@ -20,7 +20,7 @@
#include <iostream>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -38,12 +38,12 @@
#include "version.h"
-static CvsService_stub* StartDCOPService(const QString& directory)
+static CvsService_stub* StartDCOPService(const TQString& directory)
{
// start the cvs DCOP service
- QString error;
- QCString appId;
- if( KApplication::startServiceByDesktopName("cvsservice", QStringList(),
+ TQString error;
+ TQCString appId;
+ if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(),
&error, &appId) )
{
std::cerr << "Starting cvsservice failed with message: "
@@ -53,14 +53,14 @@ static CvsService_stub* StartDCOPService(const QString& directory)
DCOPRef repository(appId, "CvsRepository");
- repository.call("setWorkingCopy(QString)", directory);
+ repository.call("setWorkingCopy(TQString)", directory);
// create a reference to the service
return new CvsService_stub(appId, "CvsService");
}
-static int ShowResolveDialog(const QString& fileName)
+static int ShowResolveDialog(const TQString& fileName)
{
KConfig* config = new KConfig("cervisiapartrc");
@@ -79,15 +79,15 @@ static int ShowResolveDialog(const QString& fileName)
}
-static int ShowLogDialog(const QString& fileName)
+static int ShowLogDialog(const TQString& fileName)
{
KConfig* config = new KConfig("cervisiapartrc");
LogDialog* dlg = new LogDialog(*config);
kapp->setMainWidget(dlg);
// get directory for file
- const QFileInfo fi(fileName);
- QString directory = fi.dirPath(true);
+ const TQFileInfo fi(fileName);
+ TQString directory = fi.dirPath(true);
// start the cvs DCOP service
CvsService_stub* cvsService = StartDCOPService(directory);
@@ -109,15 +109,15 @@ static int ShowLogDialog(const QString& fileName)
}
-static int ShowAnnotateDialog(const QString& fileName)
+static int ShowAnnotateDialog(const TQString& fileName)
{
KConfig* config = new KConfig("cervisiapartrc");
AnnotateDialog* dlg = new AnnotateDialog(*config);
kapp->setMainWidget(dlg);
// get directory for file
- const QFileInfo fi(fileName);
- QString directory = fi.dirPath(true);
+ const TQFileInfo fi(fileName);
+ TQString directory = fi.dirPath(true);
// start the cvs DCOP service
CvsService_stub* cvsService = StartDCOPService(directory);
@@ -169,17 +169,17 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KApplication app;
- QString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve");
+ TQString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve");
if (!resolvefile.isEmpty())
return ShowResolveDialog(resolvefile);
// is command line option 'show log dialog' specified?
- QString logFile = KCmdLineArgs::parsedArgs()->getOption("log");
+ TQString logFile = KCmdLineArgs::parsedArgs()->getOption("log");
if( !logFile.isEmpty() )
return ShowLogDialog(logFile);
// is command line option 'show annotation dialog' specified?
- QString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate");
+ TQString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate");
if( !annotateFile.isEmpty() )
return ShowAnnotateDialog(annotateFile);
diff --git a/cervisia/mergedlg.cpp b/cervisia/mergedlg.cpp
index 92d337d5..e2b770c6 100644
--- a/cervisia/mergedlg.cpp
+++ b/cervisia/mergedlg.cpp
@@ -20,13 +20,13 @@
#include "mergedlg.h"
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qstyle.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqstyle.h>
#include <klocale.h>
#include "misc.h"
@@ -34,50 +34,50 @@
MergeDialog::MergeDialog(CvsService_stub* service,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("CVS Merge"),
Ok | Cancel, Ok, true),
cvsService(service)
{
int const iComboBoxMinWidth(30 * fontMetrics().width('0'));
- int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6);
+ int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6);
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- bybranch_button = new QRadioButton(i18n("Merge from &branch:"), mainWidget);
+ bybranch_button = new TQRadioButton(i18n("Merge from &branch:"), mainWidget);
bybranch_button->setChecked(true);
layout->addWidget(bybranch_button);
- branch_combo = new QComboBox(true, mainWidget);
+ branch_combo = new TQComboBox(true, mainWidget);
branch_combo->setMinimumWidth(iComboBoxMinWidth);
- branch_button = new QPushButton(i18n("Fetch &List"), mainWidget);
- connect( branch_button, SIGNAL(clicked()),
- this, SLOT(branchButtonClicked()) );
+ branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget);
+ connect( branch_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(branchButtonClicked()) );
- QBoxLayout *branchedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout);
branchedit_layout->addSpacing(iWidgetIndent);
branchedit_layout->addWidget(branch_combo, 2);
branchedit_layout->addWidget(branch_button, 0);
- bytags_button = new QRadioButton(i18n("Merge &modifications:"), mainWidget);
+ bytags_button = new TQRadioButton(i18n("Merge &modifications:"), mainWidget);
layout->addWidget(bytags_button);
- QLabel *tag1_label = new QLabel(i18n("between tag: "), mainWidget);
- tag1_combo = new QComboBox(true, mainWidget);
+ TQLabel *tag1_label = new TQLabel(i18n("between tag: "), mainWidget);
+ tag1_combo = new TQComboBox(true, mainWidget);
tag1_combo->setMinimumWidth(iComboBoxMinWidth);
- QLabel *tag2_label = new QLabel(i18n("and tag: "), mainWidget);
- tag2_combo = new QComboBox(true, mainWidget);
+ TQLabel *tag2_label = new TQLabel(i18n("and tag: "), mainWidget);
+ tag2_combo = new TQComboBox(true, mainWidget);
tag2_combo->setMinimumWidth(iComboBoxMinWidth);
- tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget);
- connect( tag_button, SIGNAL(clicked()),
- this, SLOT(tagButtonClicked()) );
+ tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget);
+ connect( tag_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(tagButtonClicked()) );
- QGridLayout *tagsedit_layout = new QGridLayout(layout);
+ TQGridLayout *tagsedit_layout = new TQGridLayout(layout);
tagsedit_layout->addColSpacing(0, iWidgetIndent);
tagsedit_layout->setColStretch(0, 0);
tagsedit_layout->setColStretch(1, 1);
@@ -89,12 +89,12 @@ MergeDialog::MergeDialog(CvsService_stub* service,
tagsedit_layout->addWidget(tag2_combo, 1, 2);
tagsedit_layout->addMultiCellWidget(tag_button, 0, 1, 3, 3);
- QButtonGroup* group = new QButtonGroup(mainWidget);
+ TQButtonGroup* group = new TQButtonGroup(mainWidget);
group->hide();
group->insert(bybranch_button);
group->insert(bytags_button);
- connect( group, SIGNAL(clicked(int)),
- this, SLOT(toggled()) );
+ connect( group, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(toggled()) );
// dis-/enable the widgets
toggled();
@@ -107,19 +107,19 @@ bool MergeDialog::byBranch() const
}
-QString MergeDialog::branch() const
+TQString MergeDialog::branch() const
{
return branch_combo->currentText();
}
-QString MergeDialog::tag1() const
+TQString MergeDialog::tag1() const
{
return tag1_combo->currentText();
}
-QString MergeDialog::tag2() const
+TQString MergeDialog::tag2() const
{
return tag2_combo->currentText();
}
@@ -127,7 +127,7 @@ QString MergeDialog::tag2() const
void MergeDialog::tagButtonClicked()
{
- QStringList const listTags(::fetchTags(cvsService, this));
+ TQStringList const listTags(::fetchTags(cvsService, this));
tag1_combo->clear();
tag1_combo->insertStringList(listTags);
tag2_combo->clear();
diff --git a/cervisia/mergedlg.h b/cervisia/mergedlg.h
index bd4464c1..63454dc6 100644
--- a/cervisia/mergedlg.h
+++ b/cervisia/mergedlg.h
@@ -37,12 +37,12 @@ class MergeDialog : public KDialogBase
public:
MergeDialog( CvsService_stub* service,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
bool byBranch() const;
- QString branch() const;
- QString tag1() const;
- QString tag2() const;
+ TQString branch() const;
+ TQString tag1() const;
+ TQString tag2() const;
private slots:
void toggled();
@@ -52,9 +52,9 @@ private slots:
private:
CvsService_stub* cvsService;
- QRadioButton *bybranch_button, *bytags_button;
- QComboBox *branch_combo, *tag1_combo, *tag2_combo;
- QPushButton *tag_button, *branch_button;
+ TQRadioButton *bybranch_button, *bytags_button;
+ TQComboBox *branch_combo, *tag1_combo, *tag2_combo;
+ TQPushButton *tag_button, *branch_button;
};
#endif
diff --git a/cervisia/misc.cpp b/cervisia/misc.cpp
index e1cfe208..fbff3398 100644
--- a/cervisia/misc.cpp
+++ b/cervisia/misc.cpp
@@ -25,10 +25,10 @@
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kconfig.h>
#include <kemailsettings.h>
#include <klocale.h>
@@ -43,14 +43,14 @@
// These regular expression parts aren't useful to check the validity of the
// CVSROOT specification. They are just used to extract the different parts of it.
-static const QString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?");
-static const QString passwordRegExp("(:[^@]+)?");
-static const QString hostNameRegExp("([^:/@]+)");
-static const QString portRegExp("(:(\\d*))?");
-static const QString pathRegExp("(/.*)");
+static const TQString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?");
+static const TQString passwordRegExp("(:[^@]+)?");
+static const TQString hostNameRegExp("([^:/@]+)");
+static const TQString portRegExp("(:(\\d*))?");
+static const TQString pathRegExp("(/.*)");
-static int FindWhiteSpace(const QString& str, int index)
+static int FindWhiteSpace(const TQString& str, int index)
{
const int length = str.length();
@@ -60,10 +60,10 @@ static int FindWhiteSpace(const QString& str, int index)
if( index < 0 || index >= length )
return -1;
- const QChar* const startPos = str.unicode();
- const QChar* const endPos = startPos + length;
+ const TQChar* const startPos = str.unicode();
+ const TQChar* const endPos = startPos + length;
- const QChar* pos = startPos + index;
+ const TQChar* pos = startPos + index;
while( pos < endPos && !pos->isSpace() )
++pos;
@@ -72,21 +72,21 @@ static int FindWhiteSpace(const QString& str, int index)
}
-static const QStringList FetchBranchesAndTags(const QString& searchedType,
+static const TQStringList FetchBranchesAndTags(const TQString& searchedType,
CvsService_stub* cvsService,
- QWidget* parent)
+ TQWidget* parent)
{
- QStringList branchOrTagList;
+ TQStringList branchOrTagList;
- DCOPRef job = cvsService->status(QStringList(), true, true);
+ DCOPRef job = cvsService->status(TQStringList(), true, true);
if( !cvsService->ok() )
return branchOrTagList;
- ProgressDialog dlg(parent, "Status", job, QString::null, i18n("CVS Status"));
+ ProgressDialog dlg(parent, "Status", job, TQString::null, i18n("CVS Status"));
if( dlg.execute() )
{
- QString line;
+ TQString line;
while( dlg.getLine(line) )
{
int wsPos, bracketPos, colonPos;
@@ -100,8 +100,8 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType,
if( (colonPos = line.find(':', bracketPos + 1)) < 0 )
continue;
- const QString tag = line.mid(1, wsPos - 1);
- const QString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1);
+ const TQString tag = line.mid(1, wsPos - 1);
+ const TQString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1);
if( type == searchedType && !branchOrTagList.contains(tag) )
branchOrTagList.push_back(tag);
}
@@ -113,9 +113,9 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType,
}
-bool Cervisia::IsValidTag(const QString& tag)
+bool Cervisia::IsValidTag(const TQString& tag)
{
- static const QString prohibitedChars("$,.:;@");
+ static const TQString prohibitedChars("$,.:;@");
if( !isalpha(tag[0].latin1()) )
return false;
@@ -130,19 +130,19 @@ bool Cervisia::IsValidTag(const QString& tag)
}
-QString Cervisia::UserName()
+TQString Cervisia::UserName()
{
// 1. Try to retrieve the information from the control center settings
KEMailSettings settings;
- QString name = settings.getSetting(KEMailSettings::RealName);
- QString email = settings.getSetting(KEMailSettings::EmailAddress);
+ TQString name = settings.getSetting(KEMailSettings::RealName);
+ TQString email = settings.getSetting(KEMailSettings::EmailAddress);
if( name.isEmpty() || email.isEmpty() )
{
// 2. Try to retrieve the information from the system
struct passwd* pw = getpwuid(getuid());
if( !pw )
- return QString::null;
+ return TQString::null;
char hostname[512];
hostname[0] = '\0';
@@ -150,12 +150,12 @@ QString Cervisia::UserName()
if( !gethostname(hostname, sizeof(hostname)) )
hostname[sizeof(hostname)-1] = '0';
- name = QString::fromLocal8Bit(pw->pw_gecos);
- email = QString::fromLocal8Bit(pw->pw_name) + "@" +
- QString::fromLocal8Bit(hostname);
+ name = TQString::fromLocal8Bit(pw->pw_gecos);
+ email = TQString::fromLocal8Bit(pw->pw_name) + "@" +
+ TQString::fromLocal8Bit(hostname);
}
- QString result = name;
+ TQString result = name;
result += " <";
result += email;
result += ">";
@@ -164,17 +164,17 @@ QString Cervisia::UserName()
}
-QString Cervisia::NormalizeRepository(const QString& repository)
+TQString Cervisia::NormalizeRepository(const TQString& repository)
{
// only :pserver: repositories
if( !repository.startsWith(":pserver:") )
return repository;
- QRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" +
+ TQRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" +
hostNameRegExp + portRegExp + pathRegExp);
// extract username, hostname, port and path from CVSROOT
- QString userName, hostName, port, path;
+ TQString userName, hostName, port, path;
if( rx.search(repository) != -1 )
{
userName = rx.cap(2);
@@ -193,7 +193,7 @@ QString Cervisia::NormalizeRepository(const QString& repository)
if( userName.isEmpty() )
userName = KUser().loginName();
- QString canonicalForm = ":pserver:" + userName + "@" + hostName +
+ TQString canonicalForm = ":pserver:" + userName + "@" + hostName +
":" + port + path;
kdDebug() << "NormalizeRepository(): canonicalForm=" << canonicalForm
@@ -205,11 +205,11 @@ QString Cervisia::NormalizeRepository(const QString& repository)
}
-bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent)
+bool Cervisia::CheckOverwrite(const TQString& fileName, TQWidget* parent)
{
bool result = true;
- QFileInfo fi(fileName);
+ TQFileInfo fi(fileName);
// does the file already exist?
if( fi.exists() )
@@ -224,10 +224,10 @@ bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent)
}
-QString joinLine(const QStringList &list)
+TQString joinLine(const TQStringList &list)
{
- QString line;
- for ( QStringList::ConstIterator it = list.begin();
+ TQString line;
+ for ( TQStringList::ConstIterator it = list.begin();
it != list.end(); ++it )
{
line += KShellProcess::quote(*it);
@@ -241,11 +241,11 @@ QString joinLine(const QStringList &list)
}
-// Should be replaceable by QStringList::split
-QStringList splitLine(QString line, char delim)
+// Should be replaceable by TQStringList::split
+TQStringList splitLine(TQString line, char delim)
{
int pos;
- QStringList list;
+ TQStringList list;
line = line.simplifyWhiteSpace();
while ((pos = line.find(delim)) != -1)
@@ -259,46 +259,46 @@ QStringList splitLine(QString line, char delim)
}
-const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent)
+const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent)
{
- return FetchBranchesAndTags(QString::fromLatin1("branch"), cvsService,
+ return FetchBranchesAndTags(TQString::fromLatin1("branch"), cvsService,
parent);
}
-const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent)
+const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent)
{
- return FetchBranchesAndTags(QString::fromLatin1("revision"), cvsService,
+ return FetchBranchesAndTags(TQString::fromLatin1("revision"), cvsService,
parent);
}
-static QStringList *tempFiles = 0;
+static TQStringList *tempFiles = 0;
void cleanupTempFiles()
{
if (tempFiles)
{
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = tempFiles->begin(); it != tempFiles->end(); ++it)
- QFile::remove(*it);
+ TQFile::remove(*it);
delete tempFiles;
}
}
-QString tempFileName(const QString& suffix)
+TQString tempFileName(const TQString& suffix)
{
if (!tempFiles)
tempFiles = new QStringList;
- KTempFile f(QString::null, suffix);
+ KTempFile f(TQString::null, suffix);
tempFiles->append(f.name());
return f.name();
}
-int compareRevisions(const QString& rev1, const QString& rev2)
+int compareRevisions(const TQString& rev1, const TQString& rev2)
{
const int length1(rev1.length());
const int length2(rev2.length());
diff --git a/cervisia/misc.h b/cervisia/misc.h
index b0d912e5..40dca86b 100644
--- a/cervisia/misc.h
+++ b/cervisia/misc.h
@@ -36,40 +36,40 @@ namespace Cervisia
/**
* Verifies that the passed tag name is a valid cvs tag.
*/
-bool IsValidTag(const QString& tag);
+bool IsValidTag(const TQString& tag);
/**
* Returns the user name (real name + mail address) for the changelog entry.
*/
-QString UserName();
+TQString UserName();
/**
* This method makes sure that the cvsroot specification for a pserver repository has
* always the form:
* :pserver:[user]@[host]:[port][path]
*/
-QString NormalizeRepository(const QString& repository);
+TQString NormalizeRepository(const TQString& repository);
-bool CheckOverwrite(const QString& fileName, QWidget* parent=0);
+bool CheckOverwrite(const TQString& fileName, TQWidget* parent=0);
}
-QString joinLine(const QStringList &list);
-QStringList splitLine(QString, char delim=' ');
+TQString joinLine(const TQStringList &list);
+TQStringList splitLine(TQString, char delim=' ');
-QString tempFileName(const QString& suffix);
+TQString tempFileName(const TQString& suffix);
void cleanupTempFiles();
-const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent);
-const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent);
+const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent);
+const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent);
/**
* Compares two revision numbers.
*
* @return -1 / 0 / 1 if rev1 is < / == / > rev2
*/
-int compareRevisions(const QString& rev1, const QString& rev2);
+int compareRevisions(const TQString& rev1, const TQString& rev2);
/**
diff --git a/cervisia/patchoptiondlg.cpp b/cervisia/patchoptiondlg.cpp
index 9e6f92d1..b764c57c 100644
--- a/cervisia/patchoptiondlg.cpp
+++ b/cervisia/patchoptiondlg.cpp
@@ -19,52 +19,52 @@
#include "patchoptiondlg.h"
using Cervisia::PatchOptionDialog;
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
#include <knuminput.h>
#include <klocale.h>
-PatchOptionDialog::PatchOptionDialog(QWidget* parent, const char* name)
- : KDialogBase(parent, name, true/*modal*/, QString::null,
+PatchOptionDialog::PatchOptionDialog(TQWidget* parent, const char* name)
+ : KDialogBase(parent, name, true/*modal*/, TQString::null,
Ok | Cancel | Help, Ok, true/*separator*/)
{
- QFrame* mainWidget = makeMainWidget();
- QBoxLayout* topLayout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQFrame* mainWidget = makeMainWidget();
+ TQBoxLayout* topLayout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- m_formatBtnGroup = new QVButtonGroup(i18n("Output Format"), mainWidget, "");
+ m_formatBtnGroup = new TQVButtonGroup(i18n("Output Format"), mainWidget, "");
topLayout->addWidget(m_formatBtnGroup);
- connect(m_formatBtnGroup, SIGNAL(clicked(int)),
- this, SLOT(formatChanged(int)));
+ connect(m_formatBtnGroup, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(formatChanged(int)));
- new QRadioButton(i18n( "Context" ), m_formatBtnGroup);
- new QRadioButton(i18n( "Normal" ), m_formatBtnGroup);
- QRadioButton* unifiedFormatBtn = new QRadioButton(i18n( "Unified" ), m_formatBtnGroup);
+ new TQRadioButton(i18n( "Context" ), m_formatBtnGroup);
+ new TQRadioButton(i18n( "Normal" ), m_formatBtnGroup);
+ TQRadioButton* unifiedFormatBtn = new TQRadioButton(i18n( "Unified" ), m_formatBtnGroup);
unifiedFormatBtn->setChecked(true);
- QLabel* contextLinesLbl = new QLabel(i18n("&Number of context lines:"),
+ TQLabel* contextLinesLbl = new TQLabel(i18n("&Number of context lines:"),
mainWidget);
m_contextLines = new KIntNumInput(3, mainWidget);
m_contextLines->setRange(2, 65535, 1, false);
contextLinesLbl->setBuddy(m_contextLines);
- QBoxLayout* contextLinesLayout = new QHBoxLayout(topLayout);
+ TQBoxLayout* contextLinesLayout = new TQHBoxLayout(topLayout);
contextLinesLayout->addWidget(contextLinesLbl);
contextLinesLayout->addWidget(m_contextLines);
- QVButtonGroup* ignoreBtnGroup = new QVButtonGroup(i18n("Ignore Options"), mainWidget);
+ TQVButtonGroup* ignoreBtnGroup = new TQVButtonGroup(i18n("Ignore Options"), mainWidget);
topLayout->addWidget(ignoreBtnGroup);
- m_blankLineChk = new QCheckBox(i18n("Ignore added or removed empty lines"),
+ m_blankLineChk = new TQCheckBox(i18n("Ignore added or removed empty lines"),
ignoreBtnGroup);
- m_spaceChangeChk = new QCheckBox(i18n("Ignore changes in the amount of whitespace"),
+ m_spaceChangeChk = new TQCheckBox(i18n("Ignore changes in the amount of whitespace"),
ignoreBtnGroup);
- m_allSpaceChk = new QCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup);
- m_caseChangesChk = new QCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup);
+ m_allSpaceChk = new TQCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup);
+ m_caseChangesChk = new TQCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup);
}
@@ -73,9 +73,9 @@ PatchOptionDialog::~PatchOptionDialog()
}
-QString PatchOptionDialog::diffOptions() const
+TQString PatchOptionDialog::diffOptions() const
{
- QString options;
+ TQString options;
if( m_blankLineChk->isChecked() )
options += " -B ";
@@ -93,13 +93,13 @@ QString PatchOptionDialog::diffOptions() const
}
-QString PatchOptionDialog::formatOption() const
+TQString PatchOptionDialog::formatOption() const
{
switch( m_formatBtnGroup->selectedId() )
{
- case 0: return "-C " + QString::number(m_contextLines->value());
+ case 0: return "-C " + TQString::number(m_contextLines->value());
case 1: return "";
- case 2: return "-U " + QString::number(m_contextLines->value());
+ case 2: return "-U " + TQString::number(m_contextLines->value());
}
return "";
diff --git a/cervisia/patchoptiondlg.h b/cervisia/patchoptiondlg.h
index 64109a2b..148640d2 100644
--- a/cervisia/patchoptiondlg.h
+++ b/cervisia/patchoptiondlg.h
@@ -36,22 +36,22 @@ class PatchOptionDialog : public KDialogBase
Q_OBJECT
public:
- explicit PatchOptionDialog(QWidget* parent = 0, const char* name = 0);
+ explicit PatchOptionDialog(TQWidget* parent = 0, const char* name = 0);
virtual ~PatchOptionDialog();
- QString diffOptions() const;
- QString formatOption() const;
+ TQString diffOptions() const;
+ TQString formatOption() const;
private slots:
void formatChanged(int buttonId);
private:
- QVButtonGroup* m_formatBtnGroup;
+ TQVButtonGroup* m_formatBtnGroup;
KIntNumInput* m_contextLines;
- QCheckBox* m_blankLineChk;
- QCheckBox* m_allSpaceChk;
- QCheckBox* m_spaceChangeChk;
- QCheckBox* m_caseChangesChk;
+ TQCheckBox* m_blankLineChk;
+ TQCheckBox* m_allSpaceChk;
+ TQCheckBox* m_spaceChangeChk;
+ TQCheckBox* m_caseChangesChk;
};
diff --git a/cervisia/progressdlg.cpp b/cervisia/progressdlg.cpp
index d72c6565..a7e34018 100644
--- a/cervisia/progressdlg.cpp
+++ b/cervisia/progressdlg.cpp
@@ -19,12 +19,12 @@
#include "progressdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <cvsjob_stub.h>
#include <dcopref.h>
@@ -42,19 +42,19 @@ struct ProgressDialog::Private
bool hasError;
CvsJob_stub* cvsJob;
- QString buffer;
- QString errorId1, errorId2;
- QStringList output;
+ TQString buffer;
+ TQString errorId1, errorId2;
+ TQStringList output;
- QTimer* timer;
+ TQTimer* timer;
KAnimWidget* gear;
- QListBox* resultbox;
+ TQListBox* resultbox;
};
-ProgressDialog::ProgressDialog(QWidget* parent, const QString& heading,
- const DCOPRef& job, const QString& errorIndicator,
- const QString& caption)
+ProgressDialog::ProgressDialog(TQWidget* parent, const TQString& heading,
+ const DCOPRef& job, const TQString& errorIndicator,
+ const TQString& caption)
: KDialogBase(parent, 0, true, caption, Cancel, Cancel, true)
, DCOPObject()
, d(new Private)
@@ -81,27 +81,27 @@ ProgressDialog::~ProgressDialog()
}
-void ProgressDialog::setupGui(const QString& heading)
+void ProgressDialog::setupGui(const TQString& heading)
{
- QVBox* vbox = makeVBoxMainWidget();
+ TQVBox* vbox = makeVBoxMainWidget();
vbox->setSpacing(10);
- QWidget* headingBox = new QWidget(vbox);
- QHBoxLayout* hboxLayout = new QHBoxLayout(headingBox);
+ TQWidget* headingBox = new TQWidget(vbox);
+ TQHBoxLayout* hboxLayout = new TQHBoxLayout(headingBox);
- QLabel* textLabel = new QLabel(heading, headingBox);
+ TQLabel* textLabel = new TQLabel(heading, headingBox);
textLabel->setMinimumWidth(textLabel->sizeHint().width());
textLabel->setFixedHeight(textLabel->sizeHint().height());
hboxLayout->addWidget(textLabel);
hboxLayout->addStretch();
- d->gear = new KAnimWidget(QString("kde"), 32, headingBox);
+ d->gear = new KAnimWidget(TQString("kde"), 32, headingBox);
d->gear->setFixedSize(32, 32);
hboxLayout->addWidget(d->gear);
- d->resultbox = new QListBox(vbox);
- d->resultbox->setSelectionMode(QListBox::NoSelection);
- QFontMetrics fm(d->resultbox->fontMetrics());
+ d->resultbox = new TQListBox(vbox);
+ d->resultbox->setSelectionMode(TQListBox::NoSelection);
+ TQFontMetrics fm(d->resultbox->fontMetrics());
d->resultbox->setMinimumSize(fm.width("0")*70, fm.lineSpacing()*8);
resize(sizeHint());
@@ -111,37 +111,37 @@ void ProgressDialog::setupGui(const QString& heading)
bool ProgressDialog::execute()
{
// get command line and display it
- QString cmdLine = d->cvsJob->cvsCommand();
+ TQString cmdLine = d->cvsJob->cvsCommand();
d->resultbox->insertItem(cmdLine);
// establish connections to the signals of the cvs job
connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "jobExited(bool, int)",
"slotJobExited(bool, int)", true);
- connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)",
- "slotReceivedOutputNonGui(QString)", true);
- connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)",
- "slotReceivedOutputNonGui(QString)", true);
+ connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)",
+ "slotReceivedOutputNonGui(TQString)", true);
+ connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)",
+ "slotReceivedOutputNonGui(TQString)", true);
// we wait for 4 seconds (or the timeout set by the user) before we
// force the dialog to show up
- d->timer = new QTimer(this);
- connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimeoutOccurred()));
+ d->timer = new TQTimer(this);
+ connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutOccurred()));
d->timer->start(CervisiaSettings::timeout(), true);
bool started = d->cvsJob->execute();
if( !started )
return false;
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
kapp->enter_loop();
- if (QApplication::overrideCursor())
- QApplication::restoreOverrideCursor();
+ if (TQApplication::overrideCursor())
+ TQApplication::restoreOverrideCursor();
return !d->isCancelled;
}
-bool ProgressDialog::getLine(QString& line)
+bool ProgressDialog::getLine(TQString& line)
{
if( d->output.isEmpty() )
return false;
@@ -153,13 +153,13 @@ bool ProgressDialog::getLine(QString& line)
}
-QStringList ProgressDialog::getOutput() const
+TQStringList ProgressDialog::getOutput() const
{
return d->output;
}
-void ProgressDialog::slotReceivedOutputNonGui(QString buffer)
+void ProgressDialog::slotReceivedOutputNonGui(TQString buffer)
{
d->buffer += buffer;
@@ -172,7 +172,7 @@ void ProgressDialog::slotReceivedOutputNonGui(QString buffer)
}
-void ProgressDialog::slotReceivedOutput(QString buffer)
+void ProgressDialog::slotReceivedOutput(TQString buffer)
{
d->buffer += buffer;
processOutput();
@@ -224,10 +224,10 @@ void ProgressDialog::stopNonGuiPart()
{
d->timer->stop();
- disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)",
- "slotReceivedOutputNonGui(QString)");
- disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)",
- "slotReceivedOutputNonGui(QString)");
+ disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)",
+ "slotReceivedOutputNonGui(TQString)");
+ disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)",
+ "slotReceivedOutputNonGui(TQString)");
kapp->exit_loop();
}
@@ -235,16 +235,16 @@ void ProgressDialog::stopNonGuiPart()
void ProgressDialog::startGuiPart()
{
- connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)",
- "slotReceivedOutput(QString)", true);
- connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)",
- "slotReceivedOutput(QString)", true);
+ connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)",
+ "slotReceivedOutput(TQString)", true);
+ connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)",
+ "slotReceivedOutput(TQString)", true);
show();
d->isShown = true;
d->gear->start();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kapp->enter_loop();
}
@@ -254,7 +254,7 @@ void ProgressDialog::processOutput()
int pos;
while( (pos = d->buffer.find('\n')) != -1 )
{
- QString item = d->buffer.left(pos);
+ TQString item = d->buffer.left(pos);
if( item.startsWith(d->errorId1) ||
item.startsWith(d->errorId2) ||
item.startsWith("cvs [server aborted]:") )
diff --git a/cervisia/progressdlg.h b/cervisia/progressdlg.h
index 3e9dfed1..9ffa9dbf 100644
--- a/cervisia/progressdlg.h
+++ b/cervisia/progressdlg.h
@@ -34,17 +34,17 @@ class ProgressDialog : public KDialogBase, public DCOPObject
Q_OBJECT
public:
- ProgressDialog(QWidget* parent, const QString& heading, const DCOPRef& job,
- const QString& errorIndicator, const QString& caption = "");
+ ProgressDialog(TQWidget* parent, const TQString& heading, const DCOPRef& job,
+ const TQString& errorIndicator, const TQString& caption = "");
~ProgressDialog();
bool execute();
- bool getLine(QString& line);
- QStringList getOutput() const;
+ bool getLine(TQString& line);
+ TQStringList getOutput() const;
k_dcop:
- void slotReceivedOutputNonGui(QString buffer);
- void slotReceivedOutput(QString buffer);
+ void slotReceivedOutputNonGui(TQString buffer);
+ void slotReceivedOutput(TQString buffer);
void slotJobExited(bool normalExit, int status);
protected slots:
@@ -54,7 +54,7 @@ private slots:
void slotTimeoutOccurred();
private:
- void setupGui(const QString& heading);
+ void setupGui(const TQString& heading);
void stopNonGuiPart();
void startGuiPart();
void processOutput();
diff --git a/cervisia/protocolview.cpp b/cervisia/protocolview.cpp
index 8496b983..2de8405f 100644
--- a/cervisia/protocolview.cpp
+++ b/cervisia/protocolview.cpp
@@ -21,8 +21,8 @@
#include "protocolview.h"
-#include <qdir.h>
-#include <qpopupmenu.h>
+#include <tqdir.h>
+#include <tqpopupmenu.h>
#include <dcopref.h>
#include <kconfig.h>
#include <klocale.h>
@@ -32,8 +32,8 @@
#include "cvsjob_stub.h"
-ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *name)
- : QTextEdit(parent, name)
+ProtocolView::ProtocolView(const TQCString& appId, TQWidget *parent, const char *name)
+ : TQTextEdit(parent, name)
, job(0)
, m_isUpdateJob(false)
{
@@ -47,11 +47,11 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n
setFont(config->readFontEntry("ProtocolFont"));
config->setGroup("Colors");
- QColor defaultColor = QColor(255, 130, 130);
+ TQColor defaultColor = TQColor(255, 130, 130);
conflictColor=config->readColorEntry("Conflict",&defaultColor);
- defaultColor=QColor(130, 130, 255);
+ defaultColor=TQColor(130, 130, 255);
localChangeColor=config->readColorEntry("LocalChange",&defaultColor);
- defaultColor=QColor(70, 210, 70);
+ defaultColor=TQColor(70, 210, 70);
remoteChangeColor=config->readColorEntry("RemoteChange",&defaultColor);
// create a DCOP stub for the non-concurrent cvs job
@@ -60,10 +60,10 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n
// establish connections to the signals of the cvs job
connectDCOPSignal(job->app(), job->obj(), "jobExited(bool, int)",
"slotJobExited(bool, int)", true);
- connectDCOPSignal(job->app(), job->obj(), "receivedStdout(QString)",
- "slotReceivedOutput(QString)", true);
- connectDCOPSignal(job->app(), job->obj(), "receivedStderr(QString)",
- "slotReceivedOutput(QString)", true);
+ connectDCOPSignal(job->app(), job->obj(), "receivedStdout(TQString)",
+ "slotReceivedOutput(TQString)", true);
+ connectDCOPSignal(job->app(), job->obj(), "receivedStderr(TQString)",
+ "slotReceivedOutput(TQString)", true);
}
@@ -78,24 +78,24 @@ bool ProtocolView::startJob(bool isUpdateJob)
m_isUpdateJob = isUpdateJob;
// get command line and add it to output buffer
- QString cmdLine = job->cvsCommand();
+ TQString cmdLine = job->cvsCommand();
buf += cmdLine;
buf += '\n';
processOutput();
// disconnect 3rd party slots from our signals
- disconnect( SIGNAL(receivedLine(QString)) );
- disconnect( SIGNAL(jobFinished(bool, int)) );
+ disconnect( TQT_SIGNAL(receivedLine(TQString)) );
+ disconnect( TQT_SIGNAL(jobFinished(bool, int)) );
return job->execute();
}
-QPopupMenu* ProtocolView::createPopupMenu(const QPoint &pos)
+TQPopupMenu* ProtocolView::createPopupMenu(const TQPoint &pos)
{
- QPopupMenu* menu = QTextEdit::createPopupMenu(pos);
+ TQPopupMenu* menu = TQTextEdit::createPopupMenu(pos);
- int id = menu->insertItem(i18n("Clear"), this, SLOT( clear() ), 0, -1, 0);
+ int id = menu->insertItem(i18n("Clear"), this, TQT_SLOT( clear() ), 0, -1, 0);
if( length() == 0 )
menu->setItemEnabled(id, false);
@@ -110,7 +110,7 @@ void ProtocolView::cancelJob()
}
-void ProtocolView::slotReceivedOutput(QString buffer)
+void ProtocolView::slotReceivedOutput(TQString buffer)
{
buf += buffer;
processOutput();
@@ -119,7 +119,7 @@ void ProtocolView::slotReceivedOutput(QString buffer)
void ProtocolView::slotJobExited(bool normalExit, int exitStatus)
{
- QString msg;
+ TQString msg;
if( normalExit )
{
@@ -144,7 +144,7 @@ void ProtocolView::processOutput()
int pos;
while ( (pos = buf.find('\n')) != -1)
{
- QString line = buf.left(pos);
+ TQString line = buf.left(pos);
if (!line.isEmpty())
{
appendLine(line);
@@ -155,11 +155,11 @@ void ProtocolView::processOutput()
}
-void ProtocolView::appendLine(const QString &line)
+void ProtocolView::appendLine(const TQString &line)
{
// Escape output line, so that html tags in commit
// messages aren't interpreted
- const QString escapedLine = QStyleSheet::escape(line);
+ const TQString escapedLine = TQStyleSheet::escape(line);
// When we don't get the output from an update job then
// just add it to the text edit.
@@ -169,7 +169,7 @@ void ProtocolView::appendLine(const QString &line)
return;
}
- QColor color;
+ TQColor color;
// Colors are the same as in UpdateViewItem::paintCell()
if (line.startsWith("C "))
color = conflictColor;
@@ -180,7 +180,7 @@ void ProtocolView::appendLine(const QString &line)
color = remoteChangeColor;
append(color.isValid()
- ? QString("<font color=\"%1\"><b>%2</b></font>").arg(color.name())
+ ? TQString("<font color=\"%1\"><b>%2</b></font>").arg(color.name())
.arg(escapedLine)
: escapedLine);
}
diff --git a/cervisia/protocolview.h b/cervisia/protocolview.h
index 0e0390d2..e3b59f6d 100644
--- a/cervisia/protocolview.h
+++ b/cervisia/protocolview.h
@@ -22,7 +22,7 @@
#ifndef PROTOCOLVIEW_H
#define PROTOCOLVIEW_H
-#include <qtextedit.h>
+#include <tqtextedit.h>
#include <dcopobject.h>
class QPoint;
@@ -30,26 +30,26 @@ class QPopupMenu;
class CvsJob_stub;
-class ProtocolView : public QTextEdit, public DCOPObject
+class ProtocolView : public TQTextEdit, public DCOPObject
{
K_DCOP
Q_OBJECT
public:
- explicit ProtocolView(const QCString& appId, QWidget *parent=0, const char *name=0);
+ explicit ProtocolView(const TQCString& appId, TQWidget *parent=0, const char *name=0);
~ProtocolView();
bool startJob(bool isUpdateJob = false);
protected:
- virtual QPopupMenu* createPopupMenu(const QPoint &pos);
+ virtual TQPopupMenu* createPopupMenu(const TQPoint &pos);
k_dcop:
- void slotReceivedOutput(QString buffer);
+ void slotReceivedOutput(TQString buffer);
void slotJobExited(bool normalExit, int exitStatus);
signals:
- void receivedLine(QString line);
+ void receivedLine(TQString line);
void jobFinished(bool normalExit, int exitStatus);
private slots:
@@ -57,13 +57,13 @@ private slots:
private:
void processOutput();
- void appendLine(const QString &line);
+ void appendLine(const TQString &line);
- QString buf;
+ TQString buf;
- QColor conflictColor;
- QColor localChangeColor;
- QColor remoteChangeColor;
+ TQColor conflictColor;
+ TQColor localChangeColor;
+ TQColor remoteChangeColor;
CvsJob_stub* job;
diff --git a/cervisia/qttableview.cpp b/cervisia/qttableview.cpp
index 22b2993c..7e877ef8 100644
--- a/cervisia/qttableview.cpp
+++ b/cervisia/qttableview.cpp
@@ -13,10 +13,10 @@
**********************************************************************/
#include "qttableview.h"
-#include "qscrollbar.h"
-#include "qpainter.h"
-#include "qdrawutil.h"
-#include <qapplication.h>
+#include "tqscrollbar.h"
+#include "tqpainter.h"
+#include "tqdrawutil.h"
+#include <tqapplication.h>
#include <limits.h>
enum ScrollBarDirtyFlags {
@@ -40,16 +40,16 @@ enum ScrollBarDirtyFlags {
class QCornerSquare : public QWidget // internal class
{
public:
- QCornerSquare( QWidget *, const char* = 0 );
- void paintEvent( QPaintEvent * );
+ QCornerSquare( TQWidget *, const char* = 0 );
+ void paintEvent( TQPaintEvent * );
};
-QCornerSquare::QCornerSquare( QWidget *parent, const char *name )
- : QWidget( parent, name )
+QCornerSquare::QCornerSquare( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
}
-void QCornerSquare::paintEvent( QPaintEvent * )
+void QCornerSquare::paintEvent( TQPaintEvent * )
{
}
@@ -112,9 +112,9 @@ void QCornerSquare::paintEvent( QPaintEvent * )
\warning Experience has shown that use of this widget tends to cause
more bugs than expected and our analysis indicates that the widget's
- very flexibility is the problem. If QScrollView or QListBox can
+ very flexibility is the problem. If TQScrollView or TQListBox can
easily be made to do the job you need, we recommend subclassing
- those widgets rather than QtTableView. In addition, QScrollView makes
+ those widgets rather than QtTableView. In addition, TQScrollView makes
it easy to have child widgets inside tables, which QtTableView
doesn't support at all.
@@ -125,7 +125,7 @@ void QCornerSquare::paintEvent( QPaintEvent * )
/*!
Constructs a table view. The \a parent, \a name and \f arguments
- are passed to the QFrame constructor.
+ are passed to the TQFrame constructor.
The \link setTableFlags() table flags\endlink are all cleared (set to 0).
Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll
@@ -134,17 +134,17 @@ void QCornerSquare::paintEvent( QPaintEvent * )
The \link setCellHeight() cell height\endlink and \link setCellWidth()
cell width\endlink are set to 0.
- Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed;
- see QFrame::setFrameStyle().
+ Frame line shapes (TQFrame::HLink and TQFrame::VLine) are disallowed;
+ see TQFrame::setFrameStyle().
Note that the \a f argument is \e not \link setTableFlags() table
- flags \endlink but rather \link QWidget::QWidget() widget
+ flags \endlink but rather \link TQWidget::TQWidget() widget
flags. \endlink
*/
-QtTableView::QtTableView( QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f )
+QtTableView::QtTableView( TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f )
{
nRows = nCols = 0; // zero rows/cols
xCellOffs = yCellOffs = 0; // zero offset
@@ -178,21 +178,21 @@ QtTableView::~QtTableView()
/*!
\internal
- Reimplements QWidget::setBackgroundColor() for binary compatibility.
+ Reimplements TQWidget::setBackgroundColor() for binary compatibility.
\sa setPalette()
*/
-void QtTableView::setBackgroundColor( const QColor &c )
+void QtTableView::setBackgroundColor( const TQColor &c )
{
- QWidget::setBackgroundColor( c );
+ TQWidget::setBackgroundColor( c );
}
/*!\reimp
*/
-void QtTableView::setPalette( const QPalette &p )
+void QtTableView::setPalette( const TQPalette &p )
{
- QWidget::setPalette( p );
+ TQWidget::setPalette( p );
}
/*!\reimp
@@ -201,7 +201,7 @@ void QtTableView::setPalette( const QPalette &p )
void QtTableView::show()
{
showOrHideScrollBars();
- QWidget::show();
+ TQWidget::show();
}
@@ -225,7 +225,7 @@ void QtTableView::show()
event.
At present, QtTableView is the only widget that reimplements \link
- QWidget::repaint() repaint()\endlink. It does this because by
+ TQWidget::repaint() repaint()\endlink. It does this because by
clearing and then repainting one cell at at time, it can make the
screen flicker less than it would otherwise. */
@@ -237,10 +237,10 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase )
w = width() - x;
if ( h < 0 )
h = height() - y;
- QRect r( x, y, w, h );
+ TQRect r( x, y, w, h );
if ( r.isEmpty() )
return; // nothing to do
- QPaintEvent e( r );
+ TQPaintEvent e( r );
if ( erase && backgroundMode() != NoBackground )
eraseInPaint = TRUE; // erase when painting
paintEvent( &e );
@@ -248,7 +248,7 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase )
}
/*!
- \overload void QtTableView::repaint( const QRect &r, bool erase )
+ \overload void QtTableView::repaint( const TQRect &r, bool erase )
Replaints rectangle \a r. If \a erase is TRUE draws the background
using the palette's background.
*/
@@ -729,7 +729,7 @@ int QtTableView::totalHeight()
<dt> Tbl_autoHScrollBar <dd> The table has a horizontal scroll bar if
- and only if - the table is wider than the view.
<dt> Tbl_autoScrollBars <dd> - The union of the previous two flags.
- <dt> Tbl_clipCellPainting <dd> - The table uses QPainter::setClipRect() to
+ <dt> Tbl_clipCellPainting <dd> - The table uses TQPainter::setClipRect() to
make sure that paintCell() will not draw outside the cell
boundaries.
<dt> Tbl_cutCellsV <dd> - The table will never show part of a
@@ -959,7 +959,7 @@ void QtTableView::updateCell( int row, int col, bool erase )
return;
if ( !rowYPos( row, &yPos ) )
return;
- QRect uR = QRect( xPos, yPos,
+ TQRect uR = TQRect( xPos, yPos,
cellW ? cellW : cellWidth(col),
cellH ? cellH : cellHeight(row) );
repaint( uR.intersect(viewRect()), erase );
@@ -967,7 +967,7 @@ void QtTableView::updateCell( int row, int col, bool erase )
/*!
- \fn QRect QtTableView::cellUpdateRect() const
+ \fn TQRect QtTableView::cellUpdateRect() const
This function should be called only from the paintCell() function in
subclasses. It returns the portion of a cell that actually needs to be
@@ -981,9 +981,9 @@ void QtTableView::updateCell( int row, int col, bool erase )
frame, in \e widget coordinates.
*/
-QRect QtTableView::viewRect() const
+TQRect QtTableView::viewRect() const
{
- return QRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() );
+ return TQRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() );
}
@@ -1126,7 +1126,7 @@ void QtTableView::snapToGrid( bool horizontal, bool vertical )
/*!
\internal
This internal slot is connected to the horizontal scroll bar's
- QScrollBar::valueChanged() signal.
+ TQScrollBar::valueChanged() signal.
Moves the table horizontally to offset \a val without updating the
scroll bar.
@@ -1147,7 +1147,7 @@ void QtTableView::horSbValue( int val )
/*!
\internal
This internal slot is connected to the horizontal scroll bar's
- QScrollBar::sliderMoved() signal.
+ TQScrollBar::sliderMoved() signal.
Scrolls the table smoothly horizontally even if \c Tbl_snapToHGrid is set.
*/
@@ -1167,7 +1167,7 @@ void QtTableView::horSbSliding( int val )
/*!
\internal
This internal slot is connected to the horizontal scroll bar's
- QScrollBar::sliderReleased() signal.
+ TQScrollBar::sliderReleased() signal.
*/
void QtTableView::horSbSlidingDone( )
@@ -1180,7 +1180,7 @@ void QtTableView::horSbSlidingDone( )
/*!
\internal
This internal slot is connected to the vertical scroll bar's
- QScrollBar::valueChanged() signal.
+ TQScrollBar::valueChanged() signal.
Moves the table vertically to offset \a val without updating the
scroll bar.
@@ -1201,7 +1201,7 @@ void QtTableView::verSbValue( int val )
/*!
\internal
This internal slot is connected to the vertical scroll bar's
- QScrollBar::sliderMoved() signal.
+ TQScrollBar::sliderMoved() signal.
Scrolls the table smoothly vertically even if \c Tbl_snapToVGrid is set.
*/
@@ -1221,7 +1221,7 @@ void QtTableView::verSbSliding( int val )
/*!
\internal
This internal slot is connected to the vertical scroll bar's
- QScrollBar::sliderReleased() signal.
+ TQScrollBar::sliderReleased() signal.
*/
void QtTableView::verSbSlidingDone( )
@@ -1239,18 +1239,18 @@ void QtTableView::verSbSlidingDone( )
do so for each cell.
*/
-void QtTableView::setupPainter( QPainter * )
+void QtTableView::setupPainter( TQPainter * )
{
}
/*!
- \fn void QtTableView::paintCell( QPainter *p, int row, int col )
+ \fn void QtTableView::paintCell( TQPainter *p, int row, int col )
This pure virtual function is called to paint the single cell at \a
(row,col) using \a p, which is open when paintCell() is called and
must remain open.
- The coordinate system is \link QPainter::translate() translated \endlink
+ The coordinate system is \link TQPainter::translate() translated \endlink
so that the origin is at the top-left corner of the cell to be
painted, i.e. \e cell coordinates. Do not scale or shear the coordinate
system (or if you do, restore the transformation matrix before you
@@ -1268,16 +1268,16 @@ void QtTableView::setupPainter( QPainter * )
Calls paintCell() for the cells that needs to be repainted.
*/
-void QtTableView::paintEvent( QPaintEvent *e )
+void QtTableView::paintEvent( TQPaintEvent *e )
{
- QRect updateR = e->rect(); // update rectangle
+ TQRect updateR = e->rect(); // update rectangle
if ( sbDirty ) {
bool e = eraseInPaint;
updateScrollBars();
eraseInPaint = e;
}
- QPainter paint( this );
+ TQPainter paint( this );
if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ?
drawFrame( &paint );
@@ -1311,11 +1311,11 @@ void QtTableView::paintEvent( QPaintEvent *e )
int xPos = maxX+1; // in case the while() is empty
int nextX;
int nextY;
- QRect winR = viewRect();
- QRect cellR;
- QRect cellUR;
+ TQRect winR = viewRect();
+ TQRect cellR;
+ TQRect cellUR;
#ifndef QT_NO_TRANSFORMATIONS
- QWMatrix matrix;
+ TQWMatrix matrix;
#endif
while ( yPos <= maxY && row < nRows ) {
@@ -1383,22 +1383,22 @@ void QtTableView::paintEvent( QPaintEvent *e )
// inside the cells. So QtTableView is reponsible for all pixels
// outside the cells.
- QRect viewR = viewRect();
- const QColorGroup g = colorGroup();
+ TQRect viewR = viewRect();
+ const TQColorGroup g = colorGroup();
if ( xPos <= maxX ) {
- QRect r = viewR;
+ TQRect r = viewR;
r.setLeft( xPos );
r.setBottom( yPos<maxY?yPos:maxY );
- if ( inherits( "QMultiLineEdit" ) )
+ if ( inherits( "TQMultiLineEdit" ) )
paint.fillRect( r.intersect( updateR ), g.base() );
else
paint.eraseRect( r.intersect( updateR ) );
}
if ( yPos <= maxY ) {
- QRect r = viewR;
+ TQRect r = viewR;
r.setTop( yPos );
- if ( inherits( "QMultiLineEdit" ) )
+ if ( inherits( "TQMultiLineEdit" ) )
paint.fillRect( r.intersect( updateR ), g.base() );
else
paint.eraseRect( r.intersect( updateR ) );
@@ -1407,7 +1407,7 @@ void QtTableView::paintEvent( QPaintEvent *e )
/*!\reimp
*/
-void QtTableView::resizeEvent( QResizeEvent * )
+void QtTableView::resizeEvent( TQResizeEvent * )
{
updateScrollBars( horValue | verValue | horSteps | horGeometry | horRange |
verSteps | verGeometry | verRange );
@@ -1418,10 +1418,10 @@ void QtTableView::resizeEvent( QResizeEvent * )
setOffset( maxX, maxY );
}
-void QtTableView::wheelEvent( QWheelEvent * e )
+void QtTableView::wheelEvent( TQWheelEvent * e )
{
if( e->orientation() == Vertical && vScrollBar && vScrollBar->isVisible() )
- QApplication::sendEvent( vScrollBar, e );
+ TQApplication::sendEvent( vScrollBar, e );
}
/*!
@@ -1439,11 +1439,11 @@ void QtTableView::updateView()
values; use findRow() to translate to cell numbers.
*/
-QScrollBar *QtTableView::verticalScrollBar() const
+TQScrollBar *QtTableView::verticalScrollBar() const
{
QtTableView *that = (QtTableView*)this; // semantic const
if ( !vScrollBar ) {
- QScrollBar *sb = new QScrollBar( QScrollBar::Vertical, that );
+ TQScrollBar *sb = new TQScrollBar( TQScrollBar::Vertical, that );
#ifndef QT_NO_CURSOR
sb->setCursor( arrowCursor );
#endif
@@ -1451,12 +1451,12 @@ QScrollBar *QtTableView::verticalScrollBar() const
Q_CHECK_PTR(sb);
sb->setTracking( FALSE );
sb->setFocusPolicy( NoFocus );
- connect( sb, SIGNAL(valueChanged(int)),
- SLOT(verSbValue(int)));
- connect( sb, SIGNAL(sliderMoved(int)),
- SLOT(verSbSliding(int)));
- connect( sb, SIGNAL(sliderReleased()),
- SLOT(verSbSlidingDone()));
+ connect( sb, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(verSbValue(int)));
+ connect( sb, TQT_SIGNAL(sliderMoved(int)),
+ TQT_SLOT(verSbSliding(int)));
+ connect( sb, TQT_SIGNAL(sliderReleased()),
+ TQT_SLOT(verSbSlidingDone()));
sb->hide();
that->vScrollBar = sb;
return sb;
@@ -1470,11 +1470,11 @@ QScrollBar *QtTableView::verticalScrollBar() const
values; use findCol() to translate to cell numbers.
*/
-QScrollBar *QtTableView::horizontalScrollBar() const
+TQScrollBar *QtTableView::horizontalScrollBar() const
{
QtTableView *that = (QtTableView*)this; // semantic const
if ( !hScrollBar ) {
- QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that );
+ TQScrollBar *sb = new TQScrollBar( TQScrollBar::Horizontal, that );
#ifndef QT_NO_CURSOR
sb->setCursor( arrowCursor );
#endif
@@ -1482,12 +1482,12 @@ QScrollBar *QtTableView::horizontalScrollBar() const
sb->setFocusPolicy( NoFocus );
Q_CHECK_PTR(sb);
sb->setTracking( FALSE );
- connect( sb, SIGNAL(valueChanged(int)),
- SLOT(horSbValue(int)));
- connect( sb, SIGNAL(sliderMoved(int)),
- SLOT(horSbSliding(int)));
- connect( sb, SIGNAL(sliderReleased()),
- SLOT(horSbSlidingDone()));
+ connect( sb, TQT_SIGNAL(valueChanged(int)),
+ TQT_SLOT(horSbValue(int)));
+ connect( sb, TQT_SIGNAL(sliderMoved(int)),
+ TQT_SLOT(horSbSliding(int)));
+ connect( sb, TQT_SIGNAL(sliderReleased()),
+ TQT_SLOT(horSbSlidingDone()));
sb->hide();
that->hScrollBar = sb;
return sb;
@@ -1791,10 +1791,10 @@ bool QtTableView::colXPos( int col, int *xPos ) const
Moves the visible area of the table right by \a xPixels and
down by \a yPixels pixels. Both may be negative.
- \warning You might find that QScrollView offers a higher-level of
+ \warning You might find that TQScrollView offers a higher-level of
functionality than using QtTableView and this function.
- This function is \e not the same as QWidget::scroll(); in particular,
+ This function is \e not the same as TQWidget::scroll(); in particular,
the signs of \a xPixels and \a yPixels have the reverse semantics.
\sa setXOffset(), setYOffset(), setOffset(), setTopCell(),
@@ -1803,7 +1803,7 @@ bool QtTableView::colXPos( int col, int *xPos ) const
void QtTableView::scroll( int xPixels, int yPixels )
{
- QWidget::scroll( -xPixels, -yPixels, contentsRect() );
+ TQWidget::scroll( -xPixels, -yPixels, contentsRect() );
}
@@ -2062,7 +2062,7 @@ void QtTableView::updateFrameSize()
if ( autoUpdate() ) {
int fh = frameRect().height();
int fw = frameRect().width();
- setFrameRect( QRect(0,0,rw,rh) );
+ setFrameRect( TQRect(0,0,rw,rh) );
if ( rw != fw )
update( QMIN(fw,rw) - frameWidth() - 2, 0, frameWidth()+4, rh );
diff --git a/cervisia/qttableview.h b/cervisia/qttableview.h
index 6f8b8397..04cc2a9a 100644
--- a/cervisia/qttableview.h
+++ b/cervisia/qttableview.h
@@ -16,7 +16,7 @@
#define QTTABLEVIEW_H
#ifndef QT_H
-#include "qframe.h"
+#include "tqframe.h"
#endif // QT_H
#ifndef QT_NO_QTTABLEVIEW
@@ -29,16 +29,16 @@ class QtTableView : public QFrame
{
Q_OBJECT
public:
- virtual void setBackgroundColor( const QColor & );
- virtual void setPalette( const QPalette & );
+ virtual void setBackgroundColor( const TQColor & );
+ virtual void setPalette( const TQPalette & );
void show();
void repaint( bool erase=TRUE );
void repaint( int x, int y, int w, int h, bool erase=TRUE );
- void repaint( const QRect &, bool erase=TRUE );
+ void repaint( const TQRect &, bool erase=TRUE );
protected:
- QtTableView( QWidget *parent=0, const char *name=0, WFlags f=0 );
+ QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 );
~QtTableView();
int numRows() const;
@@ -87,8 +87,8 @@ protected:
bool rowIsVisible( int row ) const;
bool colIsVisible( int col ) const;
- QScrollBar *verticalScrollBar() const;
- QScrollBar *horizontalScrollBar() const;
+ TQScrollBar *verticalScrollBar() const;
+ TQScrollBar *horizontalScrollBar() const;
private slots:
void horSbValue( int );
@@ -99,12 +99,12 @@ private slots:
void verSbSlidingDone();
protected:
- virtual void paintCell( QPainter *, int row, int col ) = 0;
- virtual void setupPainter( QPainter * );
+ virtual void paintCell( TQPainter *, int row, int col ) = 0;
+ virtual void setupPainter( TQPainter * );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
- virtual void wheelEvent( QWheelEvent *e );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
+ virtual void wheelEvent( TQWheelEvent *e );
int findRow( int yPos ) const;
int findCol( int xPos ) const;
@@ -165,8 +165,8 @@ private:
uint tFlags;
QRect cellUpdateR;
- QScrollBar *vScrollBar;
- QScrollBar *hScrollBar;
+ TQScrollBar *vScrollBar;
+ TQScrollBar *hScrollBar;
QCornerSquare *cornerSquare;
private: // Disabled copy constructor and operator=
@@ -231,7 +231,7 @@ inline uint QtTableView::tableFlags() const
inline bool QtTableView::testTableFlags( uint f ) const
{ return (tFlags & f) != 0; }
-inline QRect QtTableView::cellUpdateRect() const
+inline TQRect QtTableView::cellUpdateRect() const
{ return cellUpdateR; }
inline bool QtTableView::autoUpdate() const
@@ -240,7 +240,7 @@ inline bool QtTableView::autoUpdate() const
inline void QtTableView::repaint( bool erase )
{ repaint( 0, 0, width(), height(), erase ); }
-inline void QtTableView::repaint( const QRect &r, bool erase )
+inline void QtTableView::repaint( const TQRect &r, bool erase )
{ repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
inline void QtTableView::updateScrollBars()
diff --git a/cervisia/repositories.cpp b/cervisia/repositories.cpp
index 4c517116..7f52a39d 100644
--- a/cervisia/repositories.cpp
+++ b/cervisia/repositories.cpp
@@ -19,9 +19,9 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -29,15 +29,15 @@
#include "cervisiapart.h"
-static QString fileNameCvs()
+static TQString fileNameCvs()
{
- return QDir::homeDirPath() + "/.cvspass";
+ return TQDir::homeDirPath() + "/.cvspass";
}
-static QString fileNameCvsnt()
+static TQString fileNameCvsnt()
{
- return QDir::homeDirPath() + "/.cvs/cvspass";
+ return TQDir::homeDirPath() + "/.cvs/cvspass";
}
@@ -47,18 +47,18 @@ static QString fileNameCvsnt()
// new .cvspass format (since cvs 1.11.1):
// /1 user@host:port/path Aencoded_password
//
-static QStringList readCvsPassFile()
+static TQStringList readCvsPassFile()
{
- QStringList list;
+ TQStringList list;
- QFile f(fileNameCvs());
+ TQFile f(fileNameCvs());
if (f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while (!stream.eof())
{
int pos;
- QString line = stream.readLine();
+ TQString line = stream.readLine();
if ( (pos = line.find(' ')) != -1)
{
if (line[0] != '/') // old format
@@ -76,17 +76,17 @@ static QStringList readCvsPassFile()
// .cvs/cvspass format
// user@host:port/path=Aencoded_password
//
-static QStringList readCvsntPassFile()
+static TQStringList readCvsntPassFile()
{
- QStringList list;
+ TQStringList list;
- QFile file(fileNameCvsnt());
+ TQFile file(fileNameCvsnt());
if (file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (!stream.atEnd())
{
- const QString line(stream.readLine());
+ const TQString line(stream.readLine());
const int pos(line.find("=A"));
if (pos >= 0)
@@ -98,18 +98,18 @@ static QStringList readCvsntPassFile()
}
-QStringList Repositories::readCvsPassFile()
+TQStringList Repositories::readCvsPassFile()
{
- return (QFileInfo(fileNameCvs()).lastModified()
- < QFileInfo(fileNameCvsnt()).lastModified())
+ return (TQFileInfo(fileNameCvs()).lastModified()
+ < TQFileInfo(fileNameCvsnt()).lastModified())
? readCvsntPassFile()
: ::readCvsPassFile();
}
-QStringList Repositories::readConfigFile()
+TQStringList Repositories::readConfigFile()
{
- QStringList list;
+ TQStringList list;
KConfig *config = CervisiaPart::config();
config->setGroup("Repositories");
diff --git a/cervisia/repositories.h b/cervisia/repositories.h
index 28d7a469..79c1c5ad 100644
--- a/cervisia/repositories.h
+++ b/cervisia/repositories.h
@@ -25,8 +25,8 @@
class Repositories
{
public:
- static QStringList readCvsPassFile();
- static QStringList readConfigFile();
+ static TQStringList readCvsPassFile();
+ static TQStringList readConfigFile();
};
diff --git a/cervisia/repositorydlg.cpp b/cervisia/repositorydlg.cpp
index d0568398..a30a13ce 100644
--- a/cervisia/repositorydlg.cpp
+++ b/cervisia/repositorydlg.cpp
@@ -21,8 +21,8 @@
#include "repositorydlg.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kbuttonbox.h>
#include <kconfig.h>
#include <klistview.h>
@@ -40,25 +40,25 @@
class RepositoryListItem : public KListViewItem
{
public:
- RepositoryListItem(KListView* parent, const QString& repo, bool loggedin);
+ RepositoryListItem(KListView* parent, const TQString& repo, bool loggedin);
- void setRsh(const QString& rsh);
- void setServer(const QString& server) { m_server = server; }
+ void setRsh(const TQString& rsh);
+ void setServer(const TQString& server) { m_server = server; }
void setCompression(int compression);
void setIsLoggedIn(bool isLoggedIn);
void setRetrieveCvsignore(bool retrieve) { m_retrieveCvsignore = retrieve; }
- QString repository() const
+ TQString repository() const
{
return text(0);
}
- QString rsh() const
+ TQString rsh() const
{
- QString str = text(1);
+ TQString str = text(1);
return (str.startsWith("ext (") ? str.mid(5, str.length()-6)
- : QString::null);
+ : TQString::null);
}
- QString server() const { return m_server; }
+ TQString server() const { return m_server; }
int compression() const
{
bool ok;
@@ -72,20 +72,20 @@ private:
void changeLoginStatusColumn();
private:
- QString m_server;
+ TQString m_server;
bool m_isLoggedIn;
bool m_retrieveCvsignore;
};
-static bool LoginNeeded(const QString& repository)
+static bool LoginNeeded(const TQString& repository)
{
return repository.startsWith(":pserver:") ||
repository.startsWith(":sspi:");
}
-RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo,
+RepositoryListItem::RepositoryListItem(KListView* parent, const TQString& repo,
bool loggedin)
: KListViewItem(parent)
, m_isLoggedIn(loggedin)
@@ -96,10 +96,10 @@ RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo,
}
-void RepositoryListItem::setRsh(const QString& rsh)
+void RepositoryListItem::setRsh(const TQString& rsh)
{
- QString repo = repository();
- QString method;
+ TQString repo = repository();
+ TQString method;
if( repo.startsWith(":pserver:") )
method = "pserver";
@@ -124,7 +124,7 @@ void RepositoryListItem::setRsh(const QString& rsh)
void RepositoryListItem::setCompression(int compression)
{
- QString compressionStr = (compression >= 0) ? QString::number(compression)
+ TQString compressionStr = (compression >= 0) ? TQString::number(compression)
: i18n("Default");
setText(2, compressionStr);
@@ -141,7 +141,7 @@ void RepositoryListItem::setIsLoggedIn(bool isLoggedIn)
void RepositoryListItem::changeLoginStatusColumn()
{
- QString loginStatus;
+ TQString loginStatus;
if( LoginNeeded(repository()) )
loginStatus = m_isLoggedIn ? i18n("Logged in") : i18n("Not logged in");
@@ -153,15 +153,15 @@ void RepositoryListItem::changeLoginStatusColumn()
RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("Configure Access to Repositories"),
Ok | Cancel | Help, Ok, true)
, m_partConfig(cfg)
, m_cvsService(cvsService)
{
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout* hbox = new QHBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout* hbox = new TQHBoxLayout(mainWidget, 0, spacingHint());
m_repoList = new KListView(mainWidget);
hbox->addWidget(m_repoList, 10);
@@ -173,13 +173,13 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
m_repoList->addColumn(i18n("Status"));
m_repoList->setFocus();
- connect(m_repoList, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(slotDoubleClicked(QListViewItem*)));
- connect(m_repoList, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectionChanged()));
+ connect(m_repoList, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
+ connect(m_repoList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectionChanged()));
KButtonBox* actionbox = new KButtonBox(mainWidget, KButtonBox::Vertical);
- QPushButton* addbutton = actionbox->addButton(i18n("&Add..."));
+ TQPushButton* addbutton = actionbox->addButton(i18n("&Add..."));
m_modifyButton = actionbox->addButton(i18n("&Modify..."));
m_removeButton = actionbox->addButton(i18n("&Remove"));
actionbox->addStretch();
@@ -192,16 +192,16 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
m_loginButton->setEnabled(false);
m_logoutButton->setEnabled(false);
- connect( addbutton, SIGNAL(clicked()),
- this, SLOT(slotAddClicked()) );
- connect( m_modifyButton, SIGNAL(clicked()),
- this, SLOT(slotModifyClicked()) );
- connect( m_removeButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveClicked()) );
- connect( m_loginButton, SIGNAL(clicked()),
- this, SLOT(slotLoginClicked()) );
- connect( m_logoutButton, SIGNAL(clicked()),
- this, SLOT(slotLogoutClicked()) );
+ connect( addbutton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddClicked()) );
+ connect( m_modifyButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotModifyClicked()) );
+ connect( m_removeButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveClicked()) );
+ connect( m_loginButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoginClicked()) );
+ connect( m_logoutButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLogoutClicked()) );
// open cvs DCOP service configuration file
m_serviceConfig = new KConfig("cvsservicerc");
@@ -209,7 +209,7 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
readCvsPassFile();
readConfigFile();
- if (QListViewItem* item = m_repoList->firstChild())
+ if (TQListViewItem* item = m_repoList->firstChild())
{
m_repoList->setCurrentItem(item);
m_repoList->setSelected(item, true);
@@ -224,14 +224,14 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(m_partConfig, "RepositoryDialog");
+ TQSize size = configDialogSize(m_partConfig, "RepositoryDialog");
resize(size);
// without this restoreLayout() can't change the column widths
for (int i = 0; i < m_repoList->columns(); ++i)
- m_repoList->setColumnWidthMode(i, QListView::Manual);
+ m_repoList->setColumnWidthMode(i, TQListView::Manual);
- m_repoList->restoreLayout(&m_partConfig, QString::fromLatin1("RepositoryListView"));
+ m_repoList->restoreLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView"));
}
@@ -239,7 +239,7 @@ RepositoryDialog::~RepositoryDialog()
{
saveDialogSize(m_partConfig, "RepositoryDialog");
- m_repoList->saveLayout(&m_partConfig, QString::fromLatin1("RepositoryListView"));
+ m_repoList->saveLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView"));
delete m_serviceConfig;
}
@@ -247,8 +247,8 @@ RepositoryDialog::~RepositoryDialog()
void RepositoryDialog::readCvsPassFile()
{
- QStringList list = Repositories::readCvsPassFile();
- QStringList::ConstIterator it;
+ TQStringList list = Repositories::readCvsPassFile();
+ TQStringList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it )
(void) new RepositoryListItem(m_repoList, (*it), true);
}
@@ -256,14 +256,14 @@ void RepositoryDialog::readCvsPassFile()
void RepositoryDialog::readConfigFile()
{
- QStringList list = Repositories::readConfigFile();
+ TQStringList list = Repositories::readConfigFile();
// Sort out all list elements which are already in the list view
- QListViewItem* item = m_repoList->firstChild();
+ TQListViewItem* item = m_repoList->firstChild();
for( ; item; item = item->nextSibling() )
list.remove(item->text(0));
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = list.begin(); it != list.end(); ++it )
new RepositoryListItem(m_repoList, *it, false);
@@ -274,11 +274,11 @@ void RepositoryDialog::readConfigFile()
RepositoryListItem* ritem = static_cast<RepositoryListItem*>(item);
// read entries from cvs DCOP service configuration
- m_serviceConfig->setGroup(QString::fromLatin1("Repository-") +
+ m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") +
ritem->repository());
- QString rsh = m_serviceConfig->readEntry("rsh", QString());
- QString server = m_serviceConfig->readEntry("cvs_server", QString());
+ TQString rsh = m_serviceConfig->readEntry("rsh", TQString());
+ TQString server = m_serviceConfig->readEntry("cvs_server", TQString());
int compression = m_serviceConfig->readNumEntry("Compression", -1);
bool retrieveFile = m_serviceConfig->readBoolEntry("RetrieveCvsignore",
false);
@@ -294,8 +294,8 @@ void RepositoryDialog::readConfigFile()
void RepositoryDialog::slotOk()
{
// Make list of repositories
- QListViewItem* item;
- QStringList list;
+ TQListViewItem* item;
+ TQStringList list;
for( item = m_repoList->firstChild(); item; item = item->nextSibling() )
list.append(item->text(0));
@@ -319,18 +319,18 @@ void RepositoryDialog::slotOk()
void RepositoryDialog::slotAddClicked()
{
- AddRepositoryDialog dlg(m_partConfig, QString::null, this);
+ AddRepositoryDialog dlg(m_partConfig, TQString::null, this);
// default compression level
dlg.setCompression(-1);
if( dlg.exec() )
{
- QString repo = Cervisia::NormalizeRepository(dlg.repository());
- QString rsh = dlg.rsh();
- QString server = dlg.server();
+ TQString repo = Cervisia::NormalizeRepository(dlg.repository());
+ TQString rsh = dlg.rsh();
+ TQString server = dlg.server();
int compression = dlg.compression();
bool retrieveFile = dlg.retrieveCvsignoreFile();
- QListViewItem* item = m_repoList->firstChild();
+ TQListViewItem* item = m_repoList->firstChild();
for( ; item; item = item->nextSibling() )
if( item->text(0) == repo )
{
@@ -369,15 +369,15 @@ void RepositoryDialog::slotRemoveClicked()
}
-void RepositoryDialog::slotDoubleClicked(QListViewItem* item)
+void RepositoryDialog::slotDoubleClicked(TQListViewItem* item)
{
if( !item )
return;
RepositoryListItem* ritem = static_cast<RepositoryListItem*>(item);
- QString repo = ritem->repository();
- QString rsh = ritem->rsh();
- QString server = ritem->server();
+ TQString repo = ritem->repository();
+ TQString rsh = ritem->rsh();
+ TQString server = ritem->server();
int compression = ritem->compression();
bool retrieveFile = ritem->retrieveCvsignore();
@@ -422,7 +422,7 @@ void RepositoryDialog::slotLoginClicked()
bool success = job.call("execute()");
if( !success )
{
- QStringList output = job.call("output()");
+ TQStringList output = job.call("output()");
KMessageBox::detailedError(this, i18n("Login failed."), output.join("\n"));
return;
}
@@ -490,7 +490,7 @@ void RepositoryDialog::slotSelectionChanged()
void RepositoryDialog::writeRepositoryData(RepositoryListItem* item)
{
// write entries to cvs DCOP service configuration
- m_serviceConfig->setGroup(QString::fromLatin1("Repository-") +
+ m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") +
item->repository());
m_serviceConfig->writeEntry("rsh", item->rsh());
diff --git a/cervisia/repositorydlg.h b/cervisia/repositorydlg.h
index c980b712..0ffae1ab 100644
--- a/cervisia/repositorydlg.h
+++ b/cervisia/repositorydlg.h
@@ -39,7 +39,7 @@ class RepositoryDialog : public KDialogBase
public:
RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
virtual ~RepositoryDialog();
void readConfigFile();
@@ -52,7 +52,7 @@ private slots:
void slotAddClicked();
void slotModifyClicked();
void slotRemoveClicked();
- void slotDoubleClicked(QListViewItem *item);
+ void slotDoubleClicked(TQListViewItem *item);
void slotLoginClicked();
void slotLogoutClicked();
void slotSelectionChanged();
@@ -65,10 +65,10 @@ private:
CvsService_stub* m_cvsService;
KConfig* m_serviceConfig;
KListView* m_repoList;
- QPushButton* m_modifyButton;
- QPushButton* m_removeButton;
- QPushButton* m_loginButton;
- QPushButton* m_logoutButton;
+ TQPushButton* m_modifyButton;
+ TQPushButton* m_removeButton;
+ TQPushButton* m_loginButton;
+ TQPushButton* m_logoutButton;
};
#endif
diff --git a/cervisia/resolvedlg.cpp b/cervisia/resolvedlg.cpp
index 2cf0ffd6..8fce2ee7 100644
--- a/cervisia/resolvedlg.cpp
+++ b/cervisia/resolvedlg.cpp
@@ -21,18 +21,18 @@
#include "resolvedlg.h"
-#include <qfile.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kfiledialog.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "misc.h"
#include "resolvedlg_p.h"
using Cervisia::ResolveEditorDialog;
@@ -40,13 +40,13 @@ using Cervisia::ResolveEditorDialog;
// *UGLY HACK*
// The following conditions are a rough hack
-static QTextCodec *DetectCodec(const QString &fileName)
+static TQTextCodec *DetectCodec(const TQString &fileName)
{
if (fileName.endsWith(".ui") || fileName.endsWith(".docbook")
|| fileName.endsWith(".xml"))
- return QTextCodec::codecForName("utf8");
+ return TQTextCodec::codecForName("utf8");
- return QTextCodec::codecForLocale();
+ return TQTextCodec::codecForLocale();
}
@@ -56,19 +56,19 @@ namespace
class LineSeparator
{
public:
- LineSeparator(const QString& text)
+ LineSeparator(const TQString& text)
: m_text(text)
, m_startPos(0)
, m_endPos(0)
{
}
- QString nextLine() const
+ TQString nextLine() const
{
// already reach end of text on previous call
if( m_endPos < 0 )
{
- m_currentLine = QString::null;
+ m_currentLine = TQString::null;
return m_currentLine;
}
@@ -87,16 +87,16 @@ public:
}
private:
- const QString m_text;
- mutable QString m_currentLine;
+ const TQString m_text;
+ mutable TQString m_currentLine;
mutable int m_startPos, m_endPos;
};
}
-ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
- : KDialogBase(parent, name, false, QString::null,
+ResolveDialog::ResolveDialog(KConfig& cfg, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, false, TQString::null,
Close | Help | User1 | User2, Close, true,
KStdGuiItem::saveAs(), KStdGuiItem::save())
, markeditem(-1)
@@ -104,26 +104,26 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
{
items.setAutoDelete(true);
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QSplitter *vertSplitter = new QSplitter(QSplitter::Vertical, mainWidget);
+ TQSplitter *vertSplitter = new TQSplitter(TQSplitter::Vertical, mainWidget);
- QSplitter *splitter = new QSplitter(QSplitter::Horizontal, vertSplitter);
+ TQSplitter *splitter = new TQSplitter(TQSplitter::Horizontal, vertSplitter);
- QWidget *versionALayoutWidget = new QWidget(splitter);
- QBoxLayout *versionAlayout = new QVBoxLayout(versionALayoutWidget, 5);
+ TQWidget *versionALayoutWidget = new TQWidget(splitter);
+ TQBoxLayout *versionAlayout = new TQVBoxLayout(versionALayoutWidget, 5);
- QLabel *revlabel1 = new QLabel(i18n("Your version (A):"), versionALayoutWidget);
+ TQLabel *revlabel1 = new TQLabel(i18n("Your version (A):"), versionALayoutWidget);
versionAlayout->addWidget(revlabel1);
diff1 = new DiffView(cfg, true, false, versionALayoutWidget);
versionAlayout->addWidget(diff1, 10);
- QWidget* versionBLayoutWidget = new QWidget(splitter);
- QBoxLayout *versionBlayout = new QVBoxLayout(versionBLayoutWidget, 5);
+ TQWidget* versionBLayoutWidget = new TQWidget(splitter);
+ TQBoxLayout *versionBlayout = new TQVBoxLayout(versionBLayoutWidget, 5);
- QLabel *revlabel2 = new QLabel(i18n("Other version (B):"), versionBLayoutWidget);
+ TQLabel *revlabel2 = new TQLabel(i18n("Other version (B):"), versionBLayoutWidget);
versionBlayout->addWidget(revlabel2);
diff2 = new DiffView(cfg, true, false, versionBLayoutWidget);
versionBlayout->addWidget(diff2, 10);
@@ -131,10 +131,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
diff1->setPartner(diff2);
diff2->setPartner(diff1);
- QWidget* mergeLayoutWidget = new QWidget(vertSplitter);
- QBoxLayout *mergeLayout = new QVBoxLayout(mergeLayoutWidget, 5);
+ TQWidget* mergeLayoutWidget = new TQWidget(vertSplitter);
+ TQBoxLayout *mergeLayout = new TQVBoxLayout(mergeLayoutWidget, 5);
- QLabel *mergelabel = new QLabel(i18n("Merged version:"), mergeLayoutWidget);
+ TQLabel *mergelabel = new TQLabel(i18n("Merged version:"), mergeLayoutWidget);
mergeLayout->addWidget(mergelabel);
merge = new DiffView(cfg, false, false, mergeLayoutWidget);
@@ -142,31 +142,31 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
layout->addWidget(vertSplitter);
- abutton = new QPushButton("&A", mainWidget);
- connect( abutton, SIGNAL(clicked()), SLOT(aClicked()) );
+ abutton = new TQPushButton("&A", mainWidget);
+ connect( abutton, TQT_SIGNAL(clicked()), TQT_SLOT(aClicked()) );
- bbutton = new QPushButton("&B", mainWidget);
- connect( bbutton, SIGNAL(clicked()), SLOT(bClicked()) );
+ bbutton = new TQPushButton("&B", mainWidget);
+ connect( bbutton, TQT_SIGNAL(clicked()), TQT_SLOT(bClicked()) );
- abbutton = new QPushButton("A+B", mainWidget);
- connect( abbutton, SIGNAL(clicked()), SLOT(abClicked()) );
+ abbutton = new TQPushButton("A+B", mainWidget);
+ connect( abbutton, TQT_SIGNAL(clicked()), TQT_SLOT(abClicked()) );
- babutton = new QPushButton("B+A", mainWidget);
- connect( babutton, SIGNAL(clicked()), SLOT(baClicked()) );
+ babutton = new TQPushButton("B+A", mainWidget);
+ connect( babutton, TQT_SIGNAL(clicked()), TQT_SLOT(baClicked()) );
- editbutton = new QPushButton(i18n("&Edit"), mainWidget);
- connect( editbutton, SIGNAL(clicked()), SLOT(editClicked()) );
+ editbutton = new TQPushButton(i18n("&Edit"), mainWidget);
+ connect( editbutton, TQT_SIGNAL(clicked()), TQT_SLOT(editClicked()) );
- nofnlabel = new QLabel(mainWidget);
+ nofnlabel = new TQLabel(mainWidget);
nofnlabel->setAlignment(AlignCenter);
- backbutton = new QPushButton("&<<", mainWidget);
- connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) );
+ backbutton = new TQPushButton("&<<", mainWidget);
+ connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) );
- forwbutton = new QPushButton("&>>", mainWidget);
- connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) );
+ forwbutton = new TQPushButton("&>>", mainWidget);
+ connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) );
- QBoxLayout *buttonlayout = new QHBoxLayout(layout);
+ TQBoxLayout *buttonlayout = new TQHBoxLayout(layout);
buttonlayout->addWidget(abutton, 1);
buttonlayout->addWidget(bbutton, 1);
buttonlayout->addWidget(abbutton, 1);
@@ -178,10 +178,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
buttonlayout->addWidget(backbutton, 1);
buttonlayout->addWidget(forwbutton, 1);
- connect( this, SIGNAL(user2Clicked()), SLOT(saveClicked()) );
- connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) );
+ connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(saveClicked()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) );
- QFontMetrics const fm(fontMetrics());
+ TQFontMetrics const fm(fontMetrics());
setMinimumSize(fm.width('0') * 120,
fm.lineSpacing() * 40);
@@ -189,7 +189,7 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name)
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "ResolveDialog");
+ TQSize size = configDialogSize(partConfig, "ResolveDialog");
resize(size);
}
@@ -216,7 +216,7 @@ public:
};
-bool ResolveDialog::parseFile(const QString &name)
+bool ResolveDialog::parseFile(const TQString &name)
{
int lineno1, lineno2;
int advanced1, advanced2;
@@ -226,7 +226,7 @@ bool ResolveDialog::parseFile(const QString &name)
fname = name;
- QString fileContent = readFile();
+ TQString fileContent = readFile();
if( fileContent.isNull() )
return false;
@@ -237,7 +237,7 @@ bool ResolveDialog::parseFile(const QString &name)
advanced1 = advanced2 = 0;
do
{
- QString line = separator.nextLine();
+ TQString line = separator.nextLine();
// reached end of file?
if( separator.atEnd() )
@@ -250,7 +250,7 @@ bool ResolveDialog::parseFile(const QString &name)
// check for start of conflict block
// Set to look for <<<<<<< at begining of line with exaclty one
// space after then anything after that.
- QRegExp rx( "^<{7}\\s.*$" );
+ TQRegExp rx( "^<{7}\\s.*$" );
int separatorPos = rx.search(line);
if( separatorPos >= 0 )
{
@@ -268,7 +268,7 @@ bool ResolveDialog::parseFile(const QString &name)
{
// Set to look for ======= at begining of line which may have one
// or more spaces after then nothing else.
- QRegExp rx( "^={7}\\s*$" );
+ TQRegExp rx( "^={7}\\s*$" );
int separatorPos = rx.search(line);
if( separatorPos < 0 ) // still in version A
{
@@ -286,7 +286,7 @@ bool ResolveDialog::parseFile(const QString &name)
{
// Set to look for >>>>>>> at begining of line with exaclty one
// space after then anything after that.
- QRegExp rx( "^>{7}\\s.*$" );
+ TQRegExp rx( "^>{7}\\s.*$" );
int separatorPos = rx.search(line);
if( separatorPos < 0 ) // still in version B
{
@@ -325,7 +325,7 @@ bool ResolveDialog::parseFile(const QString &name)
}
-void ResolveDialog::addToMergeAndVersionA(const QString& line,
+void ResolveDialog::addToMergeAndVersionA(const TQString& line,
DiffView::DiffType type, int& lineNo)
{
lineNo++;
@@ -334,7 +334,7 @@ void ResolveDialog::addToMergeAndVersionA(const QString& line,
}
-void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type,
+void ResolveDialog::addToVersionB(const TQString& line, DiffView::DiffType type,
int& lineNo)
{
lineNo++;
@@ -342,9 +342,9 @@ void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type,
}
-void ResolveDialog::saveFile(const QString &name)
+void ResolveDialog::saveFile(const TQString &name)
{
- QFile f(name);
+ TQFile f(name);
if (!f.open(IO_WriteOnly))
{
KMessageBox::sorry(this,
@@ -352,11 +352,11 @@ void ResolveDialog::saveFile(const QString &name)
"Cervisia");
return;
}
- QTextStream stream(&f);
- QTextCodec *fcodec = DetectCodec(name);
+ TQTextStream stream(&f);
+ TQTextCodec *fcodec = DetectCodec(name);
stream.setCodec(fcodec);
- QString output;
+ TQString output;
for( int i = 0; i < merge->count(); i++ )
output +=merge->stringAtOffset(i);
stream << output;
@@ -365,14 +365,14 @@ void ResolveDialog::saveFile(const QString &name)
}
-QString ResolveDialog::readFile()
+TQString ResolveDialog::readFile()
{
- QFile f(fname);
+ TQFile f(fname);
if( !f.open(IO_ReadOnly) )
- return QString::null;
+ return TQString::null;
- QTextStream stream(&f);
- QTextCodec* codec = DetectCodec(fname);
+ TQTextStream stream(&f);
+ TQTextCodec* codec = DetectCodec(fname);
stream.setCodec(codec);
return stream.read();
@@ -381,7 +381,7 @@ QString ResolveDialog::readFile()
void ResolveDialog::updateNofN()
{
- QString str;
+ TQString str;
if (markeditem >= 0)
str = i18n("%1 of %2").arg(markeditem+1).arg(items.count());
else
@@ -441,7 +441,7 @@ void ResolveDialog::updateMergedVersion(ResolveItem* item,
// Insert new
int total = 0;
LineSeparator separator(m_contentMergedVersion);
- QString line = separator.nextLine();
+ TQString line = separator.nextLine();
while( !separator.atEnd() )
{
merge->insertAtOffset(line, DiffView::Change, item->offsetM+total);
@@ -546,7 +546,7 @@ void ResolveDialog::editClicked()
ResolveItem *item = items.at(markeditem);
- QString mergedPart;
+ TQString mergedPart;
int total = item->linecountTotal;
int offset = item->offsetM;
for( int i = 0; i < total; ++i )
@@ -576,7 +576,7 @@ void ResolveDialog::saveClicked()
void ResolveDialog::saveAsClicked()
{
- QString filename =
+ TQString filename =
KFileDialog::getSaveFileName(0, 0, this, 0);
if( !filename.isEmpty() && Cervisia::CheckOverwrite(filename) )
@@ -584,7 +584,7 @@ void ResolveDialog::saveAsClicked()
}
-void ResolveDialog::keyPressEvent(QKeyEvent *e)
+void ResolveDialog::keyPressEvent(TQKeyEvent *e)
{
switch (e->key())
{
@@ -601,10 +601,10 @@ void ResolveDialog::keyPressEvent(QKeyEvent *e)
-/* This will return the A side of the diff in a QString. */
-QString ResolveDialog::contentVersionA(const ResolveItem *item)
+/* This will return the A side of the diff in a TQString. */
+TQString ResolveDialog::contentVersionA(const ResolveItem *item)
{
- QString result;
+ TQString result;
for( int i = item->linenoA; i < item->linenoA+item->linecountA; ++i )
{
result += diff1->stringAtLine(i);
@@ -614,10 +614,10 @@ QString ResolveDialog::contentVersionA(const ResolveItem *item)
}
-/* This will return the B side of the diff item in a QString. */
-QString ResolveDialog::contentVersionB(const ResolveItem *item)
+/* This will return the B side of the diff item in a TQString. */
+TQString ResolveDialog::contentVersionB(const ResolveItem *item)
{
- QString result;
+ TQString result;
for( int i = item->linenoB; i < item->linenoB+item->linecountB; ++i )
{
result += diff2->stringAtLine(i);
diff --git a/cervisia/resolvedlg.h b/cervisia/resolvedlg.h
index 1cee22b7..334622d9 100644
--- a/cervisia/resolvedlg.h
+++ b/cervisia/resolvedlg.h
@@ -25,7 +25,7 @@
#include <kdialogbase.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "diffview.h"
@@ -42,13 +42,13 @@ class ResolveDialog : public KDialogBase
public:
enum ChooseType { ChA, ChB, ChAB, ChBA, ChEdit };
- explicit ResolveDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 );
+ explicit ResolveDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 );
virtual ~ResolveDialog();
- bool parseFile(const QString &name);
+ bool parseFile(const TQString &name);
protected:
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
private slots:
void backClicked();
@@ -66,27 +66,27 @@ private:
void updateHighlight(int newitem);
void choose(ChooseType ch);
void chooseEdit();
- void saveFile(const QString &name);
- QString readFile();
- void addToMergeAndVersionA(const QString& line, DiffView::DiffType type,
+ void saveFile(const TQString &name);
+ TQString readFile();
+ void addToMergeAndVersionA(const TQString& line, DiffView::DiffType type,
int& lineNo);
- void addToVersionB(const QString& line, DiffView::DiffType type, int& lineNo);
+ void addToVersionB(const TQString& line, DiffView::DiffType type, int& lineNo);
void updateMergedVersion(ResolveItem* item, ChooseType chosen);
- QString contentVersionA(const ResolveItem *item);
- QString contentVersionB(const ResolveItem *item);
+ TQString contentVersionA(const ResolveItem *item);
+ TQString contentVersionB(const ResolveItem *item);
- QLabel *nofnlabel;
- QPushButton *backbutton, *forwbutton;
- QPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton;
+ TQLabel *nofnlabel;
+ TQPushButton *backbutton, *forwbutton;
+ TQPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton;
DiffView *diff1, *diff2, *merge;
- QPtrList<ResolveItem> items;
- QString fname;
- QTextCodec *fcodec;
+ TQPtrList<ResolveItem> items;
+ TQString fname;
+ TQTextCodec *fcodec;
int markeditem;
KConfig& partConfig;
- QString m_contentMergedVersion;
+ TQString m_contentMergedVersion;
};
diff --git a/cervisia/resolvedlg_p.cpp b/cervisia/resolvedlg_p.cpp
index e925677d..1023465a 100644
--- a/cervisia/resolvedlg_p.cpp
+++ b/cervisia/resolvedlg_p.cpp
@@ -22,8 +22,8 @@ using namespace Cervisia;
#include <ktextedit.h>
-ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null,
+ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null,
Ok | Cancel, Ok, true)
, m_partConfig(cfg)
{
@@ -32,11 +32,11 @@ ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const ch
setMainWidget(m_edit);
- QFontMetrics const fm(fontMetrics());
+ TQFontMetrics const fm(fontMetrics());
setMinimumSize(fm.width('0') * 120,
fm.lineSpacing() * 40);
- QSize size = configDialogSize(m_partConfig, "ResolveEditDialog");
+ TQSize size = configDialogSize(m_partConfig, "ResolveEditDialog");
resize(size);
}
@@ -47,13 +47,13 @@ ResolveEditorDialog::~ResolveEditorDialog()
}
-void ResolveEditorDialog::setContent(const QString& text)
+void ResolveEditorDialog::setContent(const TQString& text)
{
m_edit->setText(text);
}
-QString ResolveEditorDialog::content() const
+TQString ResolveEditorDialog::content() const
{
return m_edit->text();
}
diff --git a/cervisia/resolvedlg_p.h b/cervisia/resolvedlg_p.h
index 30b4559a..08d7a779 100644
--- a/cervisia/resolvedlg_p.h
+++ b/cervisia/resolvedlg_p.h
@@ -33,11 +33,11 @@ namespace Cervisia
class ResolveEditorDialog : public KDialogBase
{
public:
- explicit ResolveEditorDialog(KConfig& cfg, QWidget* parent=0, const char* name=0);
+ explicit ResolveEditorDialog(KConfig& cfg, TQWidget* parent=0, const char* name=0);
virtual ~ResolveEditorDialog();
- void setContent(const QString& text);
- QString content() const;
+ void setContent(const TQString& text);
+ TQString content() const;
private:
KTextEdit* m_edit;
diff --git a/cervisia/settingsdlg.cpp b/cervisia/settingsdlg.cpp
index 71b8b32c..1d50b6c1 100644
--- a/cervisia/settingsdlg.cpp
+++ b/cervisia/settingsdlg.cpp
@@ -20,16 +20,16 @@
#include "settingsdlg.h"
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qwidgetlist.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqwidgetlist.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
#include <kbuttonbox.h>
#include <kcolorbutton.h>
#include <kconfig.h>
@@ -49,27 +49,27 @@
namespace
{
// helper method to load icons for configuration pages
- inline QPixmap LoadIcon(const char* iconName)
+ inline TQPixmap LoadIcon(const char* iconName)
{
KIconLoader* loader = KGlobal::instance()->iconLoader();
- return loader->loadIcon(QString::fromLatin1(iconName), KIcon::NoGroup,
+ return loader->loadIcon(TQString::fromLatin1(iconName), KIcon::NoGroup,
KIcon::SizeMedium);
}
}
-FontButton::FontButton( const QString &text, QWidget *parent, const char *name )
- : QPushButton(text, parent, name)
+FontButton::FontButton( const TQString &text, TQWidget *parent, const char *name )
+ : TQPushButton(text, parent, name)
{
- connect( this, SIGNAL(clicked()), this, SLOT(chooseFont()) );
+ connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseFont()) );
}
void FontButton::chooseFont()
{
- QFont newFont(font());
+ TQFont newFont(font());
- if (KFontDialog::getFont(newFont, false, this) == QDialog::Rejected)
+ if (KFontDialog::getFont(newFont, false, this) == TQDialog::Rejected)
return;
setFont(newFont);
@@ -77,7 +77,7 @@ void FontButton::chooseFont()
}
-SettingsDialog::SettingsDialog( KConfig *conf, QWidget *parent, const char *name )
+SettingsDialog::SettingsDialog( KConfig *conf, TQWidget *parent, const char *name )
: KDialogBase(KDialogBase::IconList, i18n("Configure Cervisia"),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help,
KDialogBase::Ok,
@@ -204,10 +204,10 @@ void SettingsDialog::writeSettings()
CervisiaSettings::setDiffDeleteColor(m_diffDeleteButton->color());
// I'm not yet sure whether this is a hack or not :-)
- QWidgetListIt it(*QApplication::allWidgets());
+ TQWidgetListIt it(*TQApplication::allWidgets());
for (; it.current(); ++it)
{
- QWidget *w = it.current();
+ TQWidget *w = it.current();
if (w->inherits("ProtocolView"))
w->setFont(m_protocolFontBox->font());
if (w->inherits("AnnotateView"))
@@ -234,11 +234,11 @@ void SettingsDialog::done(int res)
*/
void SettingsDialog::addGeneralPage()
{
- QFrame* generalPage = addPage(i18n("General"), QString::null,
+ TQFrame* generalPage = addPage(i18n("General"), TQString::null,
LoadIcon("misc"));
- QVBoxLayout* layout = new QVBoxLayout(generalPage, 0, KDialog::spacingHint());
+ TQVBoxLayout* layout = new TQVBoxLayout(generalPage, 0, KDialog::spacingHint());
- QLabel *usernamelabel = new QLabel( i18n("&User name for the change log editor:"), generalPage );
+ TQLabel *usernamelabel = new TQLabel( i18n("&User name for the change log editor:"), generalPage );
usernameedit = new KLineEdit(generalPage);
usernameedit->setFocus();
usernamelabel->setBuddy(usernameedit);
@@ -246,7 +246,7 @@ void SettingsDialog::addGeneralPage()
layout->addWidget(usernamelabel);
layout->addWidget(usernameedit);
- QLabel *cvspathlabel = new QLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage );
+ TQLabel *cvspathlabel = new TQLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage );
cvspathedit = new KURLRequester(generalPage);
cvspathlabel->setBuddy(cvspathedit);
@@ -262,29 +262,29 @@ void SettingsDialog::addGeneralPage()
*/
void SettingsDialog::addDiffPage()
{
- QGrid *diffPage = addGridPage(2, QGrid::Horizontal, i18n("Diff Viewer"),
- QString::null, LoadIcon("vcs_diff"));
+ TQGrid *diffPage = addGridPage(2, TQGrid::Horizontal, i18n("Diff Viewer"),
+ TQString::null, LoadIcon("vcs_diff"));
- QLabel *contextlabel = new QLabel( i18n("&Number of context lines in diff dialog:"), diffPage );
+ TQLabel *contextlabel = new TQLabel( i18n("&Number of context lines in diff dialog:"), diffPage );
contextedit = new KIntNumInput( 0, diffPage );
contextedit->setRange(0, 65535, 1, false);
contextlabel->setBuddy(contextedit);
- QLabel *diffoptlabel = new QLabel(i18n("Additional &options for cvs diff:"), diffPage);
+ TQLabel *diffoptlabel = new TQLabel(i18n("Additional &options for cvs diff:"), diffPage);
diffoptedit = new KLineEdit(diffPage);
diffoptlabel->setBuddy(diffoptedit);
- QLabel *tabwidthlabel = new QLabel(i18n("Tab &width in diff dialog:"), diffPage);
+ TQLabel *tabwidthlabel = new TQLabel(i18n("Tab &width in diff dialog:"), diffPage);
tabwidthedit = new KIntNumInput(0, diffPage);
tabwidthedit->setRange(1, 16, 1, false);
tabwidthlabel->setBuddy(tabwidthedit);
- QLabel *extdifflabel = new QLabel(i18n("External diff &frontend:"), diffPage);
+ TQLabel *extdifflabel = new TQLabel(i18n("External diff &frontend:"), diffPage);
extdiffedit = new KURLRequester(diffPage);
extdifflabel->setBuddy(extdiffedit);
// dummy widget to take up the vertical space
- new QWidget(diffPage);
+ new TQWidget(diffPage);
}
@@ -293,16 +293,16 @@ void SettingsDialog::addDiffPage()
*/
void SettingsDialog::addStatusPage()
{
- QVBox* statusPage = addVBoxPage(i18n("Status"), QString::null,
+ TQVBox* statusPage = addVBoxPage(i18n("Status"), TQString::null,
LoadIcon("fork"));
- remotestatusbox = new QCheckBox(i18n("When opening a sandbox from a &remote repository,\n"
+ remotestatusbox = new TQCheckBox(i18n("When opening a sandbox from a &remote repository,\n"
"start a File->Status command automatically"), statusPage);
- localstatusbox = new QCheckBox(i18n("When opening a sandbox from a &local repository,\n"
+ localstatusbox = new TQCheckBox(i18n("When opening a sandbox from a &local repository,\n"
"start a File->Status command automatically"), statusPage);
// dummy widget to take up the vertical space
- new QWidget(statusPage);
+ new TQWidget(statusPage);
}
@@ -311,7 +311,7 @@ void SettingsDialog::addStatusPage()
*/
void SettingsDialog::addAdvancedPage()
{
- QVBox* frame = addVBoxPage(i18n("Advanced"), QString::null,
+ TQVBox* frame = addVBoxPage(i18n("Advanced"), TQString::null,
LoadIcon("configure"));
m_advancedPage = new AdvancedPage(frame);
@@ -325,10 +325,10 @@ void SettingsDialog::addAdvancedPage()
*/
void SettingsDialog::addLookAndFeelPage()
{
- QVBox* lookPage = addVBoxPage(i18n("Appearance"), QString::null,
+ TQVBox* lookPage = addVBoxPage(i18n("Appearance"), TQString::null,
LoadIcon("looknfeel"));
- QGroupBox* fontGroupBox = new QGroupBox(4, Qt::Vertical, i18n("Fonts"),
+ TQGroupBox* fontGroupBox = new TQGroupBox(4, Qt::Vertical, i18n("Fonts"),
lookPage);
fontGroupBox->setInsideSpacing(KDialog::spacingHint());
@@ -341,40 +341,40 @@ void SettingsDialog::addLookAndFeelPage()
m_changelogFontBox = new FontButton(i18n("Font for ChangeLog View..."),
fontGroupBox);
- QGroupBox* colorGroupBox = new QGroupBox(4, Qt::Horizontal,
+ TQGroupBox* colorGroupBox = new TQGroupBox(4, Qt::Horizontal,
i18n("Colors"), lookPage);
colorGroupBox->setColumns(4);
colorGroupBox->setInsideSpacing(KDialog::spacingHint());
- QLabel* conflictLabel = new QLabel(i18n("Conflict:"), colorGroupBox);
+ TQLabel* conflictLabel = new TQLabel(i18n("Conflict:"), colorGroupBox);
m_conflictButton = new KColorButton(colorGroupBox);
conflictLabel->setBuddy(m_conflictButton);
- QLabel* diffChangeLabel = new QLabel(i18n("Diff change:"), colorGroupBox);
+ TQLabel* diffChangeLabel = new TQLabel(i18n("Diff change:"), colorGroupBox);
m_diffChangeButton = new KColorButton(colorGroupBox);
diffChangeLabel->setBuddy(m_diffChangeButton);
- QLabel* localChangeLabel = new QLabel(i18n("Local change:"), colorGroupBox);
+ TQLabel* localChangeLabel = new TQLabel(i18n("Local change:"), colorGroupBox);
m_localChangeButton = new KColorButton(colorGroupBox);
localChangeLabel->setBuddy(m_localChangeButton);
- QLabel* diffInsertLabel = new QLabel(i18n("Diff insertion:"), colorGroupBox);
+ TQLabel* diffInsertLabel = new TQLabel(i18n("Diff insertion:"), colorGroupBox);
m_diffInsertButton = new KColorButton(colorGroupBox);
diffInsertLabel->setBuddy(m_diffInsertButton);
- QLabel* remoteChangeLabel = new QLabel(i18n("Remote change:"), colorGroupBox);
+ TQLabel* remoteChangeLabel = new TQLabel(i18n("Remote change:"), colorGroupBox);
m_remoteChangeButton = new KColorButton(colorGroupBox);
remoteChangeLabel->setBuddy( m_remoteChangeButton );
- QLabel* diffDeleteLabel = new QLabel(i18n("Diff deletion:"), colorGroupBox);
+ TQLabel* diffDeleteLabel = new TQLabel(i18n("Diff deletion:"), colorGroupBox);
m_diffDeleteButton = new KColorButton(colorGroupBox);
diffDeleteLabel->setBuddy(m_diffDeleteButton);
- QLabel* notInCvsLabel = new QLabel(i18n("Not in cvs:"), colorGroupBox);
+ TQLabel* notInCvsLabel = new TQLabel(i18n("Not in cvs:"), colorGroupBox);
m_notInCvsButton = new KColorButton(colorGroupBox);
notInCvsLabel->setBuddy(m_notInCvsButton);
- m_splitterBox = new QCheckBox(i18n("Split main window &horizontally"), lookPage);
+ m_splitterBox = new TQCheckBox(i18n("Split main window &horizontally"), lookPage);
}
#include "settingsdlg.moc"
diff --git a/cervisia/settingsdlg.h b/cervisia/settingsdlg.h
index 2f7effb4..e07c2153 100644
--- a/cervisia/settingsdlg.h
+++ b/cervisia/settingsdlg.h
@@ -22,7 +22,7 @@
#define SETTINGSDLG_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
@@ -40,7 +40,7 @@ class FontButton : public QPushButton
Q_OBJECT
public:
- FontButton( const QString &text, QWidget *parent=0, const char *name=0 );
+ FontButton( const TQString &text, TQWidget *parent=0, const char *name=0 );
private slots:
void chooseFont();
@@ -52,7 +52,7 @@ class SettingsDialog : public KDialogBase
Q_OBJECT
public:
- SettingsDialog( KConfig *conf, QWidget *parent=0, const char *name=0 );
+ SettingsDialog( KConfig *conf, TQWidget *parent=0, const char *name=0 );
virtual ~SettingsDialog();
protected slots:
@@ -75,8 +75,8 @@ private:
KLineEdit *usernameedit;
KLineEdit *diffoptedit;
KURLRequester *extdiffedit;
- QCheckBox *remotestatusbox;
- QCheckBox *localstatusbox;
+ TQCheckBox *remotestatusbox;
+ TQCheckBox *localstatusbox;
FontButton* m_protocolFontBox;
FontButton* m_annotateFontBox;
FontButton* m_diffFontBox;
@@ -90,7 +90,7 @@ private:
KColorButton* m_diffInsertButton;
KColorButton* m_diffDeleteButton;
- QCheckBox* m_splitterBox;
+ TQCheckBox* m_splitterBox;
AdvancedPage* m_advancedPage;
KConfig* serviceConfig;
diff --git a/cervisia/stringmatcher.cpp b/cervisia/stringmatcher.cpp
index 1f0b4de8..6e70a6e0 100644
--- a/cervisia/stringmatcher.cpp
+++ b/cervisia/stringmatcher.cpp
@@ -28,27 +28,27 @@ namespace Cervisia
{
namespace
{
- const QChar asterix('*');
- const QChar question('?');
+ const TQChar asterix('*');
+ const TQChar question('?');
- inline bool isMetaCharacter(QChar c)
+ inline bool isMetaCharacter(TQChar c)
{
return c == asterix || c == question;
}
- unsigned int countMetaCharacters(const QString& text);
+ unsigned int countMetaCharacters(const TQString& text);
}
-bool StringMatcher::match(const QString& text) const
+bool StringMatcher::match(const TQString& text) const
{
if (m_exactPatterns.find(text) != m_exactPatterns.end())
{
return true;
}
- for (QStringList::const_iterator it(m_startPatterns.begin()),
+ for (TQStringList::const_iterator it(m_startPatterns.begin()),
itEnd(m_startPatterns.end());
it != itEnd; ++it)
{
@@ -58,7 +58,7 @@ bool StringMatcher::match(const QString& text) const
}
}
- for (QStringList::const_iterator it(m_endPatterns.begin()),
+ for (TQStringList::const_iterator it(m_endPatterns.begin()),
itEnd(m_endPatterns.end());
it != itEnd; ++it)
{
@@ -68,7 +68,7 @@ bool StringMatcher::match(const QString& text) const
}
}
- for (QValueList<QCString>::const_iterator it(m_generalPatterns.begin()),
+ for (TQValueList<TQCString>::const_iterator it(m_generalPatterns.begin()),
itEnd(m_generalPatterns.end());
it != itEnd; ++it)
{
@@ -82,7 +82,7 @@ bool StringMatcher::match(const QString& text) const
}
-void StringMatcher::add(const QString& pattern)
+void StringMatcher::add(const TQString& pattern)
{
if (pattern.isEmpty())
{
@@ -129,12 +129,12 @@ void StringMatcher::clear()
namespace
{
-unsigned int countMetaCharacters(const QString& text)
+unsigned int countMetaCharacters(const TQString& text)
{
unsigned int count(0);
- const QChar* pos(text.unicode());
- const QChar* posEnd(pos + text.length());
+ const TQChar* pos(text.unicode());
+ const TQChar* posEnd(pos + text.length());
while (pos < posEnd)
{
count += isMetaCharacter(*pos++);
diff --git a/cervisia/stringmatcher.h b/cervisia/stringmatcher.h
index 17ecd3e8..baedc69f 100644
--- a/cervisia/stringmatcher.h
+++ b/cervisia/stringmatcher.h
@@ -21,7 +21,7 @@
#define CERVISIA_STRINGMATCHER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace Cervisia
@@ -35,12 +35,12 @@ public:
/**
* @return \c true, if text matches one of the given patterns.
*/
- bool match(const QString& text) const;
+ bool match(const TQString& text) const;
/**
* Adds pattern \a pattern.
*/
- void add(const QString& pattern);
+ void add(const TQString& pattern);
/**
* Removes all patterns.
@@ -52,22 +52,22 @@ private:
/**
* The patterns which are tested in match().
*/
- QStringList m_exactPatterns;
+ TQStringList m_exactPatterns;
/**
* The patterns which are tested in match().
*/
- QStringList m_startPatterns;
+ TQStringList m_startPatterns;
/**
* The patterns which are tested in match().
*/
- QStringList m_endPatterns;
+ TQStringList m_endPatterns;
/**
* The patterns which are tested in match().
*/
- QValueList<QCString> m_generalPatterns;
+ TQValueList<TQCString> m_generalPatterns;
};
diff --git a/cervisia/tagdlg.cpp b/cervisia/tagdlg.cpp
index 2f1e7e89..7dc3df0c 100644
--- a/cervisia/tagdlg.cpp
+++ b/cervisia/tagdlg.cpp
@@ -20,12 +20,12 @@
#include "tagdlg.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,8 +35,8 @@
using Cervisia::TagDialog;
TagDialog::TagDialog(ActionType action, CvsService_stub* service,
- QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null,
+ TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null,
Ok | Cancel | Help, Ok, true),
act(action),
cvsService(service),
@@ -45,43 +45,43 @@ TagDialog::TagDialog(ActionType action, CvsService_stub* service,
{
setCaption( (action==Delete)? i18n("CVS Delete Tag") : i18n("CVS Tag") );
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
if (action == Delete)
{
- tag_combo = new QComboBox(true, mainWidget);
+ tag_combo = new TQComboBox(true, mainWidget);
tag_combo->setFocus();
tag_combo->setMinimumWidth(fontMetrics().width('0') * 30);
- QLabel *tag_label = new QLabel(tag_combo, i18n("&Name of tag:"), mainWidget);
+ TQLabel *tag_label = new TQLabel(tag_combo, i18n("&Name of tag:"), mainWidget);
- QPushButton *tag_button = new QPushButton(i18n("Fetch &List"), mainWidget);
- connect( tag_button, SIGNAL(clicked()),
- this, SLOT(tagButtonClicked()) );
+ TQPushButton *tag_button = new TQPushButton(i18n("Fetch &List"), mainWidget);
+ connect( tag_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(tagButtonClicked()) );
- QBoxLayout *tagedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout);
tagedit_layout->addWidget(tag_label);
tagedit_layout->addWidget(tag_combo);
tagedit_layout->addWidget(tag_button);
}
else
{
- tag_edit = new QLineEdit(mainWidget);
+ tag_edit = new TQLineEdit(mainWidget);
tag_edit->setFocus();
tag_edit->setMinimumWidth(fontMetrics().width('0') * 30);
- QLabel *tag_label = new QLabel(tag_edit, i18n("&Name of tag:"), mainWidget);
+ TQLabel *tag_label = new TQLabel(tag_edit, i18n("&Name of tag:"), mainWidget);
- QBoxLayout *tagedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout);
tagedit_layout->addWidget(tag_label);
tagedit_layout->addWidget(tag_edit);
- branchtag_button = new QCheckBox(i18n("Create &branch with this tag"), mainWidget);
+ branchtag_button = new TQCheckBox(i18n("Create &branch with this tag"), mainWidget);
layout->addWidget(branchtag_button);
- forcetag_button = new QCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget);
+ forcetag_button = new TQCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget);
layout->addWidget(forcetag_button);
}
@@ -101,7 +101,7 @@ bool TagDialog::forceTag() const
}
-QString TagDialog::tag() const
+TQString TagDialog::tag() const
{
return act==Delete? tag_combo->currentText() : tag_edit->text();
}
@@ -109,7 +109,7 @@ QString TagDialog::tag() const
void TagDialog::slotOk()
{
- QString const str(tag());
+ TQString const str(tag());
if (str.isEmpty())
{
diff --git a/cervisia/tagdlg.h b/cervisia/tagdlg.h
index 4d1e4754..fedb738a 100644
--- a/cervisia/tagdlg.h
+++ b/cervisia/tagdlg.h
@@ -41,11 +41,11 @@ public:
enum ActionType { Create, Delete };
TagDialog( ActionType action, CvsService_stub* service,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
bool branchTag() const;
bool forceTag() const;
- QString tag() const;
+ TQString tag() const;
protected:
virtual void slotOk();
@@ -57,10 +57,10 @@ private:
ActionType act;
CvsService_stub* cvsService;
- QCheckBox *branchtag_button;
- QCheckBox *forcetag_button;
- QLineEdit *tag_edit;
- QComboBox *tag_combo;
+ TQCheckBox *branchtag_button;
+ TQCheckBox *forcetag_button;
+ TQLineEdit *tag_edit;
+ TQComboBox *tag_combo;
};
}
diff --git a/cervisia/tooltip.cpp b/cervisia/tooltip.cpp
index 7debf9d7..728945ca 100644
--- a/cervisia/tooltip.cpp
+++ b/cervisia/tooltip.cpp
@@ -22,27 +22,27 @@
#include <kglobal.h>
#include <kglobalsettings.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
namespace Cervisia
{
-static QString truncateLines(const QString&, const QFontMetrics&, const QSize&);
-static QString truncateLines(const QString&, const QFont&, const QPoint&, const QRect&);
+static TQString truncateLines(const TQString&, const TQFontMetrics&, const TQSize&);
+static TQString truncateLines(const TQString&, const TQFont&, const TQPoint&, const TQRect&);
-ToolTip::ToolTip(QWidget* widget)
- : QObject(widget), QToolTip(widget)
+ToolTip::ToolTip(TQWidget* widget)
+ : TQObject(widget), TQToolTip(widget)
{
}
-void ToolTip::maybeTip(const QPoint& pos)
+void ToolTip::maybeTip(const TQPoint& pos)
{
- QRect rect;
- QString text;
+ TQRect rect;
+ TQString text;
emit queryToolTip(pos, rect, text);
if (rect.isValid() && !text.isEmpty())
@@ -59,11 +59,11 @@ void ToolTip::maybeTip(const QPoint& pos)
// Primtive routine to truncate the text. size.width() is ignored, only
// size.height() is used at the moment to keep it fast. It doesn't work
// correct if text lines have different heights.
-QString truncateLines(const QString& text,
- const QFontMetrics& fm,
- const QSize& size)
+TQString truncateLines(const TQString& text,
+ const TQFontMetrics& fm,
+ const TQSize& size)
{
- const QChar newLine('\n');
+ const TQChar newLine('\n');
const int lineSpacing(fm.lineSpacing());
const int numberOfLines(text.contains(newLine) + 1);
@@ -72,7 +72,7 @@ QString truncateLines(const QString& text,
if (numberOfLines <= maxNumberOfLines)
return text;
- const QChar* unicode(text.unicode());
+ const TQChar* unicode(text.unicode());
for (int count(maxNumberOfLines); count; ++unicode)
if (*unicode == newLine)
--count;
@@ -82,10 +82,10 @@ QString truncateLines(const QString& text,
// Truncate the tooltip's text if necessary
-QString truncateLines(const QString& text,
- const QFont& font,
- const QPoint& globalPos,
- const QRect& desktopGeometry)
+TQString truncateLines(const TQString& text,
+ const TQFont& font,
+ const TQPoint& globalPos,
+ const TQRect& desktopGeometry)
{
// maximum size of the tooltip, - 10 just to be safe
const int maxWidth(kMax(desktopGeometry.width() - globalPos.x(), globalPos.x())
@@ -94,13 +94,13 @@ QString truncateLines(const QString& text,
- desktopGeometry.top() - 10);
// calculate the tooltip's size
- const QSimpleRichText layoutedText(text, font);
+ const TQSimpleRichText layoutedText(text, font);
// only if the tooltip's size is bigger in x- and y-direction the text must
// be truncated otherwise the tip is moved to a position where it fits
return ((layoutedText.widthUsed() > maxWidth)
&& (layoutedText.height() > maxHeight))
- ? truncateLines(text, QFontMetrics(font), QSize(maxWidth, maxHeight))
+ ? truncateLines(text, TQFontMetrics(font), TQSize(maxWidth, maxHeight))
: text;
}
diff --git a/cervisia/tooltip.h b/cervisia/tooltip.h
index fc0cd7be..f6a47999 100644
--- a/cervisia/tooltip.h
+++ b/cervisia/tooltip.h
@@ -21,8 +21,8 @@
#define CERVISIA_TOOLTIP_H
-#include <qobject.h>
-#include <qtooltip.h>
+#include <tqobject.h>
+#include <tqtooltip.h>
namespace Cervisia
@@ -30,11 +30,11 @@ namespace Cervisia
/**
- * This class extends QToolTip:
+ * This class extends TQToolTip:
* - no more need to subclass just connect to the signal queryToolTip()
* - truncate too large tooltip texts.
*/
-class ToolTip : public QObject, public QToolTip
+class ToolTip : public TQObject, public QToolTip
{
Q_OBJECT
@@ -42,10 +42,10 @@ public:
/**
* @param widget The widget you want to add tooltips to. It's also used as
- * parent for the QObject. So you don't have to free an instance of this
+ * parent for the TQObject. So you don't have to free an instance of this
* class yourself.
*/
- explicit ToolTip(QWidget* widget);
+ explicit ToolTip(TQWidget* widget);
signals:
@@ -61,11 +61,11 @@ signals:
*
* @param text The tooltip text.
*/
- void queryToolTip(const QPoint& pos, QRect& rect, QString& text);
+ void queryToolTip(const TQPoint& pos, TQRect& rect, TQString& text);
protected:
- virtual void maybeTip(const QPoint&);
+ virtual void maybeTip(const TQPoint&);
};
diff --git a/cervisia/updatedlg.cpp b/cervisia/updatedlg.cpp
index 9a536763..4cd4367c 100644
--- a/cervisia/updatedlg.cpp
+++ b/cervisia/updatedlg.cpp
@@ -20,12 +20,12 @@
#include "updatedlg.h"
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qstyle.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqstyle.h>
#include <klineedit.h>
#include <klocale.h>
@@ -34,65 +34,65 @@
UpdateDialog::UpdateDialog(CvsService_stub* service,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("CVS Update"),
Ok | Cancel, Ok, true),
cvsService(service)
{
int const iComboBoxMinWidth(40 * fontMetrics().width('0'));
- int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6);
+ int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6);
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- bybranch_button = new QRadioButton(i18n("Update to &branch: "), mainWidget);
+ bybranch_button = new TQRadioButton(i18n("Update to &branch: "), mainWidget);
bybranch_button->setChecked(true);
layout->addWidget(bybranch_button);
- branch_combo = new QComboBox(true, mainWidget);
+ branch_combo = new TQComboBox(true, mainWidget);
branch_combo->setMinimumWidth(iComboBoxMinWidth);
- branch_button = new QPushButton(i18n("Fetch &List"), mainWidget);
- connect( branch_button, SIGNAL(clicked()),
- this, SLOT(branchButtonClicked()) );
+ branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget);
+ connect( branch_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(branchButtonClicked()) );
- QBoxLayout *branchedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout);
branchedit_layout->addSpacing(iWidgetIndent);
branchedit_layout->addWidget(branch_combo);
branchedit_layout->addWidget(branch_button);
- bytag_button = new QRadioButton(i18n("Update to &tag: "), mainWidget);
+ bytag_button = new TQRadioButton(i18n("Update to &tag: "), mainWidget);
layout->addWidget(bytag_button);
- tag_combo = new QComboBox(true, mainWidget);
+ tag_combo = new TQComboBox(true, mainWidget);
tag_combo->setMinimumWidth(iComboBoxMinWidth);
- tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget);
- connect( tag_button, SIGNAL(clicked()),
- this, SLOT(tagButtonClicked()) );
+ tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget);
+ connect( tag_button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(tagButtonClicked()) );
- QBoxLayout *tagedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout);
tagedit_layout->addSpacing(iWidgetIndent);
tagedit_layout->addWidget(tag_combo);
tagedit_layout->addWidget(tag_button);
- bydate_button = new QRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget);
+ bydate_button = new TQRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget);
layout->addWidget(bydate_button);
date_edit = new KLineEdit(mainWidget);
- QBoxLayout *dateedit_layout = new QHBoxLayout(layout);
+ TQBoxLayout *dateedit_layout = new TQHBoxLayout(layout);
dateedit_layout->addSpacing(iWidgetIndent);
dateedit_layout->addWidget(date_edit);
- QButtonGroup* group = new QButtonGroup(mainWidget);
+ TQButtonGroup* group = new TQButtonGroup(mainWidget);
group->hide();
group->insert(bytag_button);
group->insert(bybranch_button);
group->insert(bydate_button);
- connect( group, SIGNAL(clicked(int)),
- this, SLOT(toggled()) );
+ connect( group, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(toggled()) );
// dis-/enable the widgets
toggled();
@@ -105,7 +105,7 @@ bool UpdateDialog::byTag() const
}
-QString UpdateDialog::tag() const
+TQString UpdateDialog::tag() const
{
return bybranch_button->isChecked()
? branch_combo->currentText()
@@ -113,7 +113,7 @@ QString UpdateDialog::tag() const
}
-QString UpdateDialog::date() const
+TQString UpdateDialog::date() const
{
return date_edit->text();
}
diff --git a/cervisia/updatedlg.h b/cervisia/updatedlg.h
index 2ce143cf..0e4e1718 100644
--- a/cervisia/updatedlg.h
+++ b/cervisia/updatedlg.h
@@ -38,11 +38,11 @@ class UpdateDialog : public KDialogBase
public:
UpdateDialog( CvsService_stub* service,
- QWidget *parent=0, const char *name=0 );
+ TQWidget *parent=0, const char *name=0 );
bool byTag() const;
- QString tag() const;
- QString date() const;
+ TQString tag() const;
+ TQString date() const;
private slots:
void toggled();
@@ -52,9 +52,9 @@ private slots:
private:
CvsService_stub* cvsService;
- QRadioButton *bytag_button, *bybranch_button, *bydate_button;
- QComboBox *tag_combo, *branch_combo;
- QPushButton *tag_button, *branch_button;
+ TQRadioButton *bytag_button, *bybranch_button, *bydate_button;
+ TQComboBox *tag_combo, *branch_combo;
+ TQPushButton *tag_button, *branch_button;
KLineEdit *date_edit;
};
diff --git a/cervisia/updateview.cpp b/cervisia/updateview.cpp
index 94679f6c..710eabd8 100644
--- a/cervisia/updateview.cpp
+++ b/cervisia/updateview.cpp
@@ -22,9 +22,9 @@
#include <set>
-#include <qapplication.h>
-#include <qfileinfo.h>
-#include <qptrstack.h>
+#include <tqapplication.h>
+#include <tqfileinfo.h>
+#include <tqptrstack.h>
#include <kconfig.h>
#include <klocale.h>
@@ -38,7 +38,7 @@ using Cervisia::Entry;
using Cervisia::EntryStatus;
-UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name)
+UpdateView::UpdateView(KConfig& partConfig, TQWidget *parent, const char *name)
: KListView(parent, name),
m_partConfig(partConfig),
m_unfoldingTree(false)
@@ -56,22 +56,22 @@ UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name)
setFilter(NoFilter);
- connect( this, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(itemExecuted(QListViewItem*)) );
- connect( this, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(itemExecuted(QListViewItem*)) );
+ connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(itemExecuted(TQListViewItem*)) );
+ connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(itemExecuted(TQListViewItem*)) );
// without this restoreLayout() can't change the column widths
for (int col = 0; col < columns(); ++col)
- setColumnWidthMode(col, QListView::Manual);
+ setColumnWidthMode(col, TQListView::Manual);
- restoreLayout(&m_partConfig, QString::fromLatin1("UpdateView"));
+ restoreLayout(&m_partConfig, TQString::fromLatin1("UpdateView"));
}
UpdateView::~UpdateView()
{
- saveLayout(&m_partConfig, QString::fromLatin1("UpdateView"));
+ saveLayout(&m_partConfig, TQString::fromLatin1("UpdateView"));
}
@@ -98,18 +98,18 @@ UpdateView::Filter UpdateView::filter() const
// returns true iff exactly one UpdateFileItem is selected
bool UpdateView::hasSingleSelection() const
{
- const QPtrList<QListViewItem>& listSelectedItems(selectedItems());
+ const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems());
return (listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst());
}
-void UpdateView::getSingleSelection(QString *filename, QString *revision) const
+void UpdateView::getSingleSelection(TQString *filename, TQString *revision) const
{
- const QPtrList<QListViewItem>& listSelectedItems(selectedItems());
+ const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems());
- QString tmpFileName;
- QString tmpRevision;
+ TQString tmpFileName;
+ TQString tmpRevision;
if ((listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst()))
{
UpdateFileItem* fileItem(static_cast<UpdateFileItem*>(listSelectedItems.getFirst()));
@@ -123,12 +123,12 @@ void UpdateView::getSingleSelection(QString *filename, QString *revision) const
}
-QStringList UpdateView::multipleSelection() const
+TQStringList UpdateView::multipleSelection() const
{
- QStringList res;
+ TQStringList res;
- const QPtrList<QListViewItem>& listSelectedItems(selectedItems());
- for (QPtrListIterator<QListViewItem> it(listSelectedItems);
+ const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems());
+ for (TQPtrListIterator<TQListViewItem> it(listSelectedItems);
it.current() != 0; ++it)
{
if ((*it)->isVisible())
@@ -139,15 +139,15 @@ QStringList UpdateView::multipleSelection() const
}
-QStringList UpdateView::fileSelection() const
+TQStringList UpdateView::fileSelection() const
{
- QStringList res;
+ TQStringList res;
- const QPtrList<QListViewItem>& listSelectedItems(selectedItems());
- for (QPtrListIterator<QListViewItem> it(listSelectedItems);
+ const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems());
+ for (TQPtrListIterator<TQListViewItem> it(listSelectedItems);
it.current() != 0; ++it)
{
- QListViewItem* item(*it);
+ TQListViewItem* item(*it);
if (isFileItem(item) && item->isVisible())
res.append(static_cast<UpdateFileItem*>(item)->filePath());
@@ -157,25 +157,25 @@ QStringList UpdateView::fileSelection() const
}
-const QColor& UpdateView::conflictColor() const
+const TQColor& UpdateView::conflictColor() const
{
return m_conflictColor;
}
-const QColor& UpdateView::localChangeColor() const
+const TQColor& UpdateView::localChangeColor() const
{
return m_localChangeColor;
}
-const QColor& UpdateView::remoteChangeColor() const
+const TQColor& UpdateView::remoteChangeColor() const
{
return m_remoteChangeColor;
}
-const QColor& UpdateView::notInCvsColor() const
+const TQColor& UpdateView::notInCvsColor() const
{
return m_notInCvsColor;
}
@@ -188,8 +188,8 @@ bool UpdateView::isUnfoldingTree() const
// updates internal data
-void UpdateView::replaceItem(QListViewItem* oldItem,
- QListViewItem* newItem)
+void UpdateView::replaceItem(TQListViewItem* oldItem,
+ TQListViewItem* newItem)
{
const int index(relevantSelection.find(oldItem));
if (index >= 0)
@@ -199,15 +199,15 @@ void UpdateView::replaceItem(QListViewItem* oldItem,
void UpdateView::unfoldSelectedFolders()
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
int previousDepth = 0;
bool isUnfolded = false;
- QStringList selection = multipleSelection();
+ TQStringList selection = multipleSelection();
// setup name of selected folder
- QString selectedItem = selection.first();
+ TQString selectedItem = selection.first();
if( selectedItem.contains('/') )
selectedItem.remove(0, selectedItem.findRev('/')+1);
@@ -215,8 +215,8 @@ void UpdateView::unfoldSelectedFolders()
const bool updatesEnabled = isUpdatesEnabled();
setUpdatesEnabled(false);
- QListViewItemIterator it(this);
- while( QListViewItem* item = it.current() )
+ TQListViewItemIterator it(this);
+ while( TQListViewItem* item = it.current() )
{
if( isDirItem(item) )
{
@@ -275,13 +275,13 @@ void UpdateView::unfoldSelectedFolders()
setUpdatesEnabled(updatesEnabled);
triggerUpdate();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void UpdateView::unfoldTree()
{
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
m_unfoldingTree = true;
@@ -289,8 +289,8 @@ void UpdateView::unfoldTree()
setUpdatesEnabled(false);
- QListViewItemIterator it(this);
- while (QListViewItem* item = it.current())
+ TQListViewItemIterator it(this);
+ while (TQListViewItem* item = it.current())
{
if (isDirItem(item))
{
@@ -323,14 +323,14 @@ void UpdateView::unfoldTree()
m_unfoldingTree = false;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void UpdateView::foldTree()
{
- QListViewItemIterator it(this);
- while (QListViewItem* item = it.current())
+ TQListViewItemIterator it(this);
+ while (TQListViewItem* item = it.current())
{
// don't close the top level directory
if (isDirItem(item) && item->parent())
@@ -345,7 +345,7 @@ void UpdateView::foldTree()
* Clear the tree view and insert the directory dirname
* into it as the new root item
*/
-void UpdateView::openDirectory(const QString& dirName)
+void UpdateView::openDirectory(const TQString& dirName)
{
clear();
@@ -411,11 +411,11 @@ void UpdateView::finishJob(bool normalExit, int exitStatus)
*/
void UpdateView::markUpdated(bool laststage, bool success)
{
- QPtrListIterator<QListViewItem> it(relevantSelection);
+ TQPtrListIterator<TQListViewItem> it(relevantSelection);
for ( ; it.current(); ++it)
if (isDirItem(it.current()))
{
- for (QListViewItem *item = it.current()->firstChild(); item;
+ for (TQListViewItem *item = it.current()->firstChild(); item;
item = item->nextSibling() )
if (isFileItem(item))
{
@@ -436,10 +436,10 @@ void UpdateView::markUpdated(bool laststage, bool success)
*/
void UpdateView::rememberSelection(bool recursive)
{
- std::set<QListViewItem*> setItems;
- for (QListViewItemIterator it(this); it.current(); ++it)
+ std::set<TQListViewItem*> setItems;
+ for (TQListViewItemIterator it(this); it.current(); ++it)
{
- QListViewItem* item(it.current());
+ TQListViewItem* item(it.current());
// if this item is selected and if it was not inserted already
// and if we work recursive and if it is a dir item then insert
@@ -450,8 +450,8 @@ void UpdateView::rememberSelection(bool recursive)
&& recursive
&& isDirItem(item))
{
- QPtrStack<QListViewItem> s;
- for (QListViewItem* childItem = item->firstChild(); childItem;
+ TQPtrStack<TQListViewItem> s;
+ for (TQListViewItem* childItem = item->firstChild(); childItem;
childItem = childItem->nextSibling() ? childItem->nextSibling() : s.pop())
{
// if this item is a dir item and if it is was not
@@ -459,7 +459,7 @@ void UpdateView::rememberSelection(bool recursive)
// DON'T CHANGE TESTING ORDER
if (isDirItem(childItem) && setItems.insert(childItem).second)
{
- if (QListViewItem* childChildItem = childItem->firstChild())
+ if (TQListViewItem* childChildItem = childItem->firstChild())
s.push(childChildItem);
}
}
@@ -468,14 +468,14 @@ void UpdateView::rememberSelection(bool recursive)
// Copy the set to the list
relevantSelection.clear();
- std::set<QListViewItem*>::const_iterator const itItemEnd = setItems.end();
- for (std::set<QListViewItem*>::const_iterator itItem = setItems.begin();
+ std::set<TQListViewItem*>::const_iterator const itItemEnd = setItems.end();
+ for (std::set<TQListViewItem*>::const_iterator itItem = setItems.begin();
itItem != itItemEnd; ++itItem)
relevantSelection.append(*itItem);
#if 0
DEBUGOUT("Relevant:");
- QPtrListIterator<QListViewItem> it44(relevantSelection);
+ TQPtrListIterator<TQListViewItem> it44(relevantSelection);
for (; it44.current(); ++it44)
DEBUGOUT(" " << (*it44)->text(UpdateFileItem::File));
DEBUGOUT("End");
@@ -492,22 +492,22 @@ void UpdateView::syncSelection()
// compute all directories which are selected or contain a selected file
// (in recursive mode this includes all sub directories)
std::set<UpdateDirItem*> setDirItems;
- for (QPtrListIterator<QListViewItem> itItem(relevantSelection);
+ for (TQPtrListIterator<TQListViewItem> itItem(relevantSelection);
itItem.current(); ++itItem)
{
- QListViewItem* item(itItem.current());
+ TQListViewItem* item(itItem.current());
UpdateDirItem* dirItem(0);
if (isDirItem(item))
dirItem = static_cast<UpdateDirItem*>(item);
- else if (QListViewItem* parentItem = item->parent())
+ else if (TQListViewItem* parentItem = item->parent())
dirItem = static_cast<UpdateDirItem*>(parentItem);
if (dirItem)
setDirItems.insert(dirItem);
}
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
std::set<UpdateDirItem*>::const_iterator const itDirItemEnd = setDirItems.end();
for (std::set<UpdateDirItem*>::const_iterator itDirItem = setDirItems.begin();
@@ -521,7 +521,7 @@ void UpdateView::syncSelection()
qApp->processEvents();
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
@@ -534,13 +534,13 @@ void UpdateView::updateColors()
KConfigGroupSaver cs(&m_partConfig, "Colors");
m_partConfig.setGroup("Colors");
- QColor defaultColor = QColor(255, 130, 130);
+ TQColor defaultColor = TQColor(255, 130, 130);
m_conflictColor = m_partConfig.readColorEntry("Conflict", &defaultColor);
- defaultColor = QColor(130, 130, 255);
+ defaultColor = TQColor(130, 130, 255);
m_localChangeColor = m_partConfig.readColorEntry("LocalChange", &defaultColor);
- defaultColor = QColor(70, 210, 70);
+ defaultColor = TQColor(70, 210, 70);
m_remoteChangeColor = m_partConfig.readColorEntry("RemoteChange", &defaultColor);
m_notInCvsColor = CervisiaSettings::notInCvsColor();
@@ -552,7 +552,7 @@ void UpdateView::updateColors()
* is true, it is assumed that the output is from a command
* 'cvs update -n', i.e. cvs actually changes no files.
*/
-void UpdateView::processUpdateLine(QString str)
+void UpdateView::processUpdateLine(TQString str)
{
if (str.length() > 2 && str[1] == ' ')
{
@@ -586,8 +586,8 @@ void UpdateView::processUpdateLine(QString str)
updateItem(str.mid(2), status, false);
}
- const QString removedFileStart(QString::fromLatin1("cvs server: "));
- const QString removedFileEnd(QString::fromLatin1(" is no longer in the repository"));
+ const TQString removedFileStart(TQString::fromLatin1("cvs server: "));
+ const TQString removedFileEnd(TQString::fromLatin1(" is no longer in the repository"));
if (str.startsWith(removedFileStart) && str.endsWith(removedFileEnd))
{
}
@@ -600,12 +600,12 @@ void UpdateView::processUpdateLine(QString str)
}
-void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool isdir)
+void UpdateView::updateItem(const TQString& filePath, EntryStatus status, bool isdir)
{
- if (isdir && filePath == QChar('.'))
+ if (isdir && filePath == TQChar('.'))
return;
- const QFileInfo fileInfo(filePath);
+ const TQFileInfo fileInfo(filePath);
UpdateDirItem* rootItem = static_cast<UpdateDirItem*>(firstChild());
UpdateDirItem* dirItem = findOrCreateDirItem(fileInfo.dirPath(), rootItem);
@@ -614,7 +614,7 @@ void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool is
}
-void UpdateView::itemExecuted(QListViewItem *item)
+void UpdateView::itemExecuted(TQListViewItem *item)
{
if (isFileItem(item))
emit fileOpened(static_cast<UpdateFileItem*>(item)->filePath());
diff --git a/cervisia/updateview.h b/cervisia/updateview.h
index d01446a9..d583b16b 100644
--- a/cervisia/updateview.h
+++ b/cervisia/updateview.h
@@ -24,7 +24,7 @@
#include <klistview.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "entry.h"
@@ -42,7 +42,7 @@ public:
NoRemoved=4, NoNotInCVS=8 , NoEmptyDirectories = 16 };
enum Action { Add, Remove, Update, UpdateNoAct, Commit };
- explicit UpdateView(KConfig& partConfig, QWidget *parent=0, const char *name=0);
+ explicit UpdateView(KConfig& partConfig, TQWidget *parent=0, const char *name=0);
virtual ~UpdateView();
@@ -50,42 +50,42 @@ public:
Filter filter() const;
bool hasSingleSelection() const;
- void getSingleSelection(QString *filename, QString *revision=0) const;
+ void getSingleSelection(TQString *filename, TQString *revision=0) const;
/* Returns a list of all marked files and directories */
- QStringList multipleSelection() const;
+ TQStringList multipleSelection() const;
/* Returns a list of all marked files, excluding directories*/
- QStringList fileSelection() const;
+ TQStringList fileSelection() const;
- void openDirectory(const QString& dirname);
+ void openDirectory(const TQString& dirname);
void prepareJob(bool recursive, Action action);
- const QColor& conflictColor() const;
- const QColor& localChangeColor() const;
- const QColor& remoteChangeColor() const;
- const QColor& notInCvsColor() const;
+ const TQColor& conflictColor() const;
+ const TQColor& localChangeColor() const;
+ const TQColor& remoteChangeColor() const;
+ const TQColor& notInCvsColor() const;
/**
* @return \c true iff unfoldTree() is active.
*/
bool isUnfoldingTree() const;
- void replaceItem(QListViewItem*, QListViewItem*);
+ void replaceItem(TQListViewItem*, TQListViewItem*);
signals:
- void fileOpened(QString filename);
+ void fileOpened(TQString filename);
public slots:
void unfoldSelectedFolders();
void unfoldTree();
void foldTree();
void finishJob(bool normalExit, int exitStatus);
- void processUpdateLine(QString line);
+ void processUpdateLine(TQString line);
private slots:
- void itemExecuted(QListViewItem *item);
+ void itemExecuted(TQListViewItem *item);
private:
- void updateItem(const QString &filename, Cervisia::EntryStatus status, bool isdir);
+ void updateItem(const TQString &filename, Cervisia::EntryStatus status, bool isdir);
void rememberSelection(bool recursive);
void syncSelection();
void markUpdated(bool laststage, bool success);
@@ -96,12 +96,12 @@ private:
Filter filt;
Action act;
- QPtrList<QListViewItem> relevantSelection;
+ TQPtrList<TQListViewItem> relevantSelection;
- QColor m_conflictColor;
- QColor m_localChangeColor;
- QColor m_remoteChangeColor;
- QColor m_notInCvsColor;
+ TQColor m_conflictColor;
+ TQColor m_localChangeColor;
+ TQColor m_remoteChangeColor;
+ TQColor m_notInCvsColor;
/**
* \c true iff unfoldTree() is active (is needed by UpdateDirItem::setOpen()).
diff --git a/cervisia/updateview_items.cpp b/cervisia/updateview_items.cpp
index 76223c24..582c9aae 100644
--- a/cervisia/updateview_items.cpp
+++ b/cervisia/updateview_items.cpp
@@ -22,9 +22,9 @@
#include <cassert>
-#include <qdir.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kglobalsettings.h>
@@ -47,9 +47,9 @@ using Cervisia::EntryStatus;
// ------------------------------------------------------------------------------
-QString UpdateItem::dirPath() const
+TQString UpdateItem::dirPath() const
{
- QString path;
+ TQString path;
const UpdateItem* item = static_cast<UpdateItem*>(parent());
while (item)
@@ -57,7 +57,7 @@ QString UpdateItem::dirPath() const
const UpdateItem* parentItem = static_cast<UpdateItem*>(item->parent());
if (parentItem)
{
- path.prepend(item->m_entry.m_name + QDir::separator());
+ path.prepend(item->m_entry.m_name + TQDir::separator());
}
item = parentItem;
@@ -67,10 +67,10 @@ QString UpdateItem::dirPath() const
}
-QString UpdateItem::filePath() const
+TQString UpdateItem::filePath() const
{
// the filePath of the root item is '.'
- return parent() ? dirPath() + m_entry.m_name : QChar('.');
+ return parent() ? dirPath() + m_entry.m_name : TQChar('.');
}
@@ -102,7 +102,7 @@ UpdateDirItem::UpdateDirItem(UpdateView* parent,
/**
* Update the status of an item; if it doesn't exist yet, create new one
*/
-void UpdateDirItem::updateChildItem(const QString& name,
+void UpdateDirItem::updateChildItem(const TQString& name,
EntryStatus status,
bool isdir)
{
@@ -154,7 +154,7 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry,
}
fileItem->setRevTag(entry.m_revision, entry.m_tag);
fileItem->setDate(entry.m_dateTime);
- fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : QPixmap());
+ fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : TQPixmap());
}
return;
}
@@ -169,8 +169,8 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry,
void UpdateDirItem::scanDirectory()
{
- const QString& path(filePath());
- if (!QFile::exists(path))
+ const TQString& path(filePath());
+ if (!TQFile::exists(path))
return;
const CvsDir dir(path);
@@ -243,24 +243,24 @@ UpdateItem* UpdateDirItem::insertItem(UpdateItem* item)
}
-UpdateItem* UpdateDirItem::findItem(const QString& name) const
+UpdateItem* UpdateDirItem::findItem(const TQString& name) const
{
const TMapItemsByName::const_iterator it = m_itemsByName.find(name);
return (it != m_itemsByName.end()) ? *it : 0;
}
-// Qt-3.3.8 changed the parsing in QDateTime::fromString() but introduced
+// Qt-3.3.8 changed the parsing in TQDateTime::fromString() but introduced
// a bug which leads to the problem that days with 1 digit will incorrectly being
// parsed as day 0 - which is invalid.
// workaround with the implementation from Qt-3.3.6
-QDateTime parseDateTime(const QString &s)
+TQDateTime parseDateTime(const TQString &s)
{
static const char * const qt_shortMonthNames[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
- QString monthName( s.mid( 4, 3 ) );
+ TQString monthName( s.mid( 4, 3 ) );
int month = -1;
// Assume that English monthnames are the default
for ( int i = 0; i < 12; ++i ) {
@@ -272,30 +272,30 @@ QDateTime parseDateTime(const QString &s)
// If English names can't be found, search the localized ones
if ( month == -1 ) {
for ( int i = 1; i <= 12; ++i ) {
- if ( monthName == QDate::shortMonthName( i ) ) {
+ if ( monthName == TQDate::shortMonthName( i ) ) {
month = i;
break;
}
}
}
if ( month < 1 || month > 12 ) {
- qWarning( "QDateTime::fromString: Parameter out of range" );
- QDateTime dt;
+ qWarning( "TQDateTime::fromString: Parameter out of range" );
+ TQDateTime dt;
return dt;
}
int day = s.mid( 8, 2 ).simplifyWhiteSpace().toInt();
int year = s.right( 4 ).toInt();
- QDate date( year, month, day );
- QTime time;
+ TQDate date( year, month, day );
+ TQTime time;
int hour, minute, second;
- int pivot = s.find( QRegExp(QString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
+ int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) );
if ( pivot != -1 ) {
hour = s.mid( pivot, 2 ).toInt();
minute = s.mid( pivot+3, 2 ).toInt();
second = s.mid( pivot+6, 2 ).toInt();
time.setHMS( hour, minute, second );
}
- return QDateTime( date, time );
+ return TQDateTime( date, time );
}
// Format of the CVS/Entries file:
@@ -303,15 +303,15 @@ QDateTime parseDateTime(const QString &s)
void UpdateDirItem::syncWithEntries()
{
- const QString path(filePath() + QDir::separator());
+ const TQString path(filePath() + TQDir::separator());
- QFile f(path + "CVS/Entries");
+ TQFile f(path + "CVS/Entries");
if( f.open(IO_ReadOnly) )
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while( !stream.eof() )
{
- QString line = stream.readLine();
+ TQString line = stream.readLine();
Cervisia::Entry entry;
@@ -332,15 +332,15 @@ void UpdateDirItem::syncWithEntries()
}
else
{
- QString rev(line.section('/', 2, 2));
- const QString timestamp(line.section('/', 3, 3));
- const QString options(line.section('/', 4, 4));
+ TQString rev(line.section('/', 2, 2));
+ const TQString timestamp(line.section('/', 3, 3));
+ const TQString options(line.section('/', 4, 4));
entry.m_tag = line.section('/', 5, 5);
const bool isBinary(options.find("-kb") >= 0);
// file date in local time
- entry.m_dateTime = QFileInfo(path + entry.m_name).lastModified();
+ entry.m_dateTime = TQFileInfo(path + entry.m_name).lastModified();
if( rev == "0" )
entry.m_status = Cervisia::LocallyAdded;
@@ -356,9 +356,9 @@ void UpdateDirItem::syncWithEntries()
else
{
// workaround Qt-3.3.8 bug with our own function (see function above)
- // const QDateTime date(QDateTime::fromString(timestamp)); // UTC Time
- const QDateTime date(parseDateTime(timestamp)); // UTC Time
- QDateTime fileDateUTC;
+ // const TQDateTime date(TQDateTime::fromString(timestamp)); // UTC Time
+ const TQDateTime date(parseDateTime(timestamp)); // UTC Time
+ TQDateTime fileDateUTC;
fileDateUTC.setTime_t(entry.m_dateTime.toTime_t(), Qt::UTC);
if (date != fileDateUTC)
entry.m_status = Cervisia::LocallyModified;
@@ -378,7 +378,7 @@ void UpdateDirItem::syncWithEntries()
*/
void UpdateDirItem::syncWithDirectory()
{
- QDir dir(filePath());
+ TQDir dir(filePath());
for (TMapItemsByName::iterator it(m_itemsByName.begin()),
itEnd(m_itemsByName.end());
@@ -393,7 +393,7 @@ void UpdateDirItem::syncWithDirectory()
if (!dir.exists(it.key()))
{
fileItem->setStatus(Cervisia::Removed);
- fileItem->setRevTag(QString::null, QString::null);
+ fileItem->setRevTag(TQString::null, TQString::null);
}
}
}
@@ -460,11 +460,11 @@ void UpdateDirItem::setOpen(bool open)
view->setFilter(view->filter());
}
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
-int UpdateDirItem::compare(QListViewItem* i,
+int UpdateDirItem::compare(TQListViewItem* i,
int /*column*/,
bool bAscending) const
{
@@ -479,9 +479,9 @@ int UpdateDirItem::compare(QListViewItem* i,
}
-QString UpdateDirItem::text(int column) const
+TQString UpdateDirItem::text(int column) const
{
- QString result;
+ TQString result;
if (column == Name)
result = entry().m_name;
@@ -541,7 +541,7 @@ bool UpdateFileItem::applyFilter(UpdateView::Filter filter)
}
-void UpdateFileItem::setRevTag(const QString& rev, const QString& tag)
+void UpdateFileItem::setRevTag(const TQString& rev, const TQString& tag)
{
m_entry.m_revision = rev;
@@ -549,13 +549,13 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag)
&& tag[8] == '.' && tag[11] == '.' && tag[14] == '.'
&& tag[17] == '.')
{
- const QDate tagDate(tag.mid(1, 4).toInt(),
+ const TQDate tagDate(tag.mid(1, 4).toInt(),
tag.mid(6, 2).toInt(),
tag.mid(9, 2).toInt());
- const QTime tagTime(tag.mid(12, 2).toInt(),
+ const TQTime tagTime(tag.mid(12, 2).toInt(),
tag.mid(15, 2).toInt(),
tag.mid(18, 2).toInt());
- const QDateTime tagDateTimeUtc(tagDate, tagTime);
+ const TQDateTime tagDateTimeUtc(tagDate, tagTime);
if (tagDateTimeUtc.isValid())
{
@@ -565,11 +565,11 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag)
// Compute the difference between UTC and local timezone for this
// tag date.
const unsigned int dateTimeInSeconds(tagDateTimeUtc.toTime_t());
- QDateTime dateTime;
+ TQDateTime dateTime;
dateTime.setTime_t(dateTimeInSeconds, Qt::UTC);
const int localUtcOffset(dateTime.secsTo(tagDateTimeUtc));
- const QDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset));
+ const TQDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset));
m_entry.m_tag = KGlobal::locale()->formatDateTime(tagDateTimeLocal);
}
@@ -589,7 +589,7 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag)
}
-void UpdateFileItem::setDate(const QDateTime& date)
+void UpdateFileItem::setDate(const TQDateTime& date)
{
m_entry.m_dateTime = date;
}
@@ -649,7 +649,7 @@ int UpdateFileItem::statusClass() const
}
-int UpdateFileItem::compare(QListViewItem* i,
+int UpdateFileItem::compare(TQListViewItem* i,
int column,
bool bAscending) const
{
@@ -687,9 +687,9 @@ int UpdateFileItem::compare(QListViewItem* i,
}
-QString UpdateFileItem::text(int column) const
+TQString UpdateFileItem::text(int column) const
{
- QString result;
+ TQString result;
switch (column)
{
case Name:
@@ -717,15 +717,15 @@ QString UpdateFileItem::text(int column) const
}
-void UpdateFileItem::paintCell(QPainter *p,
- const QColorGroup &cg,
+void UpdateFileItem::paintCell(TQPainter *p,
+ const TQColorGroup &cg,
int col,
int width,
int align)
{
const UpdateView* view(updateView());
- QColor color;
+ TQColor color;
switch (m_entry.m_status)
{
case Cervisia::Conflict:
@@ -752,17 +752,17 @@ void UpdateFileItem::paintCell(QPainter *p,
break;
}
- const QFont oldFont(p->font());
- QColorGroup mycg(cg);
+ const TQFont oldFont(p->font());
+ TQColorGroup mycg(cg);
if (color.isValid() && color != KGlobalSettings::textColor())
{
- QFont myFont(oldFont);
+ TQFont myFont(oldFont);
myFont.setBold(true);
p->setFont(myFont);
- mycg.setColor(QColorGroup::Text, color);
+ mycg.setColor(TQColorGroup::Text, color);
}
- QListViewItem::paintCell(p, mycg, col, width, align);
+ TQListViewItem::paintCell(p, mycg, col, width, align);
if (color.isValid())
{
@@ -775,7 +775,7 @@ void UpdateFileItem::paintCell(QPainter *p,
* Finds or creates the UpdateDirItem with path \a dirPath. If \a dirPath
* is "." \a rootItem is returned.
*/
-UpdateDirItem* findOrCreateDirItem(const QString& dirPath,
+UpdateDirItem* findOrCreateDirItem(const TQString& dirPath,
UpdateDirItem* rootItem)
{
assert(!dirPath.isEmpty());
@@ -783,14 +783,14 @@ UpdateDirItem* findOrCreateDirItem(const QString& dirPath,
UpdateDirItem* dirItem(rootItem);
- if (dirPath != QChar('.'))
+ if (dirPath != TQChar('.'))
{
- const QStringList& dirNames(QStringList::split('/', dirPath));
- const QStringList::const_iterator itDirNameEnd(dirNames.end());
- for (QStringList::const_iterator itDirName(dirNames.begin());
+ const TQStringList& dirNames(TQStringList::split('/', dirPath));
+ const TQStringList::const_iterator itDirNameEnd(dirNames.end());
+ for (TQStringList::const_iterator itDirName(dirNames.begin());
itDirName != itDirNameEnd; ++itDirName)
{
- const QString& dirName(*itDirName);
+ const TQString& dirName(*itDirName);
UpdateItem* item = dirItem->findItem(dirName);
if (isFileItem(item))
diff --git a/cervisia/updateview_items.h b/cervisia/updateview_items.h
index 49f5cf91..0b24ca85 100644
--- a/cervisia/updateview_items.h
+++ b/cervisia/updateview_items.h
@@ -22,9 +22,9 @@
#define UPDATEVIEW_ITEMS_H
-#include <qdatetime.h>
-#include <qlistview.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqlistview.h>
+#include <tqmap.h>
#include "entry.h"
#include "updateview.h"
@@ -35,7 +35,7 @@ class UpdateFileItem;
class Visitor;
-UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*);
+UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*);
class UpdateItem : public QListViewItem
@@ -43,19 +43,19 @@ class UpdateItem : public QListViewItem
public:
UpdateItem(UpdateView* parent, const Cervisia::Entry& entry)
- : QListViewItem(parent), m_entry(entry) {}
+ : TQListViewItem(parent), m_entry(entry) {}
UpdateItem(UpdateItem* parent, const Cervisia::Entry& entry)
- : QListViewItem(parent), m_entry(entry) {}
+ : TQListViewItem(parent), m_entry(entry) {}
const Cervisia::Entry& entry() const { return m_entry; }
// Returns the path (relative to the repository).
- // QString::null for the root item and its (direct) children.
- // If it's not QString::null it ends with '/'.
- QString dirPath() const;
+ // TQString::null for the root item and its (direct) children.
+ // If it's not TQString::null it ends with '/'.
+ TQString dirPath() const;
// Returns the file name, including the path (relative to the repository)
- QString filePath() const;
+ TQString filePath() const;
virtual void accept(Visitor&) = 0;
@@ -78,13 +78,13 @@ public:
void syncWithDirectory();
void syncWithEntries();
- void updateChildItem(const QString& name, Cervisia::EntryStatus status, bool isdir);
+ void updateChildItem(const TQString& name, Cervisia::EntryStatus status, bool isdir);
void updateEntriesItem(const Cervisia::Entry& entry, bool isBinary);
bool wasScanned() const { return m_opened; }
- virtual int compare(QListViewItem* i, int col, bool) const;
- virtual QString text(int col) const;
+ virtual int compare(TQListViewItem* i, int col, bool) const;
+ virtual TQString text(int col) const;
virtual void setOpen(bool o);
virtual int rtti() const { return RTTI; }
@@ -103,15 +103,15 @@ private:
UpdateItem* insertItem(UpdateItem* item);
- UpdateItem* findItem(const QString& name) const;
+ UpdateItem* findItem(const TQString& name) const;
- typedef QMap<QString, UpdateItem*> TMapItemsByName;
+ typedef TQMap<TQString, UpdateItem*> TMapItemsByName;
TMapItemsByName m_itemsByName;
bool m_opened;
- friend UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*);
+ friend UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*);
};
@@ -126,15 +126,15 @@ public:
bool undefinedState() const
{ return m_undefined; }
- virtual int compare(QListViewItem* i, int col, bool) const;
- virtual QString text(int col) const;
- virtual void paintCell(QPainter *p, const QColorGroup &cg,
+ virtual int compare(TQListViewItem* i, int col, bool) const;
+ virtual TQString text(int col) const;
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,
int col, int width, int align);
virtual int rtti() const { return RTTI; }
void setStatus(Cervisia::EntryStatus status);
- void setRevTag(const QString& rev, const QString& tag);
- void setDate(const QDateTime& date);
+ void setRevTag(const TQString& rev, const TQString& tag);
+ void setDate(const TQDateTime& date);
void setUndefinedState(bool b)
{ m_undefined = b; }
@@ -154,13 +154,13 @@ private:
};
-inline bool isDirItem(const QListViewItem* item)
+inline bool isDirItem(const TQListViewItem* item)
{
return item && item->rtti() == UpdateDirItem::RTTI;
}
-inline bool isFileItem(const QListViewItem* item)
+inline bool isFileItem(const TQListViewItem* item)
{
return item && item->rtti() == UpdateFileItem::RTTI;
}
diff --git a/cervisia/updateview_visitors.cpp b/cervisia/updateview_visitors.cpp
index e18b5b68..0dae046b 100644
--- a/cervisia/updateview_visitors.cpp
+++ b/cervisia/updateview_visitors.cpp
@@ -34,7 +34,7 @@ ApplyFilterVisitor::ApplyFilterVisitor(UpdateView::Filter filter)
void ApplyFilterVisitor::preVisit(UpdateDirItem* item)
{
- // as QListViewItem::setVisible() is recursive we have to make
+ // as TQListViewItem::setVisible() is recursive we have to make
// this UpdateDirItem visible first and later we can make it invisible
item->setVisible(true);
@@ -56,7 +56,7 @@ void ApplyFilterVisitor::postVisit(UpdateDirItem* item)
|| !(m_filter & UpdateView::NoEmptyDirectories)
|| !item->parent());
- // only set invisible as QListViewItem::setVisible() is recursive
+ // only set invisible as TQListViewItem::setVisible() is recursive
// and so maybe overrides the state applied by the filter
if (visible)
{
diff --git a/cervisia/watchdlg.cpp b/cervisia/watchdlg.cpp
index 317f5c95..1ea42da6 100644
--- a/cervisia/watchdlg.cpp
+++ b/cervisia/watchdlg.cpp
@@ -20,65 +20,65 @@
#include "watchdlg.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <klocale.h>
-WatchDialog::WatchDialog(ActionType action, QWidget *parent, const char *name)
- : KDialogBase(parent, name, true, QString::null,
+WatchDialog::WatchDialog(ActionType action, TQWidget *parent, const char *name)
+ : KDialogBase(parent, name, true, TQString::null,
Ok | Cancel | Help, Ok, true)
{
setCaption( (action==Add)? i18n("CVS Watch Add") : i18n("CVS Watch Remove") );
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- QLabel *textlabel = new QLabel
+ TQLabel *textlabel = new QLabel
( (action==Add)? i18n("Add watches for the following events:")
: i18n("Remove watches for the following events:"), mainWidget );
layout->addWidget(textlabel, 0);
- all_button = new QRadioButton(i18n("&All"), mainWidget);
+ all_button = new TQRadioButton(i18n("&All"), mainWidget);
all_button->setFocus();
all_button->setChecked(true);
layout->addWidget(all_button);
- only_button = new QRadioButton(i18n("&Only:"), mainWidget);
+ only_button = new TQRadioButton(i18n("&Only:"), mainWidget);
layout->addWidget(only_button);
- QGridLayout *eventslayout = new QGridLayout(layout);
+ TQGridLayout *eventslayout = new TQGridLayout(layout);
eventslayout->addColSpacing(0, 20);
eventslayout->setColStretch(0, 0);
eventslayout->setColStretch(1, 1);
- commitbox = new QCheckBox(i18n("&Commits"), mainWidget);
+ commitbox = new TQCheckBox(i18n("&Commits"), mainWidget);
commitbox->setEnabled(false);
eventslayout->addWidget(commitbox, 0, 1);
- editbox = new QCheckBox(i18n("&Edits"), mainWidget);
+ editbox = new TQCheckBox(i18n("&Edits"), mainWidget);
editbox->setEnabled(false);
eventslayout->addWidget(editbox, 1, 1);
- uneditbox = new QCheckBox(i18n("&Unedits"), mainWidget);
+ uneditbox = new TQCheckBox(i18n("&Unedits"), mainWidget);
uneditbox->setEnabled(false);
eventslayout->addWidget(uneditbox, 2, 1);
- QButtonGroup* group = new QButtonGroup(mainWidget);
+ TQButtonGroup* group = new TQButtonGroup(mainWidget);
group->hide();
group->insert(all_button);
group->insert(only_button);
- connect( only_button, SIGNAL(toggled(bool)),
- commitbox, SLOT(setEnabled(bool)) );
- connect( only_button, SIGNAL(toggled(bool)),
- editbox, SLOT(setEnabled(bool)) );
- connect( only_button, SIGNAL(toggled(bool)),
- uneditbox, SLOT(setEnabled(bool)) );
+ connect( only_button, TQT_SIGNAL(toggled(bool)),
+ commitbox, TQT_SLOT(setEnabled(bool)) );
+ connect( only_button, TQT_SIGNAL(toggled(bool)),
+ editbox, TQT_SLOT(setEnabled(bool)) );
+ connect( only_button, TQT_SIGNAL(toggled(bool)),
+ uneditbox, TQT_SLOT(setEnabled(bool)) );
setHelp("watches");
}
diff --git a/cervisia/watchdlg.h b/cervisia/watchdlg.h
index 59510dc2..fc58be05 100644
--- a/cervisia/watchdlg.h
+++ b/cervisia/watchdlg.h
@@ -35,13 +35,13 @@ public:
enum ActionType { Add, Remove };
enum Events { None=0, All=1, Commits=2, Edits=4, Unedits=8 };
- explicit WatchDialog( ActionType action, QWidget *parent=0, const char *name=0 );
+ explicit WatchDialog( ActionType action, TQWidget *parent=0, const char *name=0 );
Events events() const;
private:
- QRadioButton *all_button, *only_button;
- QCheckBox *commitbox, *editbox, *uneditbox;
+ TQRadioButton *all_button, *only_button;
+ TQCheckBox *commitbox, *editbox, *uneditbox;
};
#endif
diff --git a/cervisia/watchersdlg.cpp b/cervisia/watchersdlg.cpp
index d7d849bd..157f154b 100644
--- a/cervisia/watchersdlg.cpp
+++ b/cervisia/watchersdlg.cpp
@@ -19,8 +19,8 @@
#include "watchersdlg.h"
-#include <qlayout.h>
-#include <qtable.h>
+#include <tqlayout.h>
+#include <tqtable.h>
#include <kconfig.h>
#include <klineedit.h>
#include <klocale.h>
@@ -30,18 +30,18 @@
#include "progressdlg.h"
-WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name)
- : KDialogBase(parent, name, false, QString::null,
+WatchersDialog::WatchersDialog(KConfig& cfg, TQWidget* parent, const char* name)
+ : KDialogBase(parent, name, false, TQString::null,
Close, ButtonCode(0), true)
, partConfig(cfg)
{
- QFrame* mainWidget = makeMainWidget();
+ TQFrame* mainWidget = makeMainWidget();
- QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint());
+ TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint());
- table = new QTable(mainWidget, "watchersTable");
+ table = new TQTable(mainWidget, "watchersTable");
table->setNumCols(5);
- table->setSelectionMode(QTable::NoSelection);
+ table->setSelectionMode(TQTable::NoSelection);
table->setColumnMovingEnabled(false);
table->setRowMovingEnabled(false);
table->setReadOnly(true);
@@ -50,7 +50,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name)
table->verticalHeader()->hide();
table->setLeftMargin(0);
- QHeader* header = table->horizontalHeader();
+ TQHeader* header = table->horizontalHeader();
header->setLabel(0, i18n("File"));
header->setLabel(1, i18n("Watcher"));
header->setLabel(2, i18n("Edit"));
@@ -61,7 +61,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name)
setWFlags(Qt::WDestructiveClose | getWFlags());
- QSize size = configDialogSize(partConfig, "WatchersDialog");
+ TQSize size = configDialogSize(partConfig, "WatchersDialog");
resize(size);
}
@@ -73,7 +73,7 @@ WatchersDialog::~WatchersDialog()
bool WatchersDialog::parseWatchers(CvsService_stub* cvsService,
- const QStringList& files)
+ const TQStringList& files)
{
setCaption(i18n("CVS Watchers"));
@@ -85,12 +85,12 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService,
if( !dlg.execute() )
return false;
- QString line;
+ TQString line;
int numRows = 0;
while( dlg.getLine(line) )
{
// parse the output line
- QStringList list = splitLine(line);
+ TQStringList list = splitLine(line);
// ignore empty lines and unknown files
if( list.isEmpty() || list[0] == "?" )
@@ -102,15 +102,15 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService,
table->setText(numRows, 0, list[0]);
table->setText(numRows, 1, list[1]);
- QCheckTableItem* item = new QCheckTableItem(table, "");
+ TQCheckTableItem* item = new TQCheckTableItem(table, "");
item->setChecked(list.contains("edit"));
table->setItem(numRows, 2, item);
- item = new QCheckTableItem(table, "");
+ item = new TQCheckTableItem(table, "");
item->setChecked(list.contains("unedit"));
table->setItem(numRows, 3, item);
- item = new QCheckTableItem(table, "");
+ item = new TQCheckTableItem(table, "");
item->setChecked(list.contains("commit"));
table->setItem(numRows, 4, item);
diff --git a/cervisia/watchersdlg.h b/cervisia/watchersdlg.h
index 59b2d52c..c98b0dc4 100644
--- a/cervisia/watchersdlg.h
+++ b/cervisia/watchersdlg.h
@@ -31,14 +31,14 @@ class CvsService_stub;
class WatchersDialog : public KDialogBase
{
public:
- explicit WatchersDialog(KConfig& cfg, QWidget* parent = 0,
+ explicit WatchersDialog(KConfig& cfg, TQWidget* parent = 0,
const char* name = 0);
virtual ~WatchersDialog();
- bool parseWatchers(CvsService_stub* cvsService, const QStringList& files);
+ bool parseWatchers(CvsService_stub* cvsService, const TQStringList& files);
private:
- QTable* table;
+ TQTable* table;
KConfig& partConfig;
};
diff --git a/kapptemplate/kapp/app.cpp b/kapptemplate/kapp/app.cpp
index 58ed3415..04f88108 100644
--- a/kapptemplate/kapp/app.cpp
+++ b/kapptemplate/kapp/app.cpp
@@ -10,8 +10,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}.cpp
#include "${APP_NAME_LC}pref.h"
#include <kprinter.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kdeversion.h>
#include <kglobal.h>
@@ -51,10 +51,10 @@ ${APP_NAME}::${APP_NAME}()
setupGUI();
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(m_view, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
}
@@ -65,7 +65,7 @@ ${APP_NAME}::~${APP_NAME}()
void ${APP_NAME}::load(const KURL& url)
{
- QString target;
+ TQString target;
// the below code is what you should normally do. in this
// example case, we want the url to our own. you probably
// want to use this code instead for your app
@@ -91,19 +91,19 @@ void ${APP_NAME}::load(const KURL& url)
void ${APP_NAME}::setupActions()
{
- KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- 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(kapp, SLOT(quit()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(fileNew()), 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(kapp, TQT_SLOT(quit()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
// this doesn't do anything useful. it's just here to illustrate
// how to insert a custom menu and menu item
KAction *custom = new KAction(i18n("Cus&tom Menuitem"), 0,
- this, SLOT(optionsPreferences()),
+ this, TQT_SLOT(optionsPreferences()),
actionCollection(), "custom_action");
}
@@ -129,19 +129,19 @@ void ${APP_NAME}::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");
if (!url.isEmpty())
m_view->openURL(KURL::fromPathOrURL(url));
}
-void ${APP_NAME}::dragEnterEvent(QDragEnterEvent *event)
+void ${APP_NAME}::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void ${APP_NAME}::dropEvent(QDropEvent *event)
+void ${APP_NAME}::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*
@@ -174,7 +174,7 @@ void ${APP_NAME}::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
- KURL url = KURLRequesterDlg::getURL(QString::null, this, i18n("Open Location") );
+ KURL url = KURLRequesterDlg::getURL(TQString::null, this, i18n("Open Location") );
if (!url.isEmpty())
m_view->openURL(url);
}
@@ -207,13 +207,13 @@ void ${APP_NAME}::filePrint()
if (m_printer->setup(this))
{
// 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(m_printer);
// we let our view do the actual printing
- QPaintDeviceMetrics metrics(m_printer);
+ TQPaintDeviceMetrics metrics(m_printer);
m_view->print(&p, metrics.height(), metrics.width());
// and send the result to the printer
@@ -226,7 +226,7 @@ void ${APP_NAME}::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();
}
@@ -248,13 +248,13 @@ void ${APP_NAME}::optionsPreferences()
}
}
-void ${APP_NAME}::changeStatusbar(const QString& text)
+void ${APP_NAME}::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void ${APP_NAME}::changeCaption(const QString& text)
+void ${APP_NAME}::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
diff --git a/kapptemplate/kapp/app.h b/kapptemplate/kapp/app.h
index 7f7b0d39..2b1d1d55 100644
--- a/kapptemplate/kapp/app.h
+++ b/kapptemplate/kapp/app.h
@@ -46,8 +46,8 @@ protected:
/**
* 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);
protected:
/**
@@ -74,8 +74,8 @@ private slots:
void optionsPreferences();
void newToolbarConfig();
- void changeStatusbar(const QString& text);
- void changeCaption(const QString& text);
+ void changeStatusbar(const TQString& text);
+ void changeCaption(const TQString& text);
private:
void setupAccel();
diff --git a/kapptemplate/kapp/app_client.cpp b/kapptemplate/kapp/app_client.cpp
index cd5e065d..53de48f5 100644
--- a/kapptemplate/kapp/app_client.cpp
+++ b/kapptemplate/kapp/app_client.cpp
@@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp...";
cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_client.cpp
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
int main(int argc, char **argv)
{
@@ -14,13 +14,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("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(QString)", data);
+ ds << TQString("http://www.kde.org");
+ client->send("${APP_NAME_LC}", "${APP_NAME}Iface", "openURL(TQString)", data);
return app.exec();
}
diff --git a/kapptemplate/kapp/appiface.h b/kapptemplate/kapp/appiface.h
index 2601df94..9b1ab6ec 100644
--- a/kapptemplate/kapp/appiface.h
+++ b/kapptemplate/kapp/appiface.h
@@ -11,7 +11,7 @@ class ${APP_NAME}Iface : virtual public DCOPObject
public:
k_dcop:
- virtual void openURL(QString url) = 0;
+ virtual void openURL(TQString url) = 0;
};
#endif // ${APP_NAME_UC}IFACE_H
diff --git a/kapptemplate/kapp/apppref.cpp b/kapptemplate/kapp/apppref.cpp
index b025924a..6a479b83 100644
--- a/kapptemplate/kapp/apppref.cpp
+++ b/kapptemplate/kapp/apppref.cpp
@@ -4,8 +4,8 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.cpp
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
${APP_NAME}Preferences::${APP_NAME}Preferences()
: KDialogBase(TreeList, "${APP_NAME} Preferences",
@@ -14,7 +14,7 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences()
// 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 ${APP_NAME}PrefPageOne(frame);
@@ -22,21 +22,21 @@ ${APP_NAME}Preferences::${APP_NAME}Preferences()
m_pageTwo = new ${APP_NAME}PrefPageTwo(frame);
}
-${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(QWidget *parent)
- : QFrame(parent)
+${APP_NAME}PrefPageOne::${APP_NAME}PrefPageOne(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel("Add something here", this);
+ new TQLabel("Add something here", this);
}
-${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(QWidget *parent)
- : QFrame(parent)
+${APP_NAME}PrefPageTwo::${APP_NAME}PrefPageTwo(TQWidget *parent)
+ : TQFrame(parent)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
layout->setAutoAdd(true);
- new QLabel("Add something here", this);
+ new TQLabel("Add something here", this);
}
#include "${APP_NAME_LC}pref.moc"
diff --git a/kapptemplate/kapp/apppref.h b/kapptemplate/kapp/apppref.h
index 97371936..234223f6 100644
--- a/kapptemplate/kapp/apppref.h
+++ b/kapptemplate/kapp/apppref.h
@@ -4,7 +4,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}pref.h
#define ${APP_NAME_UC}PREF_H
#include <kdialogbase.h>
-#include <qframe.h>
+#include <tqframe.h>
class ${APP_NAME}PrefPageOne;
class ${APP_NAME}PrefPageTwo;
@@ -24,14 +24,14 @@ class ${APP_NAME}PrefPageOne : public QFrame
{
Q_OBJECT
public:
- ${APP_NAME}PrefPageOne(QWidget *parent = 0);
+ ${APP_NAME}PrefPageOne(TQWidget *parent = 0);
};
class ${APP_NAME}PrefPageTwo : public QFrame
{
Q_OBJECT
public:
- ${APP_NAME}PrefPageTwo(QWidget *parent = 0);
+ ${APP_NAME}PrefPageTwo(TQWidget *parent = 0);
};
#endif // ${APP_NAME_UC}PREF_H
diff --git a/kapptemplate/kapp/appview.cpp b/kapptemplate/kapp/appview.cpp
index 575e8a5d..3527596b 100644
--- a/kapptemplate/kapp/appview.cpp
+++ b/kapptemplate/kapp/appview.cpp
@@ -2,8 +2,8 @@ echo "Creating $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp...";
cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp
#include "${APP_NAME_LC}view.h"
-#include <qpainter.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
#include <kurl.h>
@@ -12,12 +12,12 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}view.cpp
#include <kmessagebox.h>
#include <krun.h>
-${APP_NAME}View::${APP_NAME}View(QWidget *parent)
- : QWidget(parent),
+${APP_NAME}View::${APP_NAME}View(TQWidget *parent)
+ : TQWidget(parent),
DCOPObject("${APP_NAME}Iface")
{
// setup our layout manager to automatically add our widgets
- QHBoxLayout *top_layout = new QHBoxLayout(this);
+ TQHBoxLayout *top_layout = new TQHBoxLayout(this);
top_layout->setAutoAdd(true);
// we want to look for all components that satisfy our needs. the
@@ -62,10 +62,10 @@ ${APP_NAME}View::${APP_NAME}View(QWidget *parent)
return;
}
- connect(m_html, SIGNAL(setWindowCaption(const QString&)),
- this, SLOT(slotSetTitle(const QString&)));
- connect(m_html, SIGNAL(setStatusBarText(const QString&)),
- this, SLOT(slotOnURL(const QString&)));
+ connect(m_html, TQT_SIGNAL(setWindowCaption(const TQString&)),
+ this, TQT_SLOT(slotSetTitle(const TQString&)));
+ connect(m_html, TQT_SIGNAL(setStatusBarText(const TQString&)),
+ this, TQT_SLOT(slotOnURL(const TQString&)));
}
@@ -73,18 +73,18 @@ ${APP_NAME}View::~${APP_NAME}View()
{
}
-void ${APP_NAME}View::print(QPainter *p, int height, int width)
+void ${APP_NAME}View::print(TQPainter *p, int height, int width)
{
// do the actual printing, here
// p->drawText(etc..)
}
-QString ${APP_NAME}View::currentURL()
+TQString ${APP_NAME}View::currentURL()
{
return m_html->url().url();
}
-void ${APP_NAME}View::openURL(QString url)
+void ${APP_NAME}View::openURL(TQString url)
{
openURL(KURL(url));
}
@@ -94,12 +94,12 @@ void ${APP_NAME}View::openURL(const KURL& url)
m_html->openURL(url);
}
-void ${APP_NAME}View::slotOnURL(const QString& url)
+void ${APP_NAME}View::slotOnURL(const TQString& url)
{
emit signalChangeStatusbar(url);
}
-void ${APP_NAME}View::slotSetTitle(const QString& title)
+void ${APP_NAME}View::slotSetTitle(const TQString& title)
{
emit signalChangeCaption(title);
}
diff --git a/kapptemplate/kapp/appview.h b/kapptemplate/kapp/appview.h
index 881b979c..76e61701 100644
--- a/kapptemplate/kapp/appview.h
+++ b/kapptemplate/kapp/appview.h
@@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}view.h
#ifndef ${APP_NAME_UC}VIEW_H
#define ${APP_NAME_UC}VIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/part.h>
#include <${APP_NAME_LC}iface.h>
@@ -21,14 +21,14 @@ class KURL;
* @author $AUTHOR <$EMAIL>
* @version $APP_VERSION
*/
-class ${APP_NAME}View : public QWidget, public ${APP_NAME}Iface
+class ${APP_NAME}View : public TQWidget, public ${APP_NAME}Iface
{
Q_OBJECT
public:
/**
* Default constructor
*/
- ${APP_NAME}View(QWidget *parent);
+ ${APP_NAME}View(TQWidget *parent);
/**
* Destructor
@@ -38,12 +38,12 @@ public:
/**
* Random 'get' function
*/
- QString currentURL();
+ TQString currentURL();
/**
* Random 'set' function accessed by DCOP
*/
- virtual void openURL(QString url);
+ virtual void openURL(TQString url);
/**
* Random 'set' function
@@ -53,22 +53,22 @@ public:
/**
* Print this view to any medium -- paper or not
*/
- void print(QPainter *, int height, int width);
+ void print(TQPainter *, int height, int width);
signals:
/**
* 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);
private slots:
- void slotOnURL(const QString& url);
- void slotSetTitle(const QString& title);
+ void slotOnURL(const TQString& url);
+ void slotSetTitle(const TQString& title);
private:
KParts::ReadOnlyPart *m_html;
diff --git a/kapptemplate/kpartapp/app.cpp b/kapptemplate/kpartapp/app.cpp
index 8b04053e..626aa8bd 100644
--- a/kapptemplate/kpartapp/app.cpp
+++ b/kapptemplate/kpartapp/app.cpp
@@ -79,16 +79,16 @@ void ${APP_NAME}::load(const KURL& url)
void ${APP_NAME}::setupActions()
{
- KStdAction::openNew(this, SLOT(fileNew()), actionCollection());
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- 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 ${APP_NAME}::saveProperties(KConfig* /*config*/)
@@ -136,8 +136,8 @@ void ${APP_NAME}::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();
}
@@ -152,7 +152,7 @@ void ${APP_NAME}::fileOpen()
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
KURL url =
- KFileDialog::getOpenURL( QString::null, QString::null, this );
+ KFileDialog::getOpenURL( TQString::null, TQString::null, this );
if (url.isEmpty() == false)
{
diff --git a/kapptemplate/kpartapp/app_part.cpp b/kapptemplate/kpartapp/app_part.cpp
index c2821950..d8880577 100644
--- a/kapptemplate/kpartapp/app_part.cpp
+++ b/kapptemplate/kpartapp/app_part.cpp
@@ -10,30 +10,30 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.cpp
#include <kfiledialog.h>
#include <kparts/genericfactory.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
typedef KParts::GenericFactory<${APP_NAME}Part> ${APP_NAME}PartFactory;
K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}part, ${APP_NAME}PartFactory )
-${APP_NAME}Part::${APP_NAME}Part( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+${APP_NAME}Part::${APP_NAME}Part( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: KParts::ReadWritePart(parent, name)
{
// we need an instance
setInstance( ${APP_NAME}PartFactory::instance() );
// this should be your custom internal widget
- m_widget = new QMultiLineEdit( parentWidget, widgetName );
+ m_widget = new TQMultiLineEdit( parentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
// create our actions
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
// set our XML-UI resource file
setXMLFile("${APP_NAME_LC}_part.rc");
@@ -54,12 +54,12 @@ void ${APP_NAME}Part::setReadWrite(bool rw)
// notify your internal widget of the read-write state
m_widget->setReadOnly(!rw);
if (rw)
- connect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ connect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
else
{
- disconnect(m_widget, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ disconnect(m_widget, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
}
ReadWritePart::setReadWrite(rw);
@@ -95,15 +95,15 @@ KAboutData *${APP_NAME}Part::createAboutData()
bool ${APP_NAME}Part::openFile()
{
- // m_file is always local so we can use QFile on it
- QFile file(m_file);
+ // m_file is always local so we can use TQFile on it
+ TQFile file(m_file);
if (file.open(IO_ReadOnly) == false)
return false;
- // our example widget is text-based, so we use QTextStream instead
+ // our example widget is text-based, so we use TQTextStream instead
// of a raw QDataStream
- QTextStream stream(&file);
- QString str;
+ TQTextStream stream(&file);
+ TQString str;
while (!stream.eof())
str += stream.readLine() + "\n";
@@ -125,12 +125,12 @@ bool ${APP_NAME}Part::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);
stream << m_widget->text();
file.close();
@@ -141,7 +141,7 @@ bool ${APP_NAME}Part::saveFile()
void ${APP_NAME}Part::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);
}
diff --git a/kapptemplate/kpartapp/app_part.h b/kapptemplate/kpartapp/app_part.h
index 18841510..e60b147b 100644
--- a/kapptemplate/kpartapp/app_part.h
+++ b/kapptemplate/kpartapp/app_part.h
@@ -26,8 +26,8 @@ public:
/**
* Default constructor
*/
- ${APP_NAME}Part(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ ${APP_NAME}Part(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor
@@ -63,7 +63,7 @@ protected slots:
void fileSaveAs();
private:
- QMultiLineEdit *m_widget;
+ TQMultiLineEdit *m_widget;
};
#endif // ${APP_NAME_UC}PART_H
diff --git a/kapptemplate/kpartplugin/plugin_app.cpp b/kapptemplate/kpartplugin/plugin_app.cpp
index 71c68bc7..0ec7a273 100644
--- a/kapptemplate/kpartplugin/plugin_app.cpp
+++ b/kapptemplate/kpartplugin/plugin_app.cpp
@@ -13,14 +13,14 @@ typedef KGenericFactory<Plugin${APP_NAME}> ${APP_NAME}Factory;
K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}plugin,
${APP_NAME}Factory( "${APP_NAME_LC}" ) );
-Plugin${APP_NAME}::Plugin${APP_NAME}( QObject* parent, const char* name,
- const QStringList & /*args*/ )
+Plugin${APP_NAME}::Plugin${APP_NAME}( TQObject* parent, const char* name,
+ const TQStringList & /*args*/ )
: Plugin( parent, name )
{
// Instantiate all of your actions here. These will appear in
// Konqueror's menu and toolbars.
(void) new KAction( i18n("&Plugin Action"), "${APP_NAME_LC}", 0,
- this, SLOT(slotAction()),
+ this, TQT_SLOT(slotAction()),
actionCollection(), "plugin_action" );
}
@@ -35,8 +35,8 @@ void Plugin${APP_NAME}::slotAction()
// change the following block.
if ( !parent()->inherits("KHTMLPart") )
{
- QString title( i18n( "Cannot Translate Source" ) );
- QString text( i18n( "You cannot translate anything except web pages "
+ TQString title( i18n( "Cannot Translate Source" ) );
+ TQString text( i18n( "You cannot translate anything except web pages "
"with this plugin." ) );
KMessageBox::sorry( 0, text, title );
@@ -55,8 +55,8 @@ void Plugin${APP_NAME}::slotAction()
// valid URL
if ( !url.isValid() )
{
- QString title( i18n( "Malformed URL" ) );
- QString text( i18n( "The URL you entered is not valid, please "
+ TQString title( i18n( "Malformed URL" ) );
+ TQString text( i18n( "The URL you entered is not valid, please "
"correct it and try again." ) );
KMessageBox::sorry( 0, text, title );
@@ -69,7 +69,7 @@ void Plugin${APP_NAME}::slotAction()
// BEGIN
KURL work( "http://babel.altavista.com/translate.dyn" );
- QString query( "urltext=" );
+ TQString query( "urltext=" );
query += KURL::encode_string( url.url() );
work.setQuery( query );
// END
diff --git a/kapptemplate/kpartplugin/plugin_app.h b/kapptemplate/kpartplugin/plugin_app.h
index 3e651499..8bb225b8 100644
--- a/kapptemplate/kpartplugin/plugin_app.h
+++ b/kapptemplate/kpartplugin/plugin_app.h
@@ -9,8 +9,8 @@ class Plugin${APP_NAME} : public KParts::Plugin
{
Q_OBJECT
public:
- Plugin${APP_NAME}( QObject* parent = 0, const char* name = 0,
- const QStringList &args = QStringList() );
+ Plugin${APP_NAME}( TQObject* parent = 0, const char* name = 0,
+ const TQStringList &args = TQStringList() );
virtual ~Plugin${APP_NAME}();
public slots:
diff --git a/kbabel/addons/kfile-plugins/kfile_po.cpp b/kbabel/addons/kfile-plugins/kfile_po.cpp
index 190d81fc..457e4bd9 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.cpp
+++ b/kbabel/addons/kfile-plugins/kfile_po.cpp
@@ -30,7 +30,7 @@
#include "kfile_po.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "poinfo.h"
#include <kgenericfactory.h>
@@ -40,8 +40,8 @@ using namespace KBabel;
typedef KGenericFactory<KPoPlugin> POFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_po, POFactory("kfile_po"))
-KPoPlugin::KPoPlugin(QObject *parent, const char *name,
- const QStringList& args)
+KPoPlugin::KPoPlugin(TQObject *parent, const char *name,
+ const TQStringList& args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo("application/x-gettext");
@@ -50,18 +50,18 @@ KPoPlugin::KPoPlugin(QObject *parent, const char *name,
addGroupInfo(info, "CatalogInfo", i18n("Catalog Information"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Total", i18n("Total Messages"), QVariant::Int);
- item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), QVariant::Int);
- item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), QVariant::Int);
- item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), QVariant::String);
- item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), QVariant::String);
- item = addItemInfo(group, "Revision", i18n("Revision"), QVariant::String);
+ item = addItemInfo(group, "Total", i18n("Total Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Fuzzy", i18n("Fuzzy Messages"), TQVariant::Int);
+ item = addItemInfo(group, "Untranslated", i18n("Untranslated Messages"), TQVariant::Int);
+ item = addItemInfo(group, "LastTranslator", i18n("Last Translator"), TQVariant::String);
+ item = addItemInfo(group, "LanguageTeam", i18n("Language Team"), TQVariant::String);
+ item = addItemInfo(group, "Revision", i18n("Revision"), TQVariant::String);
}
bool KPoPlugin::readInfo(KFileMetaInfo& metaInfo, uint)
{
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
ConversionStatus status = PoInfo::info(metaInfo.path(), poInfo, wordList, false, false, false);
if (status == OK) {
KFileMetaInfoGroup group = appendGroup(metaInfo, "CatalogInfo");
diff --git a/kbabel/addons/kfile-plugins/kfile_po.h b/kbabel/addons/kfile-plugins/kfile_po.h
index 8e69a0ce..9b707a8f 100644
--- a/kbabel/addons/kfile-plugins/kfile_po.h
+++ b/kbabel/addons/kfile-plugins/kfile_po.h
@@ -42,7 +42,7 @@ class KPoPlugin : public KFilePlugin
Q_OBJECT
public:
- KPoPlugin(QObject *parent, const char *name, const QStringList& args);
+ KPoPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint);
};
diff --git a/kbabel/addons/preview/pothumbcreator.cpp b/kbabel/addons/preview/pothumbcreator.cpp
index f067948a..0883025c 100644
--- a/kbabel/addons/preview/pothumbcreator.cpp
+++ b/kbabel/addons/preview/pothumbcreator.cpp
@@ -33,9 +33,9 @@
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -67,35 +67,35 @@ PoThumbCreator::~PoThumbCreator()
delete m_splitter;
}
-bool PoThumbCreator::create(const QString &path, int width, int height, QImage &img)
+bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if ( !m_splitter )
{
m_splitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( !pixmap.isEmpty() )
{
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
bool ok = false;
PoInfo poInfo;
- QStringList wordList;
+ TQStringList wordList;
// We do not call msgfmt, as a thumbnail must be created fast.
if( PoInfo::info( path, poInfo, wordList, false, true, false ) == OK )
{
ok = true;
- QPixmap pix;
+ TQPixmap pix;
if (height * 3 > width * 4)
pix.resize(width, width * 4 / 3);
else
pix.resize(height * 3 / 4, height);
- pix.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ pix.fill( TQColor( 245, 245, 245 ) ); // light-grey background
@@ -114,7 +114,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
xBorder = (pix.width()-d)/2;
yBorder = (pix.height()*2/3-d)/2;
- QPainter p(&pix);
+ TQPainter p(&pix);
if(fuzzyAngle>0)
{
@@ -163,9 +163,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
- QRect rect;
+ TQRect rect;
- QSize chSize = m_splitter->itemSize(); // the size of one char
+ TQSize chSize = m_splitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -186,7 +186,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// end centering
- QString text;
+ TQString text;
if(numCharsPerLine < 30)
{
@@ -250,9 +250,9 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
text = locale->formatNumber(p,0)+'%';
*/
// find the maximum string length to center the text
- QStringList lineList=QStringList::split('\n',text);
+ TQStringList lineList=TQStringList::split('\n',text);
uint max=0;
- for( QStringList::Iterator it = lineList.begin(); it != lineList.end()
+ for( TQStringList::Iterator it = lineList.begin(); it != lineList.end()
; ++it )
{
if((*it).length() > max)
@@ -269,7 +269,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
int posLastLine = pix.height() - (chSize.height() + yBorder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(m_splitter->pixmap());
+ const TQPixmap *fontPixmap = &(m_splitter->pixmap());
for ( uint i = 0; i < text.length(); i++ )
@@ -295,7 +295,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -311,7 +311,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &pix, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &pix, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
@@ -321,7 +321,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
// in this seldom cases they are usually hidden ;-)
if(pix.width() > 40 && KApplication::random()%2000 == 0)
{
- QPixmap kbabelPix;
+ TQPixmap kbabelPix;
if(pix.width() < 80)
{
kbabelPix = KGlobal::iconLoader()->loadIcon("kbabel"
@@ -342,7 +342,7 @@ bool PoThumbCreator::create(const QString &path, int width, int height, QImage &
x = QMAX(x,0);
if(!kbabelPix.isNull())
{
- bitBlt(&pix, QPoint(x,4), &kbabelPix, kbabelPix.rect()
+ bitBlt(&pix, TQPoint(x,4), &kbabelPix, kbabelPix.rect()
, Qt::CopyROP);
}
}
diff --git a/kbabel/addons/preview/pothumbcreator.h b/kbabel/addons/preview/pothumbcreator.h
index 401e9431..25a1f7ab 100644
--- a/kbabel/addons/preview/pothumbcreator.h
+++ b/kbabel/addons/preview/pothumbcreator.h
@@ -44,7 +44,7 @@ class PoThumbCreator : public ThumbCreator
public:
PoThumbCreator();
virtual ~PoThumbCreator();
- 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:
diff --git a/kbabel/catalogmanager/catalogmanager.cpp b/kbabel/catalogmanager/catalogmanager.cpp
index 6cbe964d..1292c0cf 100644
--- a/kbabel/catalogmanager/catalogmanager.cpp
+++ b/kbabel/catalogmanager/catalogmanager.cpp
@@ -45,8 +45,8 @@
#include "msgfmt.h"
#include "toolaction.h"
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <dcopclient.h>
#include <kapplication.h>
@@ -72,24 +72,24 @@
#include <ktoolbar.h>
#include <kwin.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
using namespace KBabel;
WId CatalogManagerApp::_preferredWindow = 0;
-QStringList CatalogManager::_foundFilesList;
-QStringList CatalogManager::_toBeSearched;
+TQStringList CatalogManager::_foundFilesList;
+TQStringList CatalogManager::_toBeSearched;
-CatalogManager::CatalogManager(QString configFile )
+CatalogManager::CatalogManager(TQString configFile )
:KMainWindow(0,0)
{
if ( configFile.isEmpty() )
@@ -114,8 +114,8 @@ void CatalogManager::init()
_totalFound = 0;
_foundFilesList.clear();
_toBeSearched.clear();
- _timerFind = new QTimer( this );
- connect(_timerFind, SIGNAL( timeout() ), this, SLOT(findNextFile()) );
+ _timerFind = new TQTimer( this );
+ connect(_timerFind, TQT_SIGNAL( timeout() ), this, TQT_SLOT(findNextFile()) );
_searchStopped = false;
_prefDialog=0;
@@ -132,11 +132,11 @@ void CatalogManager::init()
_project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName());
}
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
- QWidget *view = new QWidget(this);
- QVBoxLayout* layout= new QVBoxLayout(view);
+ TQWidget *view = new TQWidget(this);
+ TQVBoxLayout* layout= new TQVBoxLayout(view);
layout->setMargin(0);
layout->setSpacing(KDialog::spacingHint());
@@ -144,26 +144,26 @@ void CatalogManager::init()
layout->addWidget(_catalogManager);
layout->setStretchFactor(_catalogManager,1);
- connect(this,SIGNAL(settingsChanged(KBabel::CatManSettings))
- ,_catalogManager,SLOT(setSettings(KBabel::CatManSettings)));
- connect(_catalogManager,SIGNAL(openFile(QString,QString))
- ,this,SLOT(openFile(QString,QString)));
- connect(_catalogManager,SIGNAL(openFileInNewWindow(QString,QString))
- ,this,SLOT(openFileInNewWindow(QString,QString)));
- connect(_catalogManager,SIGNAL(openTemplate(QString,QString,QString))
- ,this,SLOT(openTemplate(QString,QString,QString)));
- connect(_catalogManager,SIGNAL(openTemplateInNewWindow(QString,QString,QString))
- ,this,SLOT(openTemplateInNewWindow(QString,QString,QString)));
- connect(_catalogManager,SIGNAL(gotoFileEntry(QString,QString,int))
- ,this,SLOT(openFile(QString,QString,int)));
- connect(_catalogManager, SIGNAL(selectedChanged(uint)),
- this, SLOT(selectedChanged(uint)));
+ connect(this,TQT_SIGNAL(settingsChanged(KBabel::CatManSettings))
+ ,_catalogManager,TQT_SLOT(setSettings(KBabel::CatManSettings)));
+ connect(_catalogManager,TQT_SIGNAL(openFile(TQString,TQString))
+ ,this,TQT_SLOT(openFile(TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openFileInNewWindow(TQString,TQString))
+ ,this,TQT_SLOT(openFileInNewWindow(TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openTemplate(TQString,TQString,TQString))
+ ,this,TQT_SLOT(openTemplate(TQString,TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(openTemplateInNewWindow(TQString,TQString,TQString))
+ ,this,TQT_SLOT(openTemplateInNewWindow(TQString,TQString,TQString)));
+ connect(_catalogManager,TQT_SIGNAL(gotoFileEntry(TQString,TQString,int))
+ ,this,TQT_SLOT(openFile(TQString,TQString,int)));
+ connect(_catalogManager, TQT_SIGNAL(selectedChanged(uint)),
+ this, TQT_SLOT(selectedChanged(uint)));
KWin::setIcons(winId(),BarIcon("catalogmanager",32)
,SmallIcon("catalogmanager"));
- QHBoxLayout* hBoxL = new QHBoxLayout(layout);
- _progressLabel = new QLabel(view);
+ TQHBoxLayout* hBoxL = new TQHBoxLayout(layout);
+ _progressLabel = new TQLabel(view);
hBoxL->addWidget(_progressLabel);
_progressBar=new KProgress(view);
hBoxL->addWidget(_progressBar);
@@ -172,20 +172,20 @@ void CatalogManager::init()
_progressLabel->hide();
_progressBar->hide();
- connect(_catalogManager,SIGNAL(prepareProgressBar(QString,int))
- , this, SLOT(prepareProgressBar(QString,int)));
- connect(_catalogManager,SIGNAL(clearProgressBar())
- , this, SLOT(clearProgressBar()));
- connect(_catalogManager,SIGNAL(progress(int))
- , _progressBar, SLOT(setProgress(int)));
-// connect(_catalogManager, SIGNAL(signalBuildTree(bool))
-// , this, SLOT(enableMenuForFiles(bool)));
- connect(_catalogManager, SIGNAL(signalBuildTree(bool))
- , this, SLOT(enableActions(bool)));
- connect(this, SIGNAL(searchStopped())
- , _catalogManager, SLOT(stopSearch()));
- connect(_catalogManager, SIGNAL(prepareFindProgressBar(int))
- , this, SLOT(prepareStatusProgressBar(int)));
+ connect(_catalogManager,TQT_SIGNAL(prepareProgressBar(TQString,int))
+ , this, TQT_SLOT(prepareProgressBar(TQString,int)));
+ connect(_catalogManager,TQT_SIGNAL(clearProgressBar())
+ , this, TQT_SLOT(clearProgressBar()));
+ connect(_catalogManager,TQT_SIGNAL(progress(int))
+ , _progressBar, TQT_SLOT(setProgress(int)));
+// connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool))
+// , this, TQT_SLOT(enableMenuForFiles(bool)));
+ connect(_catalogManager, TQT_SIGNAL(signalBuildTree(bool))
+ , this, TQT_SLOT(enableActions(bool)));
+ connect(this, TQT_SIGNAL(searchStopped())
+ , _catalogManager, TQT_SLOT(stopSearch()));
+ connect(_catalogManager, TQT_SIGNAL(prepareFindProgressBar(int))
+ , this, TQT_SLOT(prepareStatusProgressBar(int)));
setCentralWidget(view);
resize( 600,300);
@@ -194,20 +194,20 @@ void CatalogManager::init()
setupActions();
- QPopupMenu* popup;
- popup = (QPopupMenu*)(factory()->container("rmb_file", this));
+ TQPopupMenu* popup;
+ popup = (TQPopupMenu*)(factory()->container("rmb_file", this));
if(popup)
{
_catalogManager->setRMBMenuFile(popup);
}
- popup = (QPopupMenu*)(factory()->container("rmb_dir", this));
+ popup = (TQPopupMenu*)(factory()->container("rmb_dir", this));
if(popup)
{
_catalogManager->setRMBMenuDir(popup);
}
- connect(_catalogManager, SIGNAL(signalSearchedFile(int))
- , _statusProgressBar, SLOT(advance(int)));
+ connect(_catalogManager, TQT_SIGNAL(signalSearchedFile(int))
+ , _statusProgressBar, TQT_SLOT(advance(int)));
restoreView();
}
@@ -220,60 +220,60 @@ void CatalogManager::setupActions()
// the file menu
action = new KAction( i18n("&Open"), CTRL+Key_O, _catalogManager,
- SLOT(slotOpenFile()),actionCollection(), "open");
+ TQT_SLOT(slotOpenFile()),actionCollection(), "open");
action->setEnabled(false);
action = new KAction(i18n("&Open Template"),Key_Space,_catalogManager,
- SLOT(slotOpenTemplate()),actionCollection(), "open_template");
+ TQT_SLOT(slotOpenTemplate()),actionCollection(), "open_template");
action->setEnabled(false);
action = new KAction(i18n("Open in &New Window"),CTRL+SHIFT+Key_O,_catalogManager,
- SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window");
+ TQT_SLOT(slotOpenFileInNewWindow()),actionCollection(), "open_new_window");
action->setEnabled(false);
- action = KStdAction::quit(kapp, SLOT (closeAllWindows()), actionCollection());
+ action = KStdAction::quit(kapp, TQT_SLOT (closeAllWindows()), actionCollection());
actionMap["open_template"] = NEEDS_POT;
// the edit menu
action = new KAction( i18n("Fi&nd in Files..."), CTRL+Key_F, this,
- SLOT(find()), actionCollection(), "find_in_files");
+ TQT_SLOT(find()), actionCollection(), "find_in_files");
action->setEnabled(false);
action = new KAction( i18n("Re&place in Files..."), CTRL+Key_R, this,
- SLOT(replace()), actionCollection(), "replace_in_files");
+ TQT_SLOT(replace()), actionCollection(), "replace_in_files");
action->setEnabled(false);
action = new KAction( i18n("&Stop Searching"), "stop", Key_Escape, this,
- SLOT(stopSearching()), actionCollection(), "stop_search");
+ TQT_SLOT(stopSearching()), actionCollection(), "stop_search");
action->setEnabled(false);
action = new KAction( i18n("&Reload"), "reload", KStdAccel::reload(), _catalogManager,
- SLOT(updateCurrent()), actionCollection(), "reload");
+ TQT_SLOT(updateCurrent()), actionCollection(), "reload");
action->setEnabled(false);
// the marking menu
action = new KAction( i18n("&Toggle Marking"), CTRL+Key_M, _catalogManager,
- SLOT(toggleMark()), actionCollection(), "toggle_marking");
+ TQT_SLOT(toggleMark()), actionCollection(), "toggle_marking");
action->setEnabled(false);
action = new KAction( i18n("Remove Marking"), 0, _catalogManager,
- SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking");
+ TQT_SLOT(slotClearMarksInDir()), actionCollection(), "remove_marking");
action->setEnabled(false);
action = new KAction( i18n("Toggle All Markings"), 0, _catalogManager,
- SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking");
+ TQT_SLOT(toggleAllMarks()), actionCollection(), "toggle_all_marking");
action->setEnabled(false);
action = new KAction( i18n("Remove All Markings"), 0, _catalogManager,
- SLOT(clearAllMarks()), actionCollection(), "remove_all_marking");
+ TQT_SLOT(clearAllMarks()), actionCollection(), "remove_all_marking");
action->setEnabled(false);
action = new KAction( i18n("Mark Modified Files"), 0, _catalogManager,
- SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files");
+ TQT_SLOT(markModifiedFiles()), actionCollection(), "mark_modified_files");
// fixme to enabling this when loading is done using updateFinished() signal
action->setEnabled(true);
action = new KAction( i18n("&Load Markings..."), 0, _catalogManager,
- SLOT(loadMarks()), actionCollection(), "load_marking");
+ TQT_SLOT(loadMarks()), actionCollection(), "load_marking");
action->setEnabled(false);
action = new KAction( i18n("&Save Markings..."), 0, _catalogManager,
- SLOT(saveMarks()), actionCollection(), "save_marking");
+ TQT_SLOT(saveMarks()), actionCollection(), "save_marking");
action->setEnabled(false);
(void)new KAction(i18n("&Mark Files..."), 0, _catalogManager,
- SLOT(slotMarkPattern()), actionCollection(), "mark_pattern");
+ TQT_SLOT(slotMarkPattern()), actionCollection(), "mark_pattern");
(void)new KAction(i18n("&Unmark Files..."), 0, _catalogManager,
- SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern");
+ TQT_SLOT(slotUnmarkPattern()), actionCollection(), "unmark_pattern");
actionMap["remove_marking"] = NEEDS_MARK;
actionMap["remove_all_marking"] = NEEDS_MARK;
@@ -282,102 +282,102 @@ void CatalogManager::setupActions()
// go menu
action = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated", ALT+Key_Next,
- _catalogManager, SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
+ _catalogManager, TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
action->setEnabled(false);
action = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated", ALT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans");
+ _catalogManager, TQT_SLOT(gotoPreviousUntranslated()),actionCollection(), "go_prev_untrans");
action->setEnabled(false);
action = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy", CTRL+Key_Next,
- _catalogManager, SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
+ _catalogManager, TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
action->setEnabled(false);
action = new KAction(i18n("Pre&vious Fuzzy"), "prevfuzzy", CTRL+Key_Prior,
- _catalogManager, SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy");
+ _catalogManager, TQT_SLOT(gotoPreviousFuzzy()),actionCollection(), "go_prev_fuzzy");
action->setEnabled(false);
action = new KAction(i18n("N&ext Fuzzy or Untranslated"), "nextfuzzyuntrans", CTRL+SHIFT+Key_Next,
- _catalogManager, SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr");
+ _catalogManager, TQT_SLOT(gotoNextFuzzyOrUntranslated()),actionCollection(), "go_next_fuzzyUntr");
action->setEnabled(false);
action = new KAction(i18n("P&revious Fuzzy or Untranslated"), "prevfuzzyuntrans", CTRL+SHIFT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr");
+ _catalogManager, TQT_SLOT(gotoPreviousFuzzyOrUntranslated()),actionCollection(), "go_prev_fuzzyUntr");
action->setEnabled(false);
action = new KAction(i18n("Next Err&or"), "nexterror", ALT+SHIFT+Key_Next,
- _catalogManager, SLOT(gotoNextError()),actionCollection(), "go_next_error");
+ _catalogManager, TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error");
action->setEnabled(false);
action = new KAction(i18n("Previo&us Error"), "preverror", ALT+SHIFT+Key_Prior,
- _catalogManager, SLOT(gotoPreviousError()),actionCollection(), "go_prev_error");
+ _catalogManager, TQT_SLOT(gotoPreviousError()),actionCollection(), "go_prev_error");
action->setEnabled(false);
action = new KAction(i18n("Next Te&mplate Only"), "nexttemplate", CTRL+Key_Down,
- _catalogManager, SLOT(gotoNextTemplate()),actionCollection(), "go_next_template");
+ _catalogManager, TQT_SLOT(gotoNextTemplate()),actionCollection(), "go_next_template");
action->setEnabled(false);
action = new KAction(i18n("Previous Temp&late Only"), "prevtemplate", CTRL+Key_Up,
- _catalogManager, SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template");
+ _catalogManager, TQT_SLOT(gotoPreviousTemplate()),actionCollection(), "go_prev_template");
action->setEnabled(false);
action = new KAction(i18n("Next Tran&slation Exists"), "nextpo", ALT+Key_Down,
- _catalogManager, SLOT(gotoNextPo()),actionCollection(), "go_next_po");
+ _catalogManager, TQT_SLOT(gotoNextPo()),actionCollection(), "go_next_po");
action->setEnabled(false);
action = new KAction(i18n("Previous Transl&ation Exists"), "prevpo", ALT+Key_Up,
- _catalogManager, SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po");
+ _catalogManager, TQT_SLOT(gotoPreviousPo()),actionCollection(), "go_prev_po");
action->setEnabled(false);
action = new KAction(i18n("Previous Marke&d"), "prevmarked", SHIFT+Key_Up,
- _catalogManager, SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked");
+ _catalogManager, TQT_SLOT(gotoPreviousMarked()),actionCollection(), "go_prev_marked");
action->setEnabled(false);
action = new KAction(i18n("Next &Marked"), "nextmarked", SHIFT+Key_Down,
- _catalogManager, SLOT(gotoNextMarked()),actionCollection(), "go_next_marked");
+ _catalogManager, TQT_SLOT(gotoNextMarked()),actionCollection(), "go_next_marked");
action->setEnabled(false);
// project menu
// the project menu
action = new KAction(i18n("&New..."), "filenew"
- , this, SLOT(projectNew()),actionCollection()
+ , this, TQT_SLOT(projectNew()),actionCollection()
,"project_new");
action = new KAction(i18n("&Open..."), "fileopen"
- , this, SLOT(projectOpen()),actionCollection()
+ , this, TQT_SLOT(projectOpen()),actionCollection()
,"project_open");
action = new KAction(i18n("C&lose"), "fileclose"
- , this, SLOT(projectClose()),actionCollection()
+ , this, TQT_SLOT(projectClose()),actionCollection()
,"project_close");
action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() );
action = new KAction(i18n("&Configure..."), "configure"
- , this, SLOT(projectConfigure()),actionCollection()
+ , this, TQT_SLOT(projectConfigure()),actionCollection()
,"project_settings");
// tools menu
action = new KAction( i18n("&Statistics"), "statistics", CTRL+Key_S,
- _catalogManager, SLOT(statistics()), actionCollection(), "statistics");
+ _catalogManager, TQT_SLOT(statistics()), actionCollection(), "statistics");
action->setEnabled(false);
action = new KAction( i18n("S&tatistics in Marked"), "statistics", CTRL+ALT+Key_S,
- _catalogManager, SLOT(markedStatistics()), actionCollection(), "statistics_marked");
+ _catalogManager, TQT_SLOT(markedStatistics()), actionCollection(), "statistics_marked");
action->setEnabled(false);
action = new KAction( i18n("Check S&yntax"), "syntax", CTRL+Key_Y,
- _catalogManager, SLOT(checkSyntax()), actionCollection(), "syntax");
+ _catalogManager, TQT_SLOT(checkSyntax()), actionCollection(), "syntax");
action->setEnabled(false);
action = new KAction( i18n("S&pell Check"), "spellcheck", CTRL+Key_I,
- this, SLOT(spellcheck()), actionCollection(), "spellcheck");
+ this, TQT_SLOT(spellcheck()), actionCollection(), "spellcheck");
action->setEnabled(false);
action = new KAction( i18n("Spell Check in &Marked"), "spellcheck", CTRL+ALT+Key_I,
- this, SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked");
+ this, TQT_SLOT(markedSpellcheck()), actionCollection(), "spellcheck_marked");
action->setEnabled(false);
action = new KAction( i18n("&Rough Translation"), CTRL+Key_T,
- _catalogManager, SLOT(roughTranslation()), actionCollection(), "rough_translation");
+ _catalogManager, TQT_SLOT(roughTranslation()), actionCollection(), "rough_translation");
action->setEnabled(false);
action = new KAction( i18n("Rough Translation in M&arked"), CTRL+ALT+Key_T,
- _catalogManager, SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked");
+ _catalogManager, TQT_SLOT(markedRoughTranslation()), actionCollection(), "rough_translation_marked");
action->setEnabled(false);
action = new KAction( i18n("Mai&l"), "mail_send", CTRL+Key_A,
- _catalogManager, SLOT(mailFiles()), actionCollection(), "mail_file");
+ _catalogManager, TQT_SLOT(mailFiles()), actionCollection(), "mail_file");
action->setEnabled(false);
action = new KAction( i18n("Mail Mar&ked"), "mail_send", CTRL+ALT+Key_A,
- _catalogManager, SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked");
+ _catalogManager, TQT_SLOT(mailMarkedFiles()), actionCollection(), "mail_file_marked");
action->setEnabled(false);
action = new KAction( i18n("&Pack"), "tar", CTRL+Key_B,
- _catalogManager, SLOT(packageFiles()), actionCollection(), "package_file");
- action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked");
+ _catalogManager, TQT_SLOT(packageFiles()), actionCollection(), "package_file");
+ action = new KAction( i18n("Pack &Marked"), "tar", CTRL+ALT+Key_B, _catalogManager, TQT_SLOT(packageMarkedFiles()), actionCollection(), "package_file_marked");
action->setEnabled(false);
actionMap["statistics_marked"] = NEEDS_DIR | NEEDS_MARK;
@@ -390,10 +390,10 @@ void CatalogManager::setupActions()
actionMap["package_file_marked"] = NEEDS_PO | NEEDS_MARK;
// dynamic tools
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QPtrList<KAction> actions = ToolAction::dataToolActionList(
- tools, _catalogManager, SLOT(validateUsingTool( const KDataToolInfo &, const QString& ))
+ TQPtrList<KAction> actions = ToolAction::dataToolActionList(
+ tools, _catalogManager, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString& ))
,"validate", false, actionCollection() );
KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(),
@@ -407,7 +407,7 @@ void CatalogManager::setupActions()
}
actions = ToolAction::dataToolActionList(
- tools, _catalogManager, SLOT(validateMarkedUsingTool( const KDataToolInfo &, const QString& ))
+ tools, _catalogManager, TQT_SLOT(validateMarkedUsingTool( const KDataToolInfo &, const TQString& ))
,"validate", false, actionCollection(), "marked_" );
m_menu = new KActionMenu(i18n("V&alidation Marked"), actionCollection(),
"dynamic_validation_marked");
@@ -423,19 +423,19 @@ void CatalogManager::setupActions()
// CVS submenu
// Actions for PO files
(void)new KAction( i18n( "Update" ), "down", 0, _catalogManager,
- SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" );
+ TQT_SLOT( cvsUpdate( ) ), actionCollection( ), "cvs_update" );
(void)new KAction( i18n( "Update Marked" ), 0, _catalogManager,
- SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" );
+ TQT_SLOT( cvsUpdateMarked( ) ), actionCollection( ), "cvs_update_marked" );
(void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager,
- SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" );
+ TQT_SLOT( cvsCommit( ) ), actionCollection( ), "cvs_commit" );
(void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager,
- SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" );
+ TQT_SLOT( cvsCommitMarked( ) ), actionCollection( ), "cvs_commit_marked" );
(void)new KAction( i18n( "Status" ), 0, _catalogManager,
- SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" );
+ TQT_SLOT( cvsStatus( ) ), actionCollection( ), "cvs_status" );
(void)new KAction( i18n( "Status for Marked" ), 0, _catalogManager,
- SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" );
+ TQT_SLOT( cvsStatusMarked( ) ), actionCollection( ), "cvs_status_marked" );
(void)new KAction( i18n( "Show Diff" ), 0, _catalogManager,
- SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" );
+ TQT_SLOT( cvsDiff( ) ), actionCollection( ), "cvs_diff" );
// CVS
actionMap["cvs_update"] = NEEDS_PO | NEEDS_PO_CVS;
@@ -449,27 +449,27 @@ void CatalogManager::setupActions()
// SVN submenu
// Actions for PO files
(void)new KAction( i18n( "Update" ), "down", 0, _catalogManager,
- SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" );
+ TQT_SLOT( svnUpdate( ) ), actionCollection( ), "svn_update" );
(void)new KAction( i18n( "Update Marked" ), 0, _catalogManager,
- SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" );
+ TQT_SLOT( svnUpdateMarked( ) ), actionCollection( ), "svn_update_marked" );
(void)new KAction( i18n( "Commit" ), "up", 0, _catalogManager,
- SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" );
+ TQT_SLOT( svnCommit( ) ), actionCollection( ), "svn_commit" );
(void)new KAction( i18n( "Commit Marked" ), 0, _catalogManager,
- SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" );
+ TQT_SLOT( svnCommitMarked( ) ), actionCollection( ), "svn_commit_marked" );
(void)new KAction( i18n( "Status (Local)" ), 0, _catalogManager,
- SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" );
+ TQT_SLOT( svnStatusLocal() ), actionCollection( ), "svn_status_local" );
(void)new KAction( i18n( "Status (Local) for Marked" ), 0, _catalogManager,
- SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" );
+ TQT_SLOT( svnStatusLocalMarked() ), actionCollection( ), "svn_status_local_marked" );
(void)new KAction( i18n( "Status (Remote)" ), 0, _catalogManager,
- SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" );
+ TQT_SLOT( svnStatusRemote() ), actionCollection( ), "svn_status_remote" );
(void)new KAction( i18n( "Status (Remote) for Marked" ), 0, _catalogManager,
- SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" );
+ TQT_SLOT( svnStatusRemoteMarked() ), actionCollection( ), "svn_status_remote_marked" );
(void)new KAction( i18n( "Show Diff" ), 0, _catalogManager,
- SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" );
+ TQT_SLOT( svnDiff( ) ), actionCollection( ), "svn_diff" );
(void)new KAction( i18n( "Show Information" ), 0, _catalogManager,
- SLOT( svnInfo() ), actionCollection( ), "svn_info" );
+ TQT_SLOT( svnInfo() ), actionCollection( ), "svn_info" );
(void)new KAction( i18n( "Show Information for Marked" ), 0, _catalogManager,
- SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" );
+ TQT_SLOT( svnInfoMarked() ), actionCollection( ), "svn_info_marked" );
// SVN
actionMap["svn_update"] = NEEDS_PO | NEEDS_PO_SVN;
@@ -486,13 +486,13 @@ void CatalogManager::setupActions()
// CVS Actions for POT files
(void)new KAction( i18n( "Update Templates" ), 0, _catalogManager,
- SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" );
+ TQT_SLOT( cvsUpdateTemplate( ) ), actionCollection( ), "cvs_update_template" );
(void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager,
- SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" );
+ TQT_SLOT( cvsUpdateMarkedTemplate( ) ), actionCollection( ), "cvs_update_marked_template" );
(void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager,
- SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" );
+ TQT_SLOT( cvsCommitTemplate( ) ), actionCollection( ), "cvs_commit_template" );
(void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager,
- SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" );
+ TQT_SLOT( cvsCommitMarkedTemplate( ) ), actionCollection( ), "cvs_commit_marked_template" );
actionMap["cvs_update_template"] = NEEDS_POT | NEEDS_POT_CVS;
actionMap["cvs_update_marked_template"] = NEEDS_POT | NEEDS_POT_CVS | NEEDS_MARK;
@@ -501,13 +501,13 @@ void CatalogManager::setupActions()
// SVN Actions for POT files
(void)new KAction( i18n( "Update Templates" ), 0, _catalogManager,
- SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" );
+ TQT_SLOT( svnUpdateTemplate( ) ), actionCollection( ), "svn_update_template" );
(void)new KAction( i18n( "Update Marked Templates" ), 0, _catalogManager,
- SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" );
+ TQT_SLOT( svnUpdateMarkedTemplate( ) ), actionCollection( ), "svn_update_marked_template" );
(void)new KAction( i18n( "Commit Templates" ), 0, _catalogManager,
- SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" );
+ TQT_SLOT( svnCommitTemplate( ) ), actionCollection( ), "svn_commit_template" );
(void)new KAction( i18n( "Commit Marked Templates" ), 0, _catalogManager,
- SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" );
+ TQT_SLOT( svnCommitMarkedTemplate( ) ), actionCollection( ), "svn_commit_marked_template" );
actionMap["svn_update_template"] = NEEDS_POT | NEEDS_POT_SVN;
actionMap["svn_update_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK;
@@ -515,7 +515,7 @@ void CatalogManager::setupActions()
actionMap["svn_commit_marked_template"] = NEEDS_POT | NEEDS_POT_SVN | NEEDS_MARK;
// settings menu
- // FIXME: KStdAction::preferences(this, SLOT( optionsPreferences()), actionCollection());
+ // FIXME: KStdAction::preferences(this, TQT_SLOT( optionsPreferences()), actionCollection());
createStandardStatusBarAction();
@@ -530,7 +530,7 @@ void CatalogManager::setupActions()
actionCollection(), "file_commands");
_catalogManager->setFileCommandsMenu( actionMenu->popupMenu());
- action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,SLOT(slotDeleteFile()),actionCollection(), "delete");
+ action = new KAction(i18n("&Delete"),Key_Delete,_catalogManager,TQT_SLOT(slotDeleteFile()),actionCollection(), "delete");
action->setEnabled(false);
#if KDE_IS_VERSION( 3, 2, 90 )
@@ -542,19 +542,19 @@ void CatalogManager::setupActions()
void CatalogManager::setupStatusBar()
{
- _foundLabel = new QLabel( " ", statusBar());
+ _foundLabel = new TQLabel( " ", statusBar());
statusBar()->addWidget(_foundLabel,0);
- QHBox* progressBox = new QHBox(statusBar(), "progressBox" );
+ TQHBox* progressBox = new TQHBox(statusBar(), "progressBox" );
progressBox->setSpacing(2);
- _statusProgressLabel = new QLabel( "", progressBox );
+ _statusProgressLabel = new TQLabel( "", progressBox );
_statusProgressBar = new KProgress( progressBox, "progressBar");
_statusProgressBar->hide();
statusBar()->addWidget(progressBox,1);
statusBar()->setMinimumHeight(_statusProgressBar->sizeHint().height());
- QWhatsThis::add(statusBar(),
+ TQWhatsThis::add(statusBar(),
i18n("<qt><p><b>Statusbar</b></p>\n"
"<p>The statusbar displays information about progress of"
" the current find or replace operation. The first number in <b>Found:</b>"
@@ -570,7 +570,7 @@ void CatalogManager::enableMenuForFiles(bool enable)
void CatalogManager::selectedChanged(uint actionValue)
{
- QMap<QString,uint>::Iterator it;
+ TQMap<TQString,uint>::Iterator it;
for (it = actionMap.begin( ); it != actionMap.end( ); ++it) {
KAction * action = actionCollection()->action(it.key( ).latin1( ));
if (action) action->setEnabled((actionValue & it.data( )) == it.data( ));
@@ -589,7 +589,7 @@ void CatalogManager::updateSettings()
_openNewWindow=_settings.openWindow;
}
-void CatalogManager::saveSettings( QString configFile )
+void CatalogManager::saveSettings( TQString configFile )
{
_settings = _catalogManager->settings(); // restore settings from the view
@@ -615,12 +615,12 @@ void CatalogManager::setPreferredWindow(WId window)
kdDebug(KBABEL_CATMAN) << "setPrefereedWindow set to :" << _preferredWindow << endl;
}
-void CatalogManager::updateFile(QString fileWithPath)
+void CatalogManager::updateFile(TQString fileWithPath)
{
_catalogManager->updateFile(fileWithPath,true); //force update
}
-void CatalogManager::updateAfterSave(QString fileWithPath, PoInfo &info)
+void CatalogManager::updateAfterSave(TQString fileWithPath, PoInfo &info)
{
_catalogManager->updateAfterSave(fileWithPath, info);
}
@@ -630,16 +630,16 @@ CatalogManagerView *CatalogManager::view()
return _catalogManager;
}
-void CatalogManager::openFile(QString filename, QString package)
+void CatalogManager::openFile(TQString filename, TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << CatalogManagerApp::_preferredWindow;
@@ -647,11 +647,11 @@ void CatalogManager::openFile(QString filename, QString package)
kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl;
- QCString callfunc="openURL(QCString, QCString, WId,int)";
+ TQCString callfunc="openURL(TQCString, TQCString, WId,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openURL(QCString, QCString, WId,int,QCString)";
+ callfunc="openURL(TQCString, TQCString, WId,int,TQCString)";
}
kdDebug(KBABEL_CATMAN) << callfunc << endl;
@@ -665,26 +665,26 @@ void CatalogManager::openFile(QString filename, QString package)
}
}
-void CatalogManager::openFile(QString filename, QString package, int msgid)
+void CatalogManager::openFile(TQString filename, TQString package, int msgid)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << msgid;
kdDebug(KBABEL_CATMAN) << "Open file with project " << _configFile << endl;
- QCString callfunc="gotoFileEntry(QCString, QCString, int)";
+ TQCString callfunc="gotoFileEntry(TQCString, TQCString, int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="gotoFileEntry(QCString, QCString,int,QCString)";
+ callfunc="gotoFileEntry(TQCString, TQCString,int,TQCString)";
}
kdDebug(KBABEL_CATMAN) << callfunc << endl;
@@ -698,26 +698,26 @@ void CatalogManager::openFile(QString filename, QString package, int msgid)
}
}
-void CatalogManager::openFileInNewWindow(QString filename, QString package)
+void CatalogManager::openFileInNewWindow(TQString filename, TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() )
{
- QByteArray data;
- QCString url = filename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = filename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
arg << package.utf8();
arg << CatalogManagerApp::_preferredWindow;
arg << ((int)1);
- QCString callfunc="openURL(QCString, QCString, WId,int)";
+ TQCString callfunc="openURL(TQCString, TQCString, WId,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openURL(QCString, QCString, WId,int,QCString)";
+ callfunc="openURL(TQCString, TQCString, WId,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -729,25 +729,25 @@ void CatalogManager::openFileInNewWindow(QString filename, QString package)
}
}
-void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QString package)
+void CatalogManager::openTemplate(TQString openFilename,TQString saveFilename,TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() ) {
- QByteArray data;
- QCString url = openFilename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = openFilename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
url = saveFilename.utf8();
arg << url;
arg << package.utf8();
arg << (_openNewWindow ? 1 : 0 );
- QCString callfunc="openTemplate(QCString,QCString,QCString,int)";
+ TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openTemplate(QCString,QCString,QCString,int,QCString)";
+ callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -759,25 +759,25 @@ void CatalogManager::openTemplate(QString openFilename,QString saveFilename,QStr
}
}
-void CatalogManager::openTemplateInNewWindow(QString openFilename,QString saveFilename,QString package)
+void CatalogManager::openTemplateInNewWindow(TQString openFilename,TQString saveFilename,TQString package)
{
DCOPClient * client = kapp->dcopClient();
if( startKBabel() ) {
- QByteArray data;
- QCString url = openFilename.local8Bit();
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString url = openFilename.local8Bit();
+ TQDataStream arg(data, IO_WriteOnly);
arg << url;
url = saveFilename.utf8();
arg << url;
arg << package.utf8();
arg << ((int)1);
- QCString callfunc="openTemplate(QCString,QCString,QCString,int)";
+ TQCString callfunc="openTemplate(TQCString,TQCString,TQCString,int)";
if(_configFile != "kbabelrc" )
{
arg << _configFile.utf8();
- callfunc="openTemplate(QCString,QCString,QCString,int,QCString)";
+ callfunc="openTemplate(TQCString,TQCString,TQCString,int,TQCString)";
}
// update the user timestamp for KBabel to get it a focus
@@ -793,17 +793,17 @@ void CatalogManager::spellcheck()
{
DCOPClient * client = kapp->dcopClient();
- QStringList fileList = _catalogManager->current();
+ TQStringList fileList = _catalogManager->current();
if( startKBabel() ) {
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << fileList;
// update the user timestamp for KBabel to get it a focus
kapp->updateRemoteUserTimestamp ("kbabel");
- if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) )
+ if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) )
KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n"
"Please check your installation of KDE."));
}
@@ -813,17 +813,17 @@ void CatalogManager::markedSpellcheck()
{
DCOPClient * client = kapp->dcopClient();
- QStringList fileList = _catalogManager->marked();
+ TQStringList fileList = _catalogManager->marked();
if( startKBabel() ) {
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << fileList;
// update the user timestamp for KBabel to get it a focus
kapp->updateRemoteUserTimestamp ("kbabel");
- if( !client->send("kbabel","KBabelIFace", "spellcheck(QStringList)", data) )
+ if( !client->send("kbabel","KBabelIFace", "spellcheck(TQStringList)", data) )
KMessageBox::error(this, i18n("Cannot send a message to KBabel.\n"
"Please check your installation of KDE."));
}
@@ -831,8 +831,8 @@ void CatalogManager::markedSpellcheck()
bool CatalogManager::startKBabel()
{
- QCString service;
- QString result;
+ TQCString service;
+ TQString result;
DCOPClient * client = kapp->dcopClient();
@@ -840,7 +840,7 @@ bool CatalogManager::startKBabel()
QCStringList apps = client->registeredApplications();
for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it )
{
- QString clientID = *it;
+ TQString clientID = *it;
if( clientID=="kbabel" )
{
service = *it;
@@ -851,8 +851,8 @@ bool CatalogManager::startKBabel()
// if there is no running kbabel, start one
if( service.isEmpty() )
{
- QString app = "kbabel";
- QString url = "";
+ TQString app = "kbabel";
+ TQString url = "";
if( kapp->startServiceByDesktopName(app,url, &result, &service))
{
KMessageBox::error( this, i18n("Unable to use KLauncher to start KBabel.\n"
@@ -866,7 +866,7 @@ bool CatalogManager::startKBabel()
}
-void CatalogManager::prepareProgressBar(QString msg, int max)
+void CatalogManager::prepareProgressBar(TQString msg, int max)
{
_progressBar->setTotalSteps(max);
_progressBar->setProgress(0);
@@ -884,7 +884,7 @@ void CatalogManager::clearProgressBar()
_progressLabel->hide();
}
-void CatalogManager::prepareStatusProgressBar(QString msg, int max)
+void CatalogManager::prepareStatusProgressBar(TQString msg, int max)
{
_totalFound = 0;
_foundToBeSent = 0;
@@ -932,7 +932,7 @@ void CatalogManager::find()
{
if( !_findDialog ) _findDialog = new FindInFilesDialog(false,this);
- if( _findDialog->exec("") == QDialog::Accepted )
+ if( _findDialog->exec("") == TQDialog::Accepted )
{
_timerFind->stop();
_searchStopped = false;
@@ -946,22 +946,22 @@ void CatalogManager::find()
_findOptions = _findDialog->findOpts();
// get from options the information for ignoring text parts
- _findOptions.contextInfo = QRegExp( _project->miscSettings().contextInfo );
+ _findOptions.contextInfo = TQRegExp( _project->miscSettings().contextInfo );
_findOptions.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
kdDebug(KBABEL_CATMAN) << "Calling catalogmanagerview::find" << endl;
- QString url = _catalogManager->find(_findOptions, _toBeSearched );
+ TQString url = _catalogManager->find(_findOptions, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
{
if( startKBabel() )
{
- QCString funcCall("findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int)");
+ TQCString funcCall("findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int)");
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << client->appId();
arg << url.utf8();
arg << _findOptions.findStr;
@@ -977,9 +977,9 @@ void CatalogManager::find()
arg << (_findOptions.askForSave ? 1 : 0);
if(_configFile != "kbabelrc" ) {
arg << _configFile.utf8();
- funcCall="findInFile(QCString,QCString,QString,int,int,int,int,int,int,int,int,int,int,QCString)";
+ funcCall="findInFile(TQCString,TQCString,TQString,int,int,int,int,int,int,int,int,int,int,TQCString)";
}
- kdDebug(KBABEL) << "DCOP: " << QString(data.data()) << endl;
+ kdDebug(KBABEL) << "DCOP: " << TQString(data.data()) << endl;
if( !client->send("kbabel","KBabelIFace",
funcCall, data)
) {
@@ -1016,7 +1016,7 @@ void CatalogManager::replace()
if( !_replaceDialog ) _replaceDialog = new FindInFilesDialog(true,this);
- if( _replaceDialog->exec("") == QDialog::Accepted )
+ if( _replaceDialog->exec("") == TQDialog::Accepted )
{
_timerFind->stop();
_searchStopped = false;
@@ -1032,21 +1032,21 @@ void CatalogManager::replace()
_findOptions = options;
// get from options the information for ignoring text parts
- options.contextInfo = QRegExp( _project->miscSettings().contextInfo );
+ options.contextInfo = TQRegExp( _project->miscSettings().contextInfo );
options.accelMarker = _project->miscSettings().accelMarker;
_foundFilesList.clear();
- QString url = _catalogManager->find(options, _toBeSearched );
+ TQString url = _catalogManager->find(options, _toBeSearched );
if( _catalogManager->isStopped() ) return;
if( !url.isEmpty() )
{
if( startKBabel() )
{
- QCString funcCall("replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int)");
+ TQCString funcCall("replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int)");
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << client->appId();
arg << url.utf8();
@@ -1065,7 +1065,7 @@ void CatalogManager::replace()
arg << (options.askForSave ? 1 : 0);
if(_configFile != "kbabelrc" ) {
arg << _configFile.utf8();
- funcCall="replaceInFile(QCString,QCString,QString,QString,int,int,int,int,int,int,int,int,int,int,int,QCString)";
+ funcCall="replaceInFile(TQCString,TQCString,TQString,TQString,int,int,int,int,int,int,int,int,int,int,int,TQCString)";
}
if( !client->send("kbabel","KBabelIFace",
funcCall, data)
@@ -1105,7 +1105,7 @@ void CatalogManager::findNextFile()
stopSearching();
return;
}
- QString file = _toBeSearched.first();
+ TQString file = _toBeSearched.first();
_toBeSearched.pop_front();
if( PoInfo::findInFile( file, _findOptions ) )
{
@@ -1188,11 +1188,11 @@ void CatalogManager::projectNew()
KBabel::Project::Ptr p = KBabel::ProjectWizard::newProject();
if( p )
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = p;
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = _project->filename();
restoreSettings();
@@ -1204,12 +1204,12 @@ void CatalogManager::projectNew()
void CatalogManager::projectOpen()
{
- QString oldproject = _project->filename();
+ TQString oldproject = _project->filename();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
- oldproject = QString();
+ oldproject = TQString();
}
- const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this);
+ const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this);
if (file.isEmpty())
{
return;
@@ -1217,11 +1217,11 @@ void CatalogManager::projectOpen()
KBabel::Project::Ptr p = KBabel::ProjectManager::open(file);
if( p )
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = p;
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = p->filename();
restoreSettings();
@@ -1238,11 +1238,11 @@ void CatalogManager::projectOpen()
void CatalogManager::projectClose()
{
- disconnect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ disconnect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_project = KBabel::ProjectManager::open(KBabel::ProjectManager::defaultProjectName());
- connect( _project, SIGNAL (signalCatManSettingsChanged())
- , this, SLOT (updateSettings()));
+ connect( _project, TQT_SIGNAL (signalCatManSettingsChanged())
+ , this, TQT_SLOT (updateSettings()));
_configFile = _project->filename();
restoreSettings();
updateSettings();
@@ -1250,7 +1250,7 @@ void CatalogManager::projectClose()
emit settingsChanged(_settings);
}
-void CatalogManager::changeProjectActions(const QString& project)
+void CatalogManager::changeProjectActions(const TQString& project)
{
bool def = ( project == KBabel::ProjectManager::defaultProjectName() ) ;
@@ -1262,8 +1262,8 @@ void CatalogManager::projectConfigure()
{
KBabel::ProjectDialog* _projectDialog = new ProjectDialog(_project);
- connect (_projectDialog, SIGNAL (settingsChanged())
- , this, SLOT (updateSettings()));
+ connect (_projectDialog, TQT_SIGNAL (settingsChanged())
+ , this, TQT_SLOT (updateSettings()));
// settings are updated via signals
_projectDialog->exec();
diff --git a/kbabel/catalogmanager/catalogmanager.h b/kbabel/catalogmanager/catalogmanager.h
index 67f871fa..11927bd7 100644
--- a/kbabel/catalogmanager/catalogmanager.h
+++ b/kbabel/catalogmanager/catalogmanager.h
@@ -34,18 +34,18 @@
#ifndef CATALOGMANAGER_H
#define CATALOGMANAGER_H
-#include <qdict.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
-#include <qguardedptr.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
#include <kdeversion.h>
#include <kmainwindow.h>
#include <kdirwatch.h>
#include <kprocess.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "projectsettings.h"
#include "kbproject.h"
@@ -71,7 +71,7 @@ class CatalogManager : public KMainWindow
{
Q_OBJECT
public:
- CatalogManager(QString configfile = QString() );
+ CatalogManager(TQString configfile = TQString() );
~CatalogManager();
KBabel::CatManSettings settings() const;
@@ -82,15 +82,15 @@ public:
void setPreferredWindow(WId id);
/** updates the file fileWithPath in the @ref CatalogManagerView */
- void updateFile(QString fileWithPath);
- void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info);
+ void updateFile(TQString fileWithPath);
+ void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info);
CatalogManagerView *view();
void pause(bool flag) { if( _catalogManager ) _catalogManager->pause (flag); }
- static QStringList _foundFilesList;
- static QStringList _toBeSearched;
+ static TQStringList _foundFilesList;
+ static TQStringList _toBeSearched;
public slots:
/** updates the settings from the project */
@@ -110,13 +110,13 @@ public slots:
void projectOpen();
void projectClose();
void projectConfigure();
- void changeProjectActions(const QString& project);
+ void changeProjectActions(const TQString& project);
virtual void clearProgressBar();
- virtual void prepareProgressBar(QString msg, int max);
+ virtual void prepareProgressBar(TQString msg, int max);
virtual void clearStatusProgressBar();
- virtual void prepareStatusProgressBar(QString msg, int max);
+ virtual void prepareStatusProgressBar(TQString msg, int max);
virtual void prepareStatusProgressBar(int max);
virtual void setNumberOfFound( int toBeSent, int total );
@@ -137,7 +137,7 @@ private:
void restoreView();
void saveView();
- void saveSettings( QString configFile = QString::null );
+ void saveSettings( TQString configFile = TQString::null );
void setupActions();
void setupStatusBar();
@@ -150,16 +150,16 @@ private slots:
* is used. If this is deleted meanwhile, the first window in
* @ref KMainWindow::memberList is used.
*/
- void openFile(QString filename,QString package);
- void openFile(QString filename,QString package, int msgid);
- void openFileInNewWindow(QString filename,QString package);
+ void openFile(TQString filename,TQString package);
+ void openFile(TQString filename,TQString package, int msgid);
+ void openFileInNewWindow(TQString filename,TQString package);
/**
* calls @ref KBabel::openTemplate where as preferred windos _preferredWindow
* is used. If this is deleted meanwhile, the first window in
* @ref KMainWindow::memberList is used.
*/
- void openTemplate(QString openFilename,QString saveFileName,QString package);
- void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package);
+ void openTemplate(TQString openFilename,TQString saveFileName,TQString package);
+ void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package);
void markedSpellcheck();
void spellcheck();
@@ -187,16 +187,16 @@ private:
/// update progress bar
KProgress* _progressBar;
- QLabel* _progressLabel;
+ TQLabel* _progressLabel;
/// statusbar progress bar
KProgress* _statusProgressBar;
- QLabel* _statusProgressLabel;
- QLabel* _foundLabel;
+ TQLabel* _statusProgressLabel;
+ TQLabel* _foundLabel;
int _foundToBeSent;
int _totalFound;
- QTimer* _timerFind;
+ TQTimer* _timerFind;
bool _searchStopped;
KBabel::CatManSettings _settings;
@@ -207,12 +207,12 @@ private:
/// project configuration file
- QString _configFile;
+ TQString _configFile;
KBabel::Project::Ptr _project;
KConfig* config;
- QMap<QString,uint> actionMap;
+ TQMap<TQString,uint> actionMap;
};
#endif // CATALOGMANAGER_H
diff --git a/kbabel/catalogmanager/catalogmanagerapp.h b/kbabel/catalogmanager/catalogmanagerapp.h
index e0762e5b..3534a516 100644
--- a/kbabel/catalogmanager/catalogmanagerapp.h
+++ b/kbabel/catalogmanager/catalogmanagerapp.h
@@ -49,8 +49,8 @@ public:
CatalogManagerInterface();
virtual void setPreferredWindow( WId id );
- virtual QCString findNextFile();
- virtual void updatedFile( QCString url );
+ virtual TQCString findNextFile();
+ virtual void updatedFile( TQCString url );
};
class CatalogManagerApp : public KApplication
@@ -62,8 +62,8 @@ public:
virtual int newInstance();
static void setPreferredWindow( WId id );
- static QCString findNextFile();
- static void updatedFile( QCString url );
+ static TQCString findNextFile();
+ static void updatedFile( TQCString url );
static WId _preferredWindow;
private:
CatalogManagerInterface *kbInterface;
diff --git a/kbabel/catalogmanager/catalogmanageriface.h b/kbabel/catalogmanager/catalogmanageriface.h
index 232a694c..037aa7c0 100644
--- a/kbabel/catalogmanager/catalogmanageriface.h
+++ b/kbabel/catalogmanager/catalogmanageriface.h
@@ -52,16 +52,16 @@ k_dcop:
* Returns a next file containing the searched string. Invoked from
* KBabel in case the FindNext() finishes a file and wants to continue in
* the next one.
- * @returns a URL to the next file, QString:null if there is no more
+ * @returns a URL to the next file, TQString:null if there is no more
* files to be searched or empty string if the search string
* is not found yet, but there is more files to be searched in.
*/
- virtual QCString findNextFile() = 0;
+ virtual TQCString findNextFile() = 0;
/**
* If you care about this file, you should update information shown.
*/
- virtual void updatedFile( QCString url) = 0;
+ virtual void updatedFile( TQCString url) = 0;
};
#endif // CATALOGMANAGERIFACE_H
diff --git a/kbabel/catalogmanager/catalogmanagerview.cpp b/kbabel/catalogmanager/catalogmanagerview.cpp
index 6bb4c88f..991e1899 100644
--- a/kbabel/catalogmanager/catalogmanagerview.cpp
+++ b/kbabel/catalogmanager/catalogmanagerview.cpp
@@ -50,10 +50,10 @@
#include "markpatterndialog.h"
#include "validationoptions.h"
-#include <qcheckbox.h>
-#include <qpopupmenu.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqcheckbox.h>
+#include <tqpopupmenu.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <kcmenumngr.h>
#include <kcursor.h>
@@ -73,15 +73,15 @@
#include <kdeversion.h>
#include <ktempfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qdragobject.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqdragobject.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
using namespace KBabel;
@@ -98,8 +98,8 @@ const char* columnNames[] = {
#define COLTEXT(a) (i18n(columnNames[a]))
-CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent,const char* name)
- : QListView(parent,name)
+CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent,const char* name)
+ : TQListView(parent,name)
, _dirWatch(0)
, _readInfoCount(0)
, _active(false)
@@ -131,8 +131,8 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
_dictBox = new KBabelDictBox(this, "dictbox");
_dictBox->hide();
- _updateTimer = new QTimer(this);
- connect(_updateTimer,SIGNAL(timeout()),this,SLOT(checkUpdate()));
+ _updateTimer = new TQTimer(this);
+ connect(_updateTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(checkUpdate()));
addColumn(COLTEXT(COL_NAME));
addColumn(COLTEXT(COL_MARKER),25);
@@ -143,7 +143,7 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
setColumnAlignment(2,AlignCenter);
addColumn(COLTEXT(COL_TOTAL));
setColumnAlignment(3,AlignCenter);
- addColumn(QString::null); // CVS/SVN column, header is set later
+ addColumn(TQString::null); // CVS/SVN column, header is set later
addColumn(COLTEXT(COL_REVISION));
addColumn(COLTEXT(COL_TRANSLATOR));
@@ -154,21 +154,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
if(KContextMenuManager::showOnButtonPress())
{
- connect(this,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint &, int))
- ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int)));
+ connect(this,TQT_SIGNAL(rightButtonPressed(TQListViewItem*,const TQPoint &, int))
+ ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int)));
}
else
{
- connect(this,SIGNAL(rightButtonClicked(QListViewItem*,const QPoint &, int))
- ,this, SLOT(showContentsMenu(QListViewItem*,const QPoint &, int)));
+ connect(this,TQT_SIGNAL(rightButtonClicked(TQListViewItem*,const TQPoint &, int))
+ ,this, TQT_SLOT(showContentsMenu(TQListViewItem*,const TQPoint &, int)));
}
- connect(this, SIGNAL(returnPressed(QListViewItem*))
- ,this, SLOT(activateItem(QListViewItem*)));
- connect(this, SIGNAL(doubleClicked(QListViewItem*))
- ,this, SLOT(activateItem(QListViewItem*)));
- connect(this,SIGNAL(selectionChanged()),this,SLOT(checkSelected()));
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint &, int)),
- this, SLOT( columnClicked(QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*))
+ ,this, TQT_SLOT(activateItem(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*))
+ ,this, TQT_SLOT(activateItem(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(checkSelected()));
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT( columnClicked(TQListViewItem *, const TQPoint &, int)));
_dirCommandsMenu = 0;
_fileCommandsMenu = 0;
@@ -178,20 +178,20 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
_logWindow = new KDialogBase(0,"log window",false,i18n("Log Window")
,KDialogBase::Close | KDialogBase::User1,KDialogBase::Close);
_logWindow->setButtonText(KDialogBase::User1,i18n("C&lear"));
- _logWindow->setInitialSize(QSize(300,200));
+ _logWindow->setInitialSize(TQSize(300,200));
- QWhatsThis::add(_logWindow,i18n("<qt><p><b>Log window</b></p>\n"
+ TQWhatsThis::add(_logWindow,i18n("<qt><p><b>Log window</b></p>\n"
"<p>In this window the output of "
"the executed commands are shown.</p></qt>"));
- _logView = new QTextEdit(_logWindow);
+ _logView = new TQTextEdit(_logWindow);
_logView->setReadOnly(true);
_logWindow->setMainWidget(_logView);
- connect(_logWindow,SIGNAL(user1Clicked()),_logView,SLOT(clear()));
+ connect(_logWindow,TQT_SIGNAL(user1Clicked()),_logView,TQT_SLOT(clear()));
- QWhatsThis::add(this,i18n("<qt><p><b>Catalog Manager</b></p>\n"
+ TQWhatsThis::add(this,i18n("<qt><p><b>Catalog Manager</b></p>\n"
"<p>The Catalog Manager merges two folders into one tree and displays all\n"
"PO and POT files in these folders. This way you can easily see if a\n"
"template has been added or removed. Also some information about the files\n"
@@ -205,21 +205,21 @@ CatalogManagerView::CatalogManagerView(KBabel::Project::Ptr project, QWidget* pa
// CVS
cvshandler = new CVSHandler( );
- connect( cvshandler, SIGNAL( signalIsPORepository( bool ) ),
- this, SLOT( slotValidPOCVSRepository( bool ) ) );
- connect( cvshandler, SIGNAL( signalIsPOTRepository( bool ) ),
- this, SLOT( slotValidPOTCVSRepository( bool ) ) );
- connect( cvshandler, SIGNAL( signalFilesCommitted( const QStringList& ) ),
- this, SLOT( updateFiles( const QStringList& ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalIsPORepository( bool ) ),
+ this, TQT_SLOT( slotValidPOCVSRepository( bool ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ),
+ this, TQT_SLOT( slotValidPOTCVSRepository( bool ) ) );
+ connect( cvshandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ),
+ this, TQT_SLOT( updateFiles( const TQStringList& ) ) );
// SVN
svnhandler = new SVNHandler( );
- connect( svnhandler, SIGNAL( signalIsPORepository( bool ) ),
- this, SLOT( slotValidPOSVNRepository( bool ) ) );
- connect( svnhandler, SIGNAL( signalIsPOTRepository( bool ) ),
- this, SLOT( slotValidPOTSVNRepository( bool ) ) );
- connect( svnhandler, SIGNAL( signalFilesCommitted( const QStringList& ) ),
- this, SLOT( updateFiles( const QStringList& ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalIsPORepository( bool ) ),
+ this, TQT_SLOT( slotValidPOSVNRepository( bool ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalIsPOTRepository( bool ) ),
+ this, TQT_SLOT( slotValidPOTSVNRepository( bool ) ) );
+ connect( svnhandler, TQT_SIGNAL( signalFilesCommitted( const TQStringList& ) ),
+ this, TQT_SLOT( updateFiles( const TQStringList& ) ) );
KConfig *config = KGlobal::config();
restoreView(config);
@@ -271,26 +271,26 @@ void CatalogManagerView::restoreView( KConfig *config)
_ignoreFuzzy = config->readBoolEntry( "ValidateIgnoreFuzzy", false );
}
-void CatalogManagerView::setRMBMenuFile( QPopupMenu *m )
+void CatalogManagerView::setRMBMenuFile( TQPopupMenu *m )
{
_fileContentsMenu = m;
}
-void CatalogManagerView::setRMBMenuDir( QPopupMenu *m )
+void CatalogManagerView::setRMBMenuDir( TQPopupMenu *m )
{
_dirContentsMenu = m;
}
-void CatalogManagerView::setDirCommandsMenu( QPopupMenu *m )
+void CatalogManagerView::setDirCommandsMenu( TQPopupMenu *m )
{
_dirCommandsMenu = m;
- connect(_dirCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotDirCommand(int)));
+ connect(_dirCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotDirCommand(int)));
}
-void CatalogManagerView::setFileCommandsMenu( QPopupMenu *m )
+void CatalogManagerView::setFileCommandsMenu( TQPopupMenu *m )
{
_fileCommandsMenu = m;
- connect(_fileCommandsMenu,SIGNAL(activated(int)),this,SLOT(slotFileCommand(int)));
+ connect(_fileCommandsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotFileCommand(int)));
}
void CatalogManagerView::checkUpdate()
@@ -298,7 +298,7 @@ void CatalogManagerView::checkUpdate()
_updateNesting++;
pause(true);
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
while ( it.current() && !_stop)
{
@@ -353,24 +353,24 @@ void CatalogManagerView::clear()
delete _dirWatch;
_dirWatch= new KDirWatch();
- connect(_dirWatch,SIGNAL(deleted(const QString&)),this
- ,SLOT(directoryDeleted(const QString&)));
- connect(_dirWatch,SIGNAL(dirty(const QString&)),this
- ,SLOT(directoryChanged(const QString&)));
- connect(_dirWatch,SIGNAL(created(const QString&)),this
- ,SLOT(directoryChanged(const QString&)));
+ connect(_dirWatch,TQT_SIGNAL(deleted(const TQString&)),this
+ ,TQT_SLOT(directoryDeleted(const TQString&)));
+ connect(_dirWatch,TQT_SIGNAL(dirty(const TQString&)),this
+ ,TQT_SLOT(directoryChanged(const TQString&)));
+ connect(_dirWatch,TQT_SIGNAL(created(const TQString&)),this
+ ,TQT_SLOT(directoryChanged(const TQString&)));
_dirList.clear();
_fileList.clear();
- QListView::clear();
+ TQListView::clear();
}
void CatalogManagerView::toggleAllMarks()
{
_markerList.clear();
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
CatManListItem* item;
for ( ; it.current(); ++it )
@@ -397,7 +397,7 @@ void CatalogManagerView::toggleAllMarks()
void CatalogManagerView::clearAllMarks()
{
_markerList.clear();
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
while ( it.current() )
{
@@ -415,7 +415,7 @@ void CatalogManagerView::clearAllMarks()
void CatalogManagerView::markModifiedFiles()
{
- QDictIterator<CatManListItem> it( _fileList );
+ TQDictIterator<CatManListItem> it( _fileList );
while ( it.current() )
{
CatManListItem* item=it.current();
@@ -434,10 +434,10 @@ void CatalogManagerView::markModifiedFiles()
void CatalogManagerView::loadMarks()
{
- const KURL url = KFileDialog::getOpenURL( QString(),"*.marklist", this );
+ const KURL url = KFileDialog::getOpenURL( TQString(),"*.marklist", this );
if( url.isEmpty() ) return;
- QString filename;
+ TQString filename;
#if KDE_IS_VERSION( 3, 2, 90 )
if (!KIO::NetAccess::download( url, filename, this ) )
#else
@@ -450,13 +450,13 @@ void CatalogManagerView::loadMarks()
}
// now load from file
- QStringList newMarkerList; // better create new list in case of problems
- QFile f( filename );
+ TQStringList newMarkerList; // better create new list in case of problems
+ TQFile f( filename );
if( f.open( IO_ReadOnly) )
{
- QTextStream s(&f);
+ TQTextStream s(&f);
- QString input;
+ TQString input;
s >> input ;
if( input == "[Markers]" )
@@ -486,8 +486,8 @@ void CatalogManagerView::loadMarks()
KIO::NetAccess::removeTempFile( filename );
// test validity of list items
- QStringList testedList;
- QStringList::const_iterator it;
+ TQStringList testedList;
+ TQStringList::const_iterator it;
for( it=newMarkerList.constBegin() ; it!=newMarkerList.constEnd() ; ++it )
if( _fileList[(*it)] != 0 ) testedList.append( (*it) );
@@ -510,13 +510,13 @@ void CatalogManagerView::loadMarks()
void CatalogManagerView::saveMarks()
{
- const KURL url2 = KFileDialog::getSaveURL( QString(), "*.marklist", this );
+ const KURL url2 = KFileDialog::getSaveURL( TQString(), "*.marklist", this );
if( url2.isEmpty() ) return;
// ### FIXME: why is the file dialog not doing this?
if ( KIO::NetAccess::exists( url2, false, this ) )
{
- if(KMessageBox::warningContinueCancel(this,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url2.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
{
return;
@@ -531,19 +531,19 @@ void CatalogManagerView::saveMarks()
#endif
kdDebug() << "Saving marks: " << url2.prettyURL() << " most-local: " << url.prettyURL() << endl;
- QFile* file = 0;
+ TQFile* file = 0;
KTempFile* tempFile = 0;
- QTextStream* stream = 0;
+ TQTextStream* stream = 0;
bool error = false;
const bool localFile = url.isLocalFile();
if ( localFile )
{
// We have a local file
- file = new QFile( url.path() );
+ file = new TQFile( url.path() );
if ( file->open (IO_WriteOnly) )
{
- stream = new QTextStream( file );
+ stream = new TQTextStream( file );
}
else
{
@@ -561,7 +561,7 @@ void CatalogManagerView::saveMarks()
{
// ### TODO: try to get a better file format for KDE4 (XML?), one working with real relative paths (no / at start) and working with UTF-8
*stream << "[Markers]" << endl;
- for( QStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it )
+ for( TQStringList::const_iterator it = _markerList.constBegin(); it!=_markerList.constEnd() ; ++it )
*stream << (*it) << endl;
}
if ( error )
@@ -622,20 +622,20 @@ void CatalogManagerView::setPatternMarks(bool mark)
if (markPatternDialog->exec( ) != KDialog::Accepted)
return;
- QRegExp rx(markPatternDialog->pattern( ));
+ TQRegExp rx(markPatternDialog->pattern( ));
rx.setWildcard(!markPatternDialog->useRegExp( ));
rx.setCaseSensitive(markPatternDialog->isCaseSensitive( ));
- QStringList fileList = item->allChildrenList(true);
- for (QStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) {
+ TQStringList fileList = item->allChildrenList(true);
+ for (TQStringList::const_iterator it = fileList.constBegin( ); it != fileList.constEnd( ); ++it) {
CatManListItem * i = _fileList[*it];
- QString matchName;
+ TQString matchName;
if (i->hasPo( ))
matchName = i->poFile( );
else if (i->hasPot( ) && markPatternDialog->includeTemplates( ))
matchName = i->potFile( );
- matchName = QFileInfo(matchName).baseName( );
+ matchName = TQFileInfo(matchName).baseName( );
if (mark) {
if (!matchName.isEmpty( ) && rx.exactMatch(matchName) && !i->marked( )) {
@@ -670,7 +670,7 @@ void CatalogManagerView::statistics()
}
}
- QStringList doList;
+ TQStringList doList;
if( i->isFile() ) doList.append(i->package());
else doList = i->allChildrenList(true);
@@ -697,13 +697,13 @@ void CatalogManagerView::markedStatistics()
}
}
- QStringList doList;
+ TQStringList doList;
if( i->isFile() ) doList.append(i->package());
else doList = i->allChildrenList(true);
- QStringList markedDoList;
- QStringList::const_iterator it;
+ TQStringList markedDoList;
+ TQStringList::const_iterator it;
for( it = doList.constBegin(); it != doList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -713,11 +713,11 @@ void CatalogManagerView::markedStatistics()
showStatistics( i, markedDoList );
}
-void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childrenList )
+void CatalogManagerView::showStatistics( CatManListItem *i, TQStringList &childrenList )
{
KLocale *locale = KGlobal::locale();
- QString msg;
+ TQString msg;
int totalPackages=0;
int totalPo=0;
int totalNoPot=0;
@@ -726,7 +726,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr
int totalFuzzy=0;
int totalUntranslated=0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -764,7 +764,7 @@ void CatalogManagerView::showStatistics( CatManListItem *i, QStringList &childr
double percent;
- const QString name=i->package(false);
+ const TQString name=i->package(false);
if(name.isEmpty())
msg = i18n("Statistics for all:\n");
else
@@ -808,7 +808,7 @@ void CatalogManagerView::checkSyntax()
return;
Msgfmt::Status status;
- QString output;
+ TQString output;
Msgfmt msgfmt;
status=msgfmt.checkSyntax(item->poFile(),output);
@@ -851,18 +851,18 @@ void CatalogManagerView::checkSyntax()
else
{
Msgfmt::Status status;
- QString output;
+ TQString output;
Msgfmt msgfmt;
status=msgfmt.checkSyntaxInDir(item->poFile(), "*.po", output);
- QString name=item->package(false);
+ TQString name=item->package(false);
switch(status)
{
case Msgfmt::Ok:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("All files in folder %1 are syntactically correct.\n"
@@ -878,7 +878,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::SyntaxError:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("At least one file in folder %1 has syntax errors.\n"
@@ -894,7 +894,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::HeaderError:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("At least one file in folder %1 has header syntax errors.\n"
@@ -910,7 +910,7 @@ void CatalogManagerView::checkSyntax()
}
case Msgfmt::Error:
{
- QString msg;
+ TQString msg;
if(!name.isEmpty())
{
msg=i18n("An error occurred while processing \"msgfmt --statistics *.po\" "
@@ -940,12 +940,12 @@ void CatalogManagerView::checkSyntax()
void CatalogManagerView::roughTranslation()
{
- QPtrList<CatManListItem> result;
+ TQPtrList<CatManListItem> result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -966,9 +966,9 @@ void CatalogManagerView::markedRoughTranslation()
{
if( _markerList.count() == 0 ) return;
- QPtrList<CatManListItem> result;
+ TQPtrList<CatManListItem> result;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -984,10 +984,10 @@ void CatalogManagerView::mailFiles()
{
CatManListItem* item = (CatManListItem*)currentItem();
if(item->isDir()) {
- QStringList filesToSend;
- QStringList childrenList = item->allChildrenList(true);
+ TQStringList filesToSend;
+ TQStringList childrenList = item->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1007,8 +1007,8 @@ void CatalogManagerView::mailMarkedFiles()
if (_markerList.count() == 0)
return;
- QStringList filesToSend;
- QStringList::const_iterator it;
+ TQStringList filesToSend;
+ TQStringList::const_iterator it;
for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1022,24 +1022,24 @@ void CatalogManagerView::packageFiles( )
{
CatManListItem* item = (CatManListItem*)currentItem();
if(item->isDir()) {
- QStringList filesToPackage;
- QStringList childrenList = item->allChildrenList(true);
+ TQStringList filesToPackage;
+ TQStringList childrenList = item->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = childrenList.constBegin(); it != childrenList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
filesToPackage << i->poFile();
}
}
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( filesToPackage, packageFileName, QString::null, false );
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false );
}
else {
if (item->hasPo()) {
- QStringList fileToPackage(item->poFile());
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( fileToPackage, packageFileName, QString::null, false );
+ TQStringList fileToPackage(item->poFile());
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( fileToPackage, packageFileName, TQString::null, false );
}
}
}
@@ -1048,8 +1048,8 @@ void CatalogManagerView::packageMarkedFiles( )
if (_markerList.count() == 0)
return;
- QStringList filesToPackage;
- QStringList::const_iterator it;
+ TQStringList filesToPackage;
+ TQStringList::const_iterator it;
for (it = _markerList.constBegin(); it != _markerList.constEnd(); ++it) {
CatManListItem* i = _fileList[(*it)];
if (i->hasPo()) {
@@ -1057,8 +1057,8 @@ void CatalogManagerView::packageMarkedFiles( )
}
}
- QString packageFileName = KFileDialog::getSaveFileName(QString::null,"*.tar.bz2\n*.tar.gz",this);
- mailer->buildArchive( filesToPackage, packageFileName, QString::null, false );
+ TQString packageFileName = KFileDialog::getSaveFileName(TQString::null,"*.tar.bz2\n*.tar.gz",this);
+ mailer->buildArchive( filesToPackage, packageFileName, TQString::null, false );
}
// CVS
@@ -1122,8 +1122,8 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ
KSharedConfig* config = _project->sharedConfig();
if ( marked ) {
if ( _markerList.isEmpty() ) return;
- QStringList fileList;
- QStringList::const_iterator it;
+ TQStringList fileList;
+ TQStringList::const_iterator it;
for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) {
CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
@@ -1133,12 +1133,12 @@ void CatalogManagerView::doCVSCommand( CVS::Command cmd, bool marked, bool templ
}
cvshandler->execCVSCommand( this, cmd, fileList, templates, config );
} else {
- const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
- QString cvsItem;
+ const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
+ TQString cvsItem;
CatManListItem * item = (CatManListItem*)currentItem( );
if ( ( cmd == CVS::Commit || cmd == CVS::Diff ) && item->isDir( ) ) {
// all children including directories
- QStringList cvsItems = item->allChildrenFileList (true, false, true);
+ TQStringList cvsItems = item->allChildrenFileList (true, false, true);
if ( !cvsItems.isEmpty( ) )
cvshandler->execCVSCommand( this, cmd, cvsItems, templates, config );
} else {
@@ -1234,8 +1234,8 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ
KSharedConfig* config = _project->sharedConfig();
if ( marked ) {
if ( _markerList.isEmpty() ) return;
- QStringList fileList;
- QStringList::const_iterator it;
+ TQStringList fileList;
+ TQStringList::const_iterator it;
for ( it = _markerList.constBegin( ); it != _markerList.constEnd( ); ++it ) {
CatManListItem * i = _fileList[(*it)];
if ( templates && i->hasPot( ) )
@@ -1245,12 +1245,12 @@ void CatalogManagerView::doSVNCommand( SVN::Command cmd, bool marked, bool templ
}
svnhandler->execSVNCommand( this, cmd, fileList, templates, config );
} else {
- const QString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
- QString svnItem;
+ const TQString basedir = ( templates ? _settings.potBaseDir : _settings.poBaseDir );
+ TQString svnItem;
CatManListItem * item = (CatManListItem*)currentItem( );
if ( ( cmd == SVN::Commit || cmd == SVN::Diff ) && item->isDir( ) ) {
// all children including directories
- QStringList svnItems = item->allChildrenFileList (true, false, true);
+ TQStringList svnItems = item->allChildrenFileList (true, false, true);
if ( !svnItems.isEmpty( ) )
svnhandler->execSVNCommand( this, cmd, svnItems, templates, config );
} else {
@@ -1270,26 +1270,26 @@ void CatalogManagerView::showLog()
_logWindow->show();
}
-QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
+TQString CatalogManagerView::find( FindOptions &options, TQStringList &rest )
{
CatManListItem* i=(CatManListItem*) currentItem();
if(!i || options.inAllFiles)
i=(CatManListItem*)_dirList["/"];
- QValueList<QString> foundFiles;
+ TQValueList<TQString> foundFiles;
_stopSearch = false;
- const QString search = options.findStr.lower().simplifyWhiteSpace();
- QStringList searchWords = QStringList::split(' ', search);
+ const TQString search = options.findStr.lower().simplifyWhiteSpace();
+ TQStringList searchWords = TQStringList::split(' ', search);
- QStringList childrenList;
+ TQStringList childrenList;
if( i->isFile() ) childrenList.append(i->name());
else childrenList =i->allChildrenList(true);
emit prepareFindProgressBar(childrenList.size());
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childrenList.constBegin(); it != childrenList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1314,7 +1314,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
else doSearch = true; // we do not have index, we need to search
if( doSearch )
{
- QString itemFile;
+ TQString itemFile;
if( options.inTemplates )
{
if( item->hasPot() ) itemFile=item->potFile();
@@ -1338,14 +1338,14 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
_stopSearch = false;
return itemFile;
}
- const QString foundItemFile = itemFile;
+ const TQString foundItemFile = itemFile;
it++;
while( it != childrenList.constEnd() )
{
CatManListItem *item = _fileList[(*it)];
- itemFile = QString::null;
+ itemFile = TQString::null;
if( options.inTemplates )
{
if( item->hasPot() ) itemFile=item->potFile();
@@ -1353,7 +1353,7 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
if( item->hasPo() )itemFile=item->poFile();
}
if( options.inMarkedFiles && !item->marked() )
- itemFile=QString::null;
+ itemFile=TQString::null;
if( !itemFile.isNull())
{
@@ -1380,23 +1380,23 @@ QString CatalogManagerView::find( FindOptions &options, QStringList &rest )
_stopSearch = false;
rest.clear();
if( _updateNesting == 0 && !_stop ) emit updateFinished();
- return QString::null;
+ return TQString::null;
}
}
- return QString::null;
+ return TQString::null;
}
-bool CatalogManagerView::hasMatchingWords( QStringList &itemWords, QStringList &searchWords)
+bool CatalogManagerView::hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords)
{
- for( QStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
- for( QStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
+ for( TQStringList::const_iterator it1 = searchWords.constBegin() ; it1 != searchWords.constEnd() ; ++it1 )
+ for( TQStringList::const_iterator it2 = itemWords.constBegin() ; it2 != itemWords.constEnd() ; ++it2 )
if( *it1 == *it2
|| (*it1).contains(*it2)
|| (*it2).contains(*it1) ) return true;
return false;
}
-void CatalogManagerView::showContentsMenu(QListViewItem *i, const QPoint &point, int)
+void CatalogManagerView::showContentsMenu(TQListViewItem *i, const TQPoint &point, int)
{
CatManListItem* item = (CatManListItem*) i;
@@ -1427,7 +1427,7 @@ void CatalogManagerView::checkSelected()
emit selectedChanged(actionValue);
}
-void CatalogManagerView::activateItem(QListViewItem *)
+void CatalogManagerView::activateItem(TQListViewItem *)
{
CatManListItem* item=(CatManListItem*) currentItem();
@@ -1471,7 +1471,7 @@ void CatalogManagerView::slotOpenFileInNewWindow()
if(item && item->isFile())
{
- QString filename;
+ TQString filename;
if(item->hasPo())
{
emit openFileInNewWindow(item->poFile(),item->package());
@@ -1499,10 +1499,10 @@ void CatalogManagerView::slotDeleteFile()
if(item && item->isFile() && item->hasPo() && !item->hasPot())
{
- const QString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile());
+ const TQString msg=i18n("Do you really want to delete the file %1?").arg(item->poFile());
if(KMessageBox::warningContinueCancel(this,msg,i18n("Warning"),KGuiItem( i18n("Delete"), "editdelete"))== KMessageBox::Continue)
{
- if(!QFile::remove(item->poFile()))
+ if(!TQFile::remove(item->poFile()))
{
KMessageBox::sorry(this,i18n("Was not able to delete the file %1!").arg(item->poFile()));
}
@@ -1545,9 +1545,9 @@ void CatalogManagerView::slotToggleMarksInDir()
if(i && i->isDir())
{
- const QStringList contentList = i->allChildrenList(true);
+ const TQStringList contentList = i->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1579,9 +1579,9 @@ void CatalogManagerView::slotClearMarksInDir()
if(i && i->isDir())
{
- const QStringList contentList=i->contentsList(true);
+ const TQStringList contentList=i->contentsList(true);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
CatManListItem* item = _fileList[(*it)];
@@ -1608,7 +1608,7 @@ void CatalogManagerView::slotDirCommand(int index)
if(index>=0 && item && item->isDir())
{
- QString cmd=*(_settings.dirCommands).at(index);
+ TQString cmd=*(_settings.dirCommands).at(index);
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@PODIR@",item->poFile());
cmd.replace("@POTDIR@",item->potFile());
@@ -1620,12 +1620,12 @@ void CatalogManagerView::slotDirCommand(int index)
KProcess* proc = new KShellProcess();
_pendingProcesses.append(proc);
- connect( proc,SIGNAL( processExited(KProcess *) ), this
- ,SLOT( processEnded(KProcess*) ) );
- connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
- connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this
+ ,TQT_SLOT( processEnded(KProcess*) ) );
+ connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
*proc << "cd" << item->poFile() << ";" << cmd;
proc->start(KProcess::NotifyOnExit,KProcess::AllOutput);
@@ -1640,7 +1640,7 @@ void CatalogManagerView::slotFileCommand(int index)
{
CatManListItem* parent = (CatManListItem*)item->parent();
- QString cmd=*(_settings.fileCommands).at(index);
+ TQString cmd=*(_settings.fileCommands).at(index);
cmd.replace("@PACKAGE@",item->name());
cmd.replace("@POFILE@",item->poFile());
cmd.replace("@POTFILE@",item->potFile());
@@ -1653,12 +1653,12 @@ void CatalogManagerView::slotFileCommand(int index)
KProcess* proc = new KShellProcess();
_pendingProcesses.append(proc);
- connect( proc,SIGNAL( processExited(KProcess *) ), this
- ,SLOT( processEnded(KProcess*) ) );
- connect( proc,SIGNAL( receivedStdout(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
- connect( proc,SIGNAL( receivedStderr(KProcess*,char*,int) ), this
- ,SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( processExited(KProcess *) ), this
+ ,TQT_SLOT( processEnded(KProcess*) ) );
+ connect( proc,TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
+ connect( proc,TQT_SIGNAL( receivedStderr(KProcess*,char*,int) ), this
+ ,TQT_SLOT( showOutput(KProcess*,char*,int) ) );
*proc << "cd" << parent->poFile() << ";" << cmd;
proc->start(KProcess::NotifyOnExit,KProcess::AllOutput);
@@ -1667,9 +1667,9 @@ void CatalogManagerView::slotFileCommand(int index)
}
-void CatalogManagerView::updateFile(QString fileWithPath, bool force)
+void CatalogManagerView::updateFile(TQString fileWithPath, bool force)
{
- QString relFile;
+ TQString relFile;
if(fileWithPath.startsWith(_settings.poBaseDir))
{
relFile=fileWithPath.mid(_settings.poBaseDir.length());
@@ -1704,9 +1704,9 @@ void CatalogManagerView::updateFile(QString fileWithPath, bool force)
}
-void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo)
+void CatalogManagerView::updateAfterSave(TQString fileWithPath, PoInfo &newInfo)
{
- QString relFile;
+ TQString relFile;
if(fileWithPath.startsWith(_settings.poBaseDir))
{
relFile=fileWithPath.mid(_settings.poBaseDir.length());
@@ -1741,7 +1741,7 @@ void CatalogManagerView::updateAfterSave(QString fileWithPath, PoInfo &newInfo)
void CatalogManagerView::buildTree()
{
// in case we were called after settings update
- disconnect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) );
+ disconnect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) );
emit signalBuildTree(false); // announce start of building
@@ -1760,7 +1760,7 @@ void CatalogManagerView::buildTree()
_dirList.insert("/",root);
//root->setSelectable(false);
- QFileInfo fileInfo(_settings.poBaseDir);
+ TQFileInfo fileInfo(_settings.poBaseDir);
if(!fileInfo.isDir())
{
KMessageBox::error(this,i18n("You have not specified a valid folder "
@@ -1833,7 +1833,7 @@ void CatalogManagerView::buildTree()
}
// first read information about the files...
- QDictIterator<CatManListItem> it( _fileList ); // iterator for dict
+ TQDictIterator<CatManListItem> it( _fileList ); // iterator for dict
int i=0;
while ( it.current() && !_stop)
@@ -1844,7 +1844,7 @@ void CatalogManagerView::buildTree()
}
// ...then update directories
- QDictIterator<CatManListItem> dit( _dirList ); // iterator for dict
+ TQDictIterator<CatManListItem> dit( _dirList ); // iterator for dict
while ( dit.current() && !_stop)
{
@@ -1868,12 +1868,12 @@ void CatalogManagerView::buildTree()
}
}
-bool CatalogManagerView::buildDir(QString relDir,bool fast)
+bool CatalogManagerView::buildDir(TQString relDir,bool fast)
{
if( _stop ) return false;
bool haveTemplateDir=true;
- QFileInfo fileInfo;
+ TQFileInfo fileInfo;
fileInfo.setFile(_settings.potBaseDir);
if(!fileInfo.isDir())
@@ -1891,8 +1891,8 @@ bool CatalogManagerView::buildDir(QString relDir,bool fast)
}
-bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
- , const QString extension , bool fast)
+bool CatalogManagerView::buildDir(const TQString& baseDir,const TQString& relDir
+ , const TQString extension , bool fast)
{
if( _stop ) return false;
@@ -1905,14 +1905,14 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
return false;
}
- const QString poBaseDir=_settings.poBaseDir;
- const QString potBaseDir=_settings.potBaseDir;
+ const TQString poBaseDir=_settings.poBaseDir;
+ const TQString potBaseDir=_settings.potBaseDir;
// traverse directory in poBaseDir
- QDir dir(baseDir+relDir);
- QStringList entryList=dir.entryList("*"+extension,QDir::Files,QDir::Name);
+ TQDir dir(baseDir+relDir);
+ TQStringList entryList=dir.entryList("*"+extension,TQDir::Files,TQDir::Name);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it )
{
@@ -1920,8 +1920,8 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
havePoFiles=true;
- QString file=relDir+(*it);
- file.remove(QRegExp(extension+"$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(extension+"$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -1941,7 +1941,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
}
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd() && !_stop ; ++it )
{
@@ -1952,7 +1952,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
continue;
}
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(baseDir+subDir))
{
_dirWatch->addDir(baseDir+subDir);
@@ -1987,7 +1987,7 @@ bool CatalogManagerView::buildDir(const QString& baseDir,const QString& relDir
}
-void CatalogManagerView::updateDir(QString relDir)
+void CatalogManagerView::updateDir(TQString relDir)
{
if( _stop ) return;
@@ -2002,16 +2002,16 @@ void CatalogManagerView::updateDir(QString relDir)
return;
}
- QStringList contentList = thisItem->contentsList(true);
+ TQStringList contentList = thisItem->contentsList(true);
- const QString poBaseDir=_settings.poBaseDir;
- const QString potBaseDir=_settings.potBaseDir;
+ const TQString poBaseDir=_settings.poBaseDir;
+ const TQString potBaseDir=_settings.potBaseDir;
// first lookup template directory
- QDir dir(potBaseDir+relDir);
- QStringList entryList=dir.entryList("*.pot",QDir::Files,QDir::Name);
+ TQDir dir(potBaseDir+relDir);
+ TQStringList entryList=dir.entryList("*.pot",TQDir::Files,TQDir::Name);
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2019,8 +2019,8 @@ void CatalogManagerView::updateDir(QString relDir)
havePoFiles=true;
- QString file=relDir+(*it);
- file.remove(QRegExp(".pot$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(".pot$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -2042,7 +2042,7 @@ void CatalogManagerView::updateDir(QString relDir)
contentList.remove(file);
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2055,7 +2055,7 @@ void CatalogManagerView::updateDir(QString relDir)
bool newDirAdded=false;
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(potBaseDir+subDir))
{
_dirWatch->addDir(potBaseDir+subDir);
@@ -2093,7 +2093,7 @@ void CatalogManagerView::updateDir(QString relDir)
// now traverse directory in poBaseDir
dir.setPath(poBaseDir+relDir);
- entryList=dir.entryList("*.po",QDir::Files,QDir::Name);
+ entryList=dir.entryList("*.po",TQDir::Files,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2101,8 +2101,8 @@ void CatalogManagerView::updateDir(QString relDir)
if( _stop ) return;
- QString file=relDir+(*it);
- file.remove(QRegExp(".po$"));
+ TQString file=relDir+(*it);
+ file.remove(TQRegExp(".po$"));
CatManListItem* item = _fileList[file];
if(!item)
{
@@ -2124,7 +2124,7 @@ void CatalogManagerView::updateDir(QString relDir)
contentList.remove(file);
}
- entryList=dir.entryList(QDir::Dirs,QDir::Name);
+ entryList=dir.entryList(TQDir::Dirs,TQDir::Name);
for ( it = entryList.constBegin(); it != entryList.constEnd(); ++it )
{
@@ -2137,7 +2137,7 @@ void CatalogManagerView::updateDir(QString relDir)
bool newDirAdded=false;
- QString subDir=relDir+(*it)+"/";
+ TQString subDir=relDir+(*it)+"/";
if(!_dirWatch->contains(poBaseDir+subDir))
{
_dirWatch->addDir(poBaseDir+subDir);
@@ -2180,11 +2180,11 @@ void CatalogManagerView::updateDir(QString relDir)
// but only if we traversed also the template directory
if(contentList.count()>0)
{
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = contentList.constBegin(); it != contentList.constEnd(); ++it )
{
- QFileInfo po(poBaseDir+(*it));
- QFileInfo pot(potBaseDir+(*it));
+ TQFileInfo po(poBaseDir+(*it));
+ TQFileInfo pot(potBaseDir+(*it));
if(!po.exists() && !pot.exists())
{
@@ -2217,11 +2217,11 @@ void CatalogManagerView::updateDir(QString relDir)
}
}
-void CatalogManagerView::directoryChanged(const QString& dir)
+void CatalogManagerView::directoryChanged(const TQString& dir)
{
pause(true);
- QString relDir, relDirPo, relDirPot;
+ TQString relDir, relDirPo, relDirPot;
if(dir.startsWith(_settings.poBaseDir))
{
relDirPo=dir.mid(_settings.poBaseDir.length());
@@ -2261,13 +2261,13 @@ void CatalogManagerView::directoryChanged(const QString& dir)
kdDebug(KBABEL_CATMAN) << "directory changed: " << relDir << endl;
- QFileInfo fileInfo(_settings.potBaseDir);
+ TQFileInfo fileInfo(_settings.potBaseDir);
CatManListItem* thisItem=_dirList[relDir];
if(!thisItem)
{
// if this item is not in the list search for next existing parent item
- QString prevRelDir;
+ TQString prevRelDir;
do
{
prevRelDir=relDir;
@@ -2312,11 +2312,11 @@ void CatalogManagerView::directoryChanged(const QString& dir)
}
-void CatalogManagerView::directoryDeleted(const QString& dir)
+void CatalogManagerView::directoryDeleted(const TQString& dir)
{
pause(true);
- QString relDir, relDirPo, relDirPot;
+ TQString relDir, relDirPo, relDirPot;
if(dir.startsWith(_settings.poBaseDir))
{
relDirPo=dir.mid(_settings.poBaseDir.length());
@@ -2371,10 +2371,10 @@ void CatalogManagerView::directoryDeleted(const QString& dir)
}
else
{
- QStringList childList = thisItem->contentsList();
+ TQStringList childList = thisItem->contentsList();
CatManListItem* item;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childList.constBegin();it != childList.constEnd(); ++it )
{
item=_fileList[(*it)];
@@ -2415,7 +2415,7 @@ void CatalogManagerView::directoryDeleted(const QString& dir)
pause(false);
}
-void CatalogManagerView::fileInfoRead( QString filename )
+void CatalogManagerView::fileInfoRead( TQString filename )
{
if( _readInfoFileList.find( filename ) != _readInfoFileList.end() ) {
emit progress( ++_readInfoCount);
@@ -2437,25 +2437,25 @@ void CatalogManagerView::setSettings(CatManSettings newSettings)
_dirCommandsMenu->clear();
int counter=0;
- for ( QStringList::const_iterator it = _settings.dirCommandNames.constBegin()
+ for ( TQStringList::const_iterator it = _settings.dirCommandNames.constBegin()
; it != _settings.dirCommandNames.constEnd(); ++it )
{
_dirCommandsMenu->insertItem((*it),counter);
counter++;
}
_dirCommandsMenu->insertSeparator();
- _dirCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog()));
+ _dirCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog()));
_fileCommandsMenu->clear();
counter=0;
- for ( QStringList::const_iterator it = _settings.fileCommandNames.constBegin()
+ for ( TQStringList::const_iterator it = _settings.fileCommandNames.constBegin()
; it != _settings.fileCommandNames.constEnd(); ++it )
{
_fileCommandsMenu->insertItem((*it),counter);
counter++;
}
_fileCommandsMenu->insertSeparator();
- _fileCommandsMenu->insertItem(i18n("Log Window"),this,SLOT(showLog()));
+ _fileCommandsMenu->insertItem(i18n("Log Window"),this,TQT_SLOT(showLog()));
const bool pathChanged = (oldSettings.poBaseDir!=_settings.poBaseDir)
|| (oldSettings.potBaseDir!=_settings.potBaseDir);
@@ -2463,10 +2463,10 @@ void CatalogManagerView::setSettings(CatManSettings newSettings)
if(pathChanged)
{
if( !isActive() ) {
- QTimer::singleShot(100,this,SLOT(buildTree()));
+ TQTimer::singleShot(100,this,TQT_SLOT(buildTree()));
} else {
stop();
- connect( this, SIGNAL( updateFinished() ), this, SLOT(buildTree() ) );
+ connect( this, TQT_SIGNAL( updateFinished() ), this, TQT_SLOT(buildTree() ) );
}
}
@@ -2487,7 +2487,7 @@ CatManSettings CatalogManagerView::settings() const
}
-void CatalogManagerView::hideEvent(QHideEvent*)
+void CatalogManagerView::hideEvent(TQHideEvent*)
{
pause(true);
@@ -2495,9 +2495,9 @@ void CatalogManagerView::hideEvent(QHideEvent*)
_dirWatch->stopScan();
}
-void CatalogManagerView::showEvent(QShowEvent*)
+void CatalogManagerView::showEvent(TQShowEvent*)
{
- QTimer::singleShot(1,this,SLOT(checkUpdate()));
+ TQTimer::singleShot(1,this,TQT_SLOT(checkUpdate()));
pause(false);
@@ -2505,15 +2505,15 @@ void CatalogManagerView::showEvent(QShowEvent*)
_dirWatch->startScan(true);
}
-void CatalogManagerView::contentsMousePressEvent(QMouseEvent* event)
+void CatalogManagerView::contentsMousePressEvent(TQMouseEvent* event)
{
if(event->button() == LeftButton)
_pressPos=event->pos();
- QListView::contentsMousePressEvent( event );
+ TQListView::contentsMousePressEvent( event );
}
-void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event)
+void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event)
{
if(event->state() & LeftButton)
{
@@ -2526,29 +2526,29 @@ void CatalogManagerView::contentsMouseMoveEvent(QMouseEvent* event)
{
// always add the po-file and if existing the pot-file to the drag and
// let the user decide what to do, when dropping into kbabel
- QStrList uri;
- uri.append(QUriDrag::localFileToUri(item->poFile()));
+ TQStrList uri;
+ uri.append(TQUriDrag::localFileToUri(item->poFile()));
if(item->hasPot())
- uri.append(QUriDrag::localFileToUri(item->potFile()));
+ uri.append(TQUriDrag::localFileToUri(item->potFile()));
- QUriDrag* drag = new QUriDrag(uri,this);
- QPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop);
- drag->setPixmap(icon,QPoint(icon.width()/2,icon.height()/2));
+ TQUriDrag* drag = new TQUriDrag(uri,this);
+ TQPixmap icon=KGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop);
+ drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2));
drag->drag();
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
else
{
- QListView::contentsMouseMoveEvent(event);
+ TQListView::contentsMouseMoveEvent(event);
}
}
@@ -2568,7 +2568,7 @@ void CatalogManagerView::saveMarker( KConfig* config) const
}
-void CatalogManagerView::deleteDirItem(QString relDir)
+void CatalogManagerView::deleteDirItem(TQString relDir)
{
CatManListItem* thisItem=_dirList[relDir];
@@ -2577,9 +2577,9 @@ void CatalogManagerView::deleteDirItem(QString relDir)
_dirList.remove(relDir);
- QStringList childList = thisItem->allChildrenList();
+ TQStringList childList = thisItem->allChildrenList();
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = childList.constBegin();it != childList.constEnd(); ++it )
{
if(!_fileList.remove((*it)))
@@ -2601,12 +2601,12 @@ void CatalogManagerView::processEnded(KProcess* proc)
void CatalogManagerView::showOutput(KProcess*, char *buffer, int buflen)
{
- const QCString output(buffer,buflen+1);
+ const TQCString output(buffer,buflen+1);
_logView->insert(output);
}
-void CatalogManagerView::columnClicked(QListViewItem * item, const QPoint &, int c)
+void CatalogManagerView::columnClicked(TQListViewItem * item, const TQPoint &, int c)
{
if( item && c == COL_MARKER )
{
@@ -2878,14 +2878,14 @@ void CatalogManagerView::gotoPreviousMarked()
}
}
-QStringList CatalogManagerView::current()
+TQStringList CatalogManagerView::current()
{
- QStringList result;
+ TQStringList result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2899,11 +2899,11 @@ QStringList CatalogManagerView::current()
return result;
}
-QStringList CatalogManagerView::marked()
+TQStringList CatalogManagerView::marked()
{
- QStringList result;
+ TQStringList result;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = _markerList.constBegin() ; it != _markerList.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2943,9 +2943,9 @@ void CatalogManagerView::updateCurrent()
}
}
-void CatalogManagerView::updateFiles( const QStringList& files )
+void CatalogManagerView::updateFiles( const TQStringList& files )
{
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.constBegin( ); it != files.constEnd( ); ++it ) {
updateFile( *it, true );
}
@@ -2961,14 +2961,14 @@ SVNHandler * CatalogManagerView::svnHandler( )
return svnhandler;
}
-void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QString& command )
+void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const TQString& command )
{
- QStringList result;
+ TQStringList result;
CatManListItem *current = static_cast<CatManListItem *>(currentItem());
if( current->isDir() )
{
- const QStringList s = current->allChildrenList(true);
- QStringList::const_iterator it;
+ const TQStringList s = current->allChildrenList(true);
+ TQStringList::const_iterator it;
for( it = s.constBegin() ; it != s.constEnd(); ++it )
{
CatManListItem *item = _fileList[(*it)];
@@ -2983,12 +2983,12 @@ void CatalogManagerView::validateUsingTool( const KDataToolInfo &tool, const QSt
validate_internal( result, tool, command );
}
-void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const QString& command )
+void CatalogManagerView::validateMarkedUsingTool( const KDataToolInfo &tool, const TQString& command )
{
validate_internal( _markerList, tool, command );
}
-void CatalogManagerView::validate_internal( const QStringList& files, const KDataToolInfo &tool, const QString& )
+void CatalogManagerView::validate_internal( const TQStringList& files, const KDataToolInfo &tool, const TQString& )
{
if( files.isEmpty() ) return;
@@ -3015,7 +3015,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
_validateOptions->ignoreFuzzy->setChecked( _ignoreFuzzy );
}
- if( _validateOptionsDlg->exec() != QDialog::Accepted )
+ if( _validateOptionsDlg->exec() != TQDialog::Accepted )
{
delete t;
@@ -3025,8 +3025,8 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
if( !_validateDialog )
{
_validateDialog = new ValidateProgressDialog(_settings.ignoreURL, this);
- connect( _validateDialog, SIGNAL( errorDoubleClicked(const QString,const int)),
- this, SLOT(showError( const QString, const int )));
+ connect( _validateDialog, TQT_SIGNAL( errorDoubleClicked(const TQString,const int)),
+ this, TQT_SLOT(showError( const TQString, const int )));
}
_markAsFuzzy = _validateOptions->markAsFuzzy->isChecked();
@@ -3035,9 +3035,9 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
_validateDialog->setMarkAsFuzzy(_markAsFuzzy);
_validateDialog->setIgnoreFuzzy(_ignoreFuzzy);
- QPtrList<CatManListItem> fileitems;
+ TQPtrList<CatManListItem> fileitems;
- for( QValueListConstIterator<QString> it=files.begin() ; it!=files.end() ; ++it )
+ for( TQValueListConstIterator<TQString> it=files.begin() ; it!=files.end() ; ++it )
{
CatManListItem* item=_fileList[ (*it) ];
if( item ) {
@@ -3050,7 +3050,7 @@ void CatalogManagerView::validate_internal( const QStringList& files, const KDat
delete t;
}
-void CatalogManagerView::showError( const QString package, const int num )
+void CatalogManagerView::showError( const TQString package, const int num )
{
CatManListItem* item = _fileList[ package];
if( !item )
@@ -3064,9 +3064,9 @@ void CatalogManagerView::showError( const QString package, const int num )
void CatalogManagerView::updateMarkerList()
{
- QStringList newMarkers;
+ TQStringList newMarkers;
- for( QStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) {
+ for( TQStringList::const_iterator it = _markerList.constBegin(); it != _markerList.constEnd(); ++it ) {
if( _fileList[ (*it) ] )
newMarkers.append( (*it) );
}
diff --git a/kbabel/catalogmanager/catalogmanagerview.h b/kbabel/catalogmanager/catalogmanagerview.h
index e4421973..9c93d195 100644
--- a/kbabel/catalogmanager/catalogmanagerview.h
+++ b/kbabel/catalogmanager/catalogmanagerview.h
@@ -35,17 +35,17 @@
#ifndef CATALOGMANAGERVIEW_H
#define CATALOGMANAGERVIEW_H
-#include <qdict.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
#include <kdialogbase.h>
#include <kdirwatch.h>
#include <kprocess.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "kbproject.h"
#include "projectsettings.h"
@@ -78,7 +78,7 @@ class CatalogManagerView : public QListView
{
Q_OBJECT
public:
- CatalogManagerView(KBabel::Project::Ptr project, QWidget* parent=0, const char* name=0);
+ CatalogManagerView(KBabel::Project::Ptr project, TQWidget* parent=0, const char* name=0);
virtual ~CatalogManagerView();
KBabel::CatManSettings settings() const;
@@ -89,9 +89,9 @@ public:
void pause(bool);
/** if file fileWithPath exists in the treeview, this is updated */
- void updateFile(QString fileWithPath, bool force = false);
+ void updateFile(TQString fileWithPath, bool force = false);
- void updateAfterSave(QString fileWithPath, KBabel::PoInfo &info);
+ void updateAfterSave(TQString fileWithPath, KBabel::PoInfo &info);
bool isActive() const {return _active;}
bool isStopped() const {return _stop;}
@@ -99,10 +99,10 @@ public:
void restoreView(KConfig *config);
void saveView(KConfig *config) const;
- void setRMBMenuFile( QPopupMenu *m);
- void setRMBMenuDir( QPopupMenu *m);
- void setDirCommandsMenu( QPopupMenu *m);
- void setFileCommandsMenu( QPopupMenu *m);
+ void setRMBMenuFile( TQPopupMenu *m);
+ void setRMBMenuDir( TQPopupMenu *m);
+ void setDirCommandsMenu( TQPopupMenu *m);
+ void setFileCommandsMenu( TQPopupMenu *m);
CVSHandler * cvsHandler();
SVNHandler * svnHandler();
@@ -184,7 +184,7 @@ public slots:
void svnInfo();
void svnInfoMarked();
- QString find(KBabel::FindOptions &options, QStringList &rest);
+ TQString find(KBabel::FindOptions &options, TQStringList &rest);
void showLog();
@@ -193,7 +193,7 @@ public slots:
/**
* Stop searching, do not try to proceed to the next file
* @ref @find will return clear list of rest to be searched
- * and @ref QString::null, if search string was not is the last searched file
+ * and @ref TQString::null, if search string was not is the last searched file
*/
void stopSearch();
@@ -201,7 +201,7 @@ public slots:
* Information for this file has been read. If the file is in
* @ref @_readInfoFileList, it will update progress bar by emitting @ref @progress
*/
- void fileInfoRead( QString file );
+ void fileInfoRead( TQString file );
void gotoNextUntranslated();
void gotoPreviousUntranslated();
@@ -218,10 +218,10 @@ public slots:
void gotoNextMarked();
void gotoPreviousMarked();
- void validateUsingTool( const KDataToolInfo &, const QString& );
- void validateMarkedUsingTool( const KDataToolInfo &, const QString& );
+ void validateUsingTool( const KDataToolInfo &, const TQString& );
+ void validateMarkedUsingTool( const KDataToolInfo &, const TQString& );
- void showError( const QString package, const int num);
+ void showError( const TQString package, const int num);
void updateCurrent();
@@ -230,33 +230,33 @@ public slots:
* after 'cvs commit' or 'svn commit' the file contents have not changed
* but the CVS/SVN file status could have changed.
*/
- void updateFiles( const QStringList& files );
+ void updateFiles( const TQStringList& files );
/**
* Returns the list of all currently selected files. If current selection is dir,
* it returns list of all its children.
*/
- QStringList current();
+ TQStringList current();
/**
* Returns the list of all currently marked files.
*/
- QStringList marked();
+ TQStringList marked();
signals:
- void openFile(QString filename,QString package);
- void openFileInNewWindow(QString filename,QString package);
- void openTemplate(QString openFilename,QString saveFileName,QString package);
- void openTemplateInNewWindow(QString openFilename,QString saveFileName,QString package);
- void gotoFileEntry(QString filename,QString package,int msgid);
- void prepareProgressBar(QString msg,int max);
+ void openFile(TQString filename,TQString package);
+ void openFileInNewWindow(TQString filename,TQString package);
+ void openTemplate(TQString openFilename,TQString saveFileName,TQString package);
+ void openTemplateInNewWindow(TQString openFilename,TQString saveFileName,TQString package);
+ void gotoFileEntry(TQString filename,TQString package,int msgid);
+ void prepareProgressBar(TQString msg,int max);
void progress(int);
void clearProgressBar();
void prepareFindProgressBar(int max);
void signalBuildTree(bool done);
void signalSearchedFile(int count);
- void newValidationFile(QString);
- void newValidationTool(QString);
+ void newValidationFile(TQString);
+ void newValidationTool(TQString);
void setValidationProgressBar(int);
void advanceValidationFileProgressBar(int);
void setMaxValidationProgressBar(int);
@@ -284,7 +284,7 @@ protected:
* @see CatalogManagerView::buildDir
* @see CatalogManagerView::updateDir
*/
- bool buildDir(QString relDir,bool fast=true);
+ bool buildDir(TQString relDir,bool fast=true);
/**
* This function is traversing the real directory on the
@@ -297,7 +297,7 @@ protected:
* @see CatalogManagerView::buildDir
* @see CatalogManagerView::updateDir
*/
- bool buildDir(const QString& baseDir,const QString& relDir, const QString extension,bool fast=true);
+ bool buildDir(const TQString& baseDir,const TQString& relDir, const TQString extension,bool fast=true);
/**
* updates dir relDir and if any new subdir is added
@@ -306,27 +306,27 @@ protected:
* This function doesn't enters subdirs except when a new subdir is added.
* @see CatalogManagerView::buildDir
*/
- void updateDir(QString relDir);
+ void updateDir(TQString relDir);
/**
* stops the update timer and the dirwatch
* @see KDirWatch::stop
- * @see QTimer::stop
+ * @see TQTimer::stop
*/
- virtual void hideEvent(QHideEvent*);
+ virtual void hideEvent(TQHideEvent*);
/**
* restarts the update timer and the dirwatch
* @see KDirWatch::start
- * @see QTimer::start
+ * @see TQTimer::start
*/
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
/** used for dragging */
- virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
/** used for dragging */
- virtual void contentsMouseMoveEvent(QMouseEvent* e);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e);
- void showStatistics( CatManListItem *i, QStringList &packages);
+ void showStatistics( CatManListItem *i, TQStringList &packages);
protected slots:
/** rebuilds the tree*/
@@ -338,13 +338,13 @@ protected slots:
void checkUpdate();
/** this is called from KDirWatch when a directory has changed */
- void directoryChanged(const QString& dir);
+ void directoryChanged(const TQString& dir);
/** this is called from KDirWatch when a directory has been deleted */
- void directoryDeleted(const QString& dir);
+ void directoryDeleted(const TQString& dir);
- void showContentsMenu(QListViewItem *, const QPoint &, int col);
+ void showContentsMenu(TQListViewItem *, const TQPoint &, int col);
/** does the default action on the currently selected item*/
- void activateItem(QListViewItem *);
+ void activateItem(TQListViewItem *);
/** emits the state of the selected item using selectedChanged*/
void checkSelected();
/** calls @ref activateItem with the selected item as argument*/
@@ -366,7 +366,7 @@ protected slots:
private slots:
void showOutput(KProcess *proc, char *buffer, int buflen);
void processEnded(KProcess *proc);
- void columnClicked(QListViewItem * item, const QPoint & pnt, int c);
+ void columnClicked(TQListViewItem * item, const TQPoint & pnt, int c);
void slotToggleCVSOrSVNColumn( bool );
@@ -396,33 +396,33 @@ private:
* deletes item with package name (relative directory) relDir
* and makes sure, that all subitems are removed from the lists
*/
- void deleteDirItem(QString relDir);
+ void deleteDirItem(TQString relDir);
- bool hasMatchingWords( QStringList &itemWords, QStringList &searchWords);
+ bool hasMatchingWords( TQStringList &itemWords, TQStringList &searchWords);
CatManListItem *itemBelow( CatManListItem *item );
CatManListItem *itemAbove( CatManListItem *item );
- void validate_internal( const QStringList&, const KDataToolInfo &, const QString& );
+ void validate_internal( const TQStringList&, const KDataToolInfo &, const TQString& );
void doCVSCommand( CVS::Command cmd, bool marked = false, bool templates = false );
void doSVNCommand( SVN::Command cmd, bool marked = false, bool templates = false );
private:
- QDict<CatManListItem> _dirList;
- QDict<CatManListItem> _fileList;
+ TQDict<CatManListItem> _dirList;
+ TQDict<CatManListItem> _fileList;
KDirWatch *_dirWatch;
- QTimer *_updateTimer;
+ TQTimer *_updateTimer;
// list of files for which was calculated the progress bar for reading file info
- QStringList _readInfoFileList;
+ TQStringList _readInfoFileList;
// current count of already read files in @ref @_readInfoFileList.
int _readInfoCount;
KBabel::CatManSettings _settings;
- QStringList _markerList;
+ TQStringList _markerList;
bool _active;
// stopping, application quit
@@ -431,17 +431,17 @@ private:
bool _stopSearch;
int _updateNesting;
- QPtrList<KProcess> _pendingProcesses;
+ TQPtrList<KProcess> _pendingProcesses;
- QTextEdit* _logView;
+ TQTextEdit* _logView;
KDialogBase* _logWindow;
- QPopupMenu* _fileContentsMenu;
- QPopupMenu* _dirContentsMenu;
- QPopupMenu* _dirCommandsMenu;
- QPopupMenu* _fileCommandsMenu;
+ TQPopupMenu* _fileContentsMenu;
+ TQPopupMenu* _dirContentsMenu;
+ TQPopupMenu* _dirCommandsMenu;
+ TQPopupMenu* _fileCommandsMenu;
/** used for starting a drag */
- QPoint _pressPos;
+ TQPoint _pressPos;
KBabelDictBox* _dictBox;
diff --git a/kbabel/catalogmanager/catmanlistitem.cpp b/kbabel/catalogmanager/catmanlistitem.cpp
index 249cb053..5613a0bd 100644
--- a/kbabel/catalogmanager/catmanlistitem.cpp
+++ b/kbabel/catalogmanager/catmanlistitem.cpp
@@ -42,29 +42,29 @@
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <cvshandler.h>
#include <svnhandler.h>
using namespace KBabel;
-CatManListItem::CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath,QString fullPotPath,QString package)
- : QListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath,TQString fullPotPath,TQString package)
+ : TQListViewItem(parent)
{
_view = view;
init(fullPath,fullPotPath,package);
}
-CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath,QString fullPotPath)
- : QListViewItem(parent)
+CatManListItem::CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath,TQString fullPotPath)
+ : TQListViewItem(parent)
{
- _primary=QFileInfo(fullPath);
- _template=QFileInfo(fullPotPath);
+ _primary=TQFileInfo(fullPath);
+ _template=TQFileInfo(fullPotPath);
_package="/";
_type=Dir;
_marked=false;
@@ -82,10 +82,10 @@ CatManListItem::CatManListItem(CatalogManagerView *view, QListView* parent,QStri
}
-void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, const QString& package)
+void CatManListItem::init(const TQString& fullPath, const TQString& fullPotPath, const TQString& package)
{
- _primary=QFileInfo(fullPath);
- _template=QFileInfo(fullPotPath);
+ _primary=TQFileInfo(fullPath);
+ _template=TQFileInfo(fullPotPath);
_package=package;
_marked=false;
@@ -97,7 +97,7 @@ void CatManListItem::init(const QString& fullPath, const QString& fullPotPath, c
_template.setCaching(false);
// set
- _lastUpdated=QDate(1900,1,1);
+ _lastUpdated=TQDate(1900,1,1);
_wordList.clear();
_wordListUpdated = false;
@@ -141,11 +141,11 @@ bool CatManListItem::marked() const
void CatManListItem::setOpen(bool open)
{
bool needWork = needsWork();
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
if(open && _type==Dir)
{
- QPixmap icon;
+ TQPixmap icon;
icon = needWork ? ICON_FOLDER_OPEN_WORK : ICON_FOLDER_OPEN_OK;
if(!_template.exists())
@@ -164,7 +164,7 @@ void CatManListItem::setOpen(bool open)
}
else
{
- QPixmap icon;
+ TQPixmap icon;
if(needsWork())
icon = ICON_FOLDER_CLOSED_WORK;
@@ -181,14 +181,14 @@ void CatManListItem::setOpen(bool open)
}
-QStringList CatManListItem::allChildrenList(bool onlyFiles) const
+TQStringList CatManListItem::allChildrenList(bool onlyFiles) const
{
- QStringList childrenList;
+ TQStringList childrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
{
- QString name=myChild->package();
+ TQString name=myChild->package();
if(myChild->isFile())
{
@@ -209,9 +209,9 @@ QStringList CatManListItem::allChildrenList(bool onlyFiles) const
}
-QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const
+TQStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs, bool onlyModified) const
{
- QStringList childrenList;
+ TQStringList childrenList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
@@ -238,14 +238,14 @@ QStringList CatManListItem::allChildrenFileList(bool onlyFiles, bool emptyDirs,
}
-QStringList CatManListItem::contentsList(bool onlyFiles) const
+TQStringList CatManListItem::contentsList(bool onlyFiles) const
{
- QStringList childList;
+ TQStringList childList;
CatManListItem * myChild = (CatManListItem*)firstChild();
while( myChild )
{
- QString name=myChild->package();
+ TQString name=myChild->package();
if(onlyFiles)
{
@@ -292,10 +292,10 @@ void CatManListItem::checkUpdate(bool noParents)
}
}
-QString CatManListItem::key(int col, bool) const
+TQString CatManListItem::key(int col, bool) const
{
// show directories first
- QString key=text(col);
+ TQString key=text(col);
if(col==COL_NAME)
{
@@ -356,7 +356,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
{
if(_primary.isDir())
{
- QDir dir=_primary.dir();
+ TQDir dir=_primary.dir();
setText(COL_NAME,dir.dirName());
// count the childen numbers
@@ -374,15 +374,15 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
ch = static_cast<CatManListItem*>(ch->nextSibling());
}
- setText(COL_FUZZY,QString::number(fuzzy));
- setText(COL_UNTRANS,QString::number(untrans));
- setText(COL_TOTAL,QString::number(total));
+ setText(COL_FUZZY,TQString::number(fuzzy));
+ setText(COL_UNTRANS,TQString::number(untrans));
+ setText(COL_TOTAL,TQString::number(total));
//setSelectable(false);
_type=Dir;
bool needWork = needsWork();
- QPixmap icon;
+ TQPixmap icon;
if(!isOpen())
{
if( needWork )
@@ -403,7 +403,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
}
else
{
- QPixmap folder = icon;
+ TQPixmap folder = icon;
icon=paintExclamation(&folder);
setPixmap(COL_NAME,folder);
@@ -412,18 +412,18 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else // primary is file
{
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
if(showPoInfo)
{
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
bool neededWork=needsWork();
bool needWork=false;
PoInfo poInfo;
- QPixmap icon = ICON_UPDATING;
+ TQPixmap icon = ICON_UPDATING;
setPixmap(COL_NAME,icon);
if ( PoInfo::info( _primary.absFilePath(), poInfo, _wordList, updateWordList, true, true ) == OK )
{
@@ -441,7 +441,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
_isModified = cvsHandler->isConsideredModified( cvsFileStatus )
|| svnHandler->isConsideredModified( svnFileStatus );
- QString versionControl;
+ TQString versionControl;
if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
versionControl = cvsHandler->fileStatus( cvsFileStatus );
else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
@@ -449,9 +449,9 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else
versionControl = i18n("No version control");
- setText(COL_FUZZY,QString::number(poInfo.fuzzy));
- setText(COL_UNTRANS,QString::number(poInfo.untranslated));
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_FUZZY,TQString::number(poInfo.fuzzy));
+ setText(COL_UNTRANS,TQString::number(poInfo.untranslated));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
setText( COL_CVS_OR_SVN, versionControl );
setText(COL_REVISION,poInfo.revision);
setText(COL_TRANSLATOR,poInfo.lastTranslator);
@@ -492,7 +492,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
{
if(_template.isDir())
{
- QDir dir=_template.dir();
+ TQDir dir=_template.dir();
setText(COL_NAME,dir.dirName());
//setSelectable(false);
_type=Dir;
@@ -508,10 +508,10 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
ch = static_cast<CatManListItem*>(ch->nextSibling());
}
- setText(COL_TOTAL,QString::number(total));
+ setText(COL_TOTAL,TQString::number(total));
- QPixmap icon;
+ TQPixmap icon;
if(!isOpen())
{
icon = ICON_FOLDER_CLOSED_WORK;
@@ -527,20 +527,20 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
else
{
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
if(showPoInfo)
{
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
// clean previous state information
- setText(COL_FUZZY,QString::null);
- setText(COL_UNTRANS,QString::null);
- setText(COL_TOTAL,QString::null);
- setText(COL_CVS_OR_SVN, QString::null);
- setText(COL_REVISION, QString::null);
- setText(COL_TRANSLATOR, QString::null);
+ setText(COL_FUZZY,TQString::null);
+ setText(COL_UNTRANS,TQString::null);
+ setText(COL_TOTAL,TQString::null);
+ setText(COL_CVS_OR_SVN, TQString::null);
+ setText(COL_REVISION, TQString::null);
+ setText(COL_TRANSLATOR, TQString::null);
setPixmap(COL_NAME,ICON_UPDATING);
@@ -548,7 +548,7 @@ void CatManListItem::update(bool showPoInfo,bool includeChildren
if ( PoInfo::info( _template.absFilePath(), poInfo, _wordList, false, true, true ) == OK )
{
if( _view->isStopped() ) return;
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
}
if( _view->isStopped() ) return;
}
@@ -614,21 +614,21 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
// primary is existent file
_type=File;
- QString name=_primary.fileName();
+ TQString name=_primary.fileName();
setText(COL_NAME,name.left(name.length()-3));
- _lastUpdated=QDateTime::currentDateTime();
+ _lastUpdated=TQDateTime::currentDateTime();
bool neededWork=needsWork();
bool needWork=false;
- QPixmap icon;
+ TQPixmap icon;
_hasErrors=false;
const CVSHandler::FileStatus cvsFileStatus = _view->cvsHandler()->fstatus(poFile());
const SVNHandler::FileStatus svnFileStatus = _view->svnHandler()->fstatus(poFile());
- QString versionControl;
+ TQString versionControl;
if ( cvsFileStatus != CVSHandler::NO_REPOSITORY )
versionControl = _view->cvsHandler()->fileStatus( cvsFileStatus );
else if ( svnFileStatus != SVNHandler::NO_REPOSITORY )
@@ -636,9 +636,9 @@ void CatManListItem::updateAfterSave( PoInfo &poInfo )
else
versionControl = i18n("No version control");
- setText(COL_FUZZY,QString::number(poInfo.fuzzy));
- setText(COL_UNTRANS,QString::number(poInfo.untranslated));
- setText(COL_TOTAL,QString::number(poInfo.total));
+ setText(COL_FUZZY,TQString::number(poInfo.fuzzy));
+ setText(COL_UNTRANS,TQString::number(poInfo.untranslated));
+ setText(COL_TOTAL,TQString::number(poInfo.total));
setText( COL_CVS_OR_SVN, versionControl );
setText(COL_REVISION,poInfo.revision);
setText(COL_TRANSLATOR,poInfo.lastTranslator);
@@ -777,17 +777,17 @@ bool CatManListItem::isFile() const
return type()==File;
}
-QString CatManListItem::poFile() const
+TQString CatManListItem::poFile() const
{
return _primary.absFilePath();
}
-QString CatManListItem::potFile() const
+TQString CatManListItem::potFile() const
{
return _template.absFilePath();
}
-QString CatManListItem::package(bool rootSlash) const
+TQString CatManListItem::package(bool rootSlash) const
{
if(rootSlash)
return _package;
@@ -797,21 +797,21 @@ QString CatManListItem::package(bool rootSlash) const
}
}
-QString CatManListItem::packageDir( ) const
+TQString CatManListItem::packageDir( ) const
{
- return ( _type == Dir ? _package : QString::null );
+ return ( _type == Dir ? _package : TQString::null );
}
-QString CatManListItem::name() const
+TQString CatManListItem::name() const
{
int index = _package.findRev("/");
return _package.right(_package.length()-index-1);
}
-QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
+TQPixmap CatManListItem::paintExclamation(TQPixmap* pixmap)
{
if(!pixmap || pixmap->isNull())
- return QPixmap(0,0);
+ return TQPixmap(0,0);
if(_package=="/" && _template.filePath().isEmpty())
return *pixmap;
@@ -827,17 +827,17 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
int diameter=QMIN(width,height);
- QBitmap mask=pixmap->createHeuristicMask();
+ TQBitmap mask=pixmap->createHeuristicMask();
- QPainter mp(&mask);
- mp.setPen(QPen(Qt::color1,1));
+ TQPainter mp(&mask);
+ mp.setPen(TQPen(Qt::color1,1));
mp.drawEllipse(width-diameter,height-diameter,diameter,diameter);
- QPixmap result(width,height);
+ TQPixmap result(width,height);
- QPainter p(&result);
+ TQPainter p(&result);
p.drawPixmap(0,0,*pixmap);
- p.setPen( QPen(red,1) );
+ p.setPen( TQPen(red,1) );
p.drawEllipse(width-diameter,height-diameter,diameter,diameter);
result.setMask(mask);
@@ -845,9 +845,9 @@ QPixmap CatManListItem::paintExclamation(QPixmap* pixmap)
return result;
}
-QListViewItem *CatManListItem::previousSibling()
+TQListViewItem *CatManListItem::previousSibling()
{
- QListViewItem * i = parent();
+ TQListViewItem * i = parent();
if( !i ) return i;
i = i->firstChild();
if( !i ) return i;
@@ -856,22 +856,22 @@ QListViewItem *CatManListItem::previousSibling()
return i;
}
-QListViewItem *CatManListItem::lastChild()
+TQListViewItem *CatManListItem::lastChild()
{
- QListViewItem * i = firstChild();
+ TQListViewItem * i = firstChild();
if( !i ) return i;
while( i->nextSibling() ) i = i->nextSibling();
return i;
}
-void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy)
+void CatManListItem::checkErrors(KDataTool* tool, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy)
{
bool hasError=false;
_errors.clear();
Catalog* cat = new Catalog();
- QObject::connect( cat, SIGNAL( signalProgress(int) ), progressSignalHandler, SIGNAL( setValidationProgressBar(int)));
- QObject::connect( cat, SIGNAL( signalResetProgressBar(QString, int) ), progressSignalHandler, SLOT( setupFileProgressBar(QString, int)));
+ TQObject::connect( cat, TQT_SIGNAL( signalProgress(int) ), progressSignalHandler, TQT_SIGNAL( setValidationProgressBar(int)));
+ TQObject::connect( cat, TQT_SIGNAL( signalResetProgressBar(TQString, int) ), progressSignalHandler, TQT_SLOT( setupFileProgressBar(TQString, int)));
if( cat->openURL(KURL( poFile() )) == OK )
{
@@ -887,7 +887,7 @@ void CatManListItem::checkErrors(KDataTool* tool, QObject* progressSignalHandler
if( hasError )
{
- QString errortext;
+ TQString errortext;
_hasErrors = true;
DocPosition dummy;
diff --git a/kbabel/catalogmanager/catmanlistitem.h b/kbabel/catalogmanager/catmanlistitem.h
index a5f41e2f..00fc3842 100644
--- a/kbabel/catalogmanager/catmanlistitem.h
+++ b/kbabel/catalogmanager/catmanlistitem.h
@@ -38,10 +38,10 @@
#include <config.h>
#endif
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
#include "validateprogress.h"
@@ -60,24 +60,24 @@ public:
/** the type of this item */
enum Type{File,Dir};
- CatManListItem(CatalogManagerView *view, QListViewItem* parent,QString fullPath
- ,QString fullPotPath,QString package);
+ CatManListItem(CatalogManagerView *view, TQListViewItem* parent,TQString fullPath
+ ,TQString fullPotPath,TQString package);
/** creates the toplevel root item with package name "/" */
- CatManListItem(CatalogManagerView *view, QListView* parent,QString fullPath, QString fullPotPath);
+ CatManListItem(CatalogManagerView *view, TQListView* parent,TQString fullPath, TQString fullPotPath);
/**
* returns the package names (including relative path) of the
* children of this item
*/
- QStringList contentsList(bool onlyFiles=false) const;
+ TQStringList contentsList(bool onlyFiles=false) const;
/**
* returns the package names of all children of this item
* (including all subdirectries)
* @param onlyFiles flag, if only the names of files should be returned
* @see CatManListItem::contentsList
*/
- QStringList allChildrenList(bool onlyFiles=false) const;
+ TQStringList allChildrenList(bool onlyFiles=false) const;
/**
* returns the relative file names of all children of this item
@@ -87,7 +87,7 @@ public:
* @param onlyModified, if only modified files should be returned
* @see CatManListItem::contentsList
*/
- QStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const;
+ TQStringList allChildrenFileList(bool onlyFiles=false, bool emptyDirs=false, bool onlyModified=false) const;
void setMarked(bool on);
bool marked() const;
@@ -110,20 +110,20 @@ public:
* @param ignoreFuzzy flag, whether fuzzy messages in the file should be not checked
* @param markAsFuzzy flag, whether the error messages should be marked as fuzzy (this alters the PO file)
*/
- void checkErrors(KDataTool* validator, QObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy);
+ void checkErrors(KDataTool* validator, TQObject* progressSignalHandler, bool ignoreFuzzy, bool markAsFuzzy);
/** return the absolute filename of the po-File */
- QString poFile() const;
+ TQString poFile() const;
/** return the absolute filename of the pot-File */
- QString potFile() const;
+ TQString potFile() const;
/** returns the package name (inlcuding relative path to base-directory) */
- QString package(bool rootSlash=true) const;
+ TQString package(bool rootSlash=true) const;
- /** returns the relative path of a dir or QString::null if not a dir. */
- QString packageDir( ) const;
+ /** returns the relative path of a dir or TQString::null if not a dir. */
+ TQString packageDir( ) const;
/** returns the package name (without path) */
- QString name() const;
+ TQString name() const;
/**
* returns the type of this item
@@ -159,25 +159,25 @@ public:
* @return true, if there were errors while parsing the file
*/
bool hasErrors() const {return _hasErrors;}
- QValueList<IgnoreItem> errors() const {return _errors;}
+ TQValueList<IgnoreItem> errors() const {return _errors;}
- virtual QString key(int col,bool) const;
+ virtual TQString key(int col,bool) const;
virtual void setOpen(bool);
/** paints the marking, if this package has no template */
- QPixmap paintExclamation(QPixmap*);
+ TQPixmap paintExclamation(TQPixmap*);
void updateAfterSave( KBabel::PoInfo &po);
- QStringList &wordList() { return _wordList; }
+ TQStringList &wordList() { return _wordList; }
bool wordsUpdated() { return _wordListUpdated; }
/** These are not in Qt, so we need to implement it ourselves*/
- QListViewItem *previousSibling();
- QListViewItem *lastChild();
+ TQListViewItem *previousSibling();
+ TQListViewItem *lastChild();
private:
- void init(const QString& fullPath, const QString& fullPotPath,const QString& package);
+ void init(const TQString& fullPath, const TQString& fullPotPath,const TQString& package);
/**
* updates the item
* @param showPoInfo if true, reads information about the
@@ -197,12 +197,12 @@ private:
* last updated. This is used to check, if the file
* on the disc has changed since last update.
*/
- QDateTime _lastUpdated;
+ TQDateTime _lastUpdated;
/** the po-file */
- QFileInfo _primary;
+ TQFileInfo _primary;
/** the pot-file */
- QFileInfo _template;
+ TQFileInfo _template;
/**
* The package name, includes the relative path beginning
* at the base directory.
@@ -210,7 +210,7 @@ private:
* The root item has the package name "/"
* @see CatManListItem::CatManListItem
*/
- QString _package;
+ TQString _package;
Type _type;
bool _marked;
@@ -225,13 +225,13 @@ private:
/** flag, if the PO-file has a syntax error */
bool _hasErrors;
/** a list of errors found by validation tool*/
- QValueList<IgnoreItem> _errors;
+ TQValueList<IgnoreItem> _errors;
/** parent view for this item, used for stopping the activity */
CatalogManagerView *_view;
/** index of words, but it does not contain any useful information as values */
- QStringList _wordList;
+ TQStringList _wordList;
bool _wordListUpdated;
};
diff --git a/kbabel/catalogmanager/findinfilesdialog.cpp b/kbabel/catalogmanager/findinfilesdialog.cpp
index b11a20d8..becffa51 100644
--- a/kbabel/catalogmanager/findinfilesdialog.cpp
+++ b/kbabel/catalogmanager/findinfilesdialog.cpp
@@ -32,10 +32,10 @@
**************************************************************************** */
#include "findinfilesdialog.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -44,19 +44,19 @@
using namespace KBabel;
-FindInFilesDialog::FindInFilesDialog(bool forReplace, QWidget* parent)
+FindInFilesDialog::FindInFilesDialog(bool forReplace, TQWidget* parent)
:FindDialog(forReplace, parent)
{
- QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget());
+ TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("File Options"), mainWidget());
mainWidget()->layout()->add(box);
- _inAllFiles = new QCheckBox(i18n("&In all files"),box);
- _inMarked = new QCheckBox(i18n("&Marked files"),box);
- _inTemplates = new QCheckBox(i18n("In &templates"),box);
- _askForNextFile = new QCheckBox(i18n("Ask before ne&xt file"),box);
- _askForSave = new QCheckBox(i18n("Save &without asking"),box);
+ _inAllFiles = new TQCheckBox(i18n("&In all files"),box);
+ _inMarked = new TQCheckBox(i18n("&Marked files"),box);
+ _inTemplates = new TQCheckBox(i18n("In &templates"),box);
+ _askForNextFile = new TQCheckBox(i18n("Ask before ne&xt file"),box);
+ _askForSave = new TQCheckBox(i18n("Save &without asking"),box);
- QWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>File Options</b></p>"
"<p>Here you can finetune where to find:"
"<ul><li><b>In all files</b>: search in all files, otherwise searched "
"is the selected file or files in the selected folder</li>"
@@ -71,14 +71,14 @@ FindInFilesDialog::~FindInFilesDialog()
saveSettings();
}
-int FindInFilesDialog::show(QString initialStr)
+int FindInFilesDialog::show(TQString initialStr)
{
FindDialog::show(initialStr);
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if( isReplaceDialog() ) {
ReplaceOptions options = replaceOpts();
options.inAllFiles = _inAllFiles->isChecked();
@@ -102,13 +102,13 @@ int FindInFilesDialog::show(QString initialStr)
return r;
}
-int FindInFilesDialog::exec(QString initialStr)
+int FindInFilesDialog::exec(TQString initialStr)
{
FindDialog::exec(initialStr);
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(isReplaceDialog()) {
ReplaceOptions options = replaceOpts();
options.inAllFiles = _inAllFiles->isChecked();
diff --git a/kbabel/catalogmanager/findinfilesdialog.h b/kbabel/catalogmanager/findinfilesdialog.h
index fd25f845..608e78e0 100644
--- a/kbabel/catalogmanager/findinfilesdialog.h
+++ b/kbabel/catalogmanager/findinfilesdialog.h
@@ -46,7 +46,7 @@ public:
* Constructor
* @param replaceDlg flag, if this is a replace dialog
*/
- FindInFilesDialog(bool replaceDlg, QWidget* parent);
+ FindInFilesDialog(bool replaceDlg, TQWidget* parent);
~FindInFilesDialog();
/**
@@ -56,7 +56,7 @@ public:
*
* @return the result code of the dialog
*/
- int show(QString initialStr);
+ int show(TQString initialStr);
/**
* executes the dialog as modal
@@ -65,7 +65,7 @@ public:
*
* @return the result code of the dialog
*/
- int exec(QString initialStr);
+ int exec(TQString initialStr);
void setFindOpts(KBabel::FindOptions options);
void setReplaceOpts(KBabel::ReplaceOptions options);
@@ -75,11 +75,11 @@ protected:
void saveSettings();
private:
- QCheckBox *_inAllFiles;
- QCheckBox *_inTemplates;
- QCheckBox *_inMarked;
- QCheckBox *_askForNextFile;
- QCheckBox *_askForSave;
+ TQCheckBox *_inAllFiles;
+ TQCheckBox *_inTemplates;
+ TQCheckBox *_inMarked;
+ TQCheckBox *_askForNextFile;
+ TQCheckBox *_askForSave;
};
#endif // FINDDIALOG_H
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.cpp b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
index af76d9d0..090b3de3 100644
--- a/kbabel/catalogmanager/libcvs/cvsdialog.cpp
+++ b/kbabel/catalogmanager/libcvs/cvsdialog.cpp
@@ -33,18 +33,18 @@
// Qt include files
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
-#include <qtextcodec.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
+#include <tqtextcodec.h>
// KDE include files
#include <kconfig.h>
#include <kdebug.h>
@@ -60,16 +60,16 @@
#include "cvsdialog.h"
-CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config )
+CVSDialog::CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config )
: KDialog( parent, "CVSDIALOG", true ), m_config( config )
{
_cmd = cmd;
p=0L;
setCaption( i18n( "CVS Dialog" ) );
- QString temp;
+ TQString temp;
- QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
// Set the label's text depending on the CVS command.
switch ( cmd ) {
@@ -86,54 +86,54 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "Get diff for the following files:" );
break;
}
- layout->addWidget( new QLabel( temp, this ) );
+ layout->addWidget( new TQLabel( temp, this ) );
// Widget for showing the list of files.
- filebox = new QListBox( this );
+ filebox = new TQListBox( this );
layout->addWidget( filebox );
// Add special widgets for 'cvs commit'.
if ( cmd == CVS::Commit ) {
- QLabel * label;
+ TQLabel * label;
// Combobox for displaying old log messages.
- label = new QLabel( i18n( "&Old messages:" ), this );
- oldMessages = new QComboBox( this );
+ label = new TQLabel( i18n( "&Old messages:" ), this );
+ oldMessages = new TQComboBox( this );
oldMessages->setDuplicatesEnabled( false );
label->setBuddy( oldMessages );
layout->addWidget( label );
layout->addWidget( oldMessages );
// Textfield for entering a log message.
- label = new QLabel( i18n( "&Log message:" ), this );
- logedit = new QTextEdit( this );
+ label = new TQLabel( i18n( "&Log message:" ), this );
+ logedit = new TQTextEdit( this );
label->setBuddy( logedit );
layout->addWidget( label );
layout->addWidget( logedit );
- label = new QLabel( i18n( "E&ncoding:" ), this );
+ label = new TQLabel( i18n( "E&ncoding:" ), this );
m_encodingComboBox = new KComboBox( this );
label->setBuddy( m_encodingComboBox );
layout->addWidget( label );
layout->addWidget( m_encodingComboBox );
- QStringList encodingList;
+ TQStringList encodingList;
// The last encoding will be added at the top of the list, when the seetings will be read.
encodingList << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
- encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( QTextCodec::codecForLocale()->mimeName() );
+ encodingList << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->mimeName() );
encodingList += KGlobal::charsets()->descriptiveEncodingNames();
m_encodingComboBox->insertStringList( encodingList );
- connect( oldMessages, SIGNAL( activated( int ) ),
- this, SLOT( slotComboActivated( int ) ) );
+ connect( oldMessages, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotComboActivated( int ) ) );
}
- QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
+ TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
// Add special buttons for 'cvs commit'.
if ( cmd == CVS::Commit ) {
- autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this );
+ autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this );
buttons->addWidget( autoAddBox );
}
- buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
// Set the main button's text depending on the CVS comand.
switch ( cmd ) {
@@ -150,33 +150,33 @@ CVSDialog::CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "&Get Diff" );
break;
}
- mainBtn = new QPushButton( temp, this );
+ mainBtn = new TQPushButton( temp, this );
mainBtn->setDefault( true );
buttons->addWidget( mainBtn );
- cancelBtn = new QPushButton( i18n( "C&ancel" ), this );
+ cancelBtn = new TQPushButton( i18n( "C&ancel" ), this );
buttons->addWidget( cancelBtn );
layout->addLayout( buttons );
- QFrame * line = new QFrame( this );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame * line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addWidget( line );
- layout->addWidget( new QLabel( i18n( "Command output:" ), this ) );
+ layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) );
- output = new QTextEdit( this );
+ output = new TQTextEdit( this );
output->setReadOnly( true );
layout->addWidget( output );
- resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
+ resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
if ( cmd == CVS::Commit )
logedit->setFocus( );
readSettings( );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) );
- connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) );
}
void CVSDialog::slotComboActivated( int index )
@@ -197,17 +197,17 @@ void CVSDialog::accept( )
KDialog::accept( );
}
-void CVSDialog::setFiles( const QStringList& files )
+void CVSDialog::setFiles( const TQStringList& files )
{
filebox->insertStringList( files );
}
-void CVSDialog::setCommandLine( const QString& command )
+void CVSDialog::setCommandLine( const TQString& command )
{
_commandLine = command;
}
-void CVSDialog::setAddCommand( const QString& command )
+void CVSDialog::setAddCommand( const TQString& command )
{
_addCommand = command;
}
@@ -228,7 +228,7 @@ void CVSDialog::slotExecuteCommand( )
if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) )
_commandLine.prepend( _addCommand );
- const QString msg( logedit->text() );
+ const TQString msg( logedit->text() );
if ( msg.isEmpty() )
{
@@ -240,7 +240,7 @@ void CVSDialog::slotExecuteCommand( )
}
m_encoding = KGlobal::charsets()->encodingForName( m_encodingComboBox->currentText() );
- QTextCodec* codec = QTextCodec::codecForName( m_encoding.utf8() );
+ TQTextCodec* codec = TQTextCodec::codecForName( m_encoding.utf8() );
if ( !codec )
{
@@ -259,10 +259,10 @@ void CVSDialog::slotExecuteCommand( )
// Write the commit log message from the input field to a temporary file
m_tempFile = new KTempFile;
m_tempFile->setAutoDelete( true );
- QTextStream* stream = m_tempFile->textStream();
+ TQTextStream* stream = m_tempFile->textStream();
if ( !stream )
{
- kdError() << "Could not create QTextStream for file " << m_tempFile->name();
+ kdError() << "Could not create TQTextStream for file " << m_tempFile->name();
delete m_tempFile;
m_tempFile = 0;
KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") );
@@ -286,7 +286,7 @@ void CVSDialog::slotExecuteCommand( )
// Update the list of log messages
if ( !msg.isEmpty() ) {
- const QString shortLog = KStringHandler::csqueeze( msg, 80 );
+ const TQString shortLog = KStringHandler::csqueeze( msg, 80 );
// Remove the message from the list if it already exists
@@ -301,12 +301,12 @@ void CVSDialog::slotExecuteCommand( )
// Set the KProcess' command line.
*p << _commandLine;
- connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
output->append( i18n( "[ Starting command ]" ) );
@@ -325,22 +325,22 @@ void CVSDialog::slotExecuteCommand( )
void CVSDialog::slotProcessStdout( KProcess*, char * buffer, int len )
{
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
// Set the cursor's position at the end of the output.
output->setCursorPosition( output->lines( ), 0 );
// If the command is 'cvs status' or 'cvs diff' collect the output of stdout.
if ( (_cmd == CVS::Status) || (_cmd == CVS::Diff) )
- _statusOutput += QString::fromLocal8Bit( buffer, len );
+ _statusOutput += TQString::fromLocal8Bit( buffer, len );
}
void CVSDialog::slotProcessStderr( KProcess*, char * buffer, int len )
{
// If an error occurs while executing the command display stderr in
// another color.
- QColor oldColor( output->color( ) );
+ TQColor oldColor( output->color( ) );
output->setColor( Qt::red );
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
output->setColor( oldColor );
output->setCursorPosition( output->lines( ), 0 );
}
@@ -358,7 +358,7 @@ void CVSDialog::slotProcessExited( KProcess * p )
mainBtn->setText( i18n( "&Show Diff" ) );
else
mainBtn->setText( i18n( "&Close" ) );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) );
// Reenable the button and the log edit now that the process is finished.
mainBtn->setEnabled( true );
@@ -366,7 +366,7 @@ void CVSDialog::slotProcessExited( KProcess * p )
logedit->setEnabled( true );
}
-QString CVSDialog::statusOutput( )
+TQString CVSDialog::statusOutput( )
{
return _statusOutput;
}
@@ -383,14 +383,14 @@ void CVSDialog::readSettings( )
m_logMessages.clear();
m_squeezedLogMessages.clear();
for ( int cnt = 0; cnt < 10; cnt++ )
- if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) )
+ if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) )
{
- const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) );
+ const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) );
if ( !logMessage.isEmpty() )
{
// If the message is too long, cut it to 80 characters (or the combo box becomes too wide)
// ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry
- const QString shortLog = KStringHandler::csqueeze( logMessage );
+ const TQString shortLog = KStringHandler::csqueeze( logMessage );
m_logMessages.append( logMessage );
m_squeezedLogMessages.append( shortLog );
oldMessages->insertItem( shortLog );
@@ -411,9 +411,9 @@ void CVSDialog::saveSettings( )
// Write the log messages to the config file.
int cnt = 0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt )
- config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it );
+ config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it );
config->writeEntry( "CVSEncoding", m_encoding );
}
diff --git a/kbabel/catalogmanager/libcvs/cvsdialog.h b/kbabel/catalogmanager/libcvs/cvsdialog.h
index 658e9883..1ed312fe 100644
--- a/kbabel/catalogmanager/libcvs/cvsdialog.h
+++ b/kbabel/catalogmanager/libcvs/cvsdialog.h
@@ -72,30 +72,30 @@ class CVSDialog : public KDialog
* Constructor for creating the dialog.
* @param cmd The type of command to be executed.
*/
- CVSDialog( CVS::Command cmd, QWidget * parent, KSharedConfig* config );
+ CVSDialog( CVS::Command cmd, TQWidget * parent, KSharedConfig* config );
~CVSDialog();
/**
* Set the list of files which will be used for the CVS command.
* @param files The list of files.
*/
- void setFiles( const QStringList& files );
+ void setFiles( const TQStringList& files );
/**
* Set the command line for the execution of the CVS command.
* @param command The command line.
*/
- void setCommandLine( const QString& command );
+ void setCommandLine( const TQString& command );
/**
* Set the command line for adding files to the CVS repository.
* This method is only used together with a 'cvs commit' for automatically
* adding files which are not yet in the repository.
* @param command The command line.
*/
- void setAddCommand( const QString& command );
+ void setAddCommand( const TQString& command );
/**
* Return the output of a 'cvs status' command.
* @returns The complete output.
*/
- QString statusOutput( );
+ TQString statusOutput( );
protected:
/**
@@ -123,30 +123,30 @@ class CVSDialog : public KDialog
private:
CVS::Command _cmd;
- QPushButton * mainBtn;
- QPushButton * cancelBtn;
- QListBox * filebox;
- QComboBox * oldMessages;
- QTextEdit * logedit;
- QTextEdit * output;
- QCheckBox * autoAddBox;
+ TQPushButton * mainBtn;
+ TQPushButton * cancelBtn;
+ TQListBox * filebox;
+ TQComboBox * oldMessages;
+ TQTextEdit * logedit;
+ TQTextEdit * output;
+ TQCheckBox * autoAddBox;
KProcess * p;
- QString _commandLine;
- QString _addCommand;
- QString _statusOutput;
+ TQString _commandLine;
+ TQString _addCommand;
+ TQString _statusOutput;
/// Log messages (long version)
- QStringList m_logMessages;
+ TQStringList m_logMessages;
/// Log messages (short version)
- QStringList m_squeezedLogMessages;
+ TQStringList m_squeezedLogMessages;
/// Temporary file (for commits)
KTempFile* m_tempFile;
/// Encoding for the commit log message
- QString m_encoding;
+ TQString m_encoding;
/// Combo box for the encoding
KComboBox* m_encodingComboBox;
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.cpp b/kbabel/catalogmanager/libcvs/cvshandler.cpp
index d3f2ae18..66eeac0a 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.cpp
+++ b/kbabel/catalogmanager/libcvs/cvshandler.cpp
@@ -37,12 +37,12 @@
#include <time.h>
#include <unistd.h>
// Qt include files
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kapplication.h>
#include <klocale.h>
@@ -52,17 +52,17 @@
#include "cvshandler.h"
-CVSHandler::CVSHandler( const QString& poBaseDir, const QString& potBaseDir )
+CVSHandler::CVSHandler( const TQString& poBaseDir, const TQString& potBaseDir )
{
setPOBaseDir( poBaseDir );
setPOTBaseDir( potBaseDir );
_autoUpdateTemplates = false;
}
-void CVSHandler::setPOBaseDir( const QString& dir )
+void CVSHandler::setPOBaseDir( const TQString& dir )
{
// check if 'CVS/Entries' exists in the PO base directory
- if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
_isPORepository = true;
_poBaseDir = dir;
} else
@@ -70,10 +70,10 @@ void CVSHandler::setPOBaseDir( const QString& dir )
emit signalIsPORepository( _isPORepository );
}
-void CVSHandler::setPOTBaseDir( const QString& dir )
+void CVSHandler::setPOTBaseDir( const TQString& dir )
{
// check if 'CVS/Entries' exists in the POT base directory
- if ( QFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/CVS/Entries" ).exists( ) ) {
_isPOTRepository = true;
_potBaseDir = dir;
} else
@@ -81,7 +81,7 @@ void CVSHandler::setPOTBaseDir( const QString& dir )
emit signalIsPOTRepository( _isPOTRepository );
}
-QString CVSHandler::fileStatus( const FileStatus status ) const
+TQString CVSHandler::fileStatus( const FileStatus status ) const
{
switch ( status ) {
case NO_REPOSITORY:
@@ -111,29 +111,29 @@ QString CVSHandler::fileStatus( const FileStatus status ) const
}
}
-CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
+CVSHandler::FileStatus CVSHandler::fstatus( const TQString& filename ) const
{
// no valid repository
if ( !_isPORepository )
return NO_REPOSITORY;
- QString fn( filename );
- fn = fn.remove( QRegExp( "/$" ) );
+ TQString fn( filename );
+ fn = fn.remove( TQRegExp( "/$" ) );
- QFileInfo info( fn );
+ TQFileInfo info( fn );
// check if 'CVS/Entries' exists and can be read
- QFile entries( info.dir( true ).path( ) + "/CVS/Entries" );
+ TQFile entries( info.dir( true ).path( ) + "/CVS/Entries" );
if ( !entries.open( IO_ReadOnly ) )
return NOT_IN_CVS; // we already know that it's a repository
// ### FIXME: it does not take care of CVS/Entries.Log
// a line in CVS/Entries has the following format:
// [D]/NAME/REVISION/[CONFLICT+]TIMESTAMP/OPTIONS/TAGDATE
- QRegExp rx( QString( "^D?/%1/" ).arg( info.fileName( ) ) );
+ TQRegExp rx( TQString( "^D?/%1/" ).arg( info.fileName( ) ) );
- QString temp;
- QTextStream stream( &entries );
+ TQString temp;
+ TQTextStream stream( &entries );
bool isInRepository = false;
while ( !stream.atEnd() ) {
@@ -149,11 +149,11 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
if ( !isInRepository )
return NOT_IN_CVS;
- const QStringList fields = QStringList::split( '/', temp, true );
+ const TQStringList fields = TQStringList::split( '/', temp, true );
// bool isDir = ( fields[0] == "D" );
- const QString cvsname( fields[1] );
- const QString revision( fields[2] );
- const QString timestamp( fields[3] );
+ const TQString cvsname( fields[1] );
+ const TQString revision( fields[2] );
+ const TQString timestamp( fields[3] );
// ignore the other fields for now
if ( revision == "0" && timestamp == "dummy timestamp" )
@@ -167,9 +167,9 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
// calculate the UTC time from the file's last modified date
struct stat st;
- lstat( QFile::encodeName(fn), &st );
+ lstat( TQFile::encodeName(fn), &st );
struct tm * tm_p = gmtime( &st.st_mtime );
- QString ftime = QString( asctime( tm_p ) );
+ TQString ftime = TQString( asctime( tm_p ) );
ftime.truncate( ftime.length( ) - 1 );
if ( ftime != timestamp )
return LOCALLY_MODIFIED;
@@ -177,12 +177,12 @@ CVSHandler::FileStatus CVSHandler::fstatus( const QString& filename ) const
return UP_TO_DATE;
}
-QString CVSHandler::cvsStatus( const QString& filename ) const
+TQString CVSHandler::cvsStatus( const TQString& filename ) const
{
return map[filename];
}
-void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -191,16 +191,16 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
return;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.isDir( ) ) {
- execCVSCommand( parent, cmd, QStringList( filename ), templates, config );
+ execCVSCommand( parent, cmd, TQStringList( filename ), templates, config );
return;
}
- // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
// it's a dir
- QString command( "cd " + filename + " && cvs " );
+ TQString command( "cd " + filename + " && cvs " );
switch ( cmd ) {
case CVS::Update:
command += "update -dP";
@@ -208,7 +208,7 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
case CVS::Commit:
// The cvs client does not care about the encoding, so we cannot set anything here
command += "commit -F @LOG@FILE@";
- checkToAdd( QStringList( filename ) );
+ checkToAdd( TQStringList( filename ) );
break;
case CVS::Status:
command += "status";
@@ -218,10 +218,10 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
break;
}
- showDialog( parent, cmd, QStringList( filename ), command, config );
+ showDialog( parent, cmd, TQStringList( filename ), command, config );
}
-void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config )
+void CVSHandler::execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -230,9 +230,9 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
return;
}
- // ### FIXME: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### FIXME: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### FIXME: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
- QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs ");
+ TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && cvs ");
switch ( cmd ) {
case CVS::Update:
command += "update -dP";
@@ -249,15 +249,15 @@ void CVSHandler::execCVSCommand( QWidget* parent, CVS::Command cmd, const QStrin
break;
}
- QRegExp rx;
+ TQRegExp rx;
if (templates)
rx.setPattern(_potBaseDir + "/?");
else
rx.setPattern(_poBaseDir + "/?");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
- QString temp = *it;
+ TQString temp = *it;
temp.remove(rx);
command += " \'" + temp + "\'";
}
@@ -270,7 +270,7 @@ void CVSHandler::setAutoUpdateTemplates( bool update )
_autoUpdateTemplates = update;
}
-void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config )
+void CVSHandler::showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
{
CVSDialog * dia = new CVSDialog( cmd, parent, config );
dia->setFiles( files );
@@ -293,30 +293,30 @@ void CVSHandler::showDialog( QWidget* parent, CVS::Command cmd, const QStringLis
emit signalFilesCommitted( files );
}
-void CVSHandler::checkToAdd( const QStringList& files )
+void CVSHandler::checkToAdd( const TQStringList& files )
{
if ( files.isEmpty( ) )
return;
- QStringList toBeAdded;
+ TQStringList toBeAdded;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
// check for every entry if it needs to be added
if ( fstatus( *it ) == NOT_IN_CVS ) {
- QFileInfo info( *it );
- QString temp; // will hold the dir path
+ TQFileInfo info( *it );
+ TQString temp; // will hold the dir path
if ( info.isDir( ) ) {
toBeAdded << *it;
temp = *it;
} else {
toBeAdded << *it;
- temp = QFileInfo( *it ).dirPath( true );
+ temp = TQFileInfo( *it ).dirPath( true );
}
// check recursivlely if parent dirs have to be added as well
while ( fstatus( temp ) == NOT_IN_CVS && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
- temp = QFileInfo( temp ).dirPath( true );
+ temp = TQFileInfo( temp ).dirPath( true );
}
}
}
@@ -329,36 +329,36 @@ void CVSHandler::checkToAdd( const QStringList& files )
// create a command line for adding the files and dirs
for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) {
- QFileInfo info( *it );
+ TQFileInfo info( *it );
_addCommand += "cd " + info.dirPath( true ) + " && cvs add " + info.fileName( ) + "; ";
}
}
-void CVSHandler::processStatusOutput( const QString& status )
+void CVSHandler::processStatusOutput( const TQString& status )
{
if ( !_isPORepository )
return;
// at first we need to extract the name of the base directory on the server
- QFile f( _poBaseDir + "/CVS/Root" );
+ TQFile f( _poBaseDir + "/CVS/Root" );
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
// extract the string after the last colon in the first line
- QString basedir = stream.readLine( ).section( ':', -1 );
+ TQString basedir = stream.readLine( ).section( ':', -1 );
f.close( );
// divide the complete status output in little chunks for every file
- QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status );
- QStringList::Iterator it;
+ TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status );
+ TQStringList::Iterator it;
for ( it = entries.begin( ); it != entries.end( ); ++it ) {
- QString entr = *it;
+ TQString entr = *it;
// translate the filename from repository to local
- QRegExp rx( basedir + ".*,v" );
+ TQRegExp rx( basedir + ".*,v" );
int pos = entr.find( rx );
- QString file = _poBaseDir + entr.mid( pos + basedir.length( ),
+ TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
entr = "<qt>" + entr + "</qt>";
@@ -369,16 +369,16 @@ void CVSHandler::processStatusOutput( const QString& status )
}
}
-void CVSHandler::processDiff( QString output )
+void CVSHandler::processDiff( TQString output )
{
- output.remove( QRegExp( "\\[ .* \\]$" ));
- output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
+ output.remove( TQRegExp( "\\[ .* \\]$" ));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
tmpFile.close();
- QString error;
+ TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error );
}
diff --git a/kbabel/catalogmanager/libcvs/cvshandler.h b/kbabel/catalogmanager/libcvs/cvshandler.h
index 44777aa3..8157a895 100644
--- a/kbabel/catalogmanager/libcvs/cvshandler.h
+++ b/kbabel/catalogmanager/libcvs/cvshandler.h
@@ -36,8 +36,8 @@
#define CVSHANDLER_H
// Qt include files
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
// Project specific include files
#include "cvsdialog.h"
#include "cvsresources.h"
@@ -69,17 +69,17 @@ class CVSHandler : public QObject
UP_TO_DATE
};
- CVSHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null );
+ CVSHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null );
- void setPOBaseDir( const QString& dir );
- void setPOTBaseDir( const QString& dir );
+ void setPOBaseDir( const TQString& dir );
+ void setPOTBaseDir( const TQString& dir );
- FileStatus fstatus( const QString& filename ) const;
- QString fileStatus( const FileStatus status ) const;
- QString cvsStatus( const QString& filename ) const;
+ FileStatus fstatus( const TQString& filename ) const;
+ TQString fileStatus( const FileStatus status ) const;
+ TQString cvsStatus( const TQString& filename ) const;
- void execCVSCommand( QWidget* parent, CVS::Command cmd, const QString& filename, bool templates, KSharedConfig* config );
- void execCVSCommand( QWidget* parent, CVS::Command cmd, const QStringList& files, bool templates, KSharedConfig* config );
+ void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQString& filename, bool templates, KSharedConfig* config );
+ void execCVSCommand( TQWidget* parent, CVS::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config );
void setAutoUpdateTemplates( bool update );
@@ -91,24 +91,24 @@ class CVSHandler : public QObject
signals:
void signalIsPORepository( bool );
void signalIsPOTRepository( bool );
- void signalFilesCommitted( const QStringList& );
+ void signalFilesCommitted( const TQStringList& );
private:
- void showDialog( QWidget* parent, CVS::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config );
- void checkToAdd( const QStringList& files );
- void processStatusOutput( const QString& status );
- void processDiff( QString output );
+ void showDialog( TQWidget* parent, CVS::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config );
+ void checkToAdd( const TQStringList& files );
+ void processStatusOutput( const TQString& status );
+ void processDiff( TQString output );
private:
- QString _poBaseDir;
- QString _potBaseDir;
+ TQString _poBaseDir;
+ TQString _potBaseDir;
bool _isPORepository;
bool _isPOTRepository;
bool _autoUpdateTemplates;
- QString _addCommand;
+ TQString _addCommand;
/** Mapping the output of 'cvs status' against the filename. */
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
};
#endif // CVSHANDLER_H
diff --git a/kbabel/catalogmanager/libsvn/svndialog.cpp b/kbabel/catalogmanager/libsvn/svndialog.cpp
index 69653591..a6f7d229 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.cpp
+++ b/kbabel/catalogmanager/libsvn/svndialog.cpp
@@ -33,17 +33,17 @@
// Qt include files
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
// KDE include files
#include <kconfig.h>
#include <kdebug.h>
@@ -57,16 +57,16 @@
#include "svndialog.h"
-SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config )
+SVNDialog::SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config )
: KDialog( parent, "SVN DIALOG", true ), m_tempFile( 0 ), m_config( config )
{
_cmd = cmd;
p=0L;
setCaption( i18n( "SVN Dialog" ) );
- QString temp;
+ TQString temp;
- QVBoxLayout * layout = new QVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
+ TQVBoxLayout * layout = new TQVBoxLayout( this, 6, 6, "MAIN LAYOUT" );
// Set the label's text depending on the SVN command.
switch ( cmd ) {
@@ -89,42 +89,42 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "Get information for the following files:" );
break;
}
- layout->addWidget( new QLabel( temp, this ) );
+ layout->addWidget( new TQLabel( temp, this ) );
// Widget for showing the list of files.
- filebox = new QListBox( this );
+ filebox = new TQListBox( this );
layout->addWidget( filebox );
// Add special widgets for 'svn commit'.
if ( cmd == SVN::Commit ) {
- QLabel * label;
+ TQLabel * label;
// Combobox for displaying old log messages.
- label = new QLabel( i18n( "&Old messages:" ), this );
- oldMessages = new QComboBox( this );
+ label = new TQLabel( i18n( "&Old messages:" ), this );
+ oldMessages = new TQComboBox( this );
oldMessages->setDuplicatesEnabled( false );
label->setBuddy( oldMessages );
layout->addWidget( label );
layout->addWidget( oldMessages );
// Textfield for entering a log message.
- label = new QLabel( i18n( "&Log message:" ), this );
- logedit = new QTextEdit( this );
+ label = new TQLabel( i18n( "&Log message:" ), this );
+ logedit = new TQTextEdit( this );
label->setBuddy( logedit );
layout->addWidget( label );
layout->addWidget( logedit );
- connect( oldMessages, SIGNAL( activated( int ) ),
- this, SLOT( slotComboActivated( int ) ) );
+ connect( oldMessages, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotComboActivated( int ) ) );
}
- QHBoxLayout * buttons = new QHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
+ TQHBoxLayout * buttons = new TQHBoxLayout( 0, 0, 6, "BUTTON LAYOUT" );
// Add special buttons for 'svn commit'.
if ( cmd == SVN::Commit ) {
- autoAddBox = new QCheckBox( i18n( "Auto&matically add files if necessary" ), this );
+ autoAddBox = new TQCheckBox( i18n( "Auto&matically add files if necessary" ), this );
buttons->addWidget( autoAddBox );
}
- buttons->addItem( new QSpacerItem( 1, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) );
+ buttons->addItem( new TQSpacerItem( 1, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
// Set the main button's text depending on the SVN comand.
switch ( cmd ) {
@@ -145,33 +145,33 @@ SVNDialog::SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config
temp = i18n( "&Get Information" );
break;
}
- mainBtn = new QPushButton( temp, this );
+ mainBtn = new TQPushButton( temp, this );
mainBtn->setDefault( true );
buttons->addWidget( mainBtn );
- cancelBtn = new QPushButton( i18n( "C&ancel" ), this );
+ cancelBtn = new TQPushButton( i18n( "C&ancel" ), this );
buttons->addWidget( cancelBtn );
layout->addLayout( buttons );
- QFrame * line = new QFrame( this );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame * line = new TQFrame( this );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
layout->addWidget( line );
- layout->addWidget( new QLabel( i18n( "Command output:" ), this ) );
+ layout->addWidget( new TQLabel( i18n( "Command output:" ), this ) );
- output = new QTextEdit( this );
+ output = new TQTextEdit( this );
output->setReadOnly( true );
layout->addWidget( output );
- resize( QSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
+ resize( TQSize( 600, 450 ).expandedTo( minimumSizeHint( ) ) );
if ( cmd == SVN::Commit )
logedit->setFocus( );
readSettings( );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( slotExecuteCommand( ) ) );
- connect( cancelBtn, SIGNAL( clicked( ) ), this, SLOT( reject( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotExecuteCommand( ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( reject( ) ) );
}
void SVNDialog::slotComboActivated( int index )
@@ -193,17 +193,17 @@ void SVNDialog::accept( )
KDialog::accept( );
}
-void SVNDialog::setFiles( const QStringList& files )
+void SVNDialog::setFiles( const TQStringList& files )
{
filebox->insertStringList( files );
}
-void SVNDialog::setCommandLine( const QString& command )
+void SVNDialog::setCommandLine( const TQString& command )
{
_commandLine = command;
}
-void SVNDialog::setAddCommand( const QString& command )
+void SVNDialog::setAddCommand( const TQString& command )
{
_addCommand = command;
}
@@ -224,7 +224,7 @@ void SVNDialog::slotExecuteCommand( )
if ( autoAddBox->isChecked( ) && !_addCommand.isEmpty( ) )
_commandLine.prepend( _addCommand );
- const QString msg( logedit->text() );
+ const TQString msg( logedit->text() );
if ( msg.isEmpty() )
{
@@ -238,16 +238,16 @@ void SVNDialog::slotExecuteCommand( )
// Write the commit log message from the input field to a temporary file
m_tempFile = new KTempFile;
m_tempFile->setAutoDelete( true );
- QTextStream* stream = m_tempFile->textStream();
+ TQTextStream* stream = m_tempFile->textStream();
if ( !stream )
{
- kdError() << "Could not create QTextStream for file " << m_tempFile->name();
+ kdError() << "Could not create TQTextStream for file " << m_tempFile->name();
delete m_tempFile;
m_tempFile = 0;
KMessageBox::error( this, i18n( "Cannot open temporary file for writing. Aborting.") );
return;
}
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << msg;
m_tempFile->close();
@@ -265,7 +265,7 @@ void SVNDialog::slotExecuteCommand( )
// Update the list of log messages
if ( !msg.isEmpty() ) {
- const QString shortLog = KStringHandler::csqueeze( msg, 80 );
+ const TQString shortLog = KStringHandler::csqueeze( msg, 80 );
// Remove the message from the list if it already exists
@@ -280,12 +280,12 @@ void SVNDialog::slotExecuteCommand( )
// Set the KProcess' command line.
*p << _commandLine;
- connect( p, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
- connect( p, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( slotProcessExited( KProcess* ) ) );
+ connect( p, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStdout( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT ( slotProcessStderr( KProcess*, char*, int ) ) );
+ connect( p, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
output->append( i18n( "[ Starting command ]" ) );
@@ -304,22 +304,22 @@ void SVNDialog::slotExecuteCommand( )
void SVNDialog::slotProcessStdout( KProcess*, char * buffer, int len )
{
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
// Set the cursor's position at the end of the output.
output->setCursorPosition( output->lines( ), 0 );
// If the command is 'svn status' or 'svn diff' collect the output of stdout.
if ( ( _cmd == SVN::StatusLocal ) || ( _cmd == SVN::StatusRemote ) || ( _cmd == SVN::Diff ) )
- _statusOutput += QString::fromLocal8Bit( buffer, len );
+ _statusOutput += TQString::fromLocal8Bit( buffer, len );
}
void SVNDialog::slotProcessStderr( KProcess*, char * buffer, int len )
{
// If an error occurs while executing the command display stderr in
// another color.
- QColor oldColor( output->color( ) );
+ TQColor oldColor( output->color( ) );
output->setColor( Qt::red );
- output->append( QString::fromLocal8Bit( buffer, len ) );
+ output->append( TQString::fromLocal8Bit( buffer, len ) );
output->setColor( oldColor );
output->setCursorPosition( output->lines( ), 0 );
}
@@ -337,7 +337,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
mainBtn->setText( i18n( "&Show Diff" ) );
else
mainBtn->setText( i18n( "&Close" ) );
- connect( mainBtn, SIGNAL( clicked( ) ), this, SLOT( accept( ) ) );
+ connect( mainBtn, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( accept( ) ) );
// Reenable the button and the log edit now that the process is finished.
mainBtn->setEnabled( true );
@@ -345,7 +345,7 @@ void SVNDialog::slotProcessExited( KProcess * p )
logedit->setEnabled( true );
}
-QString SVNDialog::statusOutput( )
+TQString SVNDialog::statusOutput( )
{
return _statusOutput;
}
@@ -362,14 +362,14 @@ void SVNDialog::readSettings( )
m_logMessages.clear();
m_squeezedLogMessages.clear();
for ( int cnt = 0; cnt < 10; cnt++ )
- if ( config->hasKey( QString( "CommitLogMessage%1" ).arg( cnt ) ) )
+ if ( config->hasKey( TQString( "CommitLogMessage%1" ).arg( cnt ) ) )
{
- const QString logMessage = config->readEntry( QString( "CommitLogMessage%1" ).arg( cnt ) );
+ const TQString logMessage = config->readEntry( TQString( "CommitLogMessage%1" ).arg( cnt ) );
if ( !logMessage.isEmpty() )
{
// If the message is too long, cut it to 80 characters (or the combo box becomes too wide)
// ### FIXME: if the string matches the squeezed 80 chars, it might overwrite another entry
- const QString shortLog = KStringHandler::csqueeze( logMessage );
+ const TQString shortLog = KStringHandler::csqueeze( logMessage );
m_logMessages.append( logMessage );
m_squeezedLogMessages.append( shortLog );
oldMessages->insertItem( shortLog );
@@ -388,9 +388,9 @@ void SVNDialog::saveSettings( )
// Write the log messages to the config file.
int cnt = 0;
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for ( it = m_logMessages.constBegin( ); it != m_logMessages.constEnd( ) && cnt < 10 ; ++it, ++cnt )
- config->writeEntry( QString( "CommitLogMessage%1" ).arg( cnt ), *it );
+ config->writeEntry( TQString( "CommitLogMessage%1" ).arg( cnt ), *it );
}
m_config->sync();
}
diff --git a/kbabel/catalogmanager/libsvn/svndialog.h b/kbabel/catalogmanager/libsvn/svndialog.h
index 0c824fa8..23ec6a7e 100644
--- a/kbabel/catalogmanager/libsvn/svndialog.h
+++ b/kbabel/catalogmanager/libsvn/svndialog.h
@@ -71,30 +71,30 @@ class SVNDialog : public KDialog
* Constructor for creating the dialog.
* @param cmd The type of command to be executed.
*/
- SVNDialog( SVN::Command cmd, QWidget * parent, KSharedConfig* config );
+ SVNDialog( SVN::Command cmd, TQWidget * parent, KSharedConfig* config );
~SVNDialog();
/**
* Set the list of files which will be used for the SVN command.
* @param files The list of files.
*/
- void setFiles( const QStringList& files );
+ void setFiles( const TQStringList& files );
/**
* Set the command line for the execution of the SVN command.
* @param command The command line.
*/
- void setCommandLine( const QString& command );
+ void setCommandLine( const TQString& command );
/**
* Set the command line for adding files to the SVN repository.
* This method is only used together with a 'svn commit' for automatically
* adding files which are not yet in the repository.
* @param command The command line.
*/
- void setAddCommand( const QString& command );
+ void setAddCommand( const TQString& command );
/**
* Return the output of a 'svn status' command.
* @returns The complete output.
*/
- QString statusOutput( );
+ TQString statusOutput( );
protected:
/**
@@ -122,24 +122,24 @@ class SVNDialog : public KDialog
private:
SVN::Command _cmd;
- QPushButton * mainBtn;
- QPushButton * cancelBtn;
- QListBox * filebox;
- QComboBox * oldMessages;
- QTextEdit * logedit;
- QTextEdit * output;
- QCheckBox * autoAddBox;
+ TQPushButton * mainBtn;
+ TQPushButton * cancelBtn;
+ TQListBox * filebox;
+ TQComboBox * oldMessages;
+ TQTextEdit * logedit;
+ TQTextEdit * output;
+ TQCheckBox * autoAddBox;
KProcess * p;
- QString _commandLine;
- QString _addCommand;
- QString _statusOutput;
+ TQString _commandLine;
+ TQString _addCommand;
+ TQString _statusOutput;
/// Log messages (long version)
- QStringList m_logMessages;
+ TQStringList m_logMessages;
/// Log messages (short version)
- QStringList m_squeezedLogMessages;
+ TQStringList m_squeezedLogMessages;
/// Temporary file (for commits)
KTempFile* m_tempFile;
diff --git a/kbabel/catalogmanager/libsvn/svnhandler.cpp b/kbabel/catalogmanager/libsvn/svnhandler.cpp
index 8117fe62..1ac98f66 100644
--- a/kbabel/catalogmanager/libsvn/svnhandler.cpp
+++ b/kbabel/catalogmanager/libsvn/svnhandler.cpp
@@ -37,13 +37,13 @@
#include <sys/stat.h>
#include <time.h>
// Qt include files
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
// KDE include files
#include <kapplication.h>
#include <klocale.h>
@@ -54,17 +54,17 @@
// project specific include files
#include "svnhandler.h"
-SVNHandler::SVNHandler( const QString& poBaseDir, const QString& potBaseDir )
+SVNHandler::SVNHandler( const TQString& poBaseDir, const TQString& potBaseDir )
{
setPOBaseDir( poBaseDir );
setPOTBaseDir( potBaseDir );
_autoUpdateTemplates = false;
}
-void SVNHandler::setPOBaseDir( const QString& dir )
+void SVNHandler::setPOBaseDir( const TQString& dir )
{
// check if '.svn/entries' exists in the PO base directory
- if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) {
_isPORepository = true;
_poBaseDir = dir;
} else
@@ -72,10 +72,10 @@ void SVNHandler::setPOBaseDir( const QString& dir )
emit signalIsPORepository( _isPORepository );
}
-void SVNHandler::setPOTBaseDir( const QString& dir )
+void SVNHandler::setPOTBaseDir( const TQString& dir )
{
// check if '.svn/entries' exists in the POT base directory
- if ( QFileInfo( dir + "/.svn/entries" ).exists( ) ) {
+ if ( TQFileInfo( dir + "/.svn/entries" ).exists( ) ) {
_isPOTRepository = true;
_potBaseDir = dir;
} else
@@ -83,7 +83,7 @@ void SVNHandler::setPOTBaseDir( const QString& dir )
emit signalIsPOTRepository( _isPOTRepository );
}
-QString SVNHandler::fileStatus( const FileStatus status ) const
+TQString SVNHandler::fileStatus( const FileStatus status ) const
{
switch ( status ) {
case NO_REPOSITORY:
@@ -115,19 +115,19 @@ QString SVNHandler::fileStatus( const FileStatus status ) const
}
}
-SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const
+SVNHandler::FileStatus SVNHandler::fstatus( const TQString& filename ) const
{
// no valid repository
if ( !_isPORepository )
return NO_REPOSITORY;
- QString fn( filename );
- fn = fn.remove( QRegExp( "/$" ) );
+ TQString fn( filename );
+ fn = fn.remove( TQRegExp( "/$" ) );
- QFileInfo info( fn );
+ TQFileInfo info( fn );
// check if '.svn/entries' exists.
- QFile entries( info.dir( true ).path( ) + "/.svn/entries" );
+ TQFile entries( info.dir( true ).path( ) + "/.svn/entries" );
if ( !entries.exists() )
return NOT_IN_SVN;
@@ -140,12 +140,12 @@ SVNHandler::FileStatus SVNHandler::fstatus( const QString& filename ) const
if( !proc.start( KProcess::Block, KProcess::Stdout ) )
return ERROR_IN_WC;
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorLine, errorCol;
- QDomNodeList nodelist;
- QDomNode node;
- QDomElement entry, wcStatus;
+ TQDomNodeList nodelist;
+ TQDomNode node;
+ TQDomElement entry, wcStatus;
// Parse the output.
if ( !doc.setContent( out.getOutput(), &errorMsg, &errorLine, &errorCol ) ) {
@@ -211,11 +211,11 @@ no_status_xml:
}
entries.close();
- QDomElement element;
+ TQDomElement element;
// File name that we are searching
- const QString findName = info.fileName();
+ const TQString findName = info.fileName();
// The entries are <entry> elements, so we have to check them
- QDomNode child = doc.documentElement().firstChild();
+ TQDomNode child = doc.documentElement().firstChild();
for ( ; !child.isNull() ; child = child.nextSibling() )
{
if ( !child.isElement() )
@@ -226,7 +226,7 @@ no_status_xml:
// Should not happend with svn 1.1.x
continue;
}
- const QString name = element.attribute("name");
+ const TQString name = element.attribute("name");
if ( name == findName )
break;
}
@@ -239,7 +239,7 @@ no_status_xml:
// ### TODO: should we check the attribute kind to be file and not dir?
// ### TODO: what do copy and move add here?
- const QString onSchedule = element.attribute( "schedule" );
+ const TQString onSchedule = element.attribute( "schedule" );
if ( onSchedule == "delete" )
return LOCALLY_REMOVED;
else if ( onSchedule == "added" )
@@ -250,15 +250,15 @@ no_status_xml:
}
// Note: we do not check the property time stamp
- const QString textTimeStamp( element.attribute( "text-time" ) );
+ const TQString textTimeStamp( element.attribute( "text-time" ) );
// calculate the UTC time from the file's last modified date
struct stat st;
- lstat( QFile::encodeName(fn), &st );
+ lstat( TQFile::encodeName(fn), &st );
struct tm * tm_p = gmtime( &st.st_mtime );
const int year = tm_p->tm_year + 1900;
const int month = tm_p->tm_mon + 1;
- QString fileTime;
+ TQString fileTime;
fileTime.sprintf( "%04i-%02i-%02iT%02i:%02i:%02i.000000Z",
year, month, tm_p->tm_mday, tm_p->tm_hour, tm_p->tm_min, tm_p->tm_sec );
//kdDebug() << "File: " << filename << " SVN time: " << textTimeStamp << " File time: " << fileTime << endl;
@@ -269,19 +269,19 @@ no_status_xml:
}
-QString SVNHandler::svnStatus( const QString& filename ) const
+TQString SVNHandler::svnStatus( const TQString& filename ) const
{
return map[filename];
}
-void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config)
+void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config)
{
// Unlike cvs, svn works also from outside the repository(as long as the path is in a repository of course!)
// ### FIXME: wrong, svn commit cannot work if the current directory is not a SVN one
- execSVNCommand( parent, cmd, QStringList( filename ), templates, config );
+ execSVNCommand( parent, cmd, TQStringList( filename ), templates, config );
}
-void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config )
+void SVNHandler::execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config )
{
if ( !_isPORepository ) {
// This message box should never be visible but who knows... ;-)
@@ -290,9 +290,9 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin
return;
}
- // ### TODO: instead of making a QString, use KProcess directly, so that it cares about quoting.
+ // ### TODO: instead of making a TQString, use KProcess directly, so that it cares about quoting.
// ### TODO: use KProcess::setWorkingDirectory instead of using "cd" (therefore allowing to use KProcess without a shell.)
- QString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn ");
+ TQString command("cd " + (templates ? _potBaseDir : _poBaseDir) + " && svn ");
switch ( cmd ) {
case SVN::Update:
command += "update --non-interactive";
@@ -315,15 +315,15 @@ void SVNHandler::execSVNCommand( QWidget* parent, SVN::Command cmd, const QStrin
command += "info"; // Does not allow --non-interactive (at least svn 1.1.4).
}
- QRegExp rx;
+ TQRegExp rx;
if (templates)
rx.setPattern(_potBaseDir + "/?");
else
rx.setPattern(_poBaseDir + "/?");
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
- QString temp = *it;
+ TQString temp = *it;
temp.remove(rx);
command += " \'" + temp + "\'";
}
@@ -336,7 +336,7 @@ void SVNHandler::setAutoUpdateTemplates( bool update )
_autoUpdateTemplates = update;
}
-void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config )
+void SVNHandler::showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config )
{
SVNDialog * dia = new SVNDialog( cmd, parent, config );
dia->setFiles( files );
@@ -359,7 +359,7 @@ void SVNHandler::showDialog( QWidget* parent, SVN::Command cmd, const QStringLis
emit signalFilesCommitted( files );
}
-bool SVNHandler::isInSvn( const QString& path )
+bool SVNHandler::isInSvn( const TQString& path )
{
if ( path.isEmpty() )
return false;
@@ -375,57 +375,57 @@ bool SVNHandler::isInSvn( const QString& path )
* - for a file: check if there is a corresponding file in .svn/text-base/
*/
- const QFileInfo info( path );
+ const TQFileInfo info( path );
if ( info.isDir() ) {
// It is a directory, so find a .svn/entries file
- QDir dir( path );
+ TQDir dir( path );
return dir.exists( ".svn/entries", true );
}
else {
// It is a file, so find the corresponding file in .svn/text-base
- QDir dir( info.dirPath() );
+ TQDir dir( info.dirPath() );
if ( ! dir.cd( ".svn/text-base" ) ) {
// There is not even a .svn/text-base directory, so the file is not under control
return false;
}
- const QString textBaseFilename( info.fileName() + ".svn-base" );
+ const TQString textBaseFilename( info.fileName() + ".svn-base" );
return dir.exists( textBaseFilename, true );
}
}
-void SVNHandler::checkToAdd( const QStringList& files )
+void SVNHandler::checkToAdd( const TQStringList& files )
{
if ( files.isEmpty( ) )
return;
- QStringList toBeAdded;
+ TQStringList toBeAdded;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = files.begin( ); it != files.end( ); ++it ) {
// check for every entry if it needs to be added
if ( ! isInSvn( *it ) ) {
- QFileInfo info( *it );
- QString temp; // will hold the dir path
+ TQFileInfo info( *it );
+ TQString temp; // will hold the dir path
if ( info.isDir( ) ) {
toBeAdded << *it;
temp = *it;
} else {
toBeAdded << *it;
- temp = QFileInfo( *it ).dirPath( true );
+ temp = TQFileInfo( *it ).dirPath( true );
}
// ### TODO: does SVN really needs this or does it do it automatically?
// check recursivlely if parent dirs have to be added as well
while ( ! isInSvn( temp ) && toBeAdded.findIndex( temp ) == -1 ) {
toBeAdded << temp;
- temp = QFileInfo( temp ).dirPath( true );
+ temp = TQFileInfo( temp ).dirPath( true );
}
}
}
// remove an old command
- _addCommand = QString();
+ _addCommand = TQString();
// ### TODO: does SVN really need this?
// make sure the directories are added before the files
@@ -434,38 +434,38 @@ void SVNHandler::checkToAdd( const QStringList& files )
// ### TODO: try to make this better
// create a command line for adding the files and dirs
for ( it = toBeAdded.begin( ); it != toBeAdded.end( ); ++it ) {
- QFileInfo info( *it );
+ TQFileInfo info( *it );
_addCommand += "cd " + info.dirPath( true ) + " && svn add " + info.fileName( ) + "; ";
}
}
// ### TODO: convert to SVN
-void SVNHandler::processStatusOutput( const QString& status )
+void SVNHandler::processStatusOutput( const TQString& status )
{
if ( !_isPORepository )
return;
#if 0
// at first we need to extract the name of the base directory on the server
- QFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME
+ TQFile f( _poBaseDir + "/SVN/Root" ); // ### FIXME
if ( !f.open( IO_ReadOnly ) )
return;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
// extract the string after the last colon in the first line
- QString basedir = stream.readLine( ).section( ':', -1 );
+ TQString basedir = stream.readLine( ).section( ':', -1 );
f.close( );
// divide the complete status output in little chunks for every file
- QStringList entries = QStringList::split( QRegExp( "={67,67}" ), status );
- QStringList::Iterator it;
+ TQStringList entries = TQStringList::split( TQRegExp( "={67,67}" ), status );
+ TQStringList::Iterator it;
for ( it = entries.begin( ); it != entries.end( ); ++it ) {
- QString entr = *it;
+ TQString entr = *it;
// translate the filename from repository to local
- QRegExp rx( basedir + ".*,v" );
+ TQRegExp rx( basedir + ".*,v" );
int pos = entr.find( rx );
- QString file = _poBaseDir + entr.mid( pos + basedir.length( ),
+ TQString file = _poBaseDir + entr.mid( pos + basedir.length( ),
rx.matchedLength( ) - basedir.length( ) - 2 );
entr = "<qt>" + entr + "</qt>";
@@ -477,16 +477,16 @@ void SVNHandler::processStatusOutput( const QString& status )
#endif
}
-void SVNHandler::processDiff( QString output )
+void SVNHandler::processDiff( TQString output )
{
- output.remove( QRegExp( "\\[ .* \\]$" ));
- output.remove( QRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
+ output.remove( TQRegExp( "\\[ .* \\]$" ));
+ output.remove( TQRegExp( "^" + i18n("[ Starting command ]" ).replace("[","\\[").replace("]","\\]")));
KTempFile tmpFile;
*(tmpFile.textStream()) << output;
tmpFile.close();
- QString error;
+ TQString error;
if ( KApplication::startServiceByName( "Kompare", tmpFile.name(), &error ) )
KMessageBox::error( 0, error );
}
@@ -516,10 +516,10 @@ void SVNOutputCollector::setProcess( KProcess* p )
m_process = p;
if( p ) {
- connect( p, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotGatherStdout(KProcess*, char*, int)) );
- connect( p, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotGatherStderr(KProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) );
}
m_gatheredOutput.truncate( 0 );
@@ -529,14 +529,14 @@ void SVNOutputCollector::setProcess( KProcess* p )
void SVNOutputCollector::slotGatherStderr( KProcess*, char* data, int len )
{
- m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) );
- m_stderrOutput.append( QString::fromLocal8Bit( data, len ) );
+ m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
+ m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) );
}
void SVNOutputCollector::slotGatherStdout( KProcess*, char* data, int len )
{
- m_gatheredOutput.append( QString::fromLocal8Bit( data, len ) );
- m_stdoutOutput.append( QString::fromLocal8Bit( data, len ) );
+ m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
+ m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) );
}
#include "svnhandler.moc"
diff --git a/kbabel/catalogmanager/libsvn/svnhandler.h b/kbabel/catalogmanager/libsvn/svnhandler.h
index 67c86d73..4933cb92 100644
--- a/kbabel/catalogmanager/libsvn/svnhandler.h
+++ b/kbabel/catalogmanager/libsvn/svnhandler.h
@@ -36,8 +36,8 @@
#define SVNHANDLER_H
// Qt include files
-#include <qmap.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqobject.h>
// Project specific include files
#include "svndialog.h"
#include "svnresources.h"
@@ -68,17 +68,17 @@ class SVNHandler : public QObject
ERROR_IN_WC ///< The working copy has data that cannot be handled
};
- SVNHandler( const QString& poBaseDir = QString::null, const QString& potBaseDir = QString::null );
+ SVNHandler( const TQString& poBaseDir = TQString::null, const TQString& potBaseDir = TQString::null );
- void setPOBaseDir( const QString& dir );
- void setPOTBaseDir( const QString& dir );
+ void setPOBaseDir( const TQString& dir );
+ void setPOTBaseDir( const TQString& dir );
- FileStatus fstatus( const QString& filename ) const;
- QString fileStatus( const FileStatus status ) const;
- QString svnStatus( const QString& filename ) const;
+ FileStatus fstatus( const TQString& filename ) const;
+ TQString fileStatus( const FileStatus status ) const;
+ TQString svnStatus( const TQString& filename ) const;
- void execSVNCommand( QWidget* parent, SVN::Command cmd, const QString& filename, bool templates, KSharedConfig* config );
- void execSVNCommand( QWidget* parent, SVN::Command cmd, const QStringList& files, bool templates, KSharedConfig* config );
+ void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQString& filename, bool templates, KSharedConfig* config );
+ void execSVNCommand( TQWidget* parent, SVN::Command cmd, const TQStringList& files, bool templates, KSharedConfig* config );
void setAutoUpdateTemplates( bool update );
@@ -90,26 +90,26 @@ class SVNHandler : public QObject
signals:
void signalIsPORepository( bool );
void signalIsPOTRepository( bool );
- void signalFilesCommitted( const QStringList& );
+ void signalFilesCommitted( const TQStringList& );
private:
- void showDialog( QWidget* parent, SVN::Command cmd, const QStringList& files, const QString& commandLine, KSharedConfig* config );
+ void showDialog( TQWidget* parent, SVN::Command cmd, const TQStringList& files, const TQString& commandLine, KSharedConfig* config );
/// Check quickly if the file is part of a SVN repository
- bool isInSvn( const QString& path );
- void checkToAdd( const QStringList& files );
- void processStatusOutput( const QString& status );
- void processDiff( QString output );
+ bool isInSvn( const TQString& path );
+ void checkToAdd( const TQStringList& files );
+ void processStatusOutput( const TQString& status );
+ void processDiff( TQString output );
private:
- QString _poBaseDir;
- QString _potBaseDir;
+ TQString _poBaseDir;
+ TQString _potBaseDir;
bool _isPORepository;
bool _isPOTRepository;
bool _autoUpdateTemplates;
- QString _addCommand;
+ TQString _addCommand;
/** Mapping the output of 'svn status' against the filename. */
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
};
class SVNOutputCollector: public QObject
@@ -120,18 +120,18 @@ class SVNOutputCollector: public QObject
SVNOutputCollector( KProcess* );
void setProcess( KProcess* );
- const QString& getOutput() const { return m_gatheredOutput; }
- const QString& getStderr() const { return m_stderrOutput; }
- const QString& getStdout() const { return m_stdoutOutput; }
+ const TQString& getOutput() const { return m_gatheredOutput; }
+ const TQString& getStderr() const { return m_stderrOutput; }
+ const TQString& getStdout() const { return m_stdoutOutput; }
private slots:
void slotGatherStderr( KProcess*, char*, int );
void slotGatherStdout( KProcess*, char*, int );
private:
- QString m_gatheredOutput;
- QString m_stderrOutput;
- QString m_stdoutOutput;
+ TQString m_gatheredOutput;
+ TQString m_stderrOutput;
+ TQString m_stdoutOutput;
KProcess* m_process;
};
diff --git a/kbabel/catalogmanager/main.cpp b/kbabel/catalogmanager/main.cpp
index 868df92a..706ad67f 100644
--- a/kbabel/catalogmanager/main.cpp
+++ b/kbabel/catalogmanager/main.cpp
@@ -53,10 +53,10 @@
#include <kwin.h>
#include <kmainwindow.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
CatalogManager *CatalogManagerApp::_view = 0;
@@ -84,15 +84,15 @@ void CatalogManagerApp::setPreferredWindow(WId id)
}
}
-void CatalogManagerApp::updatedFile(QCString url)
+void CatalogManagerApp::updatedFile(TQCString url)
{
if( _view )
_view->updateFile(url);
}
-QCString CatalogManagerApp::findNextFile()
+TQCString CatalogManagerApp::findNextFile()
{
- QString reply = "";
+ TQString reply = "";
if( !CatalogManager::_foundFilesList.isEmpty() )
{
reply = CatalogManager::_foundFilesList.first();
@@ -101,9 +101,9 @@ QCString CatalogManagerApp::findNextFile()
} else
{
if( !CatalogManager::_toBeSearched.isEmpty() )
- reply = QString(""); // nothing found yet
+ reply = TQString(""); // nothing found yet
else
- return QCString(); // not found definitely
+ return TQCString(); // not found definitely
}
return reply.utf8();
@@ -128,11 +128,11 @@ int CatalogManagerApp::newInstance()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QString configfile = args->getOption("project");
+ TQString configfile = args->getOption("project");
if( !configfile.isEmpty() )
{
- QFileInfo fi( configfile );
+ TQFileInfo fi( configfile );
configfile = fi.absFilePath();
}
else
@@ -163,12 +163,12 @@ void CatalogManagerInterface::setPreferredWindow( WId id )
CatalogManagerApp::setPreferredWindow(id);
}
-QCString CatalogManagerInterface::findNextFile()
+TQCString CatalogManagerInterface::findNextFile()
{
return CatalogManagerApp::findNextFile();
}
-void CatalogManagerInterface::updatedFile( QCString url )
+void CatalogManagerInterface::updatedFile( TQCString url )
{
CatalogManagerApp::updatedFile(url);
}
diff --git a/kbabel/catalogmanager/markpatterndialog.cpp b/kbabel/catalogmanager/markpatterndialog.cpp
index efe893a2..f56a735b 100644
--- a/kbabel/catalogmanager/markpatterndialog.cpp
+++ b/kbabel/catalogmanager/markpatterndialog.cpp
@@ -31,10 +31,10 @@
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#include <kcombobox.h>
#include <kcompletion.h>
@@ -47,21 +47,21 @@
#include "markpatterndialog.h"
#include "markpatternwidget.h"
-MarkPatternDialog::MarkPatternDialog(QWidget * parent, const char * name)
+MarkPatternDialog::MarkPatternDialog(TQWidget * parent, const char * name)
: KDialogBase(parent, name, true, 0, Ok|Cancel, Ok)
{
actionButton(Ok)->setEnabled(false);
mainWidget = new MarkPatternWidget(this);
- connect (mainWidget->combo, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotComboTextChanged(const QString&)));
+ connect (mainWidget->combo, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotComboTextChanged(const TQString&)));
comboCompletion = mainWidget->combo->completionObject( );
regexpEditDialog = 0;
if (!KTrader::self( )->query("KRegExpEditor/KRegExpEditor").isEmpty( )) {
- connect(mainWidget->regexpButton, SIGNAL(clicked( )), this, SLOT(slotRegexpButtonClicked( )));
+ connect(mainWidget->regexpButton, TQT_SIGNAL(clicked( )), this, TQT_SLOT(slotRegexpButtonClicked( )));
} else {
disconnect(mainWidget->useRegExp, 0, mainWidget->regexpButton, 0);
delete mainWidget->regexpButton;
@@ -87,7 +87,7 @@ void MarkPatternDialog::accept( )
KDialogBase::accept( );
}
-QString MarkPatternDialog::pattern( )
+TQString MarkPatternDialog::pattern( )
{
return mainWidget->combo->currentText( );
}
@@ -118,7 +118,7 @@ void MarkPatternDialog::setMode(bool markMode)
}
}
-void MarkPatternDialog::slotComboTextChanged(const QString& text)
+void MarkPatternDialog::slotComboTextChanged(const TQString& text)
{
actionButton(Ok)->setEnabled(!text.isEmpty( ));
}
@@ -126,14 +126,14 @@ void MarkPatternDialog::slotComboTextChanged(const QString& text)
void MarkPatternDialog::slotRegexpButtonClicked( )
{
if (!regexpEditDialog)
- regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>(
- "KRegExpEditor/KRegExpEditor", QString::null, this);
+ regexpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>(
+ "KRegExpEditor/KRegExpEditor", TQString::null, this);
KRegExpEditorInterface * iface = dynamic_cast<KRegExpEditorInterface *>(regexpEditDialog);
if (iface) {
iface->setRegExp(mainWidget->combo->currentText( ));
- if (regexpEditDialog->exec( ) == QDialog::Accepted)
+ if (regexpEditDialog->exec( ) == TQDialog::Accepted)
mainWidget->combo->setCurrentText(iface->regExp( ));
}
}
diff --git a/kbabel/catalogmanager/markpatterndialog.h b/kbabel/catalogmanager/markpatterndialog.h
index c8ec1218..de919130 100644
--- a/kbabel/catalogmanager/markpatterndialog.h
+++ b/kbabel/catalogmanager/markpatterndialog.h
@@ -45,9 +45,9 @@ class MarkPatternDialog : public KDialogBase
Q_OBJECT
public:
- MarkPatternDialog(QWidget * parent, const char * name = 0);
+ MarkPatternDialog(TQWidget * parent, const char * name = 0);
- QString pattern( );
+ TQString pattern( );
bool isCaseSensitive( );
bool useRegExp( );
bool includeTemplates( );
@@ -60,14 +60,14 @@ class MarkPatternDialog : public KDialogBase
void saveSettings( );
protected slots:
- void slotComboTextChanged(const QString& text);
+ void slotComboTextChanged(const TQString& text);
void slotRegexpButtonClicked( );
private:
MarkPatternWidget * mainWidget;
- QDialog * regexpEditDialog;
+ TQDialog * regexpEditDialog;
- QStringList patternList;
+ TQStringList patternList;
KCompletion * comboCompletion;
};
diff --git a/kbabel/catalogmanager/multiroughtransdlg.cpp b/kbabel/catalogmanager/multiroughtransdlg.cpp
index 874b9c3e..248ac55a 100644
--- a/kbabel/catalogmanager/multiroughtransdlg.cpp
+++ b/kbabel/catalogmanager/multiroughtransdlg.cpp
@@ -35,8 +35,8 @@
#include "catmanlistitem.h"
#include "multiroughtransdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -47,18 +47,18 @@
using namespace KBabel;
-MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, QPtrList<CatManListItem> files
- , QWidget *parent,const char *name)
+MultiRoughTransDlg::MultiRoughTransDlg(KBabelDictBox *dict, TQPtrList<CatManListItem> files
+ , TQWidget *parent,const char *name)
: RoughTransDlg(dict, new Catalog(), parent, name )
,_fileList(files)
{
- QWidget* bars = static_cast<QWidget*>(progressbar->parent());
- QLabel* label = new QLabel( i18n("Files:"), bars );
+ TQWidget* bars = static_cast<TQWidget*>(progressbar->parent());
+ TQLabel* label = new TQLabel( i18n("Files:"), bars );
filesProgressbar = new KProgress(bars,"files progressbar");
filesProgressbar->setTextEnabled(true);
filesProgressbar->setFormat("%v/%m (%p%)");
filesProgressbar->setTotalSteps(files.count());
- QHBoxLayout* mylayout= new QHBoxLayout(bars->layout());
+ TQHBoxLayout* mylayout= new TQHBoxLayout(bars->layout());
mylayout->add(label);
mylayout->add(filesProgressbar);
@@ -126,7 +126,7 @@ void MultiRoughTransDlg::showAllStatistics()
int nothing=tt-ptc-etc;
KLocale *locale = KGlobal::locale();
- QString statMsg = i18n("Result of the translation:\n"
+ TQString statMsg = i18n("Result of the translation:\n"
"Edited entries: %1\n"
"Exact translations: %2 (%3%)\n"
"Approximate translations: %4 (%5%)\n"
diff --git a/kbabel/catalogmanager/multiroughtransdlg.h b/kbabel/catalogmanager/multiroughtransdlg.h
index 8bda58e2..cdc4d1ed 100644
--- a/kbabel/catalogmanager/multiroughtransdlg.h
+++ b/kbabel/catalogmanager/multiroughtransdlg.h
@@ -42,7 +42,7 @@ class MultiRoughTransDlg : public RoughTransDlg
Q_OBJECT
public:
- MultiRoughTransDlg(KBabelDictBox* dictBox, QPtrList<CatManListItem> list, QWidget *parent
+ MultiRoughTransDlg(KBabelDictBox* dictBox, TQPtrList<CatManListItem> list, TQWidget *parent
, const char *name=0);
protected slots:
@@ -56,7 +56,7 @@ protected slots:
private:
- QPtrList<CatManListItem> _fileList;
+ TQPtrList<CatManListItem> _fileList;
KProgress *filesProgressbar;
};
diff --git a/kbabel/catalogmanager/validateprogress.cpp b/kbabel/catalogmanager/validateprogress.cpp
index 9075f24e..b8c563a8 100644
--- a/kbabel/catalogmanager/validateprogress.cpp
+++ b/kbabel/catalogmanager/validateprogress.cpp
@@ -43,8 +43,8 @@
#include <kprogress.h>
#include <ksqueezedtextlabel.h>
-#include <qlistbox.h>
-#include <qtimer.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
#define ID_ERROR_OPEN 1
#define ID_ERROR_IGNORE 2
@@ -52,7 +52,7 @@
// version identification for validation ignores
#define IGNOREFILE_VERSION 0x00
-ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget *parent,const char *name)
+ValidateProgressDialog::ValidateProgressDialog(const TQString& ignoreURL, TQWidget *parent,const char *name)
: KDialogBase(parent,name,true,i18n("Caption of dialog","Validation")
, Close, Close)
, _ignoreURL(ignoreURL), _tool(0), _stopped(false)
@@ -61,7 +61,7 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget
{
_mainWidget = new ValidateProgressWidget(this);
setMainWidget(_mainWidget);
- setInitialSize( QSize(400, 300) );
+ setInitialSize( TQSize(400, 300) );
_errors.clear();
_ignores.clear();
@@ -72,12 +72,12 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget
_errorMenu->insertItem(i18n("&Open"),ID_ERROR_OPEN);
_errorMenu->insertItem(i18n("&Ignore"),ID_ERROR_IGNORE);
- connect( this, SIGNAL(closeClicked()), this, SLOT(stop()));
- connect( _mainWidget->_errorList, SIGNAL( doubleClicked(QListBoxItem *)),
- this, SLOT( errorItemDoubleClicked(QListBoxItem *)));
+ connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(stop()));
+ connect( _mainWidget->_errorList, TQT_SIGNAL( doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT( errorItemDoubleClicked(TQListBoxItem *)));
- connect( _mainWidget->_errorList, SIGNAL( contextMenuRequested(QListBoxItem *, const QPoint &)),
- this, SLOT( showContextMenu(QListBoxItem *, const QPoint &)));
+ connect( _mainWidget->_errorList, TQT_SIGNAL( contextMenuRequested(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT( showContextMenu(TQListBoxItem *, const TQPoint &)));
}
ValidateProgressDialog::~ValidateProgressDialog()
@@ -85,7 +85,7 @@ ValidateProgressDialog::~ValidateProgressDialog()
writeIgnores();
}
-void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList<CatManListItem> files )
+void ValidateProgressDialog::validate( const KDataToolInfo &tool, const TQPtrList<CatManListItem> files )
{
if( files.isEmpty() ) return;
@@ -111,7 +111,7 @@ void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList
_stopped = false;
- QTimer::singleShot( 0, this, SLOT(validate_internal()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(validate_internal()) );
exec();
@@ -139,13 +139,13 @@ void ValidateProgressDialog::validate_internal()
if( it->hasErrors() )
{
- QValueList<IgnoreItem> err = it->errors();
+ TQValueList<IgnoreItem> err = it->errors();
- for( QValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit )
+ for( TQValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit )
{
IgnoreItem item = (*errit);
- QValueList<IgnoreItem>::Iterator ig;
+ TQValueList<IgnoreItem>::Iterator ig;
for( ig = _ignores.begin() ; ig != _ignores.end() ; ++ig )
{
if( (*ig).validationTool == _toolID &&
@@ -167,7 +167,7 @@ void ValidateProgressDialog::validate_internal()
noHeader = false;
}
- QString errortext=QString::number(item.index+1)+": " + item.msgid.first().left(50);
+ TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50);
errortext.replace("\n"," ");
if( item.msgid.first().length() > 50 ) errortext+="...";
_mainWidget->_errorList->insertItem( errortext);
@@ -200,9 +200,9 @@ void ValidateProgressDialog::stop()
_stopped = true;
}
-void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
+void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item)
{
- QString it = item->text();
+ TQString it = item->text();
bool ok =false;
int offset = it.find(":");
@@ -215,7 +215,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
if( !ok ) num = 0;
}
- QListBoxItem* package=item;
+ TQListBoxItem* package=item;
while( package && !package->text().startsWith("/") ) package=package->prev();
@@ -228,7 +228,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item)
emit errorDoubleClicked(package->text(), num-1 );
}
-void ValidateProgressDialog::showContextMenu(QListBoxItem * item, const QPoint & pos)
+void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint & pos)
{
// disable ignore for whole package
_errorMenu->setItemEnabled(ID_ERROR_IGNORE, item->pixmap()==0 );
@@ -255,10 +255,10 @@ void ValidateProgressDialog::readIgnores()
{
IgnoreItem item;
- QFile ignoreFile( _ignoreURL );
+ TQFile ignoreFile( _ignoreURL );
if( ignoreFile.open( IO_ReadOnly ) ) {
- QDataStream s( &ignoreFile );
- QString url;
+ TQDataStream s( &ignoreFile );
+ TQString url;
int version;
s >> version;
@@ -277,15 +277,15 @@ void ValidateProgressDialog::readIgnores()
void ValidateProgressDialog::writeIgnores()
{
- QFile ignoreFile( _ignoreURL );
+ TQFile ignoreFile( _ignoreURL );
if( ignoreFile.open( IO_WriteOnly ) ) {
- QDataStream s( &ignoreFile );
- QString url;
+ TQDataStream s( &ignoreFile );
+ TQString url;
int version = IGNOREFILE_VERSION;
s << version;
- for( QValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it)
+ for( TQValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it)
{
s << (*it);
}
@@ -293,7 +293,7 @@ void ValidateProgressDialog::writeIgnores()
}
}
-QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i )
+TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem & i )
{
return stream << i.fileURL
<< i.msgid
@@ -302,7 +302,7 @@ QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i )
<< i.validationTool;
}
-QDataStream & operator>>( QDataStream & stream, IgnoreItem & i ) {
+TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & i ) {
return stream >> i.fileURL
>> i.msgid
>> i.msgstr
diff --git a/kbabel/catalogmanager/validateprogress.h b/kbabel/catalogmanager/validateprogress.h
index 05133889..15c7c238 100644
--- a/kbabel/catalogmanager/validateprogress.h
+++ b/kbabel/catalogmanager/validateprogress.h
@@ -33,7 +33,7 @@
#ifndef VALIDATEDLG_H
#define VALIDATEDLG_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kdialogbase.h>
#include <kurl.h>
@@ -47,31 +47,31 @@ class KPopupMenu;
struct IgnoreItem
{
KURL fileURL;
- QStringList msgid;
- QStringList msgstr;
+ TQStringList msgid;
+ TQStringList msgstr;
uint index;
- QString validationTool;
+ TQString validationTool;
};
-QDataStream & operator<<( QDataStream & stream, const IgnoreItem &ident );
-QDataStream & operator>>( QDataStream & stream, IgnoreItem & ident);
+TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem &ident );
+TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & ident);
class ValidateProgressDialog : public KDialogBase
{
Q_OBJECT
public:
- ValidateProgressDialog(const QString& ignoreURL, QWidget* parent, const char *name=0);
+ ValidateProgressDialog(const TQString& ignoreURL, TQWidget* parent, const char *name=0);
virtual ~ValidateProgressDialog();
void setIgnoreFuzzy(bool enable) { _ignoreFuzzy = enable; }
void setMarkAsFuzzy(bool enable) { _setAsFuzzy = enable; }
public slots:
- void validate(const KDataToolInfo &tool, const QPtrList<CatManListItem> files);
+ void validate(const KDataToolInfo &tool, const TQPtrList<CatManListItem> files);
signals:
- void errorDoubleClicked(const QString file, const int messageNumber);
+ void errorDoubleClicked(const TQString file, const int messageNumber);
private slots:
/** implementation of the validation itself */
@@ -82,28 +82,28 @@ private slots:
/** If user doubleclicked an item, this slot will be invoked.
* It emits errorDoubleClicked signal for corresponding error*/
- void errorItemDoubleClicked(QListBoxItem * item);
+ void errorItemDoubleClicked(TQListBoxItem * item);
/** show our context menu */
- void showContextMenu(QListBoxItem * item, const QPoint & pos);
+ void showContextMenu(TQListBoxItem * item, const TQPoint & pos);
private:
void readIgnores();
void writeIgnores();
ValidateProgressWidget *_mainWidget;
- QString _ignoreURL;
+ TQString _ignoreURL;
KDataTool* _tool;
- QString _toolID;
- QPtrList<CatManListItem> _files;
+ TQString _toolID;
+ TQPtrList<CatManListItem> _files;
bool _stopped;
KPopupMenu* _errorMenu;
bool _ignoreFuzzy;
bool _setAsFuzzy;
- QValueList<IgnoreItem> _ignores;
- QMap<QString,IgnoreItem> _errors;
+ TQValueList<IgnoreItem> _ignores;
+ TQMap<TQString,IgnoreItem> _errors;
};
#endif // VALIDATEDLG_H
diff --git a/kbabel/catalogmanager/validateprogresswidget.ui.h b/kbabel/catalogmanager/validateprogresswidget.ui.h
index 88f36d60..f3723e02 100644
--- a/kbabel/catalogmanager/validateprogresswidget.ui.h
+++ b/kbabel/catalogmanager/validateprogresswidget.ui.h
@@ -37,11 +37,11 @@
** place of a destructor.
*****************************************************************************/
-void ValidateProgressWidget::setupFileProgressBar( QString text, int maxvalue )
+void ValidateProgressWidget::setupFileProgressBar( TQString text, int maxvalue )
{
_currentFileProgress->setTotalSteps(maxvalue);
- QString t = text[0].upper()+text.mid(1)+":";
+ TQString t = text[0].upper()+text.mid(1)+":";
_currentAction->setText(t);
_currentAction->repaint();
diff --git a/kbabel/common/argextractor.cpp b/kbabel/common/argextractor.cpp
index 4146a5a7..ec5d659f 100644
--- a/kbabel/common/argextractor.cpp
+++ b/kbabel/common/argextractor.cpp
@@ -37,22 +37,22 @@
#include <kdebug.h>
#include <kstaticdeleter.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
-ArgExtractor::ArgExtractor(QString string) : RegExpExtractor( string )
+ArgExtractor::ArgExtractor(TQString string) : RegExpExtractor( string )
{
}
-QStringList *ArgExtractor::_argList=0;
-KStaticDeleter< QStringList > sdAL;
+TQStringList *ArgExtractor::_argList=0;
+KStaticDeleter< TQStringList > sdAL;
-QStringList *ArgExtractor::regExpList()
+TQStringList *ArgExtractor::regExpList()
{
if(!_argList)
{
- sdAL.setObject( _argList, new QStringList );
+ sdAL.setObject( _argList, new TQStringList );
//Build the default arg list
_argList->append("%[ndioxXucsfeEgGp]");
_argList->append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]");
@@ -62,9 +62,9 @@ QStringList *ArgExtractor::regExpList()
return _argList;
}
-void ArgExtractor::setArgExpressions( QStringList* list )
+void ArgExtractor::setArgExpressions( TQStringList* list )
{
- sdAL.setObject( _argList, new QStringList );
- for( QStringList::Iterator it = list->begin() ; it != list->end() ; ++it )
+ sdAL.setObject( _argList, new TQStringList );
+ for( TQStringList::Iterator it = list->begin() ; it != list->end() ; ++it )
_argList->append(*it);
}
diff --git a/kbabel/common/argextractor.h b/kbabel/common/argextractor.h
index 31b28c8a..dd84f1c2 100644
--- a/kbabel/common/argextractor.h
+++ b/kbabel/common/argextractor.h
@@ -35,11 +35,11 @@
#ifndef _ARG_EXTRACTOR_H_
#define _ARG_EXTRACTOR_H_
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include "regexpextractor.h"
@@ -58,23 +58,23 @@ public:
/**
* Create an argument extractor for "string"
*/
- ArgExtractor(QString string=QString::null);
+ ArgExtractor(TQString string=TQString::null);
/**
* Set a new list of tag regular expressions. It also
* deletes the old tags.
* @param list a list of regular expressions
*/
- static void setArgExpressions(QStringList* list);
+ static void setArgExpressions(TQStringList* list);
protected:
/**
* @return the static list of args
*/
- virtual QStringList *regExpList();
+ virtual TQStringList *regExpList();
private:
- static QStringList *_argList;
+ static TQStringList *_argList;
};
}
diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp
index ffd939b7..d6501c3e 100644
--- a/kbabel/common/catalog.cpp
+++ b/kbabel/common/catalog.cpp
@@ -31,14 +31,14 @@
your version.
**************************************************************************** */
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextcodec.h>
-#include <qdatetime.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
+#include <tqdatetime.h>
#include <kconfig.h>
#include <kdatatool.h>
@@ -70,8 +70,8 @@
#include <kmessagebox.h>
using namespace KBabel;
-Catalog::Catalog(QObject* parent, const char* name, QString projectFile)
- : QObject(parent,name)
+Catalog::Catalog(TQObject* parent, const char* name, TQString projectFile)
+ : TQObject(parent,name)
{
if ( projectFile.isEmpty() )
projectFile = KBabel::ProjectManager::defaultProjectName();
@@ -79,7 +79,7 @@ Catalog::Catalog(QObject* parent, const char* name, QString projectFile)
readPreferences();
}
-Catalog::Catalog(const Catalog& c): QObject(c.parent(),c.name()
+Catalog::Catalog(const Catalog& c): TQObject(c.parent(),c.name()
)
{
kdFatal() << "Copy constructor of Catalog, please report how to reproduce to the authors" << endl;
@@ -90,20 +90,20 @@ Catalog::~Catalog()
delete d;
}
-QString Catalog::msgctxt(uint index) const
+TQString Catalog::msgctxt(uint index) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
return d->_entries[index].msgctxt();
}
-QStringList Catalog::msgid(uint index, const bool noNewlines) const
+TQStringList Catalog::msgid(uint index, const bool noNewlines) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
@@ -111,10 +111,10 @@ QStringList Catalog::msgid(uint index, const bool noNewlines) const
return d->_entries[index].msgid(noNewlines);
}
-QStringList Catalog::msgstr(uint index, const bool noNewlines) const
+TQStringList Catalog::msgstr(uint index, const bool noNewlines) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
@@ -123,24 +123,24 @@ QStringList Catalog::msgstr(uint index, const bool noNewlines) const
return d->_entries[index].msgstr(noNewlines);
}
-QString Catalog::comment(uint index) const
+TQString Catalog::comment(uint index) const
{
if ( d->_entries.isEmpty() )
- return QString::null;
+ return TQString::null;
uint max=d->_entries.count()-1;
if(index > max)
index=max;
return d->_entries[index].comment();
}
-QString Catalog::context(uint index) const
+TQString Catalog::context(uint index) const
{
- QString c = comment(index);
+ TQString c = comment(index);
- QStringList lines = QStringList::split("\n",c);
+ TQStringList lines = TQStringList::split("\n",c);
- QString result;
- for( QStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
+ TQString result;
+ for( TQStringList::Iterator it=lines.begin(); it!=lines.end(); ++it)
{
if( (*it).startsWith( "#:") )
{
@@ -155,15 +155,15 @@ CatalogItem Catalog::header() const
return d->_header;
}
-QString Catalog::lastTranslator() const
+TQString Catalog::lastTranslator() const
{
return headerInfo( d->_header ).lastTranslator;
}
-int Catalog::indexForMsgid(const QString& id) const
+int Catalog::indexForMsgid(const TQString& id) const
{
int i=0;
- QValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
+ TQValueVector<CatalogItem>::ConstIterator it = d->_entries.begin();
while(it != d->_entries.end() && !((*it).msgid(true).contains(id)))
{
@@ -177,10 +177,10 @@ int Catalog::indexForMsgid(const QString& id) const
return i;
}
-QStringList Catalog::tagList(uint index)
+TQStringList Catalog::tagList(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -190,10 +190,10 @@ QStringList Catalog::tagList(uint index)
}
-QStringList Catalog::argList(uint index)
+TQStringList Catalog::argList(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -204,7 +204,7 @@ QStringList Catalog::argList(uint index)
/*
-bool Catalog::setMsgstr(uint index,QString msgstr)
+bool Catalog::setMsgstr(uint index,TQString msgstr)
{
kdWarning() << "Catalog::setMsgstr()" << endl;
@@ -217,7 +217,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr)
}
else if(msgstr.isEmpty())
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = _untransIndex.begin();
@@ -242,7 +242,7 @@ bool Catalog::setMsgstr(uint index,QString msgstr)
*/
/*
-bool Catalog::setComment(uint index,QString comment)
+bool Catalog::setComment(uint index,TQString comment)
{
kdWarning() << "Catalog::setComment()" << endl;
bool fuzziesChanged=false;
@@ -261,7 +261,7 @@ bool Catalog::setComment(uint index,QString comment)
}
else if(isFuzzy)
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = _fuzzyIndex.begin();
@@ -289,7 +289,7 @@ bool Catalog::setHeader(CatalogItem newHeader)
if(newHeader.isValid())
{
// normalize the values - ensure every key:value pair is only on a single line
- QString values = newHeader.msgstr().first();
+ TQString values = newHeader.msgstr().first();
values.replace ("\n", "");
values.replace ("\\n", "\\n\n");
@@ -321,11 +321,11 @@ void Catalog::setCurrentURL(const KURL& url)
CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
- QStringList headerList=oldHeader.msgstrAsList();
- QStringList commentList=QStringList::split('\n',oldHeader.comment());
+ TQStringList headerList=oldHeader.msgstrAsList();
+ TQStringList commentList=TQStringList::split('\n',oldHeader.comment());
- QStringList::Iterator it,ait;
- QString temp;
+ TQStringList::Iterator it,ait;
+ TQString temp;
bool found;
const IdentitySettings identityOptions = identitySettings();
@@ -343,7 +343,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Last-Translator:.*")))
+ if((*it).contains(TQRegExp("^ *Last-Translator:.*")))
{
(*it) = temp;
found=true;
@@ -363,7 +363,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *PO-Revision-Date:.*")))
+ if((*it).contains(TQRegExp("^ *PO-Revision-Date:.*")))
{
(*it) = temp;
found=true;
@@ -384,7 +384,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Project-Id-Version:.*")))
+ if((*it).contains(TQRegExp("^ *Project-Id-Version:.*")))
{
(*it) = temp;
found=true;
@@ -408,7 +408,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp+="\\n";
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Language-Team:.*")))
+ if((*it).contains(TQRegExp("^ *Language-Team:.*")))
{
(*it) = temp;
found=true;
@@ -425,7 +425,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
- QString encodingStr;
+ TQString encodingStr;
if(saveOptions.useOldEncoding && d->fileCodec)
{
encodingStr = charsetString(d->fileCodec);
@@ -440,7 +440,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it = headerList.begin();
while( it != headerList.end() )
{
- if( (*it).find( QRegExp( "^ *Content-Type:.*" ) ) != -1 )
+ if( (*it).find( TQRegExp( "^ *Content-Type:.*" ) ) != -1 )
{
if ( found )
{
@@ -450,8 +450,8 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else
{
found=true;
- QRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" );
- QString mimeType;
+ TQRegExp regexp( "^ *Content-Type:(.*/.*);?\\s*charset=.*$" );
+ TQString mimeType;
if ( regexp.search( *it ) )
{
mimeType = regexp.cap( 1 ).stripWhiteSpace();
@@ -483,7 +483,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Content-Transfer-Encoding:.*")))
+ if((*it).contains(TQRegExp("^ *Content-Transfer-Encoding:.*")))
{
(*it) = temp;
found=true;
@@ -502,7 +502,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *X-Generator:.*")))
+ if((*it).contains(TQRegExp("^ *X-Generator:.*")))
{
(*it) = temp;
found=true;
@@ -519,7 +519,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found=false;
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *MIME-Version:")))
+ if((*it).contains(TQRegExp("^ *MIME-Version:")))
{
(*it) = temp;
found=true;
@@ -541,7 +541,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
for( it = headerList.begin(); it != headerList.end(); ++it )
{
- if((*it).contains(QRegExp("^ *Plural-Forms:")))
+ if((*it).contains(TQRegExp("^ *Plural-Forms:")))
{
(*it) = temp;
found=true;
@@ -564,7 +564,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
for( it = commentList.begin(); it != commentList.end(); ++it )
{
// U+00A9 is the Copyright sign
- if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9).*Free Software Foundation, Inc") ) != -1 )
{
found=true;
break;
@@ -572,27 +572,27 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
}
if(found)
{
- if ( (*it).find( QRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
+ if ( (*it).find( TQRegExp("^# *Copyright (\\(C\\)|\\x00a9) YEAR Free Software Foundation, Inc\\.") ) != -1 )
{
//template string
if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove)
(*it).remove(" YEAR Free Software Foundation, Inc");
else
- (*it).replace("YEAR", QDate::currentDate().toString("yyyy"));
+ (*it).replace("YEAR", TQDate::currentDate().toString("yyyy"));
} else
if( saveOptions.FSFCopyright == ProjectSettingsBase::Update )
{
//update years
- QString cy = QDate::currentDate().toString("yyyy");
- if( !(*it).contains( QRegExp(cy)) ) // is the year already included?
+ TQString cy = TQDate::currentDate().toString("yyyy");
+ if( !(*it).contains( TQRegExp(cy)) ) // is the year already included?
{
- int index = (*it).findRev( QRegExp("[\\d]+[\\d\\-, ]*") );
+ int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if( index == -1 )
{
KMessageBox::information(0,i18n("Free Software Foundation Copyright does not contain any year. "
"It will not be updated."));
} else {
- (*it).insert(index+1, QString(", ")+cy);
+ (*it).insert(index+1, TQString(", ")+cy);
}
}
}
@@ -608,14 +608,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
temp = temp.stripWhiteSpace();
// The description strings has often buggy variants already in the file, these must be removed
- QString regexpstr = "^#\\s+" + QRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
+ TQString regexpstr = "^#\\s+" + TQRegExp::escape( saveOptions.descriptionString.stripWhiteSpace() ) + "\\s*$";
regexpstr.replace( "@PACKAGE@", ".*" );
regexpstr.replace( "@LANGUAGE@", ".*" );
//kdDebug() << "REGEXPSTR: " << regexpstr << endl;
- QRegExp regexp ( regexpstr );
+ TQRegExp regexp ( regexpstr );
// The buggy variants exist in English too (of a time before KBabel got a translation for the corresponding language)
- QRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" );
+ TQRegExp regexpUntranslated ( "^#\\s+Translation of .* into .*\\s*$" );
kdDebug () << "Temp is '" << temp << "'" << endl;
@@ -666,7 +666,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
&& ( ! identityOptions.authorName.isEmpty() )
&& ( ! identityOptions.authorEmail.isEmpty() ) ) // An email address can be used as ersatz of a name
{
- QStringList foundAuthors;
+ TQStringList foundAuthors;
temp = "# ";
temp += identityOptions.authorName;
@@ -674,11 +674,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
{
temp+=(" <"+identityOptions.authorEmail+">");
}
- temp+=", "+QDate::currentDate().toString("yyyy")+".";
+ temp+=", "+TQDate::currentDate().toString("yyyy")+".";
// ### TODO: it would be nice if the entry could start with "COPYRIGHT" and have the "(C)" symbol (both not mandatory)
- QRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" );
- QRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" );
+ TQRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" );
+ TQRegExp regexpYearAlone( "^# , \\d{4}.?\\s*$" );
it = commentList.begin();
while ( it != commentList.end() )
{
@@ -721,14 +721,14 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
found = false;
bool foundAuthor = false;
- const QString cy = QDate::currentDate().toString("yyyy");
+ const TQString cy = TQDate::currentDate().toString("yyyy");
ait = foundAuthors.end();
for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it )
{
- if ( (*it).find( QRegExp(
- QRegExp::escape( identityOptions.authorName )+".*"
- + QRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
+ if ( (*it).find( TQRegExp(
+ TQRegExp::escape( identityOptions.authorName )+".*"
+ + TQRegExp::escape( identityOptions.authorEmail ) ) ) != -1 )
{
foundAuthor = true;
if( (*it).find( cy ) != -1 )
@@ -744,11 +744,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
else if ( ait != foundAuthors.end() )
{
//update years
- const int index = (*ait).findRev( QRegExp("[\\d]+[\\d\\-, ]*") );
+ const int index = (*ait).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") );
if ( index == -1 )
(*ait)+=", "+cy;
else
- (*ait).insert(index+1, QString(", ")+cy);
+ (*ait).insert(index+1, TQString(", ")+cy);
}
else
kdDebug() << "INTERNAL ERROR: author found but iterator dangling!" << endl;
@@ -760,11 +760,11 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const
it=commentList.end();
do
--it;
- while( ( it != commentList.begin() ) && ( (*it).find( QRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
+ while( ( it != commentList.begin() ) && ( (*it).find( TQRegExp( "^#(\\s*$|[:,\\.])" ) ) == -1 ) );
++it;
for( ait = foundAuthors.begin() ; ait != foundAuthors.end() ; ++ait )
{
- QString s = (*ait);
+ TQString s = (*ait);
// ensure dot at the end of copyright
if( !s.endsWith(".") ) s += ".";
@@ -790,7 +790,7 @@ void Catalog::setFuzzy(uint index, bool on)
{
applyBeginCommand( index, Comment, 0 );
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
if(on)
{
editList=d->_entries[index].addFuzzy(false);
@@ -832,13 +832,13 @@ void Catalog::setModified(bool flag)
}
-QString Catalog::packageName() const
+TQString Catalog::packageName() const
{
if( !d->_packageName.isNull() ) return d->_packageName;
- QString package=d->_url.fileName();
+ TQString package=d->_url.fileName();
- int index=package.find(QRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
+ int index=package.find(TQRegExp("(\\."+identitySettings().languageCode+")?\\.pot?$"));
if(index>0)
package=package.left(index);
@@ -846,12 +846,12 @@ QString Catalog::packageName() const
return package;
}
-void Catalog::setPackage(const QString& package )
+void Catalog::setPackage(const TQString& package )
{
const int pos = package.findRev( '/' );
if( pos < 0 )
{
- d->_packageDir = QString();
+ d->_packageDir = TQString();
d->_packageName = package;
}
else
@@ -862,20 +862,20 @@ void Catalog::setPackage(const QString& package )
kdDebug() << k_funcinfo << " " << package << " => " << d->_packageDir << " + " << d->_packageName << endl;
}
-QString Catalog::packageDir() const
+TQString Catalog::packageDir() const
{
- QString result;
+ TQString result;
if( !d->_packageDir.isNull() ) result=d->_packageDir;
else result=d->_url.directory(false);
return result;
}
-QString Catalog::encoding() const
+TQString Catalog::encoding() const
{
SaveSettings options = saveSettings();
- QString encodingStr;
+ TQString encodingStr;
if(options.useOldEncoding && d->fileCodec)
{
encodingStr = charsetString(d->fileCodec);
@@ -888,9 +888,9 @@ QString Catalog::encoding() const
return encodingStr;
}
-ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
+ConversionStatus Catalog::openURL(const KURL& url, const TQString& package)
{
- QString target;
+ TQString target;
ConversionStatus error = OK;
if(KIO::NetAccess::download(url, target, NULL))
@@ -930,15 +930,15 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
filter = static_cast<CatalogImportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
-
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
+
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
d->_active = true;
@@ -971,8 +971,8 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
if( package.isEmpty() )
{
- d->_packageName=QString::null;
- d->_packageDir=QString::null;
+ d->_packageName=TQString::null;
+ d->_packageDir=TQString::null;
}
else setPackage(package);
@@ -992,9 +992,9 @@ ConversionStatus Catalog::openURL(const KURL& url, const QString& package)
}
}
-ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const QString& package)
+ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package)
{
- QString target;
+ TQString target;
ConversionStatus error = OK;
if(KIO::NetAccess::download(openUrl, target, NULL))
@@ -1027,15 +1027,15 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
filter = static_cast<CatalogImportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
d->_active = true;
@@ -1069,8 +1069,8 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
d->_url = saveURL;
if( package.isEmpty() )
{
- d->_packageName=QString::null;
- d->_packageDir=QString::null;
+ d->_packageName=TQString::null;
+ d->_packageDir=TQString::null;
}
else setPackage(package);
@@ -1093,12 +1093,12 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons
}
}
-Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
+Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors)
{
if( !d->_mimeTypes.contains( "application/x-gettext" ) )
return Msgfmt::Unsupported;
- QString filename;
+ TQString filename;
bool tempFileUsed=false;
if(d->_url.isLocalFile() && !isModified())
@@ -1125,15 +1125,15 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
currentLine=d->_header.totalLines()+1;
// ### KDE4: return "lines" not "output"
- const QStringList lines = QStringList::split("\n",output);
- for ( QStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
+ const TQStringList lines = TQStringList::split("\n",output);
+ for ( TQStringList::const_iterator it = lines.constBegin(); it != lines.constEnd(); ++it )
{
- if( (*it).find(QRegExp("^.+:\\d+:")) >= 0 )
+ if( (*it).find(TQRegExp("^.+:\\d+:")) >= 0 )
{
const int begin=(*it).find(":",0)+1;
const int end=(*it).find(":",begin);
- const QString line=(*it).mid(begin,end-begin);
+ const TQString line=(*it).mid(begin,end-begin);
while( line.toInt() > currentLine )
{
@@ -1158,14 +1158,14 @@ Msgfmt::Status Catalog::checkSyntax(QString& output, bool clearErrors)
}
if(tempFileUsed)
- QFile::remove(filename);
+ TQFile::remove(filename);
return result;
}
void Catalog::clearErrorList()
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
for(it = d->_errorIndex.begin(); it != d->_errorIndex.end(); ++it)
{
d->_entries[(*it)].setSyntaxError(false);
@@ -1185,10 +1185,10 @@ void Catalog::removeFromErrorList(uint index)
}
}
-QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList<KDataTool> whatToCheck)
+TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -1207,10 +1207,10 @@ QStringList Catalog::itemStatus(uint index, bool recheck, QPtrList<KDataTool> wh
return item.errors();
}
-QStringList Catalog::itemStatus(uint index)
+TQStringList Catalog::itemStatus(uint index)
{
if ( d->_entries.isEmpty() )
- return QStringList();
+ return TQStringList();
uint max=d->_entries.count()-1;
if(index > max)
@@ -1229,14 +1229,14 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
kdDebug(KBABEL) << "checkUsingTool active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
int index = 0;
bool hasErrors=false;
emit signalResetProgressBar(i18n("validating file"),100);
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it, index++ )
{
if( !tool->run( "validate", (void*)(&(*it)), "CatalogItem", "application/x-kbabel-catalogitem" ))
@@ -1256,26 +1256,26 @@ bool Catalog::checkUsingTool(KDataTool* tool, bool clearErrors)
kdDebug(KBABEL) << "checkUsingTool not active" << endl;
d->_active=false;
d->_stop=false;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
emit signalClearProgressBar();
return !hasErrors;
}
-void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
+void Catalog::modifyUsingTool(KDataTool* tool, const TQString& command)
{
kdDebug(KBABEL) << "modifyUsingTool active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
int index = 0;
bool modified = false;
emit signalResetProgressBar(i18n("applying tool"),100);
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it, index++ )
{
CatalogItem dummyItem( *it );
@@ -1294,7 +1294,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
{
uint in = 0; // number of current lural form
// go over all plural forms and test, which changed
- for ( QStringList::Iterator itorig = (*it).msgstr().begin()
+ for ( TQStringList::Iterator itorig = (*it).msgstr().begin()
, itchanged = dummyItem.msgstr().begin()
; itorig != (*it).msgstr().end()
; ++itorig, ++itchanged) {
@@ -1334,7 +1334,7 @@ void Catalog::modifyUsingTool(KDataTool* tool, const QString& command)
kdDebug(KBABEL) << "modifyUsingTool not active" << endl;
d->_active=false;
d->_stop=false;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
emit signalClearProgressBar();
}
@@ -1653,7 +1653,7 @@ bool Catalog::isGeneratedFromDocbook() const
return d->_generatedFromDocbook;
}
-QString Catalog::package() const
+TQString Catalog::package() const
{
return packageDir()+packageName();
}
@@ -1672,7 +1672,7 @@ void Catalog::setSettings(IdentitySettings settings)
{
IdentitySettings oldsettings = d->_project->identitySettings();
- QString oldLanguageCode = oldsettings.languageCode;
+ TQString oldLanguageCode = oldsettings.languageCode;
int oldForms = oldsettings.numberOfPluralForms;
@@ -1711,7 +1711,7 @@ void Catalog::generateIndexLists()
clearErrorList();
uint counter=0;
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
{
if((*it).isUntranslated())
{
@@ -1727,9 +1727,9 @@ void Catalog::generateIndexLists()
}
-int Catalog::findNextInList(const QValueList<uint>& list,uint index) const
+int Catalog::findNextInList(const TQValueList<uint>& list,uint index) const
{
- QValueList<uint>::ConstIterator it;
+ TQValueList<uint>::ConstIterator it;
int nextIndex=-1;
@@ -1759,9 +1759,9 @@ int Catalog::findNextInList(const QValueList<uint>& list,uint index) const
return nextIndex;
}
-int Catalog::findPrevInList(const QValueList<uint>& list,uint index) const
+int Catalog::findPrevInList(const TQValueList<uint>& list,uint index) const
{
- QValueList<uint>::ConstIterator it;
+ TQValueList<uint>::ConstIterator it;
int prevIndex=-1;
@@ -1798,10 +1798,10 @@ int Catalog::findPrevInList(const QValueList<uint>& list,uint index) const
}
-QString Catalog::dateTime() const
+TQString Catalog::dateTime() const
{
- const QDateTime dt = QDateTime::currentDateTime();
- QString dateTimeString;
+ const TQDateTime dt = TQDateTime::currentDateTime();
+ TQString dateTimeString;
const SaveSettings options = d->_project->saveSettings();
@@ -1815,7 +1815,7 @@ QString Catalog::dateTime() const
case Qt::ISODate:
{
dateTimeString = dt.toString("yyyy-MM-dd hh:mm");
- QTime t;
+ TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60 ;
t = t.addSecs( offset * correction );
@@ -1827,56 +1827,56 @@ QString Catalog::dateTime() const
{
dateTimeString = options.customDateFormat;
- const QDate date = dt.date();
- const QTime time = dt.time();
+ const TQDate date = dt.date();
+ const TQTime time = dt.time();
// the year
- dateTimeString.replace( "%Y", QString::number( date.year() ) );
- dateTimeString.replace( "%y", QString::number( date.year() ).right(2) );
+ dateTimeString.replace( "%Y", TQString::number( date.year() ) );
+ dateTimeString.replace( "%y", TQString::number( date.year() ).right(2) );
// the month
if(date.month()<10)
{
- dateTimeString.replace( "%m", "0"+QString::number( date.month() ) );
+ dateTimeString.replace( "%m", "0"+TQString::number( date.month() ) );
}
else
{
- dateTimeString.replace( "%m", QString::number( date.month() ) );
+ dateTimeString.replace( "%m", TQString::number( date.month() ) );
}
- dateTimeString.replace( "%f", QString::number( date.month() ) );
+ dateTimeString.replace( "%f", TQString::number( date.month() ) );
dateTimeString.replace( "%b", date.longMonthName(date.month()) );
dateTimeString.replace( "%h", date.longMonthName(date.month()) );
// the day
- dateTimeString.replace( "%j", QString::number( date.dayOfYear() ) );
- dateTimeString.replace( "%e", QString::number( date.day() ) );
+ dateTimeString.replace( "%j", TQString::number( date.dayOfYear() ) );
+ dateTimeString.replace( "%e", TQString::number( date.day() ) );
if(date.day() < 10)
{
- dateTimeString.replace( "%d", "0"+QString::number( date.day() ) );
+ dateTimeString.replace( "%d", "0"+TQString::number( date.day() ) );
}
else
{
- dateTimeString.replace( "%d", QString::number( date.day() ) );
+ dateTimeString.replace( "%d", TQString::number( date.day() ) );
}
dateTimeString.replace( "%a", date.longDayName( date.dayOfWeek() ) );
// hour
- dateTimeString.replace( "%k", QString::number( time.hour() ) );
+ dateTimeString.replace( "%k", TQString::number( time.hour() ) );
if(time.hour() < 10)
{
- dateTimeString.replace( "%H", "0"+QString::number( time.hour() ) );
+ dateTimeString.replace( "%H", "0"+TQString::number( time.hour() ) );
}
else
{
- dateTimeString.replace( "%H", QString::number( time.hour() ) );
+ dateTimeString.replace( "%H", TQString::number( time.hour() ) );
}
- QString zone; // AM or PM
+ TQString zone; // AM or PM
int hour = time.hour();
if( hour > 12 )
{
@@ -1888,15 +1888,15 @@ QString Catalog::dateTime() const
zone="AM";
}
- dateTimeString.replace( "%I", QString::number( hour ) );
+ dateTimeString.replace( "%I", TQString::number( hour ) );
if(hour < 10)
{
- dateTimeString.replace( "%i", "0"+QString::number( hour ) );
+ dateTimeString.replace( "%i", "0"+TQString::number( hour ) );
}
else
{
- dateTimeString.replace( "%i", QString::number( hour ) );
+ dateTimeString.replace( "%i", TQString::number( hour ) );
}
dateTimeString.replace( "%p", zone );
@@ -1904,26 +1904,26 @@ QString Catalog::dateTime() const
// minutes
if(time.minute() < 10)
{
- dateTimeString.replace( "%M", "0"+QString::number( time.minute() ) );
+ dateTimeString.replace( "%M", "0"+TQString::number( time.minute() ) );
}
else
{
- dateTimeString.replace( "%M", QString::number( time.minute() ) );
+ dateTimeString.replace( "%M", TQString::number( time.minute() ) );
}
// seconds
if(time.second() < 10)
{
- dateTimeString.replace( "%S", "0"+QString::number( time.second() ) );
+ dateTimeString.replace( "%S", "0"+TQString::number( time.second() ) );
}
else
{
- dateTimeString.replace( "%S", QString::number( time.second() ) );
+ dateTimeString.replace( "%S", TQString::number( time.second() ) );
}
// timezone
dateTimeString.replace( "%Z", d->_project->identitySettings().timeZone );
- QTime t;
+ TQTime t;
const int offset = KRFCDate::localUTCOffset();
const int correction = offset < 0 ? -60 : 60;
t = t.addSecs( offset * correction );
@@ -1973,15 +1973,15 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
if(targetURL.isLocalFile())
{
// test if the directory exists. If not, create it.
- QDir dir( targetURL.directory());
+ TQDir dir( targetURL.directory());
- QStringList dirList;
+ TQStringList dirList;
while(!dir.exists() && !dir.dirName().isEmpty())
{
dirList.prepend(dir.dirName());
dir.setPath(dir.path()+"/..");
}
- for ( QStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it )
+ for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end(); ++it )
{
if(!dir.mkdir(*it))
{
@@ -1998,7 +1998,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
}
else
{
- QString tempFile=kapp->tempSaveName(targetURL.path(0));
+ TQString tempFile=kapp->tempSaveName(targetURL.path(0));
status = writeFile(tempFile,overwrite);
@@ -2010,7 +2010,7 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
}
}
- QFile::remove(tempFile);
+ TQFile::remove(tempFile);
}
if(status == OK)
@@ -2031,21 +2031,21 @@ ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite)
return status;
}
-QString Catalog::saveTempFile()
+TQString Catalog::saveTempFile()
{
- QString filename = kapp->tempSaveName("/temp/kbabel_temp.po");
+ TQString filename = kapp->tempSaveName("/temp/kbabel_temp.po");
if( writeFile(filename) != OK )
{
- filename = QString::null;
+ filename = TQString::null;
}
return filename;
}
-ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
+ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite)
{
- QFileInfo info(localFile);
+ TQFileInfo info(localFile);
if(info.isDir())
return NO_FILE;
@@ -2059,7 +2059,7 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
}
else // check if the directory is writable
{
- QFileInfo dir(info.dirPath());
+ TQFileInfo dir(info.dirPath());
if(!dir.isWritable())
{
return NO_PERMISSIONS;
@@ -2093,15 +2093,15 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
filter = static_cast<CatalogExportPlugin*>(factory->create(0, 0));
// provide progress bar indication
- connect( filter, SIGNAL( signalResetProgressBar(QString,int) ),
- this, SIGNAL( signalResetProgressBar(QString,int) ));
- connect( filter, SIGNAL( signalProgress(int) ),
- this, SIGNAL( signalProgress(int) ));
- connect( filter, SIGNAL( signalClearProgressBar() ),
- this, SIGNAL( signalClearProgressBar() ));
+ connect( filter, TQT_SIGNAL( signalResetProgressBar(TQString,int) ),
+ this, TQT_SIGNAL( signalResetProgressBar(TQString,int) ));
+ connect( filter, TQT_SIGNAL( signalProgress(int) ),
+ this, TQT_SIGNAL( signalProgress(int) ));
+ connect( filter, TQT_SIGNAL( signalClearProgressBar() ),
+ this, TQT_SIGNAL( signalClearProgressBar() ));
- connect( this, SIGNAL( signalStopActivity() ),
- filter, SLOT( stop() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ),
+ filter, TQT_SLOT( stop() ));
// load in the file (target is always local)
kdDebug(KBABEL) << "writeFile active" << endl;
@@ -2117,13 +2117,13 @@ ConversionStatus Catalog::writeFile(QString localFile , bool overwrite)
return error;
}
-QTextCodec* Catalog::codecForFile(QString gettextHeader)
+TQTextCodec* Catalog::codecForFile(TQString gettextHeader)
{
- QString charset;
+ TQString charset;
- QString head = gettextHeader;
+ TQString head = gettextHeader;
- QRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+");
+ TQRegExp r("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*[^\\\"\\n]+");
int begin=r.search(head);
int len=r.matchedLength();
if(begin<0) {
@@ -2133,13 +2133,13 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
head = head.mid(begin,len);
- QRegExp regexp("charset *= *([^\\\\\\\"]+)");
+ TQRegExp regexp("charset *= *([^\\\\\\\"]+)");
if( regexp.search( head ) > -1 )
{
charset = regexp.cap(1);
}
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -2148,20 +2148,20 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
// at least utf8, so utf8-codec can be used for both.
if( charset == "CHARSET")
{
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf8 encoding.")
+ << TQString("file seems to be a template: using utf8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
}
if(!codec)
{
kdWarning() << "charset found, but no codec available, using UTF8 instead" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
}
@@ -2170,81 +2170,81 @@ QTextCodec* Catalog::codecForFile(QString gettextHeader)
PoInfo Catalog::headerInfo(const CatalogItem headerItem)
{
- QStringList header=headerItem.msgstrAsList();
+ TQStringList header=headerItem.msgstrAsList();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
PoInfo info;
// extract information from the header
for(it=header.begin();it!=header.end();++it)
{
- if((*it).contains(QRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
+ if((*it).contains(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*.+\\s*$")))
{
- info.project=(*it).replace(QRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
+ info.project=(*it).replace(TQRegExp("^\\s*Project-Id-Version\\s*:\\s*"),"");
if(info.project.right(2)=="\\n")
info.project.remove(info.project.length()-2,2);
info.project=info.project.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*.+\\s*$")))
{
- info.creation=(*it).replace(QRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
+ info.creation=(*it).replace(TQRegExp("^\\s*POT-Creation-Date\\s*:\\s*"),"");
if(info.creation.right(2)=="\\n")
info.creation.remove(info.creation.length()-2,2);
info.creation=info.creation.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*.+\\s*$")))
{
- info.revision=(*it).replace(QRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
+ info.revision=(*it).replace(TQRegExp("^\\s*PO-Revision-Date\\s*:\\s*"),"");
if(info.revision.right(2)=="\\n")
info.revision.remove(info.revision.length()-2,2);
info.revision=info.revision.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
+ else if((*it).contains(TQRegExp("^\\s*Last-Translator\\s*:\\s*.+\\s*$")))
{
- info.lastTranslator=(*it).replace(QRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
+ info.lastTranslator=(*it).replace(TQRegExp("^\\s*Last-Translator\\s*:\\s*"),"");
if(info.lastTranslator.right(2)=="\\n")
info.lastTranslator.remove(info.lastTranslator.length()-2,2);
info.lastTranslator=info.lastTranslator.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Language-Team\\s*:\\s*.+\\s*")))
{
- info.languageTeam=(*it).replace(QRegExp("^\\s*Language-Team\\s*:\\s*"),"");
+ info.languageTeam=(*it).replace(TQRegExp("^\\s*Language-Team\\s*:\\s*"),"");
if(info.languageTeam.right(2)=="\\n")
info.languageTeam.remove(info.languageTeam.length()-2,2);
info.languageTeam=info.languageTeam.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*MIME-Version\\s*:\\s*.+\\s*")))
{
- info.mimeVersion=(*it).replace(QRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
+ info.mimeVersion=(*it).replace(TQRegExp("^\\s*MIME-Version\\s*:\\s*"),"");
if(info.mimeVersion.right(2)=="\\n")
info.mimeVersion.remove(info.mimeVersion.length()-2,2);
info.mimeVersion=info.mimeVersion.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Type\\s*:\\s*.+\\s*")))
{
- info.contentType=(*it).replace(QRegExp("^\\s*Content-Type\\s*:\\s*"),"");
+ info.contentType=(*it).replace(TQRegExp("^\\s*Content-Type\\s*:\\s*"),"");
if(info.contentType.right(2)=="\\n")
info.contentType.remove(info.contentType.length()-2,2);
info.contentType=info.contentType.simplifyWhiteSpace();
}
- else if((*it).contains(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
+ else if((*it).contains(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*.+\\s*")))
{
- info.encoding=(*it).replace(QRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
+ info.encoding=(*it).replace(TQRegExp("^\\s*Content-Transfer-Encoding\\s*:\\s*"),"");
if(info.encoding.right(2)=="\\n")
info.encoding.remove(info.encoding.length()-2,2);
@@ -2253,7 +2253,7 @@ PoInfo Catalog::headerInfo(const CatalogItem headerItem)
}
else
{
- QString line=(*it);
+ TQString line=(*it);
if(line.right(2)=="\\n")
line.remove(line.length()-2,2);
@@ -2455,7 +2455,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo)
if(checkUntranslated && item.isUntranslated())
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = d->_untransIndex.begin();
@@ -2478,7 +2478,7 @@ void Catalog::processCommand(EditCommand* cmd,CatalogView* view, bool undo)
}
else
{
- QValueList<uint>::Iterator it;
+ TQValueList<uint>::Iterator it;
// insert index in the right place in the list
it = d->_fuzzyIndex.begin();
@@ -2504,15 +2504,15 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
kdDebug(KBABEL) << "findNext active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
MiscSettings miscOptions = miscSettings();
len=0;
int pos=0;
- QString searchStr = findOpts->findStr;
- QRegExp regexp(searchStr);
+ TQString searchStr = findOpts->findStr;
+ TQRegExp regexp(searchStr);
if( findOpts->isRegExp ) {
regexp.setCaseSensitive(findOpts->caseSensitive);
@@ -2547,14 +2547,14 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
int accelMarkerPos = -1;
int contextInfoLength = 0;
int contextInfoPos = -1;
- QString targetStr;
+ TQString targetStr;
kapp->processEvents(10);
if( d->_stop || endReached)
{
kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findNext not active" << endl;
d->_active=false;
d->_stop=false;
@@ -2603,9 +2603,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
if ((pos=regexp.search(targetStr,docPos.offset)) >= 0 ) {
len = regexp.matchedLength();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2621,9 +2621,9 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
len=searchStr.length();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2763,7 +2763,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findNext not active" << endl;
d->_active=false;
d->_stop=false;
@@ -2779,15 +2779,15 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=true;
d->_stop=false;
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
MiscSettings miscOptions = miscSettings();
len=0;
int pos=0;
- QString searchStr = findOpts->findStr;
- QRegExp regexp(searchStr);
+ TQString searchStr = findOpts->findStr;
+ TQRegExp regexp(searchStr);
if( findOpts->isRegExp ) {
regexp.setCaseSensitive(findOpts->caseSensitive);
@@ -2796,14 +2796,14 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
int accelMarkerPos = -1;
int contextInfoLength = 0;
int contextInfoPos = -1;
- QString targetStr;
+ TQString targetStr;
kapp->processEvents(10);
if( d->_stop || beginReached)
{
kdDebug(KBABEL) << "FindNext: endReached or stopped" << endl;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=false;
d->_stop=false;
@@ -2869,9 +2869,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
if(found) {
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -2886,9 +2886,9 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
&& (uint)pos < docPos.offset) {
len=searchStr.length();
if(findOpts->wholeWords) {
- QString pre=targetStr.mid(pos-1,1);
- QString post=targetStr.mid(pos+len,1);
- if(!pre.contains(QRegExp("[a-zA-Z0-9]")) && !post.contains(QRegExp("[a-zA-Z0-9]")) ){
+ TQString pre=targetStr.mid(pos-1,1);
+ TQString post=targetStr.mid(pos+len,1);
+ if(!pre.contains(TQRegExp("[a-zA-Z0-9]")) && !post.contains(TQRegExp("[a-zA-Z0-9]")) ){
success=true;
docPos.offset=pos;
}
@@ -3034,7 +3034,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
}
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "findPrev active" << endl;
d->_active=false;
d->_stop=false;
@@ -3043,7 +3043,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le
}
-Catalog::DiffResult Catalog::diff(uint entry, QString *result)
+Catalog::DiffResult Catalog::diff(uint entry, TQString *result)
{
if(!result)
{
@@ -3057,7 +3057,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
}
// first look if the diff for this entry is in the cache
- QString *s = d->diffCache[entry];
+ TQString *s = d->diffCache[entry];
if(s)
{
if(s->isEmpty())
@@ -3070,7 +3070,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
// then look if the same msgid is contained in the diff file
// FIXME: should care about plural forms in msgid
- QString id = msgid(entry).first();
+ TQString id = msgid(entry).first();
id.replace( "\n","");
if(d->msgidDiffList.contains(id))
{
@@ -3080,21 +3080,21 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffOk;
}
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "diffv active" << endl;
d->_active=true;
d->_stop=false;
- QString idForDiff;
+ TQString idForDiff;
// then look if there are entries with the same translation
kdWarning() << "Diff feature (2) does not work with plural forms" << endl;
- QString str = msgstr(entry).first();
+ TQString str = msgstr(entry).first();
str.replace("\n","");
if(d->msgstr2MsgidDiffList.contains(str))
{
- QStringList list = d->msgstr2MsgidDiffList[str];
+ TQStringList list = d->msgstr2MsgidDiffList[str];
if(list.count() == 1)
{
@@ -3104,9 +3104,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
{
// find the best matching id
double bestWeight = 0.6;
- QString bestId;
+ TQString bestId;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it)
{
double weight = LevenshteinDistance()(id, (*it));
@@ -3130,13 +3130,13 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
// find the best matching id
double bestWeight = 0.6;
- QString bestId;
+ TQString bestId;
int counter=0;
int oldPercent=0;
int max = QMAX( d->msgidDiffList.count()-1, 1);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = d->msgidDiffList.begin();
it != d->msgidDiffList.end(); ++it)
{
@@ -3159,7 +3159,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
if( d->_stop )
{
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug
(KBABEL) << "diffv not active" << endl;
@@ -3180,7 +3180,7 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
if( idForDiff.isEmpty() )
{
- s = new QString(*result);
+ s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
delete s;
@@ -3190,16 +3190,16 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffNotFound;
}
- QString r = wordDiff(idForDiff,id);
+ TQString r = wordDiff(idForDiff,id);
//esp for plural forms
- *result = r.replace("\\n<KBABELADD>" + QString(QChar(0x00B6)) + "</KBABELADD>", "\\n\n");
+ *result = r.replace("\\n<KBABELADD>" + TQString(TQChar(0x00B6)) + "</KBABELADD>", "\\n\n");
- s = new QString(*result);
+ s = new TQString(*result);
if( !d->diffCache.insert(entry,s) )
delete s;
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "diffv not active" << endl;
d->_active=false;
d->_stop=false;
@@ -3207,9 +3207,9 @@ Catalog::DiffResult Catalog::diff(uint entry, QString *result)
return DiffOk;
}
-void Catalog::setDiffList( const QValueList<DiffEntry>& list)
+void Catalog::setDiffList( const TQValueList<DiffEntry>& list)
{
- connect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ connect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "setDiffList active" << endl;
d->_active=true;
d->_stop=false;
@@ -3223,7 +3223,7 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
uint max = QMAX(list.count()-1,1);
int oldPercent=0;
uint counter=0;
- QValueList<DiffEntry>::ConstIterator it;
+ TQValueList<DiffEntry>::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it)
{
int percent = (100*counter)/max;
@@ -3235,9 +3235,9 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
kapp->processEvents(10);
}
- QString id = (*it).msgid;
+ TQString id = (*it).msgid;
id.replace("\n","");
- QString str = (*it).msgstr;
+ TQString str = (*it).msgstr;
str.replace("\n","");
d->msgidDiffList.append(id);
@@ -3245,12 +3245,12 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
{
if(d->msgstr2MsgidDiffList.contains(str))
{
- QStringList sl = d->msgstr2MsgidDiffList[str];
+ TQStringList sl = d->msgstr2MsgidDiffList[str];
sl.append(id);
}
else
{
- QStringList sl;
+ TQStringList sl;
sl.append(id);
d->msgstr2MsgidDiffList.insert(str,sl);
}
@@ -3259,17 +3259,17 @@ void Catalog::setDiffList( const QValueList<DiffEntry>& list)
emit signalClearProgressBar();
- disconnect( this, SIGNAL( signalStopActivity() ), this, SLOT( stopInternal() ));
+ disconnect( this, TQT_SIGNAL( signalStopActivity() ), this, TQT_SLOT( stopInternal() ));
kdDebug(KBABEL) << "setDiffList not active" << endl;
d->_active=false;
d->_stop=false;
}
-QValueList<DiffEntry> Catalog::asDiffList()
+TQValueList<DiffEntry> Catalog::asDiffList()
{
- QValueList<DiffEntry> list;
+ TQValueList<DiffEntry> list;
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
DiffEntry e;
@@ -3299,7 +3299,7 @@ void Catalog::getNumberOfPluralForms()
return;
}
- QString lang=options.languageCode;
+ TQString lang=options.languageCode;
if(lang.isEmpty())
{
d->numberOfPluralForms=-1;
@@ -3309,7 +3309,7 @@ void Catalog::getNumberOfPluralForms()
d->numberOfPluralForms = getNumberOfPluralForms(lang);
}
-int Catalog::getNumberOfPluralForms(const QString& lang)
+int Catalog::getNumberOfPluralForms(const TQString& lang)
{
int nr=-1;
@@ -3323,7 +3323,7 @@ int Catalog::getNumberOfPluralForms(const QString& lang)
"that out if unsure, the programs will crash!!\n"
"Definition of PluralForm - to be set by the translator of kdelibs.po";
- QString formsTranslation = locale.translate(formsString);
+ TQString formsTranslation = locale.translate(formsString);
// no translation found
if(formsTranslation == formsString || formsTranslation.isEmpty())
@@ -3385,44 +3385,44 @@ bool Catalog::isModified() const
return d->_modified;
}
-void Catalog::setEntries(QValueVector<CatalogItem> entries)
+void Catalog::setEntries(TQValueVector<CatalogItem> entries)
{
d->_entries=entries;
// update the project for entries
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
it->setProject( d->_project );
}
}
-void Catalog::setObsoleteEntries(QValueList<CatalogItem> entries)
+void Catalog::setObsoleteEntries(TQValueList<CatalogItem> entries)
{
d->_obsoleteEntries=entries;
}
-QValueList<CatalogItem> Catalog::obsoleteEntries() const
+TQValueList<CatalogItem> Catalog::obsoleteEntries() const
{
return d->_obsoleteEntries;
}
-void Catalog::setCatalogExtraData(const QStringList& data)
+void Catalog::setCatalogExtraData(const TQStringList& data)
{
d->_catalogExtra = data;
}
-QStringList Catalog::catalogExtraData() const
+TQStringList Catalog::catalogExtraData() const
{
return d->_catalogExtra;
}
-QString Catalog::importPluginID() const
+TQString Catalog::importPluginID() const
{
return d->_importID;
}
-QTextCodec* Catalog::fileCodec() const
+TQTextCodec* Catalog::fileCodec() const
{
return d->fileCodec;
}
@@ -3432,17 +3432,17 @@ void Catalog::setGeneratedFromDocbook(const bool generated)
d->_generatedFromDocbook = generated;
}
-void Catalog::setFileCodec( QTextCodec* codec )
+void Catalog::setFileCodec( TQTextCodec* codec )
{
d->fileCodec = codec;
}
-void Catalog::setErrorIndex( const QValueList<uint>& list )
+void Catalog::setErrorIndex( const TQValueList<uint>& list )
{
d->_errorIndex = list;
}
-void Catalog::setImportPluginID( const QString& id )
+void Catalog::setImportPluginID( const TQString& id )
{
d->_importID = id;
}
@@ -3463,12 +3463,12 @@ bool Catalog::isActive()
return d->_active;
}
-void Catalog::setMimeTypes( const QString& mimeTypes )
+void Catalog::setMimeTypes( const TQString& mimeTypes )
{
d->_mimeTypes = mimeTypes;
}
-QString Catalog::mimeTypes() const
+TQString Catalog::mimeTypes() const
{
return d->_mimeTypes;
}
@@ -3479,21 +3479,21 @@ void Catalog::wordCount (uint &total, uint &fuzzy, uint &untranslated) const
fuzzy = 0;
untranslated = 0;
- QRegExp separator( "[ \n\t]+" );
+ TQRegExp separator( "[ \n\t]+" );
- for ( QValueVector<CatalogItem>::Iterator it = d->_entries.begin();
+ for ( TQValueVector<CatalogItem>::Iterator it = d->_entries.begin();
it != d->_entries.end(); ++it)
{
// find out the number of words for this message
// join all forms together
- QString message = (*it).msgid ().join (" ");
+ TQString message = (*it).msgid ().join (" ");
// remove tags first
d->_tagExtractor->setString( message );
message = d->_tagExtractor->plainString(false);
- QStringList words = QStringList::split ( separator, message );
+ TQStringList words = TQStringList::split ( separator, message );
total += words.count();
diff --git a/kbabel/common/catalog.h b/kbabel/common/catalog.h
index db47c48b..27b22bab 100644
--- a/kbabel/common/catalog.h
+++ b/kbabel/common/catalog.h
@@ -42,8 +42,8 @@
#include "catalogfileplugin.h"
#include "kbproject.h"
-#include <qptrlist.h>
-#include <qvaluevector.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
#include <kdemacros.h>
#include <kstandarddirs.h>
@@ -95,8 +95,8 @@ struct DocPosition
*/
struct DiffEntry
{
- QString msgid;
- QString msgstr;
+ TQString msgid;
+ TQString msgstr;
};
/**
@@ -121,17 +121,17 @@ public:
*
* @return Codec for found charset or 0, if no information has been found
*/
- static QTextCodec* codecForFile(QString gettextHeader);
+ static TQTextCodec* codecForFile(TQString gettextHeader);
static PoInfo headerInfo(const CatalogItem headerItem);
/**
* A constructor for an empty message catalog.
- * @param parent parent @ref QObject for this catalog
+ * @param parent parent @ref TQObject for this catalog
* @param name unique name for this object
* @param configFile configuration file to read config from
*/
- Catalog(QObject* parent=0, const char* name=0, QString projectFile = QString() );
+ Catalog(TQObject* parent=0, const char* name=0, TQString projectFile = TQString() );
/**
* Deprecated. A copy constructor. Do not use since each Catalog registers
@@ -146,7 +146,7 @@ public:
* @param index index of the requested message
* @return context for the given message
*/
- QString msgctxt(uint index) const;
+ TQString msgctxt(uint index) const;
/**
* Get list of texts for a given message in original language. Each entry in the list
@@ -157,7 +157,7 @@ public:
* (useful for searching etc)
* @return list of singular/plural forms of the original text
*/
- QStringList msgid(uint index, const bool noNewlines=false) const;
+ TQStringList msgid(uint index, const bool noNewlines=false) const;
/**
* Get list of translated texts for a given message. Each entry in the list
@@ -168,7 +168,7 @@ public:
* (useful for searching etc)
* @return list of translated singular/plural forms
*/
- QStringList msgstr(uint index, const bool noNewlines=false) const;
+ TQStringList msgstr(uint index, const bool noNewlines=false) const;
/**
* Get the comment for a given message.
@@ -176,7 +176,7 @@ public:
* @param index index of the requested message
* @return comment for the given message
*/
- QString comment(uint index) const;
+ TQString comment(uint index) const;
/**
* Get the context information for a given message. This works
@@ -187,7 +187,7 @@ public:
* @return context information found in the message comment
* @deprecated
*/
- QString context(uint index) const KDE_DEPRECATED;
+ TQString context(uint index) const KDE_DEPRECATED;
/**
* Get the header for the current file.
@@ -201,31 +201,31 @@ public:
*
* @return string representation of the name and e-mail address
*/
- QString lastTranslator() const;
+ TQString lastTranslator() const;
/**
* @return The list of obsolete entries. These cannot be changed at
* all and are stored for import/export purposes.
*/
- QValueList<CatalogItem> obsoleteEntries() const;
+ TQValueList<CatalogItem> obsoleteEntries() const;
/**
* @return The index of the item, that has the msgid id.
* If no item is found, -1 is returned.
*/
- int indexForMsgid(const QString& id) const;
+ int indexForMsgid(const TQString& id) const;
/** @return a list of tags in entry #index */
- QStringList tagList(uint index);
+ TQStringList tagList(uint index);
/** @return a list of arguments in entry #index */
- QStringList argList(uint index);
+ TQStringList argList(uint index);
/**
* @return the list of errors found for a given item index
* @param index index of the item to check
*/
- QStringList itemStatus(uint index);
+ TQStringList itemStatus(uint index);
/**
* @return the list of errors found for a given item index
@@ -233,18 +233,18 @@ public:
* @param recheck flag, if the item status should be checked now
* @param whatToCheck what checks to do (a list of tools to be used
*/
- QStringList itemStatus(uint index, bool recheck, QPtrList<KDataTool> whatToCheck);
+ TQStringList itemStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck);
/**
* replaces msgstr in catalog item at index index with msgstr
* returns true, if untranslated status changed
*/
- //bool setMsgstr(uint index,QString msgstr);
+ //bool setMsgstr(uint index,TQString msgstr);
/**
* replaces comment in catalog item at index index with comment
* returns true, if fuzzy status changed
*/
- //bool setComment(uint index,QString comment);
+ //bool setComment(uint index,TQString comment);
/**
* replaces header with given String
* @return false if the header is not valid
@@ -270,40 +270,40 @@ public:
/**
* @return package name for the current catalog
*/
- QString packageName() const;
+ TQString packageName() const;
/**
* @return directory for the package of the current catalog
*/
- QString packageDir() const;
+ TQString packageDir() const;
/**
* @return package name and directory for the current catalog
*/
- QString package() const;
+ TQString package() const;
/**
* Setup the package for the catalog. It tries to parse the
* package and split it to name and directory
* @param package the name and directory to be set as package
*/
- void setPackage(const QString& package);
+ void setPackage(const TQString& package);
/**
* @return encoding for the current catalog
*/
- QString encoding() const;
+ TQString encoding() const;
/**
* opens file url by using KDE's network downlad and calls
* openFile with a local filename
*/
- ConversionStatus openURL(const KURL& url, const QString& package=QString::null);
+ ConversionStatus openURL(const KURL& url, const TQString& package=TQString::null);
/**
* opens file openURL by using KDE's network downlad and calls
* openFile with a local filename
* sets current URL to saveURL
*/
- ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const QString& package=QString::null);
+ ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString::null);
/** save the file under the old filename */
ConversionStatus saveFile();
@@ -314,25 +314,25 @@ public:
* saves the current catalog in a temporary file and
* returns the name and path of the file.
*/
- QString saveTempFile();
+ TQString saveTempFile();
/**
* @return extra data for the catalog as set by the import filter
*/
- QStringList catalogExtraData() const;
+ TQStringList catalogExtraData() const;
/**
* @return ID string of the used import filter
*/
- QString importPluginID() const;
+ TQString importPluginID() const;
/**
* @return list of MIME types (separated by comma) this catalog
* can be viewed as. It is set by the used import filter.
*/
- QString mimeTypes() const;
+ TQString mimeTypes() const;
/**
* @return the file codec used for the current catalog
*/
- QTextCodec* fileCodec() const;
+ TQTextCodec* fileCodec() const;
/**
* Check syntax of the GNU gettext PO file using 'msgfmt'.
@@ -341,7 +341,7 @@ public:
* @param clearError should the errors be cleared before running msgfmt
* @return the file codec used for the current catalog
*/
- Msgfmt::Status checkSyntax(QString& output, bool clearErrors=true);
+ Msgfmt::Status checkSyntax(TQString& output, bool clearErrors=true);
/**
* checks using an external tool. The tool must provide the "validate" command
@@ -355,7 +355,7 @@ public:
* with the datatype expected to be CatalogItem *. The MIME type
* is application/x-kbabel-catalogitem.
*/
- void modifyUsingTool(KDataTool* tool, const QString& command);
+ void modifyUsingTool(KDataTool* tool, const TQString& command);
/**
* Returns true, if there is an ongoing activity, such as load/save
@@ -483,7 +483,7 @@ public:
* the search in po-files. This way, I can easily find the first
* catalog entry in the textstream
*/
-// static ConversionStatus readHeader(QTextStream& stream,CatalogItem& header);
+// static ConversionStatus readHeader(TQTextStream& stream,CatalogItem& header);
void registerView(CatalogView* view);
@@ -531,23 +531,23 @@ public:
* tries to find a corresponding entry for entry entry
* from the list of old messages and calculates the diff for it
*/
- DiffResult diff(uint entry, QString* result);
+ DiffResult diff(uint entry, TQString* result);
/**
* sets a list of entries to generate a diff from
*/
- void setDiffList( const QValueList<DiffEntry>& );
+ void setDiffList( const TQValueList<DiffEntry>& );
/**
* @return the contents of this catalog as list for diffs
*/
- QValueList<DiffEntry> asDiffList();
+ TQValueList<DiffEntry> asDiffList();
/**
* @return how many plural forms are used in language lang.
* If nothing is found -1 is returned.
*/
- static int getNumberOfPluralForms(const QString& lang);
+ static int getNumberOfPluralForms(const TQString& lang);
public slots:
/**
@@ -611,7 +611,7 @@ private:
void processCommand(EditCommand* cmd, CatalogView* view2exclude=0, bool undo=false);
/** do the actual file write using plugin */
- ConversionStatus writeFile(QString localfile, bool overwrite=false);
+ ConversionStatus writeFile(TQString localfile, bool overwrite=false);
/**
* generates lists that contain indexes of all fuzzy and untranslated entries
@@ -622,15 +622,15 @@ private:
* returns value in list that is lower than parameter index
* or -1 if there is none
*/
- int findPrevInList(const QValueList<uint>& list,uint index) const;
+ int findPrevInList(const TQValueList<uint>& list,uint index) const;
/**
* returns value in list that is bigger than parameter index
* or -1 if there is none
*/
- int findNextInList(const QValueList<uint>& list,uint index) const;
+ int findNextInList(const TQValueList<uint>& list,uint index) const;
/** returns the current date and time in the format of the users choice */
- QString dateTime() const;
+ TQString dateTime() const;
/** clear the list of all errors */
void clearErrorList();
@@ -648,26 +648,26 @@ private:
/** set the flag that the catalog is generated from docbook */
void setGeneratedFromDocbook(const bool generated);
/** set the entries of the catalog */
- void setEntries( QValueVector<CatalogItem> entries);
+ void setEntries( TQValueVector<CatalogItem> entries);
/** set the obsolete entries of the catalog */
- void setObsoleteEntries( QValueList<CatalogItem> entries);
+ void setObsoleteEntries( TQValueList<CatalogItem> entries);
/** set extra data for the catalog as defined by import plugin */
- void setCatalogExtraData(const QStringList& data);
+ void setCatalogExtraData(const TQStringList& data);
/** set file codec for the catalog */
- void setFileCodec(QTextCodec* codec);
+ void setFileCodec(TQTextCodec* codec);
/** set the list of import errors */
- void setErrorIndex(const QValueList<uint>&errors);
+ void setErrorIndex(const TQValueList<uint>&errors);
/** set ID of the used import plugin */
- void setImportPluginID(const QString& id);
+ void setImportPluginID(const TQString& id);
/** set the MIME types for the current catalog as defined by import plugin */
- void setMimeTypes(const QString& mimeTypes);
+ void setMimeTypes(const TQString& mimeTypes);
private:
CatalogPrivate* d;
signals:
- void signalError(QString);
- void signalResetProgressBar(QString,int);
+ void signalError(TQString);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
diff --git a/kbabel/common/catalog_private.h b/kbabel/common/catalog_private.h
index 645353f3..153c8486 100644
--- a/kbabel/common/catalog_private.h
+++ b/kbabel/common/catalog_private.h
@@ -35,12 +35,12 @@
#ifndef CATALOGPRIVATE_H
#define CATALOGPRIVATE_H
-#include <qintcache.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqintcache.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
#include <kurl.h>
#include "msgfmt.h"
@@ -66,20 +66,20 @@ public:
/** url of the po-file, that belongs to this catalog */
KURL _url;
- QString _packageName;
- QString _packageDir;
+ TQString _packageName;
+ TQString _packageDir;
/** holds the entries in the catalog */
- QValueVector<CatalogItem> _entries;
+ TQValueVector<CatalogItem> _entries;
/** The header of the po-file. */
CatalogItem _header;
/** list of obsolete entries */
- QValueList<CatalogItem> _obsoleteEntries;
+ TQValueList<CatalogItem> _obsoleteEntries;
/** identification string for used import filter*/
- QString _importID;
- QString _mimeTypes;
+ TQString _importID;
+ TQString _mimeTypes;
bool _modified;
bool _readOnly;
@@ -87,34 +87,34 @@ public:
bool _active;
bool _stop;
- QValueList<uint> _fuzzyIndex;
- QValueList<uint> _untransIndex;
- QValueList<uint> _errorIndex;
+ TQValueList<uint> _fuzzyIndex;
+ TQValueList<uint> _untransIndex;
+ TQValueList<uint> _errorIndex;
- QPtrList<CatalogView> _views;
+ TQPtrList<CatalogView> _views;
TagSettings _tagSettings;
- QPtrList<EditCommand> _undoList;
- QPtrList<EditCommand> _redoList;
+ TQPtrList<EditCommand> _undoList;
+ TQPtrList<EditCommand> _redoList;
- QTextCodec *fileCodec;
+ TQTextCodec *fileCodec;
- QStringList msgidDiffList;
- QMap< QString, QStringList > msgstr2MsgidDiffList;
- QIntCache<QString> diffCache;
+ TQStringList msgidDiffList;
+ TQMap< TQString, TQStringList > msgstr2MsgidDiffList;
+ TQIntCache<TQString> diffCache;
int numberOfPluralForms;
Project::Ptr _project;
RegExpExtractor *_tagExtractor, *_argExtractor;
- QStringList _catalogExtra;
+ TQStringList _catalogExtra;
CatalogPrivate(Project::Ptr project) :
- _packageName( QString::null ), _packageDir( QString::null ),
+ _packageName( TQString::null ), _packageDir( TQString::null ),
_header (project),
- _importID( QString::null ), _mimeTypes( "text/plain" ),
+ _importID( TQString::null ), _mimeTypes( "text/plain" ),
_modified(false), _readOnly(false), _generatedFromDocbook(false),
_active(false), _stop(false),
fileCodec(0), diffCache(30,76), numberOfPluralForms(-1),
@@ -129,8 +129,8 @@ public:
_undoList.setAutoDelete(true);
_redoList.setAutoDelete(true);
- _tagExtractor = new RegExpExtractor(QStringList());
- _argExtractor = new RegExpExtractor(QStringList());
+ _tagExtractor = new RegExpExtractor(TQStringList());
+ _argExtractor = new RegExpExtractor(TQStringList());
_catalogExtra.clear();
}
diff --git a/kbabel/common/catalogfileplugin.h b/kbabel/common/catalogfileplugin.h
index f47e0d89..caa94c17 100644
--- a/kbabel/common/catalogfileplugin.h
+++ b/kbabel/common/catalogfileplugin.h
@@ -32,7 +32,7 @@
#ifndef IMPORTPLUGIN_H
#define IMPORTPLUGIN_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
@@ -84,7 +84,7 @@ class KDE_EXPORT CatalogImportPlugin: public QObject
Q_OBJECT
public:
- CatalogImportPlugin(QObject* parent, const char* name);
+ CatalogImportPlugin(TQObject* parent, const char* name);
virtual ~CatalogImportPlugin();
/**
@@ -96,7 +96,7 @@ public:
* @param catalog the catalog to be filled
* @return result of the operation
*/
- ConversionStatus open(const QString& file, const QString& mimetype, Catalog* catalog);
+ ConversionStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog);
/**
* Reimplement this method to load the local file passed as an argument.
@@ -108,16 +108,16 @@ public:
* @param file file to be loaded
* @param mimetype the expected MIME type (the type used for plugin selection
*/
- virtual ConversionStatus load(const QString& file, const QString& mimetype) = 0;
+ virtual ConversionStatus load(const TQString& file, const TQString& mimetype) = 0;
/**
* Reimplement this method to return unique identification of your plugin
*/
- virtual const QString id() = 0;
+ virtual const TQString id() = 0;
/** @return the list of all available MIME types for which there
* is a import plugin.
*/
- static QStringList availableImportMimeTypes();
+ static TQStringList availableImportMimeTypes();
public slots:
/** stop the current operation */
@@ -133,17 +133,17 @@ protected:
/** set flag that the file is generated from DocBook */
void setGeneratedFromDocbook(const bool fromDocbook);
/** set the list of parse error indexes */
- void setErrorIndex(const QValueList<uint>& errors);
+ void setErrorIndex(const TQValueList<uint>& errors);
/** set the file codec */
- void setFileCodec(QTextCodec* codec);
+ void setFileCodec(TQTextCodec* codec);
/** set extra data for the catalog, which can't be stored in
* @ref CatalogItem. The format can be arbitrary */
- void setCatalogExtraData( const QStringList& data );
+ void setCatalogExtraData( const TQStringList& data );
/** set the header catalog item */
void setHeader( const CatalogItem& header );
/** set the MIME types which can be used for this catalog */
- void setMimeTypes( const QString& catalog );
+ void setMimeTypes( const TQString& catalog );
/** start a new transaction. You should never call this method. */
void startTransaction();
@@ -155,7 +155,7 @@ protected:
signals:
/** Signal start of the operation */
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
/** Signal progress of the operation */
void signalProgress(int);
/** Signal end of the operation */
@@ -179,11 +179,11 @@ class KDE_EXPORT CatalogExportPlugin: public QObject
Q_OBJECT
public:
- CatalogExportPlugin(QObject* parent, const char* name);
+ CatalogExportPlugin(TQObject* parent, const char* name);
virtual ~CatalogExportPlugin();
- virtual ConversionStatus save(const QString& file, const QString& mimetype, const Catalog* catalog) = 0;
+ virtual ConversionStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0;
- static QStringList availableExportMimeTypes();
+ static TQStringList availableExportMimeTypes();
public slots:
void stop();
@@ -192,7 +192,7 @@ protected:
bool isStopped() const;
signals:
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp
index ced02e8c..bd55d7b6 100644
--- a/kbabel/common/catalogitem.cpp
+++ b/kbabel/common/catalogitem.cpp
@@ -40,9 +40,9 @@
#include "regexpextractor.h"
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qdom.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqdom.h>
using namespace KBabel;
@@ -65,16 +65,16 @@ CatalogItem::~CatalogItem()
delete d;
}
-QString CatalogItem::comment() const
+TQString CatalogItem::comment() const
{
return d->_comment;
}
-QString CatalogItem::msgctxt(const bool noNewlines) const
+TQString CatalogItem::msgctxt(const bool noNewlines) const
{
if( noNewlines )
{
- QString tmp = d->_msgctxt;
+ TQString tmp = d->_msgctxt;
tmp.replace("\n", " "); // ### TODO: " " or "" ?
return tmp;
}
@@ -82,9 +82,9 @@ QString CatalogItem::msgctxt(const bool noNewlines) const
return d->_msgctxt;
}
-QStringList CatalogItem::msgid(const bool noNewlines) const
+TQStringList CatalogItem::msgid(const bool noNewlines) const
{
- QStringList result=d->_msgid;
+ TQStringList result=d->_msgid;
if( noNewlines )
{
result.gres( "\n", "" );
@@ -92,9 +92,9 @@ QStringList CatalogItem::msgid(const bool noNewlines) const
return result;
}
-QStringList CatalogItem::msgstr(const bool noNewlines) const
+TQStringList CatalogItem::msgstr(const bool noNewlines) const
{
- QStringList result=d->_msgstr;
+ TQStringList result=d->_msgstr;
if( noNewlines )
{
result.gres( "\n", "" );
@@ -102,12 +102,12 @@ QStringList CatalogItem::msgstr(const bool noNewlines) const
return result;
}
-QStringList CatalogItem::msgstrAsList(int nr) const
+TQStringList CatalogItem::msgstrAsList(int nr) const
{
- QString str;
+ TQString str;
if(d->_gettextPluralForm && nr > 0)
{
- QStringList::ConstIterator it = d->_msgstr.at(nr);
+ TQStringList::ConstIterator it = d->_msgstr.at(nr);
if(it != d->_msgstr.end())
{
str = *it;
@@ -123,7 +123,7 @@ QStringList CatalogItem::msgstrAsList(int nr) const
str = d->_msgstr.first();
}
- QStringList list=QStringList::split("\n",str);
+ TQStringList list=TQStringList::split("\n",str);
if(str.left(1)=="\n")
list.prepend("");
@@ -139,32 +139,32 @@ bool CatalogItem::isValid() const
return d->_valid;
}
-void CatalogItem::setMsgctxt(QString msg)
+void CatalogItem::setMsgctxt(TQString msg)
{
d->_msgctxt=msg;
}
-void CatalogItem::setMsgid(QString msg)
+void CatalogItem::setMsgid(TQString msg)
{
d->_msgid=msg;
}
-void CatalogItem::setMsgid(QStringList msg)
+void CatalogItem::setMsgid(TQStringList msg)
{
d->_msgid=msg;
}
-void CatalogItem::setMsgstr(QString msg)
+void CatalogItem::setMsgstr(TQString msg)
{
d->_msgstr=msg;
}
-void CatalogItem::setMsgstr(QStringList msg)
+void CatalogItem::setMsgstr(TQStringList msg)
{
d->_msgstr=msg;
}
-void CatalogItem::setComment(QString com)
+void CatalogItem::setComment(TQString com)
{
d->_comment=com;
}
@@ -174,31 +174,31 @@ void CatalogItem::setGettextPluralForm( bool _gettextPlural )
d->_gettextPluralForm = _gettextPlural;
}
-QStringList CatalogItem::errors() const
+TQStringList CatalogItem::errors() const
{
return d->_errors;
}
-QStringList CatalogItem::tagList( RegExpExtractor& te)
+TQStringList CatalogItem::tagList( RegExpExtractor& te)
{
if(!d->_haveTagList)
{
// FIXME: should care about plural forms in msgid
te.setString(msgid(true).first());
- d->_tagList = QStringList(te.matches());
+ d->_tagList = TQStringList(te.matches());
d->_haveTagList = true;
}
return d->_tagList;
}
-QStringList CatalogItem::argList( RegExpExtractor& te)
+TQStringList CatalogItem::argList( RegExpExtractor& te)
{
if(!d->_haveArgList)
{
// FIXME: should care about plural forms in msgid
te.setString(msgid(true).first());
- d->_argList = QStringList(te.matches());
+ d->_argList = TQStringList(te.matches());
}
return d->_argList;
@@ -207,29 +207,29 @@ QStringList CatalogItem::argList( RegExpExtractor& te)
bool CatalogItem::isFuzzy() const
{
- return d->_comment.find( QRegExp(",\\s*fuzzy") ) != -1;
+ return d->_comment.find( TQRegExp(",\\s*fuzzy") ) != -1;
}
bool CatalogItem::isCformat() const
{
// Allow "possible-c-format" (from xgettext --debug) or "c-format"
// Note the regexp (?: ) is similar to () but it does not capture (so it is faster)
- return d->_comment.find( QRegExp(",\\s*(?:possible-)c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*(?:possible-)c-format") ) == -1;
}
bool CatalogItem::isNoCformat() const
{
- return d->_comment.find( QRegExp(",\\s*no-c-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-c-format") ) == -1;
}
bool CatalogItem::isQtformat() const
{
- return d->_comment.find( QRegExp(",\\s*qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*qt-format") ) == -1;
}
bool CatalogItem::isNoQtformat() const
{
- return d->_comment.find( QRegExp(",\\s*no-qt-format") ) == -1;
+ return d->_comment.find( TQRegExp(",\\s*no-qt-format") ) == -1;
}
bool CatalogItem::isUntranslated() const
@@ -260,7 +260,7 @@ int CatalogItem::totalLines() const
msgctxtLines=d->_msgctxt.contains('\n')+1;
}
int msgidLines=0;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it=d->_msgid.begin(); it != d->_msgid.end(); ++it)
{
msgidLines += (*it).contains('\n')+1;
@@ -292,17 +292,17 @@ void CatalogItem::setSyntaxError(bool on)
d->_errors.remove("syntax error");
}
-QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
+TQPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
{
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
editList.setAutoDelete(false);
- QString comment=d->_comment;
+ TQString comment=d->_comment;
if(isFuzzy())
{
EditCommand *cmd;
- QRegExp fuzzyStr(",\\s*fuzzy");
+ TQRegExp fuzzyStr(",\\s*fuzzy");
int offset;
offset=comment.find(fuzzyStr);
@@ -318,7 +318,7 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
}
// remove empty comment lines
- if( comment.contains( QRegExp("^#\\s*$") ))
+ if( comment.contains( TQRegExp("^#\\s*$") ))
{
cmd = new DelTextCmd(0,comment,0);
cmd->setPart(Comment);
@@ -326,9 +326,9 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment="";
}
- if( comment.contains( QRegExp("\n#\\s*$") ))
+ if( comment.contains( TQRegExp("\n#\\s*$") ))
{
- offset=comment.find( QRegExp("\n#\\s*$") );
+ offset=comment.find( TQRegExp("\n#\\s*$") );
while(offset>=0)
{
cmd = new DelTextCmd(offset,comment.mid(offset),0);
@@ -337,12 +337,12 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,comment.length()-offset);
- offset=comment.find( QRegExp("\n#\\s*$"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*$"), offset+1 );
}
}
- if( comment.contains( QRegExp("\n#\\s*\n") ))
+ if( comment.contains( TQRegExp("\n#\\s*\n") ))
{
- offset=comment.find( QRegExp("\n#\\s*\n") )+1;
+ offset=comment.find( TQRegExp("\n#\\s*\n") )+1;
while(offset>=0)
{
int endIndex=comment.find("\n",offset)+1;
@@ -353,7 +353,7 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
comment.remove(offset,endIndex-offset);
- offset=comment.find( QRegExp("\n#\\s*\n"), offset+1 );
+ offset=comment.find( TQRegExp("\n#\\s*\n"), offset+1 );
}
}
@@ -367,9 +367,9 @@ QPtrList<EditCommand> CatalogItem::removeFuzzy(bool doIt)
-QPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
+TQPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
{
- QPtrList<EditCommand> editList;
+ TQPtrList<EditCommand> editList;
editList.setAutoDelete(false);
@@ -378,7 +378,7 @@ QPtrList<EditCommand> CatalogItem::addFuzzy(bool doIt)
EditCommand *cmd;
int offset=d->_comment.length();
- QString addStr;
+ TQString addStr;
if(offset > 0 && d->_comment[offset-1] != '\n')
{
addStr='\n';
@@ -487,7 +487,7 @@ void CatalogItem::operator=(const CatalogItem& rhs)
d->_gettextPluralForm = rhs.d->_gettextPluralForm;
}
-QString CatalogItem::nextError() const
+TQString CatalogItem::nextError() const
{
return d->_errors.first();
}
@@ -497,13 +497,13 @@ void CatalogItem::clearErrors()
d->_errors.clear();
}
-void CatalogItem::appendError(const QString& error )
+void CatalogItem::appendError(const TQString& error )
{
if( !d->_errors.contains( error ) )
d->_errors.append(error);
}
-void CatalogItem::removeError(const QString& error )
+void CatalogItem::removeError(const TQString& error )
{
d->_errors.remove(error);
}
diff --git a/kbabel/common/catalogitem.h b/kbabel/common/catalogitem.h
index 91e6cc25..9a7d6071 100644
--- a/kbabel/common/catalogitem.h
+++ b/kbabel/common/catalogitem.h
@@ -34,8 +34,8 @@
#ifndef CATALOGITEM_H
#define CATALOGITEM_H
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include "pluralforms.h"
#include "editcmd.h"
@@ -127,14 +127,14 @@ public:
* @param doIt if false, the comment is not changed, just the
* commands for doing it are calculated
*/
- QPtrList<EditCommand> removeFuzzy(bool doIt=true);
+ TQPtrList<EditCommand> removeFuzzy(bool doIt=true);
/**
* adds the string ", fuzzy" to the comment
* @param doIt if false, the comment is not changed, just the
* commands for doing it are calculated
*/
- QPtrList<EditCommand> addFuzzy(bool doIt=true);
+ TQPtrList<EditCommand> addFuzzy(bool doIt=true);
/** cleares the item */
@@ -142,13 +142,13 @@ public:
/** returns the comment of this entry */
- QString comment() const;
+ TQString comment() const;
/** returns the msgctxt of this entry */
- QString msgctxt(const bool noNewlines = false) const;
+ TQString msgctxt(const bool noNewlines = false) const;
/** returns the msgid of the entry */
- QStringList msgid(const bool noNewlines = false) const;
+ TQStringList msgid(const bool noNewlines = false) const;
/** returns the msgstr of the entry */
- QStringList msgstr(const bool noNewlines = false) const;
+ TQStringList msgstr(const bool noNewlines = false) const;
/**
* @param pluralNr If this item is a gettext plural form item,
@@ -156,14 +156,14 @@ public:
* is returned
* @return the msgstr as list
*/
- QStringList msgstrAsList(int pluralNr=0) const;
-
- void setComment(QString com);
- void setMsgctxt(QString msg);
- void setMsgid(QString msg);
- void setMsgid(QStringList msg);
- void setMsgstr(QString msg);
- void setMsgstr(QStringList msg);
+ TQStringList msgstrAsList(int pluralNr=0) const;
+
+ void setComment(TQString com);
+ void setMsgctxt(TQString msg);
+ void setMsgid(TQString msg);
+ void setMsgid(TQStringList msg);
+ void setMsgstr(TQString msg);
+ void setMsgstr(TQStringList msg);
void setGettextPluralForm( bool _gettextPlurals );
@@ -173,20 +173,20 @@ public:
/** @return a list of tags in the msgid */
- QStringList tagList( RegExpExtractor& tagExtractor );
+ TQStringList tagList( RegExpExtractor& tagExtractor );
/** @return a list of args in the msgid */
- QStringList argList( RegExpExtractor& argExtractor);
+ TQStringList argList( RegExpExtractor& argExtractor);
/**
* @return the list of all errors of this item
*/
- QStringList errors() const;
+ TQStringList errors() const;
- QString nextError() const;
+ TQString nextError() const;
void clearErrors();
- void removeError(const QString& error);
- void appendError(const QString& error);
+ void removeError(const TQString& error);
+ void appendError(const TQString& error);
/**
* makes some sanity checks and set status accordingly
@@ -200,8 +200,8 @@ public:
* @param neededLines how many lines a string with singular-plural form
* must have
*/
- int checkErrors(QChar accelMarker, const QRegExp& contextInfo
- , const QRegExp& singularPlural, const int neededLines);
+ int checkErrors(TQChar accelMarker, const TQRegExp& contextInfo
+ , const TQRegExp& singularPlural, const int neededLines);
void operator=(const CatalogItem& rhs);
diff --git a/kbabel/common/catalogitem_private.h b/kbabel/common/catalogitem_private.h
index 15c81fc7..411e76b2 100644
--- a/kbabel/common/catalogitem_private.h
+++ b/kbabel/common/catalogitem_private.h
@@ -34,7 +34,7 @@
#ifndef CATALOGITEMPRIVATE_H
#define CATALOGITEMPRIVATE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KBabel
{
@@ -55,18 +55,18 @@ class CatalogItemPrivate
public:
- QString _comment;
- QString _msgctxt;
- QStringList _msgid;
- QStringList _msgstr;
+ TQString _comment;
+ TQString _msgctxt;
+ TQStringList _msgid;
+ TQStringList _msgstr;
- QStringList _tagList;
- QStringList _argList;
+ TQStringList _tagList;
+ TQStringList _argList;
bool _valid;
bool _haveTagList;
bool _haveArgList;
- QStringList _errors;
+ TQStringList _errors;
/** flag, if this entry is a plural forms entry */
bool _gettextPluralForm;
diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp
index 480f4cb9..4b87f522 100644
--- a/kbabel/common/catalogsettings.cpp
+++ b/kbabel/common/catalogsettings.cpp
@@ -43,19 +43,19 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <stdlib.h>
using namespace KBabel;
-QString KBabel::charsetString(const QTextCodec *codec)
+TQString KBabel::charsetString(const TQTextCodec *codec)
{
if(codec)
{
- QString encodingStr = codec->mimeName();
+ TQString encodingStr = codec->mimeName();
if ( encodingStr.startsWith("CP " ) )
encodingStr.remove( 2, 1 );
else if ( encodingStr.startsWith("IBM " ) )
@@ -63,14 +63,14 @@ QString KBabel::charsetString(const QTextCodec *codec)
return encodingStr;
}
else
- return QString::null;
+ return TQString::null;
}
-QString KBabel::GNUPluralForms(const QString& lang)
+TQString KBabel::GNUPluralForms(const TQString& lang)
{
KTempFile infile, outfile;
- QTextStream* str = infile.textStream();
+ TQTextStream* str = infile.textStream();
*str << "# SOME DESCRIPTIVE TITLE." << endl;
*str << "# Copyright (C) YEAR Free Software Foundation, Inc." << endl;
@@ -105,24 +105,24 @@ QString KBabel::GNUPluralForms(const QString& lang)
msginit.start( KProcess::Block );
- QString res("");
+ TQString res("");
if( msginit.normalExit() )
{
// parse out the plural form string
- QFile f(outfile.name());
+ TQFile f(outfile.name());
if( f.open (IO_ReadOnly) )
{
- QTextStream str(&f);
+ TQTextStream str(&f);
- QString line;
+ TQString line;
do {
line = str.readLine();
if( line.startsWith( "\"Plural-Forms:" ) )
{
kdDebug() << "Plural form line: " << line << endl;
- QRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" );
+ TQRegExp re( "^\"Plural-Forms: *(.*)\\\\n\"" );
re.search( line );
res = re.cap(1);
break;
@@ -141,15 +141,15 @@ QString KBabel::GNUPluralForms(const QString& lang)
return res;
}
-QString KBabel::charsetString(const int e)
+TQString KBabel::charsetString(const int e)
{
- QString encodingStr;
+ TQString encodingStr;
switch(e)
{
case ProjectSettingsBase::Locale:
{
- QTextCodec *codec=QTextCodec::codecForLocale();
+ TQTextCodec *codec=TQTextCodec::codecForLocale();
if(codec)
encodingStr=charsetString(codec);
else
@@ -172,36 +172,36 @@ QString KBabel::charsetString(const int e)
return encodingStr;
}
-QString Defaults::Identity::authorName()
+TQString Defaults::Identity::authorName()
{
KEMailSettings emSet;
return emSet.getSetting(KEMailSettings::RealName);
}
-QString Defaults::Identity::authorLocalizedName()
+TQString Defaults::Identity::authorLocalizedName()
{
return authorName();
}
-QString Defaults::Identity::authorEmail()
+TQString Defaults::Identity::authorEmail()
{
KEMailSettings emSet;
return emSet.getSetting(KEMailSettings::EmailAddress);
}
-QString Defaults::Identity::mailingList()
+TQString Defaults::Identity::mailingList()
{
- QString lang=Defaults::Identity::languageCode();
+ TQString lang=Defaults::Identity::languageCode();
int temp=lang.find("_");
lang=lang.left(temp);
return lang+"@li.org";
}
-QString Defaults::Identity::languageCode()
+TQString Defaults::Identity::languageCode()
{
// first try to get the language from KDE settings
KLocale *locale = KGlobal::locale();
- QString lang;
+ TQString lang;
if(locale)
{
lang=locale->languageList().first();
@@ -223,18 +223,18 @@ QString Defaults::Identity::languageCode()
return lang;
}
-QString Defaults::Identity::timezone()
+TQString Defaults::Identity::timezone()
{
- QString timezone=getenv("TIMEZONE");
+ TQString timezone=getenv("TIMEZONE");
if(timezone.isEmpty())
timezone="GMT";
return timezone;
}
-QStringList Defaults::Tag::tagExpressions()
+TQStringList Defaults::Tag::tagExpressions()
{
- QStringList list;
+ TQStringList list;
list.append("</[A-Za-z0-9\\n]+>");
list.append("<[A-Za-z0-9\\n]+[^>]*/?>");
@@ -246,9 +246,9 @@ QStringList Defaults::Tag::tagExpressions()
return list;
}
-QStringList Defaults::Tag::argExpressions()
+TQStringList Defaults::Tag::argExpressions()
{
- QStringList list;
+ TQStringList list;
list.append("%[ndioxXucsfeEgGp]");
list.append("%([0-9]+(\\$))?[-+'#0]?[0-9]*(.[0-9]+)?[hlL]?[dioxXucsfeEgGp]");
diff --git a/kbabel/common/catalogsettings.h b/kbabel/common/catalogsettings.h
index f87ec673..5d220e57 100644
--- a/kbabel/common/catalogsettings.h
+++ b/kbabel/common/catalogsettings.h
@@ -34,9 +34,9 @@
#ifndef CATALOGSETTINGS_H
#define CATALOGSETTINGS_H
-#include <qstring.h>
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
#include <kdemacros.h>
class QTextCodec;
@@ -56,7 +56,7 @@ struct KDE_EXPORT SaveSettings
bool updateProject;
bool updateDescription;
- QString descriptionString;
+ TQString descriptionString;
bool updateTranslatorCopyright;
int FSFCopyright;
@@ -64,9 +64,9 @@ struct KDE_EXPORT SaveSettings
bool useOldEncoding;
Qt::DateFormat dateFormat;
- QString customDateFormat;
+ TQString customDateFormat;
- QString projectString;
+ TQString projectString;
bool autoSyntaxCheck;
bool saveObsolete;
@@ -76,13 +76,13 @@ struct KDE_EXPORT SaveSettings
struct KDE_EXPORT IdentitySettings
{
- QString authorName;
- QString authorLocalizedName;
- QString authorEmail;
- QString languageName;
- QString languageCode;
- QString mailingList;
- QString timeZone;
+ TQString authorName;
+ TQString authorLocalizedName;
+ TQString authorEmail;
+ TQString languageName;
+ TQString languageCode;
+ TQString mailingList;
+ TQString timeZone;
/**
* The number of plural forms. If <= 0 the number is determined
@@ -94,7 +94,7 @@ struct KDE_EXPORT IdentitySettings
*/
bool checkPluralArgument;
- QString gnuPluralFormHeader;
+ TQString gnuPluralFormHeader;
};
@@ -104,19 +104,19 @@ struct KDE_EXPORT MiscSettings
* The char, that marks keyboard accelerators.
* Default is '&' as used by Qt
*/
- QChar accelMarker;
+ TQChar accelMarker;
/**
* The regular expression for what is context information.
* Default is "^_:.+" as used in KDE
*/
- QRegExp contextInfo;
+ TQRegExp contextInfo;
/**
* The regular expression for strings that contain a message for
* singular and one for plural
*/
- QRegExp singularPlural;
+ TQRegExp singularPlural;
/**
* The method used for compresion of email attachments. Use
@@ -137,35 +137,35 @@ struct TagSettings
/**
* A list of regular expressions defining tags
*/
- QStringList tagExpressions;
+ TQStringList tagExpressions;
/**
* A list of regular expressions defining arguments
*/
- QStringList argExpressions;
+ TQStringList argExpressions;
};
-KDE_EXPORT QString charsetString(const int encoding);
-KDE_EXPORT QString charsetString(const QTextCodec *codec);
-KDE_EXPORT QString GNUPluralForms(const QString& lang);
+KDE_EXPORT TQString charsetString(const int encoding);
+KDE_EXPORT TQString charsetString(const TQTextCodec *codec);
+KDE_EXPORT TQString GNUPluralForms(const TQString& lang);
namespace Defaults
{
class KDE_EXPORT Identity
{
public:
- static QString authorName();
- static QString authorLocalizedName();
- static QString authorEmail();
- static QString languageCode();
- static QString mailingList();
- static QString timezone();
+ static TQString authorName();
+ static TQString authorLocalizedName();
+ static TQString authorEmail();
+ static TQString languageCode();
+ static TQString mailingList();
+ static TQString timezone();
};
class KDE_EXPORT Tag
{
public:
- static QStringList tagExpressions();
- static QStringList argExpressions();
+ static TQStringList tagExpressions();
+ static TQStringList argExpressions();
};
}
diff --git a/kbabel/common/diff.cpp b/kbabel/common/diff.cpp
index 7a54e4d3..455a26f1 100644
--- a/kbabel/common/diff.cpp
+++ b/kbabel/common/diff.cpp
@@ -37,7 +37,7 @@
#include <kdebug.h>
-LCSprinter::LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector<LCSMarker> *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_)
+LCSprinter::LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector<LCSMarker> *b_, const uint nT_, uint index):s1(s_1),s2(s_2),b(b_),nT(nT_)
{
it1=s1.begin();
it2=s2.begin();
@@ -93,24 +93,24 @@ void LCSprinter::printLCS(uint index)
-QString wordDiff(const QString& str1, const QString& str2)
+TQString wordDiff(const TQString& str1, const TQString& str2)
{
//separate punctuation marks etc from words as _only_ they may have changed
- QStringList s1, s2;
+ TQStringList s1, s2;
uint i=0;
uint j=0;
uint l1=str1.length();
uint l2=str2.length();
- QString temp;
+ TQString temp;
temp.reserve(16);
/*
while ( i<l1 )
{
- if (str1[i]==QChar(0x003C) && (str1[i+1]==QChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str1[i]==TQChar(0x003C) && (str1[i+1]==TQChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l1 && str1[i]!=QChar(0x003E)) temp += str1[i++];
- if (i++ <l1) temp += QChar(0x003E);
+ while(i<l1 && str1[i]!=TQChar(0x003E)) temp += str1[i++];
+ if (i++ <l1) temp += TQChar(0x003E);
s1.append(temp);
temp.truncate(0);
}
@@ -125,15 +125,15 @@ QString wordDiff(const QString& str1, const QString& str2)
temp.truncate(0);
};
- if (str1[i]==QChar(0x003C) && (str1[i+1]==QChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str1[i]==TQChar(0x003C) && (str1[i+1]==TQChar(0x002F) || str1[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l1 && str1[i]!=QChar(0x003E)) temp += str1[i++];
- if (i++ <l1) temp += QChar(0x003E);
+ while(i<l1 && str1[i]!=TQChar(0x003E)) temp += str1[i++];
+ if (i++ <l1) temp += TQChar(0x003E);
s1.append(temp);
temp.truncate(0);
}
- while ( i<l1 && !(str1[i].isLetter() || str1[i]==QChar(0x003C)) )
+ while ( i<l1 && !(str1[i].isLetter() || str1[i]==TQChar(0x003C)) )
{
temp += str1[i++];
}
@@ -147,10 +147,10 @@ QString wordDiff(const QString& str1, const QString& str2)
i=0;
while ( i<l2 )
{
- if (str2[i]==QChar(0x003C) && (str2[i+1]==QChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str2[i]==TQChar(0x003C) && (str2[i+1]==TQChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l2 && str2[i]!=QChar(0x003E)) temp += str2[i++];
- if (i++ <l2) temp += QChar(0x003E);
+ while(i<l2 && str2[i]!=TQChar(0x003E)) temp += str2[i++];
+ if (i++ <l2) temp += TQChar(0x003E);
s2.append(temp);
temp.truncate(0);
}
@@ -165,15 +165,15 @@ QString wordDiff(const QString& str1, const QString& str2)
temp.truncate(0);
};
//FIXME bounds
- if (str2[i]==QChar(0x003C) && (str2[i+1]==QChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
+ if (str2[i]==TQChar(0x003C) && (str2[i+1]==TQChar(0x002F) || str2[i+1].isLetter()) ) // 0x003C="<", 0x002F="/"
{// skip tag
- while(i<l2 && str2[i]!=QChar(0x003E)) temp += str2[i++];
- if (i++ <l2) temp += QChar(0x003E);
+ while(i<l2 && str2[i]!=TQChar(0x003E)) temp += str2[i++];
+ if (i++ <l2) temp += TQChar(0x003E);
s2.append(temp);
temp.truncate(0);
}
- while ( i<l2 && !(str2[i].isLetter() || str2[i]==QChar(0x003C)) )
+ while ( i<l2 && !(str2[i].isLetter() || str2[i]==TQChar(0x003C)) )
{
temp += str2[i++];
}
@@ -199,7 +199,7 @@ QString wordDiff(const QString& str1, const QString& str2)
while ( i<l1 && !str1[i].isLetter() )
{
- s1.append(QString(str1[i++]));
+ s1.append(TQString(str1[i++]));
}
}
@@ -218,7 +218,7 @@ QString wordDiff(const QString& str1, const QString& str2)
while ( i<l2 && !str2[i].isLetter() )
{
- s2.append(QString(str2[i++]));
+ s2.append(TQString(str2[i++]));
}
}
@@ -228,14 +228,14 @@ QString wordDiff(const QString& str1, const QString& str2)
uint mT = mX+1;
uint nT = nY+1;
- QValueVector<LCSMarker> b(mT*nT, NOTHING);
- QValueVector<uint> c(mT*nT, 0);
+ TQValueVector<LCSMarker> b(mT*nT, NOTHING);
+ TQValueVector<uint> c(mT*nT, 0);
// calculate the LCS
b[0] = FINAL;
uint index_cache;
- QStringList::iterator it1, it2;
+ TQStringList::iterator it1, it2;
for (i=1, it1 = s1.begin(); i<mT; ++i, ++it1)
{
@@ -295,7 +295,7 @@ QString wordDiff(const QString& str1, const QString& str2)
/*
// old algorithm by Wolfram Diestel <wolfram@steloj.de>
-QString Diff::charDiff(QString s1, QString s2)
+TQString Diff::charDiff(TQString s1, TQString s2)
{
int n = 3;
s1+="xxx";
@@ -305,7 +305,7 @@ QString Diff::charDiff(QString s1, QString s2)
int pos2=0;
int len1 = s1.length();
int len2 = s2.length();
- QString resultstr;
+ TQString resultstr;
bool found = true;
bool swap = false;
while (found && pos1+n < len1 && pos2+n < len2)
@@ -346,7 +346,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
@@ -375,7 +375,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
@@ -427,7 +427,7 @@ QString Diff::charDiff(QString s1, QString s2)
pos1 = pos2;
pos2 = pos;
- QString s = s1;
+ TQString s = s1;
s1 = s2;
s2 = s;
diff --git a/kbabel/common/diff.h b/kbabel/common/diff.h
index 4e7dfb72..2ce055bf 100644
--- a/kbabel/common/diff.h
+++ b/kbabel/common/diff.h
@@ -35,8 +35,8 @@
#ifndef DIFF_H
#define DIFF_H
-#include <qvaluevector.h>
-#include <qstringlist.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
typedef enum
{
@@ -54,7 +54,7 @@ typedef enum
* @short Word-by-word diff algorithm
* @author Nick Shaforostoff <shafff@ukr.net>
*/
- QString wordDiff(const QString& oldString, const QString& newString);
+ TQString wordDiff(const TQString& oldString, const TQString& newString);
/**
@@ -66,22 +66,22 @@ typedef enum
class LCSprinter
{
public:
- LCSprinter(const QStringList &s_1, const QStringList &s_2, QValueVector<LCSMarker>* b_, const uint nT_, uint index);
+ LCSprinter(const TQStringList &s_1, const TQStringList &s_2, TQValueVector<LCSMarker>* b_, const uint nT_, uint index);
void printLCS(uint index);
- inline QString getString();
+ inline TQString getString();
~LCSprinter() {};
private:
- QStringList s1, s2, resultString;
+ TQStringList s1, s2, resultString;
uint nT;//for use 1d vector as 2d
- QValueVector<LCSMarker> *b;
- QStringList::iterator it1, it2;
+ TQValueVector<LCSMarker> *b;
+ TQStringList::iterator it1, it2;
};
-inline QString LCSprinter::getString()
+inline TQString LCSprinter::getString()
{
- return resultString.join("").replace(QChar('\n'), ""); //w/o replace we'd get whole line colored
+ return resultString.join("").replace(TQChar('\n'), ""); //w/o replace we'd get whole line colored
}
#endif // DIFF_H
diff --git a/kbabel/common/editcmd.cpp b/kbabel/common/editcmd.cpp
index 1643ed0b..4ea98364 100644
--- a/kbabel/common/editcmd.cpp
+++ b/kbabel/common/editcmd.cpp
@@ -31,7 +31,7 @@
**************************************************************************** */
#include "editcmd.h"
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
@@ -49,7 +49,7 @@ EditCommand::EditCommand(const int index, const Part part)
// have to handle deletion of current selection
-DelTextCmd::DelTextCmd(int _offset, const QString &_str, int _pluralNumber )
+DelTextCmd::DelTextCmd(int _offset, const TQString &_str, int _pluralNumber )
: EditCommand(),
offset( _offset ),
str ( _str ),
@@ -68,7 +68,7 @@ bool DelTextCmd::merge( EditCommand* other)
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
DelTextCmd* o = (DelTextCmd*) other;
- if ( offset + int(str.length()) == o->offset && !str.contains(QRegExp("^\\s$")) )
+ if ( offset + int(str.length()) == o->offset && !str.contains(TQRegExp("^\\s$")) )
{
o->str.prepend( str );
o->offset = offset;
@@ -80,7 +80,7 @@ bool DelTextCmd::merge( EditCommand* other)
-InsTextCmd::InsTextCmd(int offset,const QString &str, int pluralNumber )
+InsTextCmd::InsTextCmd(int offset,const TQString &str, int pluralNumber )
: DelTextCmd( offset, str, pluralNumber )
{
}
@@ -95,7 +95,7 @@ bool InsTextCmd::merge( EditCommand* other)
if ( o->index()==index() && o->part() == part()
&& o->type() == type() && o->pluralNumber==pluralNumber )
{
- if ( offset == o->offset + int(o->str.length()) && !str.contains(QRegExp("^\\s$")) )
+ if ( offset == o->offset + int(o->str.length()) && !str.contains(TQRegExp("^\\s$")) )
{
o->str += str;
return true;
diff --git a/kbabel/common/editcmd.h b/kbabel/common/editcmd.h
index 458d2c57..64bd4b93 100644
--- a/kbabel/common/editcmd.h
+++ b/kbabel/common/editcmd.h
@@ -34,7 +34,7 @@
#include "itempart.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
namespace KBabel
@@ -87,11 +87,11 @@ class KDE_EXPORT DelTextCmd : public EditCommand
{
public:
int offset;
- QString str;
+ TQString str;
int pluralNumber;
// have to handle deletion of current selection
- DelTextCmd(int offset, const QString &str, int pluralNumber );
+ DelTextCmd(int offset, const TQString &str, int pluralNumber );
virtual Commands type() const { return Delete; }
bool merge( EditCommand* other);
@@ -101,7 +101,7 @@ class KDE_EXPORT InsTextCmd : public DelTextCmd
{
public:
- InsTextCmd(int offset,const QString &str, int pluralNumber );
+ InsTextCmd(int offset,const TQString &str, int pluralNumber );
virtual Commands type() const { return Insert; }
bool merge( EditCommand* other);
diff --git a/kbabel/common/exportplugin.cpp b/kbabel/common/exportplugin.cpp
index 99a727f8..327e85d0 100644
--- a/kbabel/common/exportplugin.cpp
+++ b/kbabel/common/exportplugin.cpp
@@ -33,7 +33,7 @@
#include "catalogfileplugin.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <ktrader.h>
@@ -45,7 +45,7 @@ struct KBabel::CatalogExportPluginPrivate
bool _stop;
};
-CatalogExportPlugin::CatalogExportPlugin(QObject* parent, const char* name) : QObject(parent,name)
+CatalogExportPlugin::CatalogExportPlugin(TQObject* parent, const char* name) : TQObject(parent,name)
{
d = new CatalogExportPluginPrivate;
d->_stop=false;
@@ -56,9 +56,9 @@ CatalogExportPlugin::~CatalogExportPlugin()
delete d;
}
-QStringList CatalogExportPlugin::availableExportMimeTypes()
+TQStringList CatalogExportPlugin::availableExportMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Export]");
diff --git a/kbabel/common/findoptions.h b/kbabel/common/findoptions.h
index 45c29e25..4b5f94a9 100644
--- a/kbabel/common/findoptions.h
+++ b/kbabel/common/findoptions.h
@@ -35,7 +35,7 @@
#ifndef FINDOPTIONS_H
#define FINDOPTIONS_H
-#include <qregexp.h>
+#include <tqregexp.h>
class QString;
class QChar;
@@ -46,7 +46,7 @@ namespace KBabel
class FindOptions
{
public:
- QString findStr;
+ TQString findStr;
bool caseSensitive;
bool wholeWords;
@@ -69,15 +69,15 @@ public:
// these are non-persistent options - not saved into configuration database
bool askFile; // whether findNext should ask catalog manager for next file
- QRegExp contextInfo; // actual settings of context info regular expression
- QChar accelMarker; // actual settings of accelerator marker
+ TQRegExp contextInfo; // actual settings of context info regular expression
+ TQChar accelMarker; // actual settings of accelerator marker
};
class ReplaceOptions : public FindOptions
{
public:
- QString replaceStr;
+ TQString replaceStr;
bool ask;
};
diff --git a/kbabel/common/importplugin.cpp b/kbabel/common/importplugin.cpp
index d763e670..711d77cd 100644
--- a/kbabel/common/importplugin.cpp
+++ b/kbabel/common/importplugin.cpp
@@ -36,14 +36,14 @@
#include "catalog.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <ktrader.h>
using namespace KBabel;
-CatalogImportPlugin::CatalogImportPlugin(QObject* parent, const char* name) : QObject(parent,name)
+CatalogImportPlugin::CatalogImportPlugin(TQObject* parent, const char* name) : TQObject(parent,name)
{
d = new CatalogImportPluginPrivate;
d->_catalog = 0;
@@ -64,7 +64,7 @@ void CatalogImportPlugin::appendCatalogItem( const CatalogItem& item, const bool
d->_entries.append(item);
}
-void CatalogImportPlugin::setCatalogExtraData( const QStringList& data )
+void CatalogImportPlugin::setCatalogExtraData( const TQStringList& data )
{
d->_catalogExtraData=data;
d->_updateCatalogExtraData=true;
@@ -76,13 +76,13 @@ void CatalogImportPlugin::setGeneratedFromDocbook( const bool generated )
d->_updateGeneratedFromDocbook = true;
}
-void CatalogImportPlugin::setErrorIndex(const QValueList<uint>& errors)
+void CatalogImportPlugin::setErrorIndex(const TQValueList<uint>& errors)
{
d->_errorList = errors;
d->_updateErrorList = true;
}
-void CatalogImportPlugin::setFileCodec(QTextCodec* codec)
+void CatalogImportPlugin::setFileCodec(TQTextCodec* codec)
{
d->_codec=codec;
d->_updateCodec = true;
@@ -94,12 +94,12 @@ void CatalogImportPlugin::setHeader( const CatalogItem& item )
d->_updateHeader=true;
}
-void CatalogImportPlugin::setMimeTypes( const QString& mimetypes )
+void CatalogImportPlugin::setMimeTypes( const TQString& mimetypes )
{
d->_mimeTypes=mimetypes;
}
-ConversionStatus CatalogImportPlugin::open(const QString& file, const QString& mimetype, Catalog* catalog)
+ConversionStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog)
{
d->_stopped=false;
d->_catalog=catalog;
@@ -138,9 +138,9 @@ void CatalogImportPlugin::commitTransaction()
d->_catalog->clear();
// fill in the entries
- QValueVector<CatalogItem> e;
+ TQValueVector<CatalogItem> e;
e.reserve( d->_entries.count() );
- for( QValueList<CatalogItem>::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
+ for( TQValueList<CatalogItem>::const_iterator it = d->_entries.begin(); it != d->_entries.end(); ++it )
{
e.append( *it );
}
@@ -167,9 +167,9 @@ void CatalogImportPlugin::commitTransaction()
d->_started = false;
}
-QStringList CatalogImportPlugin::availableImportMimeTypes()
+TQStringList CatalogImportPlugin::availableImportMimeTypes()
{
- QStringList result;
+ TQStringList result;
KTrader::OfferList offers = KTrader::self()->query("KBabelFilter", "exist [X-KDE-Import]");
diff --git a/kbabel/common/importplugin_private.h b/kbabel/common/importplugin_private.h
index 3c45919c..bff1ed90 100644
--- a/kbabel/common/importplugin_private.h
+++ b/kbabel/common/importplugin_private.h
@@ -48,14 +48,14 @@ public:
bool _started;
bool _stopped;
- QValueList<CatalogItem> _entries;
- QValueList<CatalogItem> _obsoleteEntries;
+ TQValueList<CatalogItem> _entries;
+ TQValueList<CatalogItem> _obsoleteEntries;
CatalogItem _header;
bool _generatedFromDocbook;
- QTextCodec* _codec;
- QValueList<uint> _errorList;
- QStringList _catalogExtraData;
- QString _mimeTypes;
+ TQTextCodec* _codec;
+ TQValueList<uint> _errorList;
+ TQStringList _catalogExtraData;
+ TQString _mimeTypes;
bool _updateHeader;
bool _updateGeneratedFromDocbook;
diff --git a/kbabel/common/kbabeldatatool.h b/kbabel/common/kbabeldatatool.h
index 57d9f771..207f8bc5 100644
--- a/kbabel/common/kbabeldatatool.h
+++ b/kbabel/common/kbabeldatatool.h
@@ -49,13 +49,13 @@ class KBabelDataTool: public KDataTool
Q_OBJECT
protected:
- KBabelDataTool( QObject* parent, const char* name ) : KDataTool( parent, name ) {}
+ KBabelDataTool( TQObject* parent, const char* name ) : KDataTool( parent, name ) {}
public slots:
/** The only method to be redefined in inherited classes.
* This method is called everytime the settings are changed.
* @param project is ID of the project, for which the settings changed.
*/
- virtual void settingsChanged(const QString &project) = 0;
+ virtual void settingsChanged(const TQString &project) = 0;
};
}
diff --git a/kbabel/common/kbmailer.cpp b/kbabel/common/kbmailer.cpp
index fb3ab3b1..0526bd74 100644
--- a/kbabel/common/kbmailer.cpp
+++ b/kbabel/common/kbmailer.cpp
@@ -33,11 +33,11 @@
**************************************************************************** */
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kio/netaccess.h>
@@ -53,7 +53,7 @@
using namespace KBabel;
-KBabelMailer::KBabelMailer( QWidget* parent, Project::Ptr project)
+KBabelMailer::KBabelMailer( TQWidget* parent, Project::Ptr project)
: _project( project ), m_parent( parent )
{
m_tempDir.setAutoDelete( true );
@@ -65,12 +65,12 @@ KBabelMailer::~KBabelMailer()
saveConfig( );
}
-void KBabelMailer::sendOneFile(const QString& fileName)
+void KBabelMailer::sendOneFile(const TQString& fileName)
{
if (!singleFileCompression) {
kapp->invokeMailer("", "", "", "", "", "", fileName);
} else {
- const QString archive ( createArchive( QStringList( fileName ), QFileInfo( fileName ).baseName() ) );
+ const TQString archive ( createArchive( TQStringList( fileName ), TQFileInfo( fileName ).baseName() ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
@@ -91,13 +91,13 @@ void KBabelMailer::sendOneFile( const KURL& url)
}
if (!singleFileCompression) {
- QString fileName( url.filename() );
+ TQString fileName( url.filename() );
if ( fileName.isEmpty() )
{
fileName = "attachment";
}
// ### TODO: the current implementation has the default to possibly overwrite an already existing temporary file
- QString tempName( m_tempDir.name() );
+ TQString tempName( m_tempDir.name() );
tempName += fileName;
if ( KIO::NetAccess::download( url, tempName, m_parent ) )
kapp->invokeMailer("", "", "", "", "", "", fileName);
@@ -108,47 +108,47 @@ void KBabelMailer::sendOneFile( const KURL& url)
}
else
{
- const QString archive ( createArchive( QStringList( url.url() ), url.filename() ) );
+ const TQString archive ( createArchive( TQStringList( url.url() ), url.filename() ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
}
}
-void KBabelMailer::sendFiles(QStringList fileList, const QString& initialName)
+void KBabelMailer::sendFiles(TQStringList fileList, const TQString& initialName)
{
- const QString archive ( createArchive( fileList, initialName ) );
+ const TQString archive ( createArchive( fileList, initialName ) );
if ( !archive.isEmpty() ) {
kapp->invokeMailer("", "", "", "", "", "", archive);
}
}
-QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
+TQString KBabelMailer::createArchive(TQStringList fileList, TQString initialName)
{
if ( m_tempDir.name().isEmpty() )
{
kdWarning() << "KBabelMailer has not a valid temporary directory!" << endl;
- return QString(); // No temporary directory!
+ return TQString(); // No temporary directory!
}
// do nothing if there are no files in the list
if (fileList.empty())
- return QString::null;
+ return TQString::null;
// determine the name of the archive, do nothing if none is given
// or Cancel was pressed
- initialName = ( initialName.isEmpty() ? QString("translations") : initialName );
+ initialName = ( initialName.isEmpty() ? TQString("translations") : initialName );
bool ok = false;
- QStringList list( archiveList );
+ TQStringList list( archiveList );
list.prepend( initialName );
- QString archiveName ( KInputDialog::getItem( i18n("Save"),
+ TQString archiveName ( KInputDialog::getItem( i18n("Save"),
i18n( "Enter the name of the archive without file extension" ),
archiveList, 0, true, &ok, m_parent ) );
if ( !ok || archiveName.isEmpty() )
- return QString();
+ return TQString();
// file extensions are determined from the type of compression
- archiveName.remove( QRegExp( "\\.tar\\.(gz|bz2)$" ) );
+ archiveName.remove( TQRegExp( "\\.tar\\.(gz|bz2)$" ) );
// Update the list of archive names, keep only the ten most recent ones.
archiveList.remove( archiveName );
@@ -157,7 +157,7 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
archiveList.pop_back();
// set the correct extension and mimetype
- QString mimetype;
+ TQString mimetype;
if (bzipCompression) {
archiveName += ".tar.bz2";
mimetype = "application/x-bzip2";
@@ -169,18 +169,18 @@ QString KBabelMailer::createArchive(QStringList fileList, QString initialName)
return buildArchive (fileList, m_tempDir.name()+archiveName, mimetype, true);
}
-QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QString mimetype, bool remove)
+TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName, TQString mimetype, bool remove)
{
Q_UNUSED( remove );
// create a new archive
KTar archive(archiveName, mimetype);
if (!archive.open(IO_WriteOnly)) {
KMessageBox::error( m_parent, i18n("Error while trying to create archive file.") );
- return QString::null;
+ return TQString::null;
}
// add files to this archive
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for (it = fileList.constBegin(); it != fileList.constEnd(); ++it) {
#if KDE_IS_VERSION( 3, 5, 0 )
// Try to get a local URL instead of a remote one
@@ -188,7 +188,7 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS
#else
const KURL url( KURL::fromPathOrURL( *it ) );
#endif
- QString poTempName;
+ TQString poTempName;
if ( !KIO::NetAccess::download( url, poTempName, m_parent ) ) {
KMessageBox::error( m_parent, i18n("Error while trying to read file %1.").arg( url.prettyURL() ) );
continue;
@@ -198,11 +198,11 @@ QString KBabelMailer::buildArchive(QStringList fileList, QString archiveName, QS
// but only if "PoBaseDir" in the config file is set and the files
// actually reside in one of its subdirectories. Else they are stored
// without relative path.
- QString poArchFileName = url.path();
+ TQString poArchFileName = url.path();
if (_poBaseDir.isEmpty( ) || poArchFileName.find(_poBaseDir) != 0)
- poArchFileName = QFileInfo( poArchFileName ).fileName();
+ poArchFileName = TQFileInfo( poArchFileName ).fileName();
else
- poArchFileName.remove( QRegExp( "^" + QRegExp::escape( _poBaseDir ) + "/?" ) );
+ poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) );
if ( !archive.addLocalFile( poTempName, poArchFileName ) )
{
KMessageBox::error( m_parent, i18n("Error while trying to copy file %1 into archive.").arg( url.prettyURL() ) );
diff --git a/kbabel/common/kbmailer.h b/kbabel/common/kbmailer.h
index 7df5ce9d..c83c9371 100644
--- a/kbabel/common/kbmailer.h
+++ b/kbabel/common/kbmailer.h
@@ -66,7 +66,7 @@ class KDE_EXPORT KBabelMailer
* @param project The project to be used.
* @since 1.11.2 (KDE 3.5.2): @p parent parameter
*/
- KBabelMailer( QWidget* parent, Project::Ptr project);
+ KBabelMailer( TQWidget* parent, Project::Ptr project);
virtual ~KBabelMailer();
/**
@@ -75,7 +75,7 @@ class KDE_EXPORT KBabelMailer
*
* @param fileName the name of the file to be sent.
*/
- void sendOneFile(const QString& fileName);
+ void sendOneFile(const TQString& fileName);
/**
* Send only one file as a mail attachment. The file can either be sent
* as a compressed or an uncompressed file.
@@ -91,13 +91,13 @@ class KDE_EXPORT KBabelMailer
* @param fileList contains the names of the files to be sent.
* @param initialName the possible name of the archive
*/
- void sendFiles(QStringList fileList, const QString& initialName = QString::null);
+ void sendFiles(TQStringList fileList, const TQString& initialName = TQString::null);
/**
* Sets the the PO files' base directory.
*
* @param dir the PO file base dir.
*/
- void setPOBaseDir(const QString& dir) { _poBaseDir = dir; }
+ void setPOBaseDir(const TQString& dir) { _poBaseDir = dir; }
/**
@@ -109,14 +109,14 @@ class KDE_EXPORT KBabelMailer
* name is queried.
*
* @return name of the archive if it was created successfully,
- * otherwise QString::null.
+ * otherwise TQString::null.
*/
- QString createArchive(QStringList fileList, QString initialName);
+ TQString createArchive(TQStringList fileList, TQString initialName);
/**
* Write the archive file.
*/
- QString buildArchive(QStringList fileList, QString fileName, QString mimetype, bool remove = true);
+ TQString buildArchive(TQStringList fileList, TQString fileName, TQString mimetype, bool remove = true);
private:
/**
* Read the config file to extract the values for compression
@@ -145,9 +145,9 @@ class KDE_EXPORT KBabelMailer
*/
bool singleFileCompression;
/**
- * This QStringList stores the recently used archive names.
+ * This TQStringList stores the recently used archive names.
*/
- QStringList archiveList;
+ TQStringList archiveList;
/**
* The project object.
*/
@@ -155,10 +155,10 @@ class KDE_EXPORT KBabelMailer
/**
* The path to the PO Base directory
*/
- QString _poBaseDir;
+ TQString _poBaseDir;
/// The parent widget
- QWidget* m_parent;
+ TQWidget* m_parent;
};
}
diff --git a/kbabel/common/kbproject.cpp b/kbabel/common/kbproject.cpp
index 38996b51..73ac9dbd 100644
--- a/kbabel/common/kbproject.cpp
+++ b/kbabel/common/kbproject.cpp
@@ -36,7 +36,7 @@
#include "kbprojectmanager.h"
#include "kbprojectsettings.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,15 +47,15 @@
namespace KBabel
{
-Project::Project( const QString& file ) :
- QObject ()
+Project::Project( const TQString& file ) :
+ TQObject ()
, _filename (file)
, _name (i18n("unnamed"))
, _valid (false)
, _config (NULL)
, _settings (NULL)
{
- QFileInfo info(file);
+ TQFileInfo info(file);
if(info.isDir())
return;
@@ -96,12 +96,12 @@ Project::Project( const QString& file ) :
// read the project name
_config->setGroup( "Project" );
- _name = _config->readEntry( "Name", QString() );
+ _name = _config->readEntry( "Name", TQString() );
if ( _name.isEmpty() )
_name = "Default-Project"; // set default project name
// ### FIXME: why is the Version number not written to the project file?
- if ( _config->readEntry( "Version", QString() ) != "1.0.1" )
+ if ( _config->readEntry( "Version", TQString() ) != "1.0.1" )
{
kdWarning() << "Old project format assumed" << endl;
@@ -266,7 +266,7 @@ MiscSettings Project::miscSettings ()
{
MiscSettings settings;
- QString temp=_settings->accelMarker();
+ TQString temp=_settings->accelMarker();
if(temp.length() > 0)
{
settings.accelMarker=temp[0];
diff --git a/kbabel/common/kbproject.h b/kbabel/common/kbproject.h
index 1e1ebc79..4c3d6fc7 100644
--- a/kbabel/common/kbproject.h
+++ b/kbabel/common/kbproject.h
@@ -33,7 +33,7 @@
#ifndef KBPROJECT_H
#define KBPROJECT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kconfig.h>
#include "catalogsettings.h"
@@ -43,19 +43,19 @@ namespace KBabel
{
class ProjectSettingsBase;
- class KDE_EXPORT Project : public QObject, public KShared
+ class KDE_EXPORT Project : public TQObject, public KShared
{
Q_OBJECT
public:
typedef KSharedPtr <Project> Ptr;
- Project( const QString& file );
+ Project( const TQString& file );
virtual ~Project ();
- QString filename () const { return _filename; }
- QString name () const { return _name; }
+ TQString filename () const { return _filename; }
+ TQString name () const { return _name; }
- void setName( const QString& name ) { _name = name; }
+ void setName( const TQString& name ) { _name = name; }
KConfig* config ();
/**
@@ -97,8 +97,8 @@ namespace KBabel
void signalSettingsChanged();
private:
- QString _filename;
- QString _name;
+ TQString _filename;
+ TQString _name;
bool _valid;
KSharedConfig::Ptr _config;
ProjectSettingsBase* _settings;
diff --git a/kbabel/common/kbprojectmanager.cpp b/kbabel/common/kbprojectmanager.cpp
index 048c530a..ab117c97 100644
--- a/kbabel/common/kbprojectmanager.cpp
+++ b/kbabel/common/kbprojectmanager.cpp
@@ -39,15 +39,15 @@
namespace KBabel
{
-QPtrList<Project> ProjectManager::p_list;
-QString ProjectManager::strDefaultProjectName = QString();
+TQPtrList<Project> ProjectManager::p_list;
+TQString ProjectManager::strDefaultProjectName = TQString();
-Project::Ptr ProjectManager::open( const QString& file )
+Project::Ptr ProjectManager::open( const TQString& file )
{
kdDebug() << k_funcinfo << " " << file << endl;
// TODO: ensure full path
// TODO: isn't a map better?
- for(QPtrList<Project>::ConstIterator it = p_list.constBegin();
+ for(TQPtrList<Project>::ConstIterator it = p_list.constBegin();
it != p_list.constEnd(); ++it)
{
if ((*it)->filename() == file)
@@ -77,7 +77,7 @@ void ProjectManager::close( Project::Ptr project)
project->config()->sync();
}
-QString ProjectManager::defaultProjectName( void )
+TQString ProjectManager::defaultProjectName( void )
{
if ( strDefaultProjectName.isEmpty() )
strDefaultProjectName = locateLocal("config", "kbabel.defaultproject" );
diff --git a/kbabel/common/kbprojectmanager.h b/kbabel/common/kbprojectmanager.h
index 418183bb..abfce3e4 100644
--- a/kbabel/common/kbprojectmanager.h
+++ b/kbabel/common/kbprojectmanager.h
@@ -33,8 +33,8 @@
#ifndef KBPROJECTMANAGER_H
#define KBPROJECTMANAGER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
#include "kbproject.h"
@@ -45,16 +45,16 @@ namespace KBabel
class KDE_EXPORT ProjectManager
{
public:
- static Project::Ptr open( const QString& file );
+ static Project::Ptr open( const TQString& file );
static void close( Project::Ptr project );
static Project::Ptr create();
- static QString defaultProjectName( void );
+ static TQString defaultProjectName( void );
friend class Project;
private:
static void remove (Project*);
- static QPtrList<Project> p_list;
- static QString strDefaultProjectName;
+ static TQPtrList<Project> p_list;
+ static TQString strDefaultProjectName;
};
}
diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp
index ef8ca895..61525a2f 100644
--- a/kbabel/common/msgfmt.cpp
+++ b/kbabel/common/msgfmt.cpp
@@ -35,33 +35,33 @@
#include <kapplication.h>
#include <kprocess.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <stdlib.h>
using namespace KBabel;
-Msgfmt::Msgfmt(QObject* parent,const char* name)
- : QObject(parent , name)
+Msgfmt::Msgfmt(TQObject* parent,const char* name)
+ : TQObject(parent , name)
{
}
-Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
+Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu)
{
Status stat=Ok;
// this method does not return the right retrun values at the moment :-(
KProcess proc;
- connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)),
- this,SLOT(addToOutput(KProcess*,char *, int )));
- connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)),
- this,SLOT(addToOutput(KProcess*,char *, int)));
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int )));
+ connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int)));
// remove last output
_output="";
@@ -80,7 +80,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@@ -92,7 +92,7 @@ Msgfmt::Status Msgfmt::checkSyntax(QString file,QString& output, bool gnu)
return stat;
}
-Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& output)
+Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output)
{
Status stat=Ok;
@@ -100,10 +100,10 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
KProcess proc;
proc.setUseShell(true);
- connect(&proc,SIGNAL(receivedStdout(KProcess*, char*, int)),
- this,SLOT(addToOutput(KProcess*,char *, int )));
- connect(&proc,SIGNAL(receivedStderr(KProcess *, char *, int)),
- this,SLOT(addToOutput(KProcess*,char *, int)));
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int )));
+ connect(&proc,TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this,TQT_SLOT(addToOutput(KProcess*,char *, int)));
// remove last output
_output="";
@@ -117,7 +117,7 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
}
else if(proc.normalExit())
{
- if( proc.exitStatus() || _output.contains(QRegExp("^.+:\\d+:")) ) // little workaround :-(
+ if( proc.exitStatus() || _output.contains(TQRegExp("^.+:\\d+:")) ) // little workaround :-(
stat=SyntaxError;
}
else
@@ -133,13 +133,13 @@ Msgfmt::Status Msgfmt::checkSyntaxInDir(QString dir,QString regexp,QString& outp
void Msgfmt::addToOutput(KProcess*,char *buffer, int buflen)
{
- QString newString = QString::fromLocal8Bit(buffer, buflen);
+ TQString newString = TQString::fromLocal8Bit(buffer, buflen);
_output+=newString;
}
-QString Msgfmt::tempSaveName()
+TQString Msgfmt::tempSaveName()
{
return kapp->tempSaveName("/tmp/kbabel_msgfmt.po");
}
diff --git a/kbabel/common/msgfmt.h b/kbabel/common/msgfmt.h
index bf983b2f..846501c1 100644
--- a/kbabel/common/msgfmt.h
+++ b/kbabel/common/msgfmt.h
@@ -33,7 +33,7 @@
#ifndef MSGFMT_H
#define MSGFMT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdemacros.h>
class KProcess;
@@ -47,17 +47,17 @@ class KDE_EXPORT Msgfmt : private QObject
Q_OBJECT
public:
enum Status{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported};
- Msgfmt(QObject* parent=0,const char* name=0);
+ Msgfmt(TQObject* parent=0,const char* name=0);
- Status checkSyntax(QString file,QString& output, bool gnu = false);
- Status checkSyntaxInDir(QString dir,QString regexp,QString& output);
+ Status checkSyntax(TQString file,TQString& output, bool gnu = false);
+ Status checkSyntaxInDir(TQString dir,TQString regexp,TQString& output);
private slots:
void addToOutput(KProcess*,char *buffer, int buflen);
private:
- static QString tempSaveName();
- QString _output;
+ static TQString tempSaveName();
+ TQString _output;
};
}
diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp
index b7beba7d..68e13da8 100644
--- a/kbabel/common/poinfo.cpp
+++ b/kbabel/common/poinfo.cpp
@@ -42,13 +42,13 @@
#include <kstandarddirs.h>
#include <ksavefile.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include "libgettext/pofiles.h"
#include "libgettext/tokens.h"
@@ -61,10 +61,10 @@ using namespace KBabel;
struct poInfoCacheItem
{
PoInfo info;
- QDateTime lastModified;
+ TQDateTime lastModified;
};
-inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item )
+inline TQDataStream& operator << ( TQDataStream& stream, poInfoCacheItem* item )
{
// Note: if you change anything here, do not forget to increase the #define POINFOCACHE_VERSION
stream << item->info.total;
@@ -84,7 +84,7 @@ inline QDataStream& operator << ( QDataStream& stream, poInfoCacheItem* item )
return stream;
}
-inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item )
+inline TQDataStream& operator >> ( TQDataStream& stream, poInfoCacheItem* item )
{
stream >> item->info.total;
stream >> item->info.fuzzy;
@@ -104,10 +104,10 @@ inline QDataStream& operator >> ( QDataStream& stream, poInfoCacheItem* item )
}
// Cache of PO-file items
-static QDict<poInfoCacheItem> _poInfoCache;
+static TQDict<poInfoCacheItem> _poInfoCache;
// File name of cache
-static QString _poInfoCacheName;
+static TQString _poInfoCacheName;
// flag to stop current reading
bool PoInfo::stopStaticRead;
@@ -117,9 +117,9 @@ bool PoInfo::_gettextPluralForm;
// Note: We only read the cache file if the data seems usable. If not, we will re-generate the data.
void PoInfo::cacheRead()
{
- QFile cacheFile( _poInfoCacheName );
+ TQFile cacheFile( _poInfoCacheName );
if( cacheFile.open( IO_ReadOnly ) ) {
- QDataStream s( &cacheFile );
+ TQDataStream s( &cacheFile );
// Check the file cache version.
// If it is not the current version, we do not read the cache file
@@ -132,13 +132,13 @@ void PoInfo::cacheRead()
}
/*
- * Check the version of the QDataStream with which the cache file was written
+ * Check the version of the TQDataStream with which the cache file was written
*
* If the cache file was written by an incompatible future version of Qt,
* the cache file will not be read.
*
* On the other side, a cache file written by a previous version of Qt can be read,
- * by setting the version of the QDataStream used.
+ * by setting the version of the TQDataStream used.
*/
Q_INT32 qdatastreamVersion;
s >> qdatastreamVersion;
@@ -146,12 +146,12 @@ void PoInfo::cacheRead()
s.setVersion( qdatastreamVersion );
}
else {
- // QDataStream version seems stupid, so abort
- kdDebug(KBABEL) << "Wrong QDataStream version: " << qdatastreamVersion << endl;
+ // TQDataStream version seems stupid, so abort
+ kdDebug(KBABEL) << "Wrong TQDataStream version: " << qdatastreamVersion << endl;
return;
}
- QString url;
+ TQString url;
while( !s.atEnd() ) {
poInfoCacheItem* item = new poInfoCacheItem;
s >> url;
@@ -168,7 +168,7 @@ void PoInfo::cacheWrite()
// (especially if two instances would write into the same cache file)
KSaveFile cacheFile( _poInfoCacheName );
- QDataStream* stream = cacheFile.dataStream();
+ TQDataStream* stream = cacheFile.dataStream();
if( stream ) {
@@ -182,9 +182,9 @@ void PoInfo::cacheWrite()
const Q_INT32 qdatastreamVersion = stream->version();
*stream << qdatastreamVersion;
- QDictIterator<poInfoCacheItem> it( _poInfoCache ); // iterator for dict
+ TQDictIterator<poInfoCacheItem> it( _poInfoCache ); // iterator for dict
for ( ; it.current(); ++it ) {
- if( QFile::exists( it.currentKey() ) ) {
+ if( TQFile::exists( it.currentKey() ) ) {
*stream << it.currentKey();
*stream << it.current();
}
@@ -194,12 +194,12 @@ void PoInfo::cacheWrite()
}
}
else {
- kdWarning(KBABEL) << "Could not create QDataStream for cache file: " << _poInfoCacheName << endl;
+ kdWarning(KBABEL) << "Could not create TQDataStream for cache file: " << _poInfoCacheName << endl;
cacheFile.abort();
}
}
-bool PoInfo::cacheFind(const QString url, PoInfo& info)
+bool PoInfo::cacheFind(const TQString url, PoInfo& info)
{
// Read cache if it has not been read, and set up post routine to write it
static bool _cacheIsRead = false;
@@ -211,7 +211,7 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info)
poInfoCacheItem *item = _poInfoCache.find( url );
if( item ) {
- QFileInfo fi( url );
+ TQFileInfo fi( url );
if( fi.lastModified() == item->lastModified ) {
info = item->info;
@@ -221,29 +221,29 @@ bool PoInfo::cacheFind(const QString url, PoInfo& info)
return false;
}
-void PoInfo::cacheSave(const QString url, PoInfo& info)
+void PoInfo::cacheSave(const TQString url, PoInfo& info)
{
poInfoCacheItem *item = new poInfoCacheItem;
- QFileInfo fi( url );
+ TQFileInfo fi( url );
item->info = info;
item->lastModified = fi.lastModified();
_poInfoCache.insert( url, item );
}
-QTextCodec* PoInfo::codecForFile(QString gettextHeader)
+TQTextCodec* PoInfo::codecForFile(TQString gettextHeader)
{
- QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
+ TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
if( regexp.search(gettextHeader) == -1 )
{
kdDebug(KBABEL) << "no charset entry found" << endl;
return 0;
}
- const QString charset = regexp.cap(1);
+ const TQString charset = regexp.cap(1);
kdDebug(KBABEL) << "charset: " << charset << endl;
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -252,27 +252,27 @@ QTextCodec* PoInfo::codecForFile(QString gettextHeader)
// at least utf8, so utf8-codec can be used for both.
if( charset == "CHARSET")
{
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf8 encoding.")
+ << TQString("file seems to be a template: using utf8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
}
if(!codec)
{
kdWarning(KBABEL) << "charset found, but no codec available, using UTF8 instead" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
}
else
{
// No charset? So it is probably ASCII, therefore UTF-8
kdWarning(KBABEL) << "No charset defined! Assuming UTF-8!" << endl;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
}
return codec;
@@ -285,12 +285,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
// Note that the "line" defined by the \n can be different than the line of the file.
// We join all lines of the header and then split the result again at the \n sequence
- const QStringList header=QStringList::split("\\n",headerItem.msgstrAsList().join(QString()));
+ const TQStringList header=TQStringList::split("\\n",headerItem.msgstrAsList().join(TQString()));
PoInfo info;
// extract information from the header
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
// The header of a Gettext .po file is consisted of lines of key and value
for(it=header.begin();it!=header.end();++it)
@@ -301,8 +301,8 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
if (res>=0)
{
knownKey=true; // We know most keys, if not it will be changed to false in the "else" case
- const QString key=(*it).left(res).simplifyWhiteSpace();
- QString value=(*it).mid(res+1);
+ const TQString key=(*it).left(res).simplifyWhiteSpace();
+ TQString value=(*it).mid(res+1);
// "Chop" the \n at the end
if (value.endsWith("\\n"))
value.remove(value.length()-2,2); // ### Qt4: use value.chop(2)
@@ -332,7 +332,7 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
}
if (!knownKey)
{
- QString line=(*it);
+ TQString line=(*it);
if(line.right(2)=="\\n")
line.remove(line.length()-2,2); // ### Qt4: use value.chop(2)
@@ -350,28 +350,28 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem)
}
-ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive)
+ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive)
{
return PoInfo::info( url, info, wordList, updateWordList, interactive, true);
}
-ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
+ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt)
{
stopStaticRead = false;
if( !updateWordList && PoInfo::cacheFind( url, info ) )
return OK;
- QString target;
+ TQString target;
if(KIO::NetAccess::download(KURL( url ), target, 0))
{
- QFile file(target);
+ TQFile file(target);
if ( msgfmt )
{
// First check file with msgfmt to be sure, it is syntactically correct
Msgfmt msgfmt;
- QString output;
+ TQString output;
Msgfmt::Status stat = msgfmt.checkSyntax( target , output );
if(stat == Msgfmt::SyntaxError)
{
@@ -422,7 +422,7 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
if( temp.isFuzzy() ) temp.removeFuzzy();
//find out the codec
- QTextCodec* codec = codecForFile( temp.msgstr().first() );
+ TQTextCodec* codec = codecForFile( temp.msgstr().first() );
if( !codec ) return PARSE_ERROR;
// convert from UTF-8 using codec
@@ -447,27 +447,27 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
if( updateWordList )
{
// FIXME: should care about plural forms in msgid
- QString st = temp.msgid().first().simplifyWhiteSpace().lower();
- QStringList sl = QStringList::split( ' ', st );
+ TQString st = temp.msgid().first().simplifyWhiteSpace().lower();
+ TQStringList sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.msgstr().join(" " ).simplifyWhiteSpace().lower();
- sl = QStringList::split( ' ', st );
+ sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
st = temp.comment().simplifyWhiteSpace().lower();
- sl = QStringList::split( ' ', st );
+ sl = TQStringList::split( ' ', st );
while(!sl.isEmpty())
{
- QString w = sl.first();
+ TQString w = sl.first();
sl.pop_front();
if( !wordList.contains(w) ) wordList.append( w );
}
@@ -504,12 +504,12 @@ ConversionStatus PoInfo::info(const QString& url, PoInfo& info, QStringList &wor
return OK;
}
-bool PoInfo::findInFile( const QString& url, FindOptions options )
+bool PoInfo::findInFile( const TQString& url, FindOptions options )
{
enum {Begin, Comment, Msgid, Msgstr, Msgctxt} part = Begin;
stopStaticRead = false;
- QString target;
+ TQString target;
if(KIO::NetAccess::download(KURL( url ), target, 0))
{
std::ifstream* stream = new std::ifstream( target.local8Bit());
@@ -523,8 +523,8 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
// prepare the search
- QString searchStr = options.findStr;
- QRegExp regexp( searchStr );
+ TQString searchStr = options.findStr;
+ TQRegExp regexp( searchStr );
if( options.isRegExp )
regexp.setCaseSensitive( options.caseSensitive );
@@ -540,14 +540,14 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
return false; // header is not at the beginning, broken file
}
- QTextCodec* codec = codecForFile( temp.msgstr().first() );
+ TQTextCodec* codec = codecForFile( temp.msgstr().first() );
if( !codec )
{
return false;
}
// now parse the rest of the file
- QString text;
+ TQString text;
int pos,len;
while(lexer->lastToken != T_EOF)
@@ -565,10 +565,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
{
if( options.wholeWords) {
len = searchStr.length();
- QString pre = text.mid(pos-1,1);
- QString post = text.mid(pos+len,1);
- if( !pre.contains( QRegExp("[a-zA-Z0-9]")) &&
- !post.contains( QRegExp("[a-zA-Z0-9]") )
+ TQString pre = text.mid(pos-1,1);
+ TQString post = text.mid(pos+len,1);
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -615,10 +615,10 @@ bool PoInfo::findInFile( const QString& url, FindOptions options )
{
if( options.wholeWords) {
len = searchStr.length();
- QString pre = text.mid(pos-1,1);
- QString post = text.mid(pos+len,1);
- if( !pre.contains( QRegExp("[a-zA-Z0-9]")) &&
- !post.contains( QRegExp("[a-zA-Z0-9]") )
+ TQString pre = text.mid(pos-1,1);
+ TQString post = text.mid(pos+len,1);
+ if( !pre.contains( TQRegExp("[a-zA-Z0-9]")) &&
+ !post.contains( TQRegExp("[a-zA-Z0-9]") )
) {
delete lexer;
delete stream;
@@ -674,9 +674,9 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
// comment
if( lexer->lastToken == T_COMMENT )
{
- QString _comment = QString::fromUtf8(lexer->YYText());
+ TQString _comment = TQString::fromUtf8(lexer->YYText());
while( lexer->yylex() == T_COMMENT )
- _comment += "\n"+QString::fromUtf8(lexer->YYText());
+ _comment += "\n"+TQString::fromUtf8(lexer->YYText());
item.setComment( _comment );
// kdDebug(KBABEL) << "Comment: " << _comment << endl;
}
@@ -700,12 +700,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
if( lexer->lastToken != T_MSGID ) return PARSE_ERROR;
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgids = item.msgid();
- QStringList::Iterator it = msgids.begin();
- *it = QString::fromUtf8(lexer->YYText());
+ TQStringList msgids = item.msgid();
+ TQStringList::Iterator it = msgids.begin();
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
while( lexer->yylex() == T_STRING )
- (*it) += ("\n"+ QString::fromUtf8(lexer->YYText()) );
+ (*it) += ("\n"+ TQString::fromUtf8(lexer->YYText()) );
else {
if( lexer->yylex() == T_STRING ) // this is not header
{
@@ -721,12 +721,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
{
_gettextPluralForm = true;
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgids = item.msgid();
+ TQStringList msgids = item.msgid();
it = msgids.fromLast();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
while( lexer->yylex() == T_STRING )
- (*it)+="\n"+ QString::fromUtf8(lexer->YYText());
+ (*it)+="\n"+ TQString::fromUtf8(lexer->YYText());
else while( lexer->yylex() == T_STRING );
item.setMsgid( msgids );
// kdDebug(KBABEL) << "Msgid_plural: " << *it << endl;
@@ -739,12 +739,12 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
- QStringList msgstrs = item.msgstr();
+ TQStringList msgstrs = item.msgstr();
it = msgstrs.begin();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText || item.msgid().first().isEmpty() ) // if we should store the text or it is a header
while( lexer->yylex() == T_STRING )
- (*it)+= ("\n"+ QString::fromUtf8(lexer->YYText()));
+ (*it)+= ("\n"+ TQString::fromUtf8(lexer->YYText()));
else
if( lexer->yylex() == T_STRING ) // check next token, whether it is really translated
{
@@ -756,21 +756,21 @@ ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, b
}
else
{
- QStringList msgstrs = item.msgstr();
- QString s = QString::fromUtf8(lexer->YYText());
- while( lexer->lastToken == T_MSGSTR && s.contains( QRegExp("^msgstr\\[[0-9]+\\]" ) ) )
+ TQStringList msgstrs = item.msgstr();
+ TQString s = TQString::fromUtf8(lexer->YYText());
+ while( lexer->lastToken == T_MSGSTR && s.contains( TQRegExp("^msgstr\\[[0-9]+\\]" ) ) )
{
if( lexer->yylex() != T_STRING ) return PARSE_ERROR;
it = msgstrs.fromLast();
- *it = QString::fromUtf8(lexer->YYText());
+ *it = TQString::fromUtf8(lexer->YYText());
if( storeText )
do {
- (*it)+="\n"+QString::fromUtf8(lexer->YYText());
+ (*it)+="\n"+TQString::fromUtf8(lexer->YYText());
} while( lexer->yylex() == T_STRING );
else while( lexer->yylex() == T_STRING );
// kdDebug(KBABEL) << "Msgstr: " << *it << endl;
- s = QString::fromUtf8(lexer->YYText());
+ s = TQString::fromUtf8(lexer->YYText());
}
item.setMsgstr( msgstrs );
}
diff --git a/kbabel/common/poinfo.h b/kbabel/common/poinfo.h
index 21b8d72d..830d35eb 100644
--- a/kbabel/common/poinfo.h
+++ b/kbabel/common/poinfo.h
@@ -38,7 +38,7 @@
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
/**
* @brief File cache version number.
@@ -64,17 +64,17 @@ public:
int fuzzy;
int untranslated;
- QString project;
- QString creation;
- QString revision;
- QString lastTranslator;
- QString languageTeam;
- QString mimeVersion;
- QString contentType;
- QString encoding;
- QString others;
+ TQString project;
+ TQString creation;
+ TQString revision;
+ TQString lastTranslator;
+ TQString languageTeam;
+ TQString mimeVersion;
+ TQString contentType;
+ TQString encoding;
+ TQString others;
- QString headerComment;
+ TQString headerComment;
/**
* Find PO-file information in the cache.
@@ -83,7 +83,7 @@ public:
* @param info Returned cached information.
* @return true if found, false otherwise.
*/
- static bool cacheFind(const QString url, PoInfo& info);
+ static bool cacheFind(const TQString url, PoInfo& info);
/**
* Save PO-file information in the cache.
@@ -91,7 +91,7 @@ public:
* @param url The URL of the PO-file.
* @param info Information to save.
*/
- static void cacheSave(const QString url, PoInfo& info);
+ static void cacheSave(const TQString url, PoInfo& info);
/**
* @brief Get information about the PO file
@@ -105,7 +105,7 @@ public:
* being parsed?
* @since KBabel 1.11 (KDE 3.5)
*/
- static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive, bool msgfmt);
+ static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt);
/**
* @brief Get information about the PO file
@@ -121,10 +121,10 @@ public:
* KBabel 1.11.1 (KDE 3.5.1)
* @note This function always call Gettext's mgfmt before parsing each file
*/
- static ConversionStatus info(const QString& url,PoInfo& info, QStringList &wordList, bool updateWordList, bool interactive = true);
+ static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true);
static PoInfo headerInfo(const CatalogItem&);
- static bool findInFile(const QString& url, FindOptions options );
+ static bool findInFile(const TQString& url, FindOptions options );
static bool stopStaticRead;
@@ -135,7 +135,7 @@ public:
*
* @return Codec for found charset or 0, if no information has been found
*/
- static QTextCodec* codecForFile(QString gettextHeader);
+ static TQTextCodec* codecForFile(TQString gettextHeader);
/**
* @brief Write the entire cache.
diff --git a/kbabel/common/projectsettings.cpp b/kbabel/common/projectsettings.cpp
index 3687c9d4..3f8f47a3 100644
--- a/kbabel/common/projectsettings.cpp
+++ b/kbabel/common/projectsettings.cpp
@@ -35,16 +35,16 @@
#include "projectsettings.h"
#include "resources.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kglobal.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kspell.h>
-QString KBabel::Defaults::Spellcheck::ignoreURL()
+TQString KBabel::Defaults::Spellcheck::ignoreURL()
{
- QString _ignoreURL;
+ TQString _ignoreURL;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
@@ -89,7 +89,7 @@ int KBabel::Defaults::Spellcheck::spellClient()
return defaultsettings->client();
}
-QString KBabel::Defaults::Spellcheck::spellDictionary()
+TQString KBabel::Defaults::Spellcheck::spellDictionary()
{
if( ! defaultsettings )
{
@@ -109,9 +109,9 @@ int KBabel::Defaults::Spellcheck::spellEncoding()
return defaultsettings->encoding();
}
-QString KBabel::Defaults::CatalogManager::ignoreURL()
+TQString KBabel::Defaults::CatalogManager::ignoreURL()
{
- QString _ignoreURL;
+ TQString _ignoreURL;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
diff --git a/kbabel/common/projectsettings.h b/kbabel/common/projectsettings.h
index 186b21e5..49afc0a6 100644
--- a/kbabel/common/projectsettings.h
+++ b/kbabel/common/projectsettings.h
@@ -35,10 +35,10 @@
#ifndef PROJECTSETTINGS_H
#define PROJECTSETTINGS_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqcolor.h>
#include <kurl.h>
#include "catalogsettings.h"
@@ -54,10 +54,10 @@ struct SpellcheckSettings
bool runTogether;
int spellEncoding;
int spellClient;
- QString spellDict;
+ TQString spellDict;
bool rememberIgnored;
- QString ignoreURL;
+ TQString ignoreURL;
bool onFlySpellcheck;
@@ -66,17 +66,17 @@ struct SpellcheckSettings
struct CatManSettings
{
- QString poBaseDir;
- QString potBaseDir;
+ TQString poBaseDir;
+ TQString potBaseDir;
bool openWindow;
- QStringList dirCommands;
- QStringList dirCommandNames;
- QStringList fileCommands;
- QStringList fileCommandNames;
+ TQStringList dirCommands;
+ TQStringList dirCommandNames;
+ TQStringList fileCommands;
+ TQStringList fileCommandNames;
- QString ignoreURL;
+ TQString ignoreURL;
bool killCmdOnExit;
bool indexWords;
@@ -99,16 +99,16 @@ struct SourceContextSettings
* A path, which can be used as @CODEROOT@ variable in @ref sourcePaths .
* Defaults to empty string.
*/
- QString codeRoot;
+ TQString codeRoot;
/**
* List of paths, where the source file should be lookup. Can use @CODEROOT@ (replaced by @ref codeRoot),
* @PACKAGE@ (replaced by package name), @PACKAGEDIR@ (replaced by the
* longest known path of the package) and @COMMENTPATH@ (path extracted from comment specs.
*/
- QStringList sourcePaths;
+ TQStringList sourcePaths;
- void SourceContextSettins() { codeRoot = QString::null; sourcePaths.clear(); }
+ void SourceContextSettins() { codeRoot = TQString::null; sourcePaths.clear(); }
};
/**
@@ -120,11 +120,11 @@ namespace Defaults
class KDE_EXPORT Spellcheck
{
public:
- static QString ignoreURL();
+ static TQString ignoreURL();
static bool noRootAffix();
static bool runTogether();
static int spellClient();
- static QString spellDictionary();
+ static TQString spellDictionary();
static int spellEncoding();
private:
static KSpellConfig* defaultsettings;
@@ -133,7 +133,7 @@ namespace Defaults
class KDE_EXPORT CatalogManager
{
public:
- static QString ignoreURL();
+ static TQString ignoreURL();
};
}
diff --git a/kbabel/common/regexpextractor.cpp b/kbabel/common/regexpextractor.cpp
index b69398c6..058834ea 100644
--- a/kbabel/common/regexpextractor.cpp
+++ b/kbabel/common/regexpextractor.cpp
@@ -35,18 +35,18 @@
#include "regexpextractor.h"
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KBabel;
-RegExpExtractor::RegExpExtractor(const QStringList& regexps) :
+RegExpExtractor::RegExpExtractor(const TQStringList& regexps) :
_regExpList( regexps )
{
- _string=QString::null;
+ _string=TQString::null;
_matches.setAutoDelete(true);
}
-void RegExpExtractor::setString(QString string)
+void RegExpExtractor::setString(TQString string)
{
_string=string;
processString();
@@ -57,17 +57,17 @@ uint RegExpExtractor::countMatches()
return _matches.count();
}
-QString RegExpExtractor::firstMatch()
+TQString RegExpExtractor::firstMatch()
{
MatchedEntryInfo *ti = _matches.first();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::nextMatch()
+TQString RegExpExtractor::nextMatch()
{
MatchedEntryInfo *ti=_matches.next();
if(!ti)
@@ -76,16 +76,16 @@ QString RegExpExtractor::nextMatch()
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::match(uint tagnumber)
+TQString RegExpExtractor::match(uint tagnumber)
{
MatchedEntryInfo *ti=_matches.at(tagnumber);
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
int RegExpExtractor::matchIndex(uint tagnumber)
@@ -97,27 +97,27 @@ int RegExpExtractor::matchIndex(uint tagnumber)
return -1;
}
-QString RegExpExtractor::prevMatch()
+TQString RegExpExtractor::prevMatch()
{
MatchedEntryInfo *ti=_matches.prev();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QString RegExpExtractor::lastMatch()
+TQString RegExpExtractor::lastMatch()
{
MatchedEntryInfo *ti=_matches.last();
if(ti)
return ti->extracted;
- return QString::null;
+ return TQString::null;
}
-QStringList RegExpExtractor::matches()
+TQStringList RegExpExtractor::matches()
{
- QStringList list;
+ TQStringList list;
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti!=0; ti = _matches.next())
{
@@ -127,15 +127,15 @@ QStringList RegExpExtractor::matches()
return list;
}
-QString RegExpExtractor::plainString(bool keepPos)
+TQString RegExpExtractor::plainString(bool keepPos)
{
- QString tmp=_string;
+ TQString tmp=_string;
MatchedEntryInfo *ti;
for(ti=_matches.first(); ti != 0; ti=_matches.next())
{
uint len=ti->extracted.length();
- QString s;
+ TQString s;
for(uint i=0; i<len; i++)
{
s+=' ';
@@ -151,9 +151,9 @@ QString RegExpExtractor::plainString(bool keepPos)
return tmp;
}
-QString RegExpExtractor::matchesReplaced(const QString& replace)
+TQString RegExpExtractor::matchesReplaced(const TQString& replace)
{
- QString tmp=_string;
+ TQString tmp=_string;
int posCorrection=0;
int replaceLen=replace.length();
@@ -177,20 +177,20 @@ void RegExpExtractor::processString()
// if there is no regexp to be matched, quit
if( regExpList().empty() ) return;
- QValueList<MatchedEntryInfo> tmpList;
+ TQValueList<MatchedEntryInfo> tmpList;
bool found=false;
- QString tmp=_string;
+ TQString tmp=_string;
do
{
found=false;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it=_regExpList.begin();it!=_regExpList.end();++it)
{
int pos=-1;
- QString tag;
+ TQString tag;
- QRegExp reg = QRegExp((*it));
+ TQRegExp reg = TQRegExp((*it));
pos = reg.search(tmp);
int len=reg.matchedLength();
@@ -208,7 +208,7 @@ void RegExpExtractor::processString()
ti.extracted=tag;
tmpList.append(ti);
- QString s;
+ TQString s;
for(uint i=0; i<tag.length(); i++)
{
s+=' ';
@@ -228,7 +228,7 @@ void RegExpExtractor::processString()
uint n= 0;
uint min=_string.length();
uint counter=0;
- QValueList<MatchedEntryInfo>::Iterator it;
+ TQValueList<MatchedEntryInfo>::Iterator it;
for(it=tmpList.begin();it!=tmpList.end();++it)
{
if((*it).index < min)
@@ -249,22 +249,22 @@ void RegExpExtractor::processString()
}
}
-QStringList RegExpExtractor::regExpList()
+TQStringList RegExpExtractor::regExpList()
{
return _regExpList;
}
-void RegExpExtractor::setRegExpList( const QStringList& regexps )
+void RegExpExtractor::setRegExpList( const TQStringList& regexps )
{
_regExpList = regexps;
}
-void RegExpExtractor::addRegExpIdentifier(QString regExp)
+void RegExpExtractor::addRegExpIdentifier(TQString regExp)
{
_regExpList.append(regExp);
}
-void RegExpExtractor::deleteRegExpIdentifier(QString regExp)
+void RegExpExtractor::deleteRegExpIdentifier(TQString regExp)
{
_regExpList.remove(regExp);
}
diff --git a/kbabel/common/regexpextractor.h b/kbabel/common/regexpextractor.h
index 89703fba..83ff8f60 100644
--- a/kbabel/common/regexpextractor.h
+++ b/kbabel/common/regexpextractor.h
@@ -34,11 +34,11 @@
#ifndef _REGEXP_EXTRACTOR_H_
#define _REGEXP_EXTRACTOR_H_
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
#include <kdemacros.h>
namespace KBabel
@@ -46,7 +46,7 @@ namespace KBabel
struct KDE_EXPORT MatchedEntryInfo{
uint index;
- QString extracted;
+ TQString extracted;
};
@@ -61,14 +61,14 @@ public:
/**
* Create a regexp extractor for "string"
*/
- RegExpExtractor(const QStringList& regexps);
+ RegExpExtractor(const TQStringList& regexps);
virtual ~RegExpExtractor() {}
/**
* Set the string of this extractor
*/
- void setString(QString string);
+ void setString(TQString string);
/**
* @return the number of matches found
@@ -79,17 +79,17 @@ public:
* @return the first match, and set the internal cursor to
* the beginning
*/
- QString firstMatch();
+ TQString firstMatch();
/**
* @return the next match and move cursor forward
*/
- QString nextMatch();
+ TQString nextMatch();
/**
* @return the n-th match. It also moves the cursor.
*/
- QString match(uint matchnumber);
+ TQString match(uint matchnumber);
/**
* @return the n-th match. It also moves the cursor. -1 is there
@@ -100,17 +100,17 @@ public:
/**
* @return the next match and move cursor forward
*/
- QString prevMatch();
+ TQString prevMatch();
/**
* @return the last match and move the cursor to the end
*/
- QString lastMatch();
+ TQString lastMatch();
/**
* @return a list of all matches
*/
- QStringList matches();
+ TQStringList matches();
/**
* @return the string without matched text
@@ -120,36 +120,36 @@ public:
* the matches are replaced with ' ' and therefore the position of the
* words will not change
*/
- QString plainString(bool keepPos=false);
+ TQString plainString(bool keepPos=false);
/**
* @return the string, where matches are replaced with the given string
*/
- QString matchesReplaced(const QString& replace);
+ TQString matchesReplaced(const TQString& replace);
//Functions that allow user to define his own regexps.
/**
* Add a regexp to the list of regexp identifier.
*/
- void addRegExpIdentifier(QString regexp);
+ void addRegExpIdentifier(TQString regexp);
/**
* Delete from the regexp list the regexp.
*/
- void deleteRegExpIdentifier(QString regexp);
+ void deleteRegExpIdentifier(TQString regexp);
- void setRegExpList( const QStringList& regexps );
+ void setRegExpList( const TQStringList& regexps );
- QStringList regExpList();
+ TQStringList regExpList();
protected:
void processString();
- QPtrList<MatchedEntryInfo> _matches;
- QString _string;
- QStringList _regExpList;
+ TQPtrList<MatchedEntryInfo> _matches;
+ TQString _string;
+ TQStringList _regExpList;
};
diff --git a/kbabel/common/stringdistance.cpp b/kbabel/common/stringdistance.cpp
index 32cb9b96..8de11c98 100644
--- a/kbabel/common/stringdistance.cpp
+++ b/kbabel/common/stringdistance.cpp
@@ -46,7 +46,7 @@ const int LevenshteinDistance::editCost_insert = 1;
const int LevenshteinDistance::editCost_delete = 1;
-double relativeDistance(double distance, const QString& left_string, const QString& right_string)
+double relativeDistance(double distance, const TQString& left_string, const TQString& right_string)
{
double maxsize=0;
double compsize=0;
@@ -63,7 +63,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri
* This function sums all the distances between all trees.
* For the calculation of the distance between two trees, it calls the function calculate.
*/
-double Distance::operator()(const QString& left_string, const QString& right_string)
+double Distance::operator()(const TQString& left_string, const TQString& right_string)
{
m_distance = 0.00;
if (left_string == right_string)
@@ -86,7 +86,7 @@ double Distance::operator()(const QString& left_string, const QString& right_str
/** This function calculates the distance between two nodes.
* For the calculation you can specify two variables gap & distance.
*/
-int Distance::nodeDistance(const QString& left_letter, const QString& right_letter)
+int Distance::nodeDistance(const TQString& left_letter, const TQString& right_letter)
{
if ( left_letter == right_letter )
{
@@ -105,7 +105,7 @@ int Distance::nodeDistance(const QString& left_letter, const QString& right_lett
* This function sums all the distances between all nodes.
* For the calculation you can specify the distance between two nodes in variable distance
*/
-double HammingDistance::calculate(const QString& left_string, const QString& right_string)
+double HammingDistance::calculate(const TQString& left_string, const TQString& right_string)
{
double hammingDistance = 0.00;
// if (debug > 0)
@@ -135,7 +135,7 @@ double HammingDistance::calculate(const QString& left_string, const QString& rig
* A matrice D is generated which represent the distribution of distances between two trees.
* The last element represent the Levenshtein-distance.
*/
-double LevenshteinDistance::calculate(const QString& left_string, const QString& right_string)
+double LevenshteinDistance::calculate(const TQString& left_string, const TQString& right_string)
{
// if (debug > 0)
// cout << left_string.length() << " " << right_string.length() << "\t";
diff --git a/kbabel/common/stringdistance.h b/kbabel/common/stringdistance.h
index 6f5aa185..89c60627 100644
--- a/kbabel/common/stringdistance.h
+++ b/kbabel/common/stringdistance.h
@@ -34,7 +34,7 @@
#ifndef STRINGDISTANCE_H
#define STRINGDISTANCE_H
-#include <qstring.h>
+#include <tqstring.h>
//#include <boost/numeric/ublas/matrix.hpp>
@@ -69,20 +69,20 @@ class Distance : public NonCopyable
{
public:
virtual ~Distance(){}
- double operator()(const QString& left, const QString& right);
+ double operator()(const TQString& left, const TQString& right);
int editCostReplace() { return editCost_replace_base; }
static int debug;
protected:
- virtual double calculate(const QString& left_string, const QString& right_string) = 0;
- int nodeDistance(const QString& left_letter, const QString& right_letter);
+ virtual double calculate(const TQString& left_string, const TQString& right_string) = 0;
+ int nodeDistance(const TQString& left_letter, const TQString& right_letter);
static const int editCost_replace_base;
double m_distance;
};
-double relativeDistance(double distance, const QString& left_string, const QString right_string);
+double relativeDistance(double distance, const TQString& left_string, const TQString right_string);
/**
@@ -96,7 +96,7 @@ double relativeDistance(double distance, const QString& left_string, const QStri
class HammingDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost; }
static const int editCost;
};
@@ -113,7 +113,7 @@ protected:
class LevenshteinDistance : public Distance
{
protected:
- virtual double calculate(const QString& left_string, const QString& right_string);
+ virtual double calculate(const TQString& left_string, const TQString& right_string);
int editCostReplace() { return editCost_replace; }
static const int editCost_replace;
static const int editCost_insert;
@@ -122,7 +122,7 @@ protected:
/** wrapper function for replacement of fstrcmp from gettext */
-inline double fstrcmp(const QString& left, const QString& right)
+inline double fstrcmp(const TQString& left, const TQString& right)
{
return LevenshteinDistance()(left,right);
}
diff --git a/kbabel/common/tagextractor.cpp b/kbabel/common/tagextractor.cpp
index 45b8ad9f..fded2703 100644
--- a/kbabel/common/tagextractor.cpp
+++ b/kbabel/common/tagextractor.cpp
@@ -40,13 +40,13 @@
using namespace KBabel;
-TagExtractor::TagExtractor() : RegExpExtractor(QStringList())
+TagExtractor::TagExtractor() : RegExpExtractor(TQStringList())
{
KConfig* config = KGlobal::config();
config->setGroup("Tags");
- QStringList s=config->readListEntry("TagExpressions");
+ TQStringList s=config->readListEntry("TagExpressions");
if( s.empty() ) s = Defaults::Tag::tagExpressions();
RegExpExtractor::setRegExpList(s);
diff --git a/kbabel/commonui/cmdedit.cpp b/kbabel/commonui/cmdedit.cpp
index bfe95293..07a35c2f 100644
--- a/kbabel/commonui/cmdedit.cpp
+++ b/kbabel/commonui/cmdedit.cpp
@@ -32,67 +32,67 @@
**************************************************************************** */
#include "cmdedit.h"
-#include <qlistbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqlistbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
#include <kdialog.h>
-CmdEdit::CmdEdit(QWidget* parent, const char* name)
- : QWidget(parent,name)
+CmdEdit::CmdEdit(TQWidget* parent, const char* name)
+ : TQWidget(parent,name)
{
- QGridLayout* layout = new QGridLayout( this , 1 , 1 );
+ TQGridLayout* layout = new TQGridLayout( this , 1 , 1 );
layout->setSpacing( KDialog::spacingHint() );
- QLabel* nameLabel = new QLabel( i18n("Command &Label:"), this);
- QLabel* cmdLabel = new QLabel( i18n("Co&mmand:"), this);
+ TQLabel* nameLabel = new TQLabel( i18n("Command &Label:"), this);
+ TQLabel* cmdLabel = new TQLabel( i18n("Co&mmand:"), this);
layout->addWidget( nameLabel, 0 , 0 );
layout->addWidget( cmdLabel, 0 , 1 );
- _cmdNameEdit = new QLineEdit( this , "cmdNameEdit" );
+ _cmdNameEdit = new TQLineEdit( this , "cmdNameEdit" );
_cmdNameEdit->setMaxLength(20);
nameLabel->setBuddy(_cmdNameEdit);
layout->addWidget( _cmdNameEdit , 1 , 0 );
- _cmdEdit = new QLineEdit( this , "cmdEdit" );
+ _cmdEdit = new TQLineEdit( this , "cmdEdit" );
cmdLabel->setBuddy(_cmdEdit);
layout->addWidget( _cmdEdit , 1 , 1 );
- _addButton = new QPushButton( i18n("&Add"), this );
+ _addButton = new TQPushButton( i18n("&Add"), this );
_addButton->setEnabled(false);
layout->addWidget( _addButton , 1 , 2 );
- _editButton = new QPushButton( i18n("&Edit"), this );
+ _editButton = new TQPushButton( i18n("&Edit"), this );
_editButton->setEnabled(false);
layout->addWidget( _editButton , 3 , 2 );
- _removeButton = new QPushButton( i18n("&Remove"), this );
+ _removeButton = new TQPushButton( i18n("&Remove"), this );
_removeButton->setEnabled(false);
layout->addWidget( _removeButton , 4 , 2 );
- QHBoxLayout* hbox = new QHBoxLayout();
+ TQHBoxLayout* hbox = new TQHBoxLayout();
layout->addLayout(hbox,5,2);
- _upButton = new QToolButton(UpArrow,this);
+ _upButton = new TQToolButton(UpArrow,this);
_upButton->setFixedSize(20,20);
_upButton->setEnabled(false);
hbox->addWidget( _upButton );
- _downButton = new QToolButton(DownArrow,this);
+ _downButton = new TQToolButton(DownArrow,this);
_downButton->setFixedSize(20,20);
_downButton->setEnabled(false);
hbox->addWidget( _downButton);
- _commandNames = new QListBox( this , "commandNamesBox" );
+ _commandNames = new TQListBox( this , "commandNamesBox" );
_commandNames->setMinimumSize(100, 100);
layout->addMultiCellWidget( _commandNames , 3 , 6 , 0 , 0);
- _commands = new QListBox( this , "commandsBox" );
+ _commands = new TQListBox( this , "commandsBox" );
_commands->setMinimumSize(160, 100);
layout->addMultiCellWidget( _commands , 3 , 6 , 1 ,1 );
@@ -107,22 +107,22 @@ CmdEdit::CmdEdit(QWidget* parent, const char* name)
setMinimumSize(layout->sizeHint());
- connect(_addButton , SIGNAL(clicked()) , this , SLOT(addCmd()) ) ;
- connect(_editButton , SIGNAL(clicked()) , this , SLOT(editCmd()) );
- connect(_removeButton , SIGNAL(clicked()) , this , SLOT(removeCmd()) );
- connect(_upButton , SIGNAL(clicked()) , this , SLOT(upCmd()) ) ;
- connect(_downButton , SIGNAL(clicked()) , this , SLOT(downCmd()) );
+ connect(_addButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(addCmd()) ) ;
+ connect(_editButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(editCmd()) );
+ connect(_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(removeCmd()) );
+ connect(_upButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(upCmd()) ) ;
+ connect(_downButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(downCmd()) );
- connect(_commands , SIGNAL(highlighted(int)) , this, SLOT(cmdHighlighted(int)) );
- connect(_commandNames , SIGNAL(highlighted(int)) , this, SLOT(cmdNameHighlighted(int)) );
- connect(_commands , SIGNAL(selected(int)) , this, SLOT(editCmd()) );
- connect(_commandNames , SIGNAL(selected(int)) , this, SLOT(editCmd()) );
+ connect(_commands , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdHighlighted(int)) );
+ connect(_commandNames , TQT_SIGNAL(highlighted(int)) , this, TQT_SLOT(cmdNameHighlighted(int)) );
+ connect(_commands , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) );
+ connect(_commandNames , TQT_SIGNAL(selected(int)) , this, TQT_SLOT(editCmd()) );
- connect(_cmdEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) );
- connect(_cmdNameEdit, SIGNAL(textChanged(const QString&)) , this , SLOT(checkAdd()) );
+ connect(_cmdEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) );
+ connect(_cmdNameEdit, TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(checkAdd()) );
}
-void CmdEdit::setCommands(const QStringList& commands,const QStringList& commandNames)
+void CmdEdit::setCommands(const TQStringList& commands,const TQStringList& commandNames)
{
_commands->clear();
_commands->insertStringList(commands);
@@ -131,7 +131,7 @@ void CmdEdit::setCommands(const QStringList& commands,const QStringList& command
_commandNames->insertStringList(commandNames);
}
-void CmdEdit::commands(QStringList& commands, QStringList& commandNames)
+void CmdEdit::commands(TQStringList& commands, TQStringList& commandNames)
{
commands.clear();
commandNames.clear();
@@ -148,8 +148,8 @@ void CmdEdit::commands(QStringList& commands, QStringList& commandNames)
void CmdEdit::addCmd()
{
- QString cmd = _cmdEdit->text();
- QString cmdName = _cmdNameEdit->text();
+ TQString cmd = _cmdEdit->text();
+ TQString cmdName = _cmdNameEdit->text();
_cmdEdit->clear();
_cmdNameEdit->clear();
@@ -197,8 +197,8 @@ void CmdEdit::removeCmd()
void CmdEdit::upCmd()
{
- QString cmd = _commands->currentText();
- QString cmdName = _commandNames->currentText();
+ TQString cmd = _commands->currentText();
+ TQString cmdName = _commandNames->currentText();
int index=_commands->currentItem();
_commands->removeItem(index);
@@ -220,8 +220,8 @@ void CmdEdit::upCmd()
void CmdEdit::downCmd()
{
- QString cmd = _commands->currentText();
- QString cmdName = _commandNames->currentText();
+ TQString cmd = _commands->currentText();
+ TQString cmdName = _commandNames->currentText();
int index=_commands->currentItem();
_commands->removeItem(index);
diff --git a/kbabel/commonui/cmdedit.h b/kbabel/commonui/cmdedit.h
index dc61679b..64abd815 100644
--- a/kbabel/commonui/cmdedit.h
+++ b/kbabel/commonui/cmdedit.h
@@ -37,8 +37,8 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
class QListBox;
class QLineEdit;
@@ -49,10 +49,10 @@ class CmdEdit : public QWidget
{
Q_OBJECT
public:
- CmdEdit(QWidget* parent=0,const char* name=0);
+ CmdEdit(TQWidget* parent=0,const char* name=0);
- void setCommands(const QStringList& commands,const QStringList& commandNames);
- void commands(QStringList& commands, QStringList& commandNames);
+ void setCommands(const TQStringList& commands,const TQStringList& commandNames);
+ void commands(TQStringList& commands, TQStringList& commandNames);
signals:
void widgetChanged();
@@ -78,17 +78,17 @@ private slots:
void checkAdd();
private:
- QListBox* _commands;
- QListBox* _commandNames;
+ TQListBox* _commands;
+ TQListBox* _commandNames;
- QLineEdit* _cmdEdit;
- QLineEdit* _cmdNameEdit;
+ TQLineEdit* _cmdEdit;
+ TQLineEdit* _cmdNameEdit;
- QPushButton* _addButton;
- QPushButton* _editButton;
- QPushButton* _removeButton;
- QToolButton* _upButton;
- QToolButton* _downButton;
+ TQPushButton* _addButton;
+ TQPushButton* _editButton;
+ TQPushButton* _removeButton;
+ TQToolButton* _upButton;
+ TQToolButton* _downButton;
};
#endif // CMDEDIT_H
diff --git a/kbabel/commonui/context.cpp b/kbabel/commonui/context.cpp
index db468795..55c0f196 100644
--- a/kbabel/commonui/context.cpp
+++ b/kbabel/commonui/context.cpp
@@ -34,17 +34,17 @@
#include "klisteditor.h"
#include "kbprojectsettings.h"
-#include <qcombobox.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qvgroupbox.h>
+#include <tqcombobox.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqvgroupbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -62,7 +62,7 @@
#include <ktexteditor/selectioninterface.h>
#include <ktexteditor/viewcursorinterface.h>
-SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWidget(parent)
+SourceContext::SourceContext(TQWidget *parent, KBabel::Project::Ptr project): TQWidget(parent)
, m_parent( parent )
, _part(0)
, _view(0)
@@ -71,20 +71,20 @@ SourceContext::SourceContext(QWidget *parent, KBabel::Project::Ptr project): QWi
, _project(project)
{
_referenceList.clear();
- _referenceCombo = new QComboBox( this );
- connect( _referenceCombo, SIGNAL(activated(int)), this, SLOT(updateToSelected(int)));
+ _referenceCombo = new TQComboBox( this );
+ connect( _referenceCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateToSelected(int)));
- _layout= new QVBoxLayout(this);
+ _layout= new TQVBoxLayout(this);
_layout->addWidget(_referenceCombo);
}
-void SourceContext::setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile )
+void SourceContext::setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile )
{
if( !_part && !loadPart() ) return;
_referenceCombo->clear();
_referenceList = resolvePath( packageDir, packageName, gettextComment, urlPoFile );
- for( QValueList<ContextInfo>::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it )
+ for( TQValueList<ContextInfo>::const_iterator it = _referenceList.constBegin(); it != _referenceList.constEnd(); ++it )
_referenceCombo->insertItem((*it).path);
_referenceCombo->setEnabled( !_referenceList.isEmpty() );
@@ -120,24 +120,24 @@ void SourceContext::updateToSelected(int index)
(dynamic_cast<KTextEditor::SelectionInterface *>(_part))->setSelection(ci.line-1,0,ci.line,0);
}
-QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile )
+TQValueList<ContextInfo> SourceContext::resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile )
{
//kdDebug() << "GETTEXTCOMMENT:" << gettextComment << endl;
// Find the directory name of the PO file, if the PO file is local
// ### TODO: find a way to allow remote files too
- QString poDir;
+ TQString poDir;
#if KDE_IS_VERSION( 3, 5, 0 )
const KURL localUrl( KIO::NetAccess::mostLocalURL( urlPoFile, m_parent ) );
if ( localUrl.isLocalFile() )
{
- const QFileInfo fi( localUrl.path() );
+ const TQFileInfo fi( localUrl.path() );
poDir = fi.dirPath( true );
}
#else
if ( urlPoFile.isLocalFile() )
{
- const QFileInfo fi( urlPoFile.path() );
+ const TQFileInfo fi( urlPoFile.path() );
poDir = fi.dirPath( true );
}
#endif
@@ -151,12 +151,12 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
kdDebug() << "CONTEXT VARIABLE END" << endl;
#endif
- QStringList prefixes;
- const QStringList paths = _project->settings()->paths();
+ TQStringList prefixes;
+ const TQStringList paths = _project->settings()->paths();
- for( QStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it )
+ for( TQStringList::const_iterator it = paths.constBegin(); it!=paths.constEnd() ; ++it )
{
- QString pref = (*it);
+ TQString pref = (*it);
if ( !poDir.isEmpty() )
{
@@ -171,19 +171,19 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
prefixes.append(pref);
}
- QValueList<ContextInfo> rawRefList; // raw references
- QRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references
- QRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references
- QRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format
- const QStringList lines = QStringList::split( "\n", gettextComment );
- for ( QStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it)
+ TQValueList<ContextInfo> rawRefList; // raw references
+ TQRegExp re("^\\s*(.+):(\\d+)\\s*$"); // Reg. exp. for Gettext references
+ TQRegExp rex( "^#. i18n: file (.+) line (\\d+)\\s*$" ); //Reg. exp. for KDE extractrc/extractattr references
+ TQRegExp res( "^# [Ff]ile: (.+), line(?: number)?: (\\d+)\\s*$"); // Reg. exp. for "strict" PO format
+ const TQStringList lines = TQStringList::split( "\n", gettextComment );
+ for ( TQStringList::const_iterator it = lines.constBegin() ; it != lines.constEnd() ; ++it)
{
- const QString curLine = (*it).stripWhiteSpace();
+ const TQString curLine = (*it).stripWhiteSpace();
if( curLine.startsWith( "#:" ) )
{
// We have a Gettext line with references
- const QStringList references( QStringList::split( " ", curLine.mid( 2 ), false ) );
- for ( QStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it )
+ const TQStringList references( TQStringList::split( " ", curLine.mid( 2 ), false ) );
+ for ( TQStringList::const_iterator it = references.constBegin(); it != references.constEnd(); ++it )
{
if ( re.exactMatch( (*it) ) )
{
@@ -191,7 +191,7 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
ref.line = re.cap(2).toInt();
ref.path = re.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.replace( QChar( '\\' ), QChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -223,7 +223,7 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
ref.line = res.cap(2).toInt();
ref.path = res.cap(1);
// ### TODO KDE4: perhaps we should not do the replace if compiled for Windows
- ref.path.replace( QChar( '\\' ), QChar( '/' ) );
+ ref.path.replace( TQChar( '\\' ), TQChar( '/' ) );
rawRefList.append( ref );
}
}
@@ -232,18 +232,18 @@ QValueList<ContextInfo> SourceContext::resolvePath( const QString& packageDir, c
}
// Now that we have gathered the references, we need to convert them to absolute paths
- QValueList<ContextInfo> results;
- for ( QValueList<ContextInfo>::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it )
+ TQValueList<ContextInfo> results;
+ for ( TQValueList<ContextInfo>::const_iterator it = rawRefList.constBegin(); it != rawRefList.constEnd(); ++it )
{
const int lineNum = (*it).line;
- const QString fileName = (*it).path;
- for ( QStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
+ const TQString fileName = (*it).path;
+ for ( TQStringList::const_iterator it1 = prefixes.constBegin(); it1 != prefixes.constEnd(); ++it1 )
{
- QString path = (*it1);
+ TQString path = (*it1);
path.replace( "@COMMENTPATH@", fileName);
//kdDebug() << "CONTEXT PATH: " << path << endl; // DEBUG
- QFileInfo pathInfo( path );
+ TQFileInfo pathInfo( path );
if( pathInfo.exists() )
{
ContextInfo ref;
@@ -289,8 +289,8 @@ bool SourceContext::loadPart()
return false;
}
_view = _part->createView( this, 0 );
- _layout->addWidget(static_cast<QWidget *>(_view), 1);
- static_cast<QWidget *>(_view)->show();
+ _layout->addWidget(static_cast<TQWidget *>(_view), 1);
+ static_cast<TQWidget *>(_view)->show();
return true;
}
diff --git a/kbabel/commonui/context.h b/kbabel/commonui/context.h
index 2ccceecd..d68a2371 100644
--- a/kbabel/commonui/context.h
+++ b/kbabel/commonui/context.h
@@ -33,8 +33,8 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <ktexteditor/document.h>
#include <ktexteditor/view.h>
@@ -50,7 +50,7 @@ class KURL;
struct ContextInfo
{
- QString path;
+ TQString path;
uint line;
};
@@ -78,7 +78,7 @@ class KDE_EXPORT SourceContext : public QWidget
{
Q_OBJECT
public:
- SourceContext(QWidget* parent, KBabel::Project::Ptr project);
+ SourceContext(TQWidget* parent, KBabel::Project::Ptr project);
void setProject(KBabel::Project::Ptr project);
@@ -91,7 +91,7 @@ public slots:
* @param urlPoFile URL of the PO file
* @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet
*/
- void setContext( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile );
+ void setContext( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile );
private:
/**
@@ -103,17 +103,17 @@ private:
* @todo even if @p urlPoFile is an URL SourceContext::resolvePath is not remote-aware yet
* @private
*/
- QValueList<ContextInfo> resolvePath( const QString& packageDir, const QString& packageName, const QString& gettextComment, const KURL& urlPoFile );
+ TQValueList<ContextInfo> resolvePath( const TQString& packageDir, const TQString& packageName, const TQString& gettextComment, const KURL& urlPoFile );
bool loadPart();
/// Parent widget (for KIO::NetAccess member functions)
- QWidget* m_parent;
+ TQWidget* m_parent;
KTextEditor::Document* _part;
KTextEditor::View* _view;
- QComboBox *_referenceCombo;
- QVBoxLayout *_layout;
+ TQComboBox *_referenceCombo;
+ TQVBoxLayout *_layout;
- QValueList<ContextInfo> _referenceList;
+ TQValueList<ContextInfo> _referenceList;
KBabel::Project::Ptr _project;
private slots:
diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp
index 7335f30a..d210811a 100644
--- a/kbabel/commonui/finddialog.cpp
+++ b/kbabel/commonui/finddialog.cpp
@@ -34,14 +34,14 @@
**************************************************************************** */
#include "finddialog.h"
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -52,14 +52,14 @@
using namespace KBabel;
-FindDialog::FindDialog(bool forReplace, QWidget* parent)
+FindDialog::FindDialog(bool forReplace, TQWidget* parent)
:KDialogBase(parent, "finddialog",true, "", Ok|Cancel, Ok)
, _regExpEditDialog(0), _replaceDlg(forReplace)
{
- QWidget* page = new QWidget(this);
- QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint());
+ TQWidget* page = new TQWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint());
- QLabel *label = new QLabel(i18n("&Find:"),page);
+ TQLabel *label = new TQLabel(i18n("&Find:"),page);
layout->addWidget(label);
_findCombo = new KComboBox(true, page, "findCombo");
@@ -68,20 +68,20 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
layout->addWidget(_findCombo);
label->setBuddy(_findCombo);
- QString msg=i18n("<qt><p><b>Find text</b></p>"
+ TQString msg=i18n("<qt><p><b>Find text</b></p>"
"<p>Here you can enter the text you want to search for. "
"If you want to search for a regular expression, "
"enable <b>Use regular expression</b> below.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(_findCombo,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(_findCombo,msg);
if(forReplace) {
setCaption(i18n("Replace"));
setButtonOK(i18n("&Replace"));
- _replaceLabel = new QLabel(i18n("&Replace with:"),page);
+ _replaceLabel = new TQLabel(i18n("&Replace with:"),page);
layout->addWidget(_replaceLabel);
_replaceCombo = new KComboBox(true, page, "replaceCombo");
_replaceCombo->setMaxCount(10);
@@ -94,8 +94,8 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
"replaced with. The text is used as is. It is not possible to make a back "
"reference, if you have searched for a regular expression.</p></qt>");
- QWhatsThis::add(_replaceLabel,msg);
- QWhatsThis::add(_replaceCombo,msg);
+ TQWhatsThis::add(_replaceLabel,msg);
+ TQWhatsThis::add(_replaceCombo,msg);
}
else {
setCaption(i18n("Find"));
@@ -105,48 +105,48 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
_replaceCombo=0;
}
- _buttonGrp = new QButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page);
- connect(_buttonGrp,SIGNAL(clicked(int)), this, SLOT(inButtonsClicked(int)));
+ _buttonGrp = new TQButtonGroup(3, Qt::Horizontal, i18n("Where to Search"), page);
+ connect(_buttonGrp,TQT_SIGNAL(clicked(int)), this, TQT_SLOT(inButtonsClicked(int)));
layout->addWidget(_buttonGrp);
- _inMsgid = new QCheckBox(i18n("&Msgid"),_buttonGrp);
- _inMsgstr = new QCheckBox(i18n("M&sgstr"),_buttonGrp);
- _inComment = new QCheckBox(i18n("Comm&ent"),_buttonGrp);
+ _inMsgid = new TQCheckBox(i18n("&Msgid"),_buttonGrp);
+ _inMsgstr = new TQCheckBox(i18n("M&sgstr"),_buttonGrp);
+ _inComment = new TQCheckBox(i18n("Comm&ent"),_buttonGrp);
- QWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>"
+ TQWhatsThis::add(_buttonGrp,i18n("<qt><p><b>Where to search</b></p>"
"<p>Select here in which parts of a catalog entry you want "
"to search.</p></qt>"));
- QGroupBox* box = new QGroupBox(2, Qt::Horizontal, i18n("Options"), page);
+ TQGroupBox* box = new TQGroupBox(2, Qt::Horizontal, i18n("Options"), page);
layout->addWidget(box);
- _caseSensitive = new QCheckBox(i18n("C&ase sensitive"),box);
- _wholeWords = new QCheckBox(i18n("O&nly whole words"),box);
- _ignoreAccelMarker = new QCheckBox(i18n("I&gnore marker for keyboard accelerator"),box);
- _ignoreContextInfo = new QCheckBox(i18n("Ignore con&text information"),box);
- _fromCursor = new QCheckBox(i18n("From c&ursor position"),box);
- _backwards = new QCheckBox(i18n("F&ind backwards"),box);
+ _caseSensitive = new TQCheckBox(i18n("C&ase sensitive"),box);
+ _wholeWords = new TQCheckBox(i18n("O&nly whole words"),box);
+ _ignoreAccelMarker = new TQCheckBox(i18n("I&gnore marker for keyboard accelerator"),box);
+ _ignoreContextInfo = new TQCheckBox(i18n("Ignore con&text information"),box);
+ _fromCursor = new TQCheckBox(i18n("From c&ursor position"),box);
+ _backwards = new TQCheckBox(i18n("F&ind backwards"),box);
- QHBox *regexp = new QHBox(box);
+ TQHBox *regexp = new TQHBox(box);
- _isRegExp = new QCheckBox(i18n("Use regu&lar expression"),regexp);
+ _isRegExp = new TQCheckBox(i18n("Use regu&lar expression"),regexp);
_regExpButton = 0;
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
- _regExpButton = new QPushButton( i18n("&Edit..."), regexp );
- connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked()));
- connect( _isRegExp, SIGNAL( toggled(bool) ), _regExpButton, SLOT(setEnabled(bool)));
+ _regExpButton = new TQPushButton( i18n("&Edit..."), regexp );
+ connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));
+ connect( _isRegExp, TQT_SIGNAL( toggled(bool) ), _regExpButton, TQT_SLOT(setEnabled(bool)));
}
if(forReplace)
{
_inMsgid->setEnabled(false);
- _askForReplace = new QCheckBox(i18n("As&k before replacing"),box);
+ _askForReplace = new TQCheckBox(i18n("As&k before replacing"),box);
_ignoreContextInfo->setEnabled(false);
- QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
"<p>Here you can finetune replacing:"
"<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>"
"<li><b>Only whole words</b>: text found must not be part of a longer word</li>"
@@ -163,7 +163,7 @@ FindDialog::FindDialog(bool forReplace, QWidget* parent)
else {
_askForReplace=0;
- QWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Options</b></p>"
"<p>Here you can finetune the search:"
"<ul><li><b>Case sensitive</b>: does case of entered text have to be respected?</li>"
"<li><b>Only whole words</b>: text found must not be part of a longer word</li>"
@@ -186,7 +186,7 @@ FindDialog::~FindDialog()
saveSettings();
}
-int FindDialog::show(QString initialStr)
+int FindDialog::show(TQString initialStr)
{
if( !initialStr.isEmpty() ) {
_findCombo->setEditText( initialStr );
@@ -199,7 +199,7 @@ int FindDialog::show(QString initialStr)
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(_replaceDlg) {
_replaceList.remove(_replaceCombo->currentText());
_replaceList.prepend(_replaceCombo->currentText());
@@ -260,7 +260,7 @@ int FindDialog::show(QString initialStr)
return r;
}
-int FindDialog::exec(QString initialStr)
+int FindDialog::exec(TQString initialStr)
{
if( !initialStr.isEmpty() ) {
_findCombo->setEditText( initialStr );
@@ -273,7 +273,7 @@ int FindDialog::exec(QString initialStr)
int r = result();
- if( r == QDialog::Accepted ) {
+ if( r == TQDialog::Accepted ) {
if(_replaceDlg) {
_replaceList.remove(_replaceCombo->currentText());
_replaceList.prepend(_replaceCombo->currentText());
@@ -520,30 +520,30 @@ void FindDialog::inButtonsClicked(int id)
void FindDialog::regExpButtonClicked()
{
if ( _regExpEditDialog == 0 )
- _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( _regExpEditDialog );
if( iface )
{
iface->setRegExp( _findCombo->currentText() );
- if( _regExpEditDialog->exec() == QDialog::Accepted )
+ if( _regExpEditDialog->exec() == TQDialog::Accepted )
_findCombo->setCurrentText( iface->regExp() );
}
}
-ReplaceDialog::ReplaceDialog(QWidget* parent)
+ReplaceDialog::ReplaceDialog(TQWidget* parent)
:KDialogBase(Plain, "", Close|User1|User2|User3, User1, parent,"finddialog"
, true,false,i18n("&Replace"),i18n("&Goto Next"),i18n("R&eplace All"))
{
- QWidget* page = plainPage();
- QVBoxLayout *layout = new QVBoxLayout(page, 0, spacingHint());
+ TQWidget* page = plainPage();
+ TQVBoxLayout *layout = new TQVBoxLayout(page, 0, spacingHint());
- QLabel *label = new QLabel(i18n("Replace this string?"),page);
+ TQLabel *label = new TQLabel(i18n("Replace this string?"),page);
layout->addWidget(label);
- connect(this,SIGNAL(user1Clicked()),this,SIGNAL(replace()));
- connect(this,SIGNAL(user2Clicked()),this,SIGNAL(next()));
- connect(this,SIGNAL(user3Clicked()),this,SIGNAL(replaceAll()));
+ connect(this,TQT_SIGNAL(user1Clicked()),this,TQT_SIGNAL(replace()));
+ connect(this,TQT_SIGNAL(user2Clicked()),this,TQT_SIGNAL(next()));
+ connect(this,TQT_SIGNAL(user3Clicked()),this,TQT_SIGNAL(replaceAll()));
}
ReplaceDialog::~ReplaceDialog()
diff --git a/kbabel/commonui/finddialog.h b/kbabel/commonui/finddialog.h
index 7baa0675..c7e6ac14 100644
--- a/kbabel/commonui/finddialog.h
+++ b/kbabel/commonui/finddialog.h
@@ -33,8 +33,8 @@
#ifndef FINDDIALOG_H
#define FINDDIALOG_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
class QButtonGroup;
@@ -52,7 +52,7 @@ public:
* Constructor
* @param replaceDlg flag, if this is a replace dialog
*/
- FindDialog(bool replaceDlg, QWidget* parent);
+ FindDialog(bool replaceDlg, TQWidget* parent);
~FindDialog();
/**
@@ -62,7 +62,7 @@ public:
*
* @return the result code of the dialog
*/
- int show(QString initialStr);
+ int show(TQString initialStr);
/**
* executes the dialog as modal
@@ -71,7 +71,7 @@ public:
*
* @return the result code of the dialog
*/
- int exec(QString initialStr);
+ int exec(TQString initialStr);
KBabel::FindOptions findOpts();
void setFindOpts(KBabel::FindOptions options);
KBabel::ReplaceOptions replaceOpts();
@@ -90,31 +90,31 @@ private slots:
private:
KComboBox *_findCombo;
KComboBox *_replaceCombo;
- QLabel *_replaceLabel;
+ TQLabel *_replaceLabel;
- QButtonGroup *_buttonGrp;
- QCheckBox *_inMsgid;
- QCheckBox *_inMsgstr;
- QCheckBox *_inComment;
+ TQButtonGroup *_buttonGrp;
+ TQCheckBox *_inMsgid;
+ TQCheckBox *_inMsgstr;
+ TQCheckBox *_inComment;
- QCheckBox *_caseSensitive;
- QCheckBox *_wholeWords;
- QCheckBox *_ignoreAccelMarker;
- QCheckBox *_ignoreContextInfo;
- QCheckBox *_backwards;
- QCheckBox *_fromCursor;
- QCheckBox *_isRegExp;
- QCheckBox *_askForReplace;
+ TQCheckBox *_caseSensitive;
+ TQCheckBox *_wholeWords;
+ TQCheckBox *_ignoreAccelMarker;
+ TQCheckBox *_ignoreContextInfo;
+ TQCheckBox *_backwards;
+ TQCheckBox *_fromCursor;
+ TQCheckBox *_isRegExp;
+ TQCheckBox *_askForReplace;
- QPushButton *_regExpButton;
- QDialog *_regExpEditDialog;
+ TQPushButton *_regExpButton;
+ TQDialog *_regExpEditDialog;
KBabel::FindOptions _findOptions;
KBabel::ReplaceOptions _replaceOptions;
- QStringList _findList;
- QStringList _replaceFindList;
- QStringList _replaceList;
+ TQStringList _findList;
+ TQStringList _replaceFindList;
+ TQStringList _replaceList;
bool _replaceDlg;
};
@@ -123,7 +123,7 @@ class KDE_EXPORT ReplaceDialog : public KDialogBase
{
Q_OBJECT
public:
- ReplaceDialog(QWidget* parent);
+ ReplaceDialog(TQWidget* parent);
~ReplaceDialog();
signals:
diff --git a/kbabel/commonui/kactionselector.cpp b/kbabel/commonui/kactionselector.cpp
index b214a49f..b699480c 100644
--- a/kbabel/commonui/kactionselector.cpp
+++ b/kbabel/commonui/kactionselector.cpp
@@ -35,37 +35,37 @@
#include <kdialog.h> // for spacingHint()
#include <kdebug.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqwhatsthis.h>
+#include <tqapplication.h>
class KActionSelectorPrivate {
public:
- QListBox *availableListBox, *selectedListBox;
- QToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
- QLabel *lAvailable, *lSelected;
+ TQListBox *availableListBox, *selectedListBox;
+ TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown;
+ TQLabel *lAvailable, *lSelected;
bool moveOnDoubleClick, keyboardEnabled;
KActionSelector::ButtonIconSize iconSize;
- QString addIcon, removeIcon, upIcon, downIcon;
+ TQString addIcon, removeIcon, upIcon, downIcon;
KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy;
bool showUpDownButtons;
};
//BEGIN Constructor/destructor
-KActionSelector::KActionSelector( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KActionSelector::KActionSelector( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
d = new KActionSelectorPrivate();
d->moveOnDoubleClick = true;
d->keyboardEnabled = true;
d->iconSize = SmallIcon;
- d->addIcon = QApplication::reverseLayout() ? "back" : "forward";
- d->removeIcon = QApplication::reverseLayout() ? "forward" : "back";
+ d->addIcon = TQApplication::reverseLayout() ? "back" : "forward";
+ d->removeIcon = TQApplication::reverseLayout() ? "forward" : "back";
d->upIcon = "up";
d->downIcon = "down";
d->availableInsertionPolicy = Sorted;
@@ -74,53 +74,53 @@ KActionSelector::KActionSelector( QWidget *parent, const char *name )
//int isz = IconSize( KIcon::Small );
- QHBoxLayout *lo = new QHBoxLayout( this );
+ TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- d->lAvailable = new QLabel( i18n("&Available:"), this );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ d->lAvailable = new TQLabel( i18n("&Available:"), this );
loAv->addWidget( d->lAvailable );
- d->availableListBox = new QListBox( this );
+ d->availableListBox = new TQListBox( this );
loAv->addWidget( d->availableListBox );
d->lAvailable->setBuddy( d->availableListBox );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- d->btnAdd = new QToolButton( this );
+ d->btnAdd = new TQToolButton( this );
loHBtns->addWidget( d->btnAdd );
- d->btnRemove = new QToolButton( this );
+ d->btnRemove = new TQToolButton( this );
loHBtns->addWidget( d->btnRemove );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- d->lSelected = new QLabel( i18n("&Selected:"), this );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ d->lSelected = new TQLabel( i18n("&Selected:"), this );
loS->addWidget( d->lSelected );
- d->selectedListBox = new QListBox( this );
+ d->selectedListBox = new TQListBox( this );
loS->addWidget( d->selectedListBox );
d->lSelected->setBuddy( d->selectedListBox );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- d->btnUp = new QToolButton( this );
+ d->btnUp = new TQToolButton( this );
loVBtns->addWidget( d->btnUp );
- d->btnDown = new QToolButton( this );
+ d->btnDown = new TQToolButton( this );
loVBtns->addWidget( d->btnDown );
loVBtns->addStretch( 1 );
loadIcons();
- connect( d->btnAdd, SIGNAL(clicked()), this, SLOT(buttonAddClicked()) );
- connect( d->btnRemove, SIGNAL(clicked()), this, SLOT(buttonRemoveClicked()) );
- connect( d->btnUp, SIGNAL(clicked()), this, SLOT(buttonUpClicked()) );
- connect( d->btnDown, SIGNAL(clicked()), this, SLOT(buttonDownClicked()) );
- connect( d->availableListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->selectedListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- this, SLOT(itemDoubleClicked(QListBoxItem*)) );
- connect( d->availableListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
- connect( d->selectedListBox, SIGNAL(currentChanged(QListBoxItem*)),
- this, SLOT(slotCurrentChanged(QListBoxItem *)) );
+ connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) );
+ connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) );
+ connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) );
+ connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) );
+ connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) );
+ connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
+ connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)),
+ this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) );
d->availableListBox->installEventFilter( this );
d->selectedListBox->installEventFilter( this );
@@ -135,17 +135,17 @@ KActionSelector::~KActionSelector()
//BEGIN Public Methods
-QListBox *KActionSelector::availableListBox()
+TQListBox *KActionSelector::availableListBox()
{
return d->availableListBox;
}
-QListBox *KActionSelector::selectedListBox()
+TQListBox *KActionSelector::selectedListBox()
{
return d->selectedListBox;
}
-void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
+void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{
int isz;
if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small );
@@ -177,7 +177,7 @@ void KActionSelector::setButtonIcon( const QString &icon, MoveButton button )
}
}
-void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton button )
+void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button )
{
switch ( button )
{
@@ -198,7 +198,7 @@ void KActionSelector::setButtonIconSet( const QIconSet &iconset, MoveButton butt
}
}
-void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
+void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button )
{
switch ( button )
{
@@ -219,21 +219,21 @@ void KActionSelector::setButtonTooltip( const QString &tip, MoveButton button )
}
}
-void KActionSelector::setButtonWhatsThis( const QString &text, MoveButton button )
+void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button )
{
switch ( button )
{
case ButtonAdd:
- QWhatsThis::add( d->btnAdd, text );
+ TQWhatsThis::add( d->btnAdd, text );
break;
case ButtonRemove:
- QWhatsThis::add( d->btnRemove, text );
+ TQWhatsThis::add( d->btnRemove, text );
break;
case ButtonUp:
- QWhatsThis::add( d->btnUp, text );
+ TQWhatsThis::add( d->btnUp, text );
break;
case ButtonDown:
- QWhatsThis::add( d->btnDown, text );
+ TQWhatsThis::add( d->btnDown, text );
break;
default:
kdDebug(KBABEL)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl;
@@ -273,22 +273,22 @@ void KActionSelector::setKeyboardEnabled( bool b )
d->keyboardEnabled = b;
}
-QString KActionSelector::availableLabel() const
+TQString KActionSelector::availableLabel() const
{
return d->lAvailable->text();
}
-void KActionSelector::setAvailableLabel( const QString &text )
+void KActionSelector::setAvailableLabel( const TQString &text )
{
d->lAvailable->setText( text );
}
-QString KActionSelector::selectedLabel() const
+TQString KActionSelector::selectedLabel() const
{
return d->lSelected->text();
}
-void KActionSelector::setSelectedLabel( const QString &text )
+void KActionSelector::setSelectedLabel( const TQString &text )
{
d->lSelected->setText( text );
}
@@ -357,7 +357,7 @@ void KActionSelector::polish()
//END Public Slots
//BEGIN Protected
-void KActionSelector::keyPressEvent( QKeyEvent *e )
+void KActionSelector::keyPressEvent( TQKeyEvent *e )
{
if ( ! d->keyboardEnabled ) return;
if ( (e->state() & Qt::ControlButton) )
@@ -383,13 +383,13 @@ void KActionSelector::keyPressEvent( QKeyEvent *e )
}
}
-bool KActionSelector::eventFilter( QObject *o, QEvent *e )
+bool KActionSelector::eventFilter( TQObject *o, TQEvent *e )
{
- if ( d->keyboardEnabled && e->type() == QEvent::KeyPress )
+ if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress )
{
- if ( (((QKeyEvent*)e)->state() & Qt::ControlButton) )
+ if ( (((TQKeyEvent*)e)->state() & Qt::ControlButton) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Right:
buttonAddClicked();
@@ -404,18 +404,18 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
buttonDownClicked();
break;
default:
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
break;
}
return true;
}
- else if ( o->inherits( "QListBox" ) )
+ else if ( o->inherits( "TQListBox" ) )
{
- switch ( ((QKeyEvent*)e)->key() )
+ switch ( ((TQKeyEvent*)e)->key() )
{
case Key_Return:
case Key_Enter:
- QListBox *lb = (QListBox*)o;
+ TQListBox *lb = (TQListBox*)o;
int index = lb->currentItem();
if ( index < 0 ) break;
moveItem( lb->item( index ) );
@@ -423,7 +423,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
//END Protected
@@ -433,7 +433,7 @@ bool KActionSelector::eventFilter( QObject *o, QEvent *e )
void KActionSelector::buttonAddClicked()
{
// move all selected items from available to selected listbox
- QListBoxItem *item = d->availableListBox->firstItem();
+ TQListBoxItem *item = d->availableListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->availableListBox->takeItem( item );
@@ -451,7 +451,7 @@ void KActionSelector::buttonAddClicked()
void KActionSelector::buttonRemoveClicked()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = d->selectedListBox->firstItem();
+ TQListBoxItem *item = d->selectedListBox->firstItem();
while ( item ) {
if ( item->isSelected() ) {
d->selectedListBox->takeItem( item );
@@ -470,7 +470,7 @@ void KActionSelector::buttonUpClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c-1 );
d->selectedListBox->setCurrentItem( item );
@@ -481,14 +481,14 @@ void KActionSelector::buttonDownClicked()
{
int c = d->selectedListBox->currentItem();
if ( c < 0 ) return;
- QListBoxItem *item = d->selectedListBox->item( c );
+ TQListBoxItem *item = d->selectedListBox->item( c );
d->selectedListBox->takeItem( item );
d->selectedListBox->insertItem( item, c+1 );
d->selectedListBox->setCurrentItem( item );
emit movedDown( item );
}
-void KActionSelector::itemDoubleClicked( QListBoxItem *item )
+void KActionSelector::itemDoubleClicked( TQListBoxItem *item )
{
if ( d->moveOnDoubleClick )
moveItem( item );
@@ -513,10 +513,10 @@ void KActionSelector::loadIcons()
d->btnDown->setIconSet( SmallIconSet( d->downIcon, isz ) );
}
-void KActionSelector::moveItem( QListBoxItem *item )
+void KActionSelector::moveItem( TQListBoxItem *item )
{
- QListBox *lbFrom = item->listBox();
- QListBox *lbTo;
+ TQListBox *lbFrom = item->listBox();
+ TQListBox *lbTo;
if ( lbFrom == d->availableListBox )
lbTo = d->selectedListBox;
else if ( lbFrom == d->selectedListBox )
@@ -540,7 +540,7 @@ void KActionSelector::moveItem( QListBoxItem *item )
emit removed( item );
}
-int KActionSelector::insertionIndex( QListBox *lb, InsertionPolicy policy )
+int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy )
{
int index;
switch ( policy )
diff --git a/kbabel/commonui/kactionselector.h b/kbabel/commonui/kactionselector.h
index 324ed54f..04139570 100644
--- a/kbabel/commonui/kactionselector.h
+++ b/kbabel/commonui/kactionselector.h
@@ -30,7 +30,7 @@
#ifndef _KACTION_SELECTOR_H_
#define _KACTION_SELECTOR_H_
-#include <qwidget.h>
+#include <tqwidget.h>
class QListBox;
class QListBoxItem;
@@ -56,13 +56,13 @@ class KActionSelectorPrivate;
see keyboardEnabled.
Note that this may conflist with keyboard selection in the selected list box,
- if you set that to anything else than QListBox::Single (which is the default).
+ if you set that to anything else than TQListBox::Single (which is the default).
To use it, simply construct an instance and then add items to the two listboxes,
available through lbAvailable() and lbSelected(). Whenever you want, you can retrieve
- the selected options using QListBox methods on lbSelected().
+ the selected options using TQListBox methods on lbSelected().
- This way, you can use your own QListBoxItem class, allowing you to easily
+ This way, you can use your own TQListBoxItem class, allowing you to easily
store object data in those.
When an item is moved to a listbox, it is placed below the current item
@@ -84,31 +84,31 @@ class KActionSelectorPrivate;
@author Anders Lund <anders@alweb.dk>
*/
-class KActionSelector : public QWidget {
+class KActionSelector : public TQWidget {
Q_OBJECT
Q_ENUMS( ButtonIconSize InsertionPolicy )
Q_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
Q_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
- Q_PROPERTY( QString availableLabel READ availableLabel WRITE setAvailableLabel )
- Q_PROPERTY( QString selectedLabel READ selectedLabel WRITE setSelectedLabel )
+ Q_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
+ Q_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
Q_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
Q_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
Q_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
Q_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
public:
- KActionSelector( QWidget *parent=0, const char *name=0 );
+ KActionSelector( TQWidget *parent=0, const char *name=0 );
~KActionSelector();
/**
- @return The QListBox holding the available actions
+ @return The TQListBox holding the available actions
*/
- QListBox *availableListBox();
+ TQListBox *availableListBox();
/**
- @return The QListBox holding the selected actions
+ @return The TQListBox holding the selected actions
*/
- QListBox *selectedListBox();
+ TQListBox *selectedListBox();
/**
This enum indentifies the moving buttons
@@ -201,7 +201,7 @@ public:
/**
@return The text of the label for the available items listbox.
*/
- QString availableLabel() const;
+ TQString availableLabel() const;
/**
Sets the label for the available items listbox to @p text.
@@ -209,12 +209,12 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setAvailableLabel( const QString & text );
+ void setAvailableLabel( const TQString & text );
/**
@return the label of the selected items listbox.
*/
- QString selectedLabel() const;
+ TQString selectedLabel() const;
/**
Sets the label for the selected items listbox to @p text.
@@ -222,7 +222,7 @@ public:
if you have a single ampersand in the text, the following character
will become the accellerator to focus te listbox.
*/
- void setSelectedLabel( const QString & text );
+ void setSelectedLabel( const TQString & text );
/**
@return the current ButtonIconSize.
@@ -276,25 +276,25 @@ public:
Sets the pixmap of the button @p button to @p icon.
It calls @ref SmallIconSet(pm) to generate the icon set.
*/
- void setButtonIcon( const QString &icon, MoveButton button );
+ void setButtonIcon( const TQString &icon, MoveButton button );
/**
Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either
- created by @ref QIconSet, or use the application instance of
+ created by @ref TQIconSet, or use the application instance of
@ref KIconLoader (recommended).
*/
- void setButtonIconSet( const QIconSet &iconset, MoveButton button );
+ void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
/**
Sets the tooltip for the button @p button to @p tip.
*/
- void setButtonTooltip( const QString &tip, MoveButton button );
+ void setButtonTooltip( const TQString &tip, MoveButton button );
/**
Sets the whatsthis help for button @p button to @p text.
*/
- void setButtonWhatsThis( const QString &text, MoveButton button );
+ void setButtonWhatsThis( const TQString &text, MoveButton button );
/**
Sets the enabled state of all moving buttons to reflect the current
@@ -309,27 +309,27 @@ signals:
/**
Emitted when an item is moved to the "selected" listbox.
*/
- void added( QListBoxItem *item );
+ void added( TQListBoxItem *item );
/**
Emitted when an item is moved out of the "selected" listbox.
*/
- void removed( QListBoxItem *item );
+ void removed( TQListBoxItem *item );
/**
Emitted when an item is moved upwards in the "selected" listbox.
*/
- void movedUp( QListBoxItem *item );
+ void movedUp( TQListBoxItem *item );
/**
Emitted when an item is moved downwards in the "selected" listbox.
*/
- void movedDown( QListBoxItem *item );
+ void movedDown( TQListBoxItem *item );
/**
Emitted when an item is moved to the "selected" listbox.
*/
-// void addedToSelection( QListBoxItem *item );
+// void addedToSelection( TQListBoxItem *item );
public slots:
/**
@@ -342,12 +342,12 @@ protected:
/**
Reimplamented for internal reasons.
*/
- void keyPressEvent( QKeyEvent * );
+ void keyPressEvent( TQKeyEvent * );
/**
Reimplemented for internal reasons.
*/
- bool eventFilter( QObject *, QEvent * );
+ bool eventFilter( TQObject *, TQEvent * );
private slots:
/**
@@ -373,19 +373,19 @@ private slots:
/**
Moves the item @p item to the other listbox if moveOnDoubleClick is enabled.
*/
- void itemDoubleClicked( QListBoxItem *item );
+ void itemDoubleClicked( TQListBoxItem *item );
/**
connected to both list boxes to set the buttons enabled
*/
- void slotCurrentChanged( QListBoxItem * ) { setButtonsEnabled(); };
+ void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); };
private:
/**
Move item @p item to the other listbox
*/
- void moveItem( QListBoxItem *item );
+ void moveItem( TQListBoxItem *item );
/**
loads the icons for the move buttons.
@@ -399,7 +399,7 @@ private:
Note that if policy is Sorted, this will return -1.
Sort the listbox after inserting the item in that case.
*/
- int insertionIndex( QListBox *lb, InsertionPolicy policy );
+ int insertionIndex( TQListBox *lb, InsertionPolicy policy );
/** @private
Private data storage
diff --git a/kbabel/commonui/klisteditor.ui.h b/kbabel/commonui/klisteditor.ui.h
index bc916e56..3d0e17df 100644
--- a/kbabel/commonui/klisteditor.ui.h
+++ b/kbabel/commonui/klisteditor.ui.h
@@ -50,7 +50,7 @@ void KListEditor::downInList()
{
int i=_list->currentItem();
if( i< (int)_list->count()-1 ) {
- QString ci = _list->currentText();
+ TQString ci = _list->currentText();
_list->removeItem(i);
_list->insertItem(ci,i+1);
_list->setCurrentItem(i+1);
@@ -70,7 +70,7 @@ void KListEditor::upInList()
{
int i=_list->currentItem();
if( i>0 ) {
- QString ci = _list->currentText();
+ TQString ci = _list->currentText();
_list->removeItem(i);
_list->insertItem(ci,i-1);
_list->setCurrentItem(i-1);
@@ -92,7 +92,7 @@ void KListEditor::updateList()
else _list->changeItem(_edit->text(), i );
}
-void KListEditor::setList( QStringList contents )
+void KListEditor::setList( TQStringList contents )
{
_list->clear();
_list->insertStringList(contents);
@@ -101,21 +101,21 @@ void KListEditor::setList( QStringList contents )
}
-void KListEditor::editChanged( const QString &s )
+void KListEditor::editChanged( const TQString &s )
{
_addButton->setEnabled(!s.isEmpty());
}
-void KListEditor::setTitle( const QString &s )
+void KListEditor::setTitle( const TQString &s )
{
_frame->setTitle(s);
}
-QStringList KListEditor::list()
+TQStringList KListEditor::list()
{
- QStringList result;
+ TQStringList result;
for( uint i=0; i<_list->count() ; i++ )
result.append(_list->text(i));
return result;
diff --git a/kbabel/commonui/projectpref.cpp b/kbabel/commonui/projectpref.cpp
index 1bffa2e6..16e6c114 100644
--- a/kbabel/commonui/projectpref.cpp
+++ b/kbabel/commonui/projectpref.cpp
@@ -37,9 +37,9 @@
#include "diffpreferences.h"
#include "kbprojectsettings.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -82,15 +82,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project)
addPage(_spellPage, i18n("title of page in preferences dialog","Spelling")
, "spellcheck"
, i18n("Options for Spell Checking"));
- connect( _spellPage, SIGNAL( settingsChanged() )
- , this, SLOT(updateButtons()) );
+ connect( _spellPage, TQT_SIGNAL( settingsChanged() )
+ , this, TQT_SLOT(updateButtons()) );
_sourcePage = new SourceContextPreferences(0);
addPage(_sourcePage, i18n("title of page in preferences dialog","Source")
, "source"
,i18n("Options for Showing Source Context"));
- connect(_sourcePage, SIGNAL (itemsChanged())
- , this, SLOT (updateButtons()) );
+ connect(_sourcePage, TQT_SIGNAL (itemsChanged())
+ , this, TQT_SLOT (updateButtons()) );
_miscPage = new MiscPreferences(0);
addPage(_miscPage, i18n("title of page in preferences dialog","Miscellaneous")
@@ -106,15 +106,15 @@ ProjectDialog::ProjectDialog(Project::Ptr project)
addPage(_dirCommandsPage, i18n("title of page in preferences dialog","Folder Commands")
, "folder"
, i18n("User-Defined Commands for Folder Items"));
- connect( _dirCommandsPage, SIGNAL( settingsChanged() ),
- this, SLOT(updateButtons()) );
+ connect( _dirCommandsPage, TQT_SIGNAL( settingsChanged() ),
+ this, TQT_SLOT(updateButtons()) );
_fileCommandsPage = new FileCommandsPreferences(0);
addPage(_fileCommandsPage, i18n("title of page in preferences dialog","File Commands")
, "files"
, i18n("User-Defined Commands for File Items"));
- connect( _fileCommandsPage, SIGNAL( settingsChanged() ),
- this, SLOT(updateButtons()) );
+ connect( _fileCommandsPage, TQT_SIGNAL( settingsChanged() ),
+ this, TQT_SLOT(updateButtons()) );
_viewPage = new ViewPreferences(0);
addPage(_viewPage, i18n("title of page in preferences dialog","Catalog Manager")
diff --git a/kbabel/commonui/projectpref.h b/kbabel/commonui/projectpref.h
index 90561c5b..ce4e7f86 100644
--- a/kbabel/commonui/projectpref.h
+++ b/kbabel/commonui/projectpref.h
@@ -36,7 +36,7 @@
#define PROJECTPREF_H
#include <kconfigdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class SavePreferences;
class IdentityPreferences;
diff --git a/kbabel/commonui/projectprefwidgets.cpp b/kbabel/commonui/projectprefwidgets.cpp
index 16bc2da4..0357065e 100644
--- a/kbabel/commonui/projectprefwidgets.cpp
+++ b/kbabel/commonui/projectprefwidgets.cpp
@@ -58,25 +58,25 @@
#include <kurldrag.h>
#include <kurlrequester.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbuttongroup.h>
-#include <qvbuttongroup.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtextcodec.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbuttongroup.h>
+#include <tqvbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtextcodec.h>
+#include <tqwhatsthis.h>
using namespace KBabel;
-static QSize sizeHintForWidget(const QWidget* widget)
+static TQSize sizeHintForWidget(const TQWidget* widget)
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -84,23 +84,23 @@ static QSize sizeHintForWidget(const QWidget* widget)
// layout()->margin() and layout()->spacing()
//
- QSize size;
+ TQSize size;
int numChild = 0;
- QObjectList *l = (QObjectList*)(widget->children());
+ TQObjectList *l = (TQObjectList*)(widget->children());
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
numChild += 1;
- QWidget *w=((QWidget*)o);
+ TQWidget *w=((TQWidget*)o);
- QSize s = w->sizeHint();
+ TQSize s = w->sizeHint();
if( s.isEmpty() == true )
{
- s = QSize( 50, 100 ); // Default size
+ s = TQSize( 50, 100 ); // Default size
}
size.setHeight( size.height() + s.height() );
if( s.width() > size.width() ) { size.setWidth( s.width() ); }
@@ -110,11 +110,11 @@ static QSize sizeHintForWidget(const QWidget* widget)
if( numChild > 0 )
{
size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) );
- size += QSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
+ size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
}
else
{
- size = QSize( 1, 1 );
+ size = TQSize( 1, 1 );
}
return( size );
@@ -123,44 +123,44 @@ static QSize sizeHintForWidget(const QWidget* widget)
-SavePreferences::SavePreferences(QWidget *parent)
+SavePreferences::SavePreferences(TQWidget *parent)
: KTabCtl(parent)
{
- QWidget* page = new QWidget(this);
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = new TQWidget(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
layout->addWidget(box);
box->setMargin(KDialog::marginHint());
- _updateButton = new QCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate");
- _descriptionButton = new QCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription");
- _autoCheckButton = new QCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck");
- _saveObsoleteButton = new QCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete");
+ _updateButton = new TQCheckBox(i18n("&Update header when saving"),box, "kcfg_AutoUpdate");
+ _descriptionButton = new TQCheckBox(i18n("Update &description comment when saving"),box, "kcfg_UpdateDescription");
+ _autoCheckButton = new TQCheckBox(i18n("Chec&k syntax of file when saving"),box, "kcfg_AutoSyntaxCheck");
+ _saveObsoleteButton = new TQCheckBox(i18n("Save &obsolete entries"),box, "kcfg_SaveObsolete");
- QGroupBox* descBox=new QGroupBox(1,Qt::Horizontal,i18n("De&scription"),page);
+ TQGroupBox* descBox=new TQGroupBox(1,Qt::Horizontal,i18n("De&scription"),page);
layout->addWidget(descBox);
descBox->setMargin(KDialog::marginHint());
- _descriptionEdit = new QLineEdit(descBox, "kcfg_DescriptionString");
+ _descriptionEdit = new TQLineEdit(descBox, "kcfg_DescriptionString");
- QGroupBox* encodingBox = new QGroupBox(1,Qt::Horizontal,i18n("Encoding")
+ TQGroupBox* encodingBox = new TQGroupBox(1,Qt::Horizontal,i18n("Encoding")
,page);
encodingBox->setMargin(KDialog::marginHint());
layout->addWidget(encodingBox);
- QHBox *b = new QHBox(encodingBox);
+ TQHBox *b = new TQHBox(encodingBox);
- QLabel* tempLabel=new QLabel(i18n("Default:"),b);
- _encodingBox = new QComboBox(b, "kcfg_Encoding");
+ TQLabel* tempLabel=new TQLabel(i18n("Default:"),b);
+ _encodingBox = new TQComboBox(b, "kcfg_Encoding");
b->setStretchFactor(_encodingBox,2);
b->setSpacing(KDialog::spacingHint());
- QString defaultName=charsetString(ProjectSettingsBase::Locale);
+ TQString defaultName=charsetString(ProjectSettingsBase::Locale);
defaultName+=" "+i18n("(default)");
- QString utf8Name=charsetString(ProjectSettingsBase::UTF8);
- QString utf16Name=charsetString(ProjectSettingsBase::UTF16);
+ TQString utf8Name=charsetString(ProjectSettingsBase::UTF8);
+ TQString utf16Name=charsetString(ProjectSettingsBase::UTF16);
_encodingBox->insertItem(defaultName,(int)ProjectSettingsBase::Locale);
_encodingBox->insertItem(utf8Name,(int)ProjectSettingsBase::UTF8);
@@ -172,10 +172,10 @@ SavePreferences::SavePreferences(QWidget *parent)
tempLabel->setBuddy(_encodingBox);
- _oldEncodingButton = new QCheckBox(i18n("Kee&p the encoding of the file")
+ _oldEncodingButton = new TQCheckBox(i18n("Kee&p the encoding of the file")
,encodingBox, "kcfg_UseOldEncoding");
- _autoSaveBox = new QGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page );
+ _autoSaveBox = new TQGroupBox( 1, Qt::Horizontal, i18n( "Automatic Saving" ), page );
_autoSaveBox->setMargin( KDialog::marginHint( ) );
layout->addWidget( _autoSaveBox );
_autoSaveDelay = new KIntNumInput( _autoSaveBox, "kcfg_AutoSaveDelay" );
@@ -187,49 +187,49 @@ SavePreferences::SavePreferences(QWidget *parent)
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("&General"));
- page = new QWidget(this);
- layout=new QVBoxLayout(page);
+ page = new TQWidget(this);
+ layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* gridBox = new QGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page);
+ TQGroupBox* gridBox = new TQGroupBox(2,Qt::Horizontal,i18n("Fields to Update"),page);
layout->addWidget(gridBox);
gridBox->setMargin(KDialog::marginHint());
- _revisionButton = new QCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate");
- _lastButton = new QCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator");
- _languageButton = new QCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam");
- _charsetButton = new QCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset");
- _encodingButton = new QCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding");
- _projectButton = new QCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject");
+ _revisionButton = new TQCheckBox(i18n("Re&vision-Date"),gridBox, "kcfg_UpdateRevisionDate");
+ _lastButton = new TQCheckBox(i18n("Last-&Translator"),gridBox, "kcfg_UpdateLastTranslator");
+ _languageButton = new TQCheckBox(i18n("&Language"),gridBox, "kcfg_UpdateLanguageTeam");
+ _charsetButton = new TQCheckBox(i18n("Char&set"),gridBox, "kcfg_UpdateCharset");
+ _encodingButton = new TQCheckBox(i18n("&Encoding"),gridBox, "kcfg_UpdateEncoding");
+ _projectButton = new TQCheckBox(i18n("Pro&ject"),gridBox, "kcfg_UpdateProject");
- QButtonGroup* dateBox = new QButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat");
+ TQButtonGroup* dateBox = new TQButtonGroup(2,Qt::Horizontal,i18n("Format of Revision-Date"),page, "kcfg_DateFormat");
layout->addWidget(dateBox);
box->setMargin(KDialog::marginHint());
// we remove/insert default date button to correctly map Qt::DateFormat to our Ids
- _defaultDateButton = new QRadioButton( i18n("De&fault date format"),dateBox );
+ _defaultDateButton = new TQRadioButton( i18n("De&fault date format"),dateBox );
dateBox->remove (_defaultDateButton);
- _localDateButton = new QRadioButton( i18n("Local date fo&rmat"),dateBox );
+ _localDateButton = new TQRadioButton( i18n("Local date fo&rmat"),dateBox );
dateBox->remove (_localDateButton);
- _customDateButton = new QRadioButton( i18n("Custo&m date format:"),dateBox );
+ _customDateButton = new TQRadioButton( i18n("Custo&m date format:"),dateBox );
dateBox->insert (_defaultDateButton);
dateBox->insert (_localDateButton);
- _dateFormatEdit = new QLineEdit(dateBox, "kcfg_CustomDateFormat");
+ _dateFormatEdit = new TQLineEdit(dateBox, "kcfg_CustomDateFormat");
_dateFormatEdit->setEnabled(false);
- connect( _customDateButton, SIGNAL(toggled(bool)), this, SLOT( customDateActivated(bool) ) );
+ connect( _customDateButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( customDateActivated(bool) ) );
- QGroupBox* projectBox = new QGroupBox(1,Qt::Horizontal,i18n("Project String")
+ TQGroupBox* projectBox = new TQGroupBox(1,Qt::Horizontal,i18n("Project String")
,page);
projectBox->setMargin(KDialog::marginHint());
layout->addWidget(projectBox);
- b = new QHBox(projectBox);
+ b = new TQHBox(projectBox);
- tempLabel=new QLabel(i18n("Project-Id:"),b);
- _projectEdit = new QLineEdit(b, "kcfg_ProjectString");
+ tempLabel=new TQLabel(i18n("Project-Id:"),b);
+ _projectEdit = new TQLineEdit(b, "kcfg_ProjectString");
b->setStretchFactor(_projectEdit,2);
b->setSpacing(KDialog::spacingHint());
tempLabel->setBuddy(_projectEdit);
@@ -238,31 +238,31 @@ SavePreferences::SavePreferences(QWidget *parent)
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("&Header"));
- page = new QWidget(this);
- layout=new QVBoxLayout(page);
+ page = new TQWidget(this);
+ layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* translatorCopyrightBox = new QGroupBox(1,Qt::Horizontal, page);
+ TQGroupBox* translatorCopyrightBox = new TQGroupBox(1,Qt::Horizontal, page);
translatorCopyrightBox->setMargin(KDialog::marginHint());
_translatorCopyrightButton =
- new QCheckBox(i18n("Update &translator copyright")
+ new TQCheckBox(i18n("Update &translator copyright")
,translatorCopyrightBox, "kcfg_UpdateTranslatorCopyright");
layout->addWidget(translatorCopyrightBox);
- QGroupBox* fsfBox=new QButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright");
+ TQGroupBox* fsfBox=new TQButtonGroup(1,Qt::Horizontal,i18n("Free Software Foundation Copyright"),page, "kcfg_FSFCopyright");
layout->addWidget(fsfBox);
fsfBox->setMargin(KDialog::marginHint());
- _removeFSFButton = new QRadioButton(i18n("&Remove copyright if empty"),fsfBox);
- _updateFSFButton = new QRadioButton(i18n("&Update copyright"),fsfBox);
- _nochangeFSFButton = new QRadioButton(i18n("Do &not change"),fsfBox);
+ _removeFSFButton = new TQRadioButton(i18n("&Remove copyright if empty"),fsfBox);
+ _updateFSFButton = new TQRadioButton(i18n("&Update copyright"),fsfBox);
+ _nochangeFSFButton = new TQRadioButton(i18n("Do &not change"),fsfBox);
layout->addStretch(1);
page->setMinimumSize(sizeHintForWidget(page));
addTab(page, i18n("Cop&yright"));
- QWhatsThis::add(_updateButton,
+ TQWhatsThis::add(_updateButton,
i18n("<qt><p><b>Update Header</b></p>\n"
"<p>Check this button to update the header "
"information of the file "
@@ -275,7 +275,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"If you want to add additional fields to the header, you can edit the header manually by choosing\n"
"<b>Edit->Edit Header</b> in the editor window.</p></qt>"));
- QWhatsThis::add(gridBox,i18n("<qt><p><b>Fields to update</b></p>\n"
+ TQWhatsThis::add(gridBox,i18n("<qt><p><b>Fields to update</b></p>\n"
"<p>Choose which fields in the header you want to have updated when saving.\n"
"If a field does not exist, it is appended to the header.</p>\n"
"<p>If you want to add other information to the header, you have to edit the header manually\n"
@@ -283,7 +283,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"<p>Deactivate <b>Update Header</b> above if you do not want to have the header\n"
"updated when saving.</p></qt>"));
- QWhatsThis::add(encodingBox,i18n("<qt><p><b>Encoding</b></p>"
+ TQWhatsThis::add(encodingBox,i18n("<qt><p><b>Encoding</b></p>"
"<p>Choose how to encode characters when saving to a file. If you are unsure "
"what encoding to use, please ask your translation coordinator.</p>"
"<ul><li><b>%1</b>: this is the encoding that fits the character "
@@ -292,18 +292,18 @@ SavePreferences::SavePreferences(QWidget *parent)
"</ul></qt>").arg(defaultName).arg(utf8Name) );
- QWhatsThis::add(_oldEncodingButton
+ TQWhatsThis::add(_oldEncodingButton
,i18n("<qt><p><b>Keep the encoding of the file</b></p>"
"<p>If this option is activated, files are always saved in the "
"same encoding as they were read in. Files without charset "
"information in the header (e.g. POT files) are saved in the "
"encoding set above.</p></qt>"));
- QWhatsThis::add(_autoCheckButton,i18n("<qt><p><b>Check syntax of file when saving</b></p>\n"
+ TQWhatsThis::add(_autoCheckButton,i18n("<qt><p><b>Check syntax of file when saving</b></p>\n"
"<p>Check this to automatically check syntax of file with \"msgfmt --statistics\"\n"
"when saving a file. You will only get a message, if an error occurred.</p></qt>"));
- QWhatsThis::add(_saveObsoleteButton,i18n("<qt><p><b>Save obsolete entries</b></p>\n"
+ TQWhatsThis::add(_saveObsoleteButton,i18n("<qt><p><b>Save obsolete entries</b></p>\n"
"<p>If this option is activated, obsolete entries found when the file was open\n"
"will be saved back to the file. Obsolete entries are marked by #~ and are\n"
"created when the msgmerge does not need the translation anymore.\n"
@@ -311,7 +311,7 @@ SavePreferences::SavePreferences(QWidget *parent)
"The main drawback is the size of the saved file.</p></qt>"));
- QWhatsThis::add(dateBox, i18n("<qt><p><b>Format of Revision-Date</b></p>"
+ TQWhatsThis::add(dateBox, i18n("<qt><p><b>Format of Revision-Date</b></p>"
"<p>Choose in which format the date and time of the header field\n"
"<i>PO-Revision-Date</i> is saved: <ul>\n"
"<li><b>Default</b> is the format normally used in PO files.</li>\n"
@@ -398,92 +398,92 @@ void SavePreferences::setAutoSaveVisible( const bool on )
-IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project)
- : QWidget(parent)
+IdentityPreferences::IdentityPreferences(TQWidget* parent, const TQString& project)
+ : TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
if( !project.isEmpty() )
{
// show the project name in the widget at the top
- layout->addWidget(new QLabel(i18n("<font size=\"+1\">Project: %1</font>").arg(project),page));
+ layout->addWidget(new TQLabel(i18n("<font size=\"+1\">Project: %1</font>").arg(project),page));
}
- QGroupBox* group = new QGroupBox(2,Qt::Horizontal,page);
+ TQGroupBox* group = new TQGroupBox(2,Qt::Horizontal,page);
layout->addWidget(group);
group->setMargin(KDialog::marginHint());
- QLabel* tempLabel=new QLabel(i18n("&Name:"),group);
- _nameEdit = new QLineEdit(group, "kcfg_AuthorName");
+ TQLabel* tempLabel=new TQLabel(i18n("&Name:"),group);
+ _nameEdit = new TQLineEdit(group, "kcfg_AuthorName");
tempLabel->setBuddy(_nameEdit);
- tempLabel=new QLabel(i18n("Localized na&me:"),group);
- _localNameEdit = new QLineEdit(group, "kcfg_LocalAuthorName");
+ tempLabel=new TQLabel(i18n("Localized na&me:"),group);
+ _localNameEdit = new TQLineEdit(group, "kcfg_LocalAuthorName");
tempLabel->setBuddy(_localNameEdit);
- tempLabel=new QLabel(i18n("E&mail:"),group);
- _mailEdit = new QLineEdit(group, "kcfg_AuthorEmail");
+ tempLabel=new TQLabel(i18n("E&mail:"),group);
+ _mailEdit = new TQLineEdit(group, "kcfg_AuthorEmail");
tempLabel->setBuddy(_mailEdit);
- tempLabel=new QLabel(i18n("&Full language name:"),group);
+ tempLabel=new TQLabel(i18n("&Full language name:"),group);
- QHBox *hbox = new QHBox(group);
+ TQHBox *hbox = new TQHBox(group);
hbox->setSpacing(KDialog::spacingHint());
- _langEdit = new QLineEdit(hbox, "kcfg_Language");
+ _langEdit = new TQLineEdit(hbox, "kcfg_Language");
tempLabel->setBuddy(_langEdit);
- tempLabel=new QLabel(i18n("Lan&guage code:"),hbox);
- _langCodeEdit = new QLineEdit(hbox, "kcfg_LanguageCode");
+ tempLabel=new TQLabel(i18n("Lan&guage code:"),hbox);
+ _langCodeEdit = new TQLineEdit(hbox, "kcfg_LanguageCode");
tempLabel->setBuddy(_langCodeEdit);
- connect(_langCodeEdit,SIGNAL(textChanged(const QString&)), this
- , SLOT(checkTestPluralButton()));
+ connect(_langCodeEdit,TQT_SIGNAL(textChanged(const TQString&)), this
+ , TQT_SLOT(checkTestPluralButton()));
- tempLabel=new QLabel(i18n("&Language mailing list:"),group);
- _listEdit = new QLineEdit(group, "kcfg_Mailinglist");
+ tempLabel=new TQLabel(i18n("&Language mailing list:"),group);
+ _listEdit = new TQLineEdit(group, "kcfg_Mailinglist");
_listEdit->setMinimumSize(100,_listEdit->sizeHint().height());
tempLabel->setBuddy(_listEdit);
- tempLabel=new QLabel(i18n("&Timezone:"), group);
- _timezoneEdit = new QLineEdit(group, "kcfg_Timezone");
+ tempLabel=new TQLabel(i18n("&Timezone:"), group);
+ _timezoneEdit = new TQLineEdit(group, "kcfg_Timezone");
_timezoneEdit->setMinimumSize(100,_timezoneEdit->sizeHint().height());
tempLabel->setBuddy(_timezoneEdit);
- QString whatsThisMsg=i18n("<qt><p><b>Identity</b></p>\n"
+ TQString whatsThisMsg=i18n("<qt><p><b>Identity</b></p>\n"
"<p>Fill in information about you and your translation team.\n"
"This information is used when updating the header of a file.</p>\n"
"<p>You can find the options if and what fields in the header should be updated\n"
"on page <b>Save</b> in this dialog.</p></qt>");
- QWhatsThis::add(group,whatsThisMsg);
+ TQWhatsThis::add(group,whatsThisMsg);
- group = new QGroupBox(1,Qt::Horizontal,page);
+ group = new TQGroupBox(1,Qt::Horizontal,page);
layout->addWidget(group);
group->setMargin(KDialog::marginHint());
- hbox = new QHBox(group);
+ hbox = new TQHBox(group);
hbox->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("&Number of singular/plural forms:"), hbox);
- _pluralFormsBox = new QSpinBox(0,100,1,hbox, "kcfg_PluralForms");
+ TQLabel *label = new TQLabel(i18n("&Number of singular/plural forms:"), hbox);
+ _pluralFormsBox = new TQSpinBox(0,100,1,hbox, "kcfg_PluralForms");
_pluralFormsBox->setSpecialValueText(
i18n("automatic choose number of plural forms","Automatic"));
label->setBuddy(_pluralFormsBox);
- connect(_pluralFormsBox,SIGNAL(valueChanged(int)), this
- , SLOT(checkTestPluralButton()));
+ connect(_pluralFormsBox,TQT_SIGNAL(valueChanged(int)), this
+ , TQT_SLOT(checkTestPluralButton()));
hbox->setStretchFactor(_pluralFormsBox,1);
- _testPluralButton = new QPushButton(i18n("Te&st"),hbox);
+ _testPluralButton = new TQPushButton(i18n("Te&st"),hbox);
_testPluralButton->setEnabled(false);
- connect(_testPluralButton, SIGNAL(clicked()), this
- , SLOT(testPluralForm()));
+ connect(_testPluralButton, TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(testPluralForm()));
- const QString msg=i18n("<qt><p><b>Number of singular/plural forms</b></p>"
+ const TQString msg=i18n("<qt><p><b>Number of singular/plural forms</b></p>"
"<p><b>Note</b>: This option is KDE specific. "
"If you are not translating a KDE application, you can safely "
"ignore this option.</p>"
@@ -495,29 +495,29 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project
"<i>Automatic</i> and KBabel will try to get this information "
"automatically from KDE. Use the <i>Test</i> button "
"to test if it can find it out.</p></qt>");
- QWhatsThis::add(_pluralFormsBox,msg);
- QWhatsThis::add(_testPluralButton,msg);
+ TQWhatsThis::add(_pluralFormsBox,msg);
+ TQWhatsThis::add(_testPluralButton,msg);
- QVBox* vbox = new QVBox(group);
+ TQVBox* vbox = new TQVBox(group);
vbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&GNU plural form header:"), vbox);
+ label = new TQLabel(i18n("&GNU plural form header:"), vbox);
- hbox = new QHBox(vbox);
+ hbox = new TQHBox(vbox);
hbox->setSpacing(KDialog::spacingHint());
- _gnuPluralFormHeaderEdit = new QLineEdit(hbox, "kcfg_PluralFormsHeader");
+ _gnuPluralFormHeaderEdit = new TQLineEdit(hbox, "kcfg_PluralFormsHeader");
label->setBuddy(_gnuPluralFormHeaderEdit);
hbox->setStretchFactor(_gnuPluralFormHeaderEdit,1);
- _testGnuPluralFormButton = new QPushButton(i18n("&Lookup"),hbox);
- connect(_testGnuPluralFormButton, SIGNAL(clicked()), this
- , SLOT(lookupGnuPluralFormHeader()));
+ _testGnuPluralFormButton = new TQPushButton(i18n("&Lookup"),hbox);
+ connect(_testGnuPluralFormButton, TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(lookupGnuPluralFormHeader()));
- _checkPluralArgumentBox = new QCheckBox( i18n("Re&quire plural form arguments in translation")
+ _checkPluralArgumentBox = new TQCheckBox( i18n("Re&quire plural form arguments in translation")
, group, "kcfg_CheckPluralArgument" );
- QWhatsThis::add(_checkPluralArgumentBox,
+ TQWhatsThis::add(_checkPluralArgumentBox,
i18n("<qt><p><b>Require plural form arguments in translation</b></p>\n"
"<p><b>Note</b>: This option is KDE specific at the moment. "
"If you are not translating a KDE application, you can safely "
@@ -525,7 +525,7 @@ IdentityPreferences::IdentityPreferences(QWidget* parent, const QString& project
"<p>If is this option enabled, the validation check will "
"require the %n argument to be present in the message.</p></qt>"));
- QWhatsThis::add(_gnuPluralFormHeaderEdit,
+ TQWhatsThis::add(_gnuPluralFormHeaderEdit,
i18n("<qt><p><b>GNU plural form header</b></p>\n"
"<p>Here you can fill a header entry for GNU plural form handling; "
"if you leave the entry empty, the entry in the PO file will not be "
@@ -557,18 +557,18 @@ void IdentityPreferences::defaults(const IdentitySettings& settings)
_checkPluralArgumentBox->setChecked(settings.checkPluralArgument);
}
-bool IdentityPreferences::eventFilter(QObject *o, QEvent *e)
+bool IdentityPreferences::eventFilter(TQObject *o, TQEvent *e)
{
- if(e->type() == QEvent::Drop)
+ if(e->type() == TQEvent::Drop)
{
- QDropEvent *de = static_cast<QDropEvent*>(e);
+ TQDropEvent *de = static_cast<TQDropEvent*>(e);
KURL::List urlList;
if(de && KURLDrag::decode(de,urlList))
{
KURL url(urlList.first());
if(url.protocol()== "mailto")
{
- QString mail=url.path();
+ TQString mail=url.path();
bool handled=false;
if(o == _mailEdit)
@@ -594,14 +594,14 @@ bool IdentityPreferences::eventFilter(QObject *o, QEvent *e)
void IdentityPreferences::checkTestPluralButton()
{
int val = _pluralFormsBox->value();
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
_testPluralButton->setEnabled(val==0 && !lang.isEmpty());
}
void IdentityPreferences::testPluralForm()
{
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
if(lang.isEmpty())
{
@@ -611,7 +611,7 @@ void IdentityPreferences::testPluralForm()
int number=Catalog::getNumberOfPluralForms(lang);
- QString msg;
+ TQString msg;
if(number < 0)
{
@@ -635,7 +635,7 @@ void IdentityPreferences::testPluralForm()
void IdentityPreferences::lookupGnuPluralFormHeader()
{
- QString lang=_langCodeEdit->text();
+ TQString lang=_langCodeEdit->text();
if(lang.isEmpty())
{
@@ -643,7 +643,7 @@ void IdentityPreferences::lookupGnuPluralFormHeader()
return;
}
- QString header=GNUPluralForms(lang);
+ TQString header=GNUPluralForms(lang);
if( header.isEmpty() )
{
@@ -658,39 +658,39 @@ void IdentityPreferences::lookupGnuPluralFormHeader()
}
-MiscPreferences::MiscPreferences(QWidget *parent)
- : QWidget(parent), _regExpEditDialog(0)
+MiscPreferences::MiscPreferences(TQWidget *parent)
+ : TQWidget(parent), _regExpEditDialog(0)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- QHBox *hbox = new QHBox(box);
+ TQHBox *hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("&Marker for keyboard accelerator:"),hbox);
+ TQLabel *label = new TQLabel(i18n("&Marker for keyboard accelerator:"),hbox);
accelMarkerEdit = new KLineEdit(hbox, "kcfg_AccelMarker");
accelMarkerEdit->setMaxLength(1);
label->setBuddy(accelMarkerEdit);
hbox->setStretchFactor(accelMarkerEdit,1);
- QString msg=i18n("<qt><p><b>Marker for keyboard accelerator</b></p>"
+ TQString msg=i18n("<qt><p><b>Marker for keyboard accelerator</b></p>"
"<p>Define here, what character marks the following "
"character as keyboard accelerator. For example in Qt it is "
"'&amp;' and in Gtk it is '_'.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(accelMarkerEdit,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(accelMarkerEdit,msg);
- hbox = new QHBox(box);
+ hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
- label = new QLabel(i18n("&Regular expression for context information:")
+ label = new TQLabel(i18n("&Regular expression for context information:")
,hbox);
contextInfoEdit = new KLineEdit(hbox, "kcfg_ContextInfo");
label->setBuddy(contextInfoEdit);
@@ -700,27 +700,27 @@ MiscPreferences::MiscPreferences(QWidget *parent)
"<p>Enter a regular expression here which defines what is "
"context information in the message and must not get "
"translated.</p></qt>");
- QWhatsThis::add(label,msg);
- QWhatsThis::add(contextInfoEdit,msg);
+ TQWhatsThis::add(label,msg);
+ TQWhatsThis::add(contextInfoEdit,msg);
if( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
- _regExpButton = new QPushButton( i18n("&Edit..."), hbox );
- connect( _regExpButton, SIGNAL( clicked() ), this, SLOT( regExpButtonClicked()));
+ _regExpButton = new TQPushButton( i18n("&Edit..."), hbox );
+ connect( _regExpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( regExpButtonClicked()));
}
// preferences for mail attachments
- QVButtonGroup* vbgroup = new QVButtonGroup(page);
+ TQVButtonGroup* vbgroup = new TQVButtonGroup(page);
vbgroup->setTitle(i18n("Compression Method for Mail Attachments"));
vbgroup->setRadioButtonExclusive(true);
vbgroup->setMargin(KDialog::marginHint());
layout->addWidget(vbgroup);
- bzipButton = new QRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression");
- gzipButton = new QRadioButton(i18n("tar/&gzip"), vbgroup);
+ bzipButton = new TQRadioButton(i18n("tar/&bzip2"), vbgroup, "kcfg_BZipCompression");
+ gzipButton = new TQRadioButton(i18n("tar/&gzip"), vbgroup);
- compressSingle = new QCheckBox(i18n("&Use compression when sending "
+ compressSingle = new TQCheckBox(i18n("&Use compression when sending "
"a single file"), vbgroup, "kcfg_CompressSingleFile");
layout->addStretch(1);
@@ -739,12 +739,12 @@ void MiscPreferences::defaults(const MiscSettings& settings)
compressSingle->setChecked(settings.compressSingleFile);
}
-QString MiscPreferences::contextInfo() const
+TQString MiscPreferences::contextInfo() const
{
- QString temp=contextInfoEdit->text();
+ TQString temp=contextInfoEdit->text();
bool quoted=false;
- QString newStr;
+ TQString newStr;
for(uint i=0; i<temp.length(); i++)
{
@@ -768,7 +768,7 @@ QString MiscPreferences::contextInfo() const
return newStr;
}
-void MiscPreferences::setContextInfo(QString reg)
+void MiscPreferences::setContextInfo(TQString reg)
{
reg.replace("\n","\\n");
contextInfoEdit->setText(reg);
@@ -777,61 +777,61 @@ void MiscPreferences::setContextInfo(QString reg)
void MiscPreferences::regExpButtonClicked()
{
if ( _regExpEditDialog==0 )
- _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>
- ("KRegExpEditor/KRegExpEditor", QString::null, this );
+ _regExpEditDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>
+ ("KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( _regExpEditDialog );
if( iface )
{
iface->setRegExp( contextInfoEdit->text() );
- if( _regExpEditDialog->exec() == QDialog::Accepted )
+ if( _regExpEditDialog->exec() == TQDialog::Accepted )
contextInfoEdit->setText( iface->regExp() );
}
}
-SpellPreferences::SpellPreferences(QWidget* parent)
- : QWidget(parent)
+SpellPreferences::SpellPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- onFlyBtn = new QCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck");
+ onFlyBtn = new TQCheckBox(i18n("On the &fly spellchecking"),page, "kcfg_OnFlySpellCheck");
layout->addWidget(onFlyBtn);
- QWhatsThis::add(onFlyBtn, i18n("<qt><p><b>On the fly spellchecking</b></p>"
+ TQWhatsThis::add(onFlyBtn, i18n("<qt><p><b>On the fly spellchecking</b></p>"
"<p>Activate this to let KBabel spell check the text "
"as you type. Mispelled words will be colored by the error color.</p></qt>"));
spellConfig = new KSpellConfig(page,"spellConfigWidget",0,false);
layout->addWidget(spellConfig);
- remIgnoredBtn = new QCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored");
+ remIgnoredBtn = new TQCheckBox(i18n("&Remember ignored words"),page, "kcfg_RememberIgnored");
layout->addWidget(remIgnoredBtn);
- connect( spellConfig, SIGNAL( configChanged() )
- , this, SIGNAL ( settingsChanged() ) );
+ connect( spellConfig, TQT_SIGNAL( configChanged() )
+ , this, TQT_SIGNAL ( settingsChanged() ) );
- QLabel *tempLabel = new QLabel(i18n("F&ile to store ignored words:"),page);
+ TQLabel *tempLabel = new TQLabel(i18n("F&ile to store ignored words:"),page);
layout->addWidget(tempLabel);
ignoreURLEdit = new KURLRequester(page, "kcfg_IgnoreURL");
layout->addWidget(ignoreURLEdit);
tempLabel->setBuddy(ignoreURLEdit);
- connect(remIgnoredBtn,SIGNAL(toggled(bool)),ignoreURLEdit
- ,SLOT(setEnabled(bool)));
+ connect(remIgnoredBtn,TQT_SIGNAL(toggled(bool)),ignoreURLEdit
+ ,TQT_SLOT(setEnabled(bool)));
- QString msg = i18n("<qt><p><b>Remember ignored words</b></p>"
+ TQString msg = i18n("<qt><p><b>Remember ignored words</b></p>"
"<p>Activate this, to let KBabel ignore the words, where you have "
"chosen <i>Ignore All</i> in the spell check dialog, "
"in every spell check.</p></qt>");
- QWhatsThis::add(remIgnoredBtn,msg);
- QWhatsThis::add(tempLabel,msg);
- QWhatsThis::add(ignoreURLEdit,msg);
+ TQWhatsThis::add(remIgnoredBtn,msg);
+ TQWhatsThis::add(tempLabel,msg);
+ TQWhatsThis::add(ignoreURLEdit,msg);
layout->addStretch(1);
@@ -874,21 +874,21 @@ void SpellPreferences::defaults(const SpellcheckSettings& settings)
*spellConfig = spCfg;
}
-CatmanPreferences::CatmanPreferences(QWidget* parent)
- : QWidget(parent)
+CatmanPreferences::CatmanPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,page);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- QLabel* label=new QLabel(i18n("&Base folder of PO files:"),box);
- QHBox* hbox = new QHBox(box);
+ TQLabel* label=new TQLabel(i18n("&Base folder of PO files:"),box);
+ TQHBox* hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
const KFile::Mode mode = static_cast<KFile::Mode>( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
@@ -900,8 +900,8 @@ CatmanPreferences::CatmanPreferences(QWidget* parent)
label->setBuddy(_poDirEdit);
- label=new QLabel(i18n("Ba&se folder of POT files:"),box);
- hbox = new QHBox(box);
+ label=new TQLabel(i18n("Ba&se folder of POT files:"),box);
+ hbox = new TQHBox(box);
hbox->setSpacing(KDialog::spacingHint());
_potDirEdit = new KURLRequester(hbox, "kcfg_PotBaseDir");
@@ -911,40 +911,40 @@ CatmanPreferences::CatmanPreferences(QWidget* parent)
- QWhatsThis::add(box,i18n("<qt><p><b>Base folders</b></p>\n"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Base folders</b></p>\n"
"<p>Type in the folders which contain all your PO and POT files.\n"
"The files and the folders in these folders will then be merged into one\n"
"tree.</p></qt>"));
- box=new QGroupBox(1,Qt::Horizontal,page);
+ box=new TQGroupBox(1,Qt::Horizontal,page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- _openWindowButton = new QCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow");
+ _openWindowButton = new TQCheckBox(i18n("O&pen files in new window"),box, "kcfg_OpenWindow");
- QWhatsThis::add(_openWindowButton,i18n("<qt><p><b>Open files in new window</b></p>\n"
+ TQWhatsThis::add(_openWindowButton,i18n("<qt><p><b>Open files in new window</b></p>\n"
"<p>If this is activated all files that are opened from the Catalog Manager are opened\n"
"in a new window.</p></qt>"));
- _killButton = new QCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" );
+ _killButton = new TQCheckBox( i18n("&Kill processes on exit") , box, "kcfg_KillCmdOnExit" );
- QWhatsThis::add( _killButton , i18n("<qt><p><b>Kill processes on exit</b></p>\n"
+ TQWhatsThis::add( _killButton , i18n("<qt><p><b>Kill processes on exit</b></p>\n"
"<p>If you check this, KBabel tries to kill the processes, that have not exited already when KBabel exits,\n"
"by sending a kill signal to them.</p>\n"
"<p>NOTE: It is not guaranteed that the processes will be killed.</p></qt>") );
- _indexButton = new QCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
+ _indexButton = new TQCheckBox( i18n("Create inde&x for file contents"), box, "kcfg_IndexWords" );
- QWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
+ TQWhatsThis::add( _indexButton , i18n("<qt><p><b>Create index for file contents</b></p>\n"
"<p>If you check this, KBabel will create an index for each PO file to speed up the find/replace functions.</p>\n"
"<p>NOTE: This will slow down updating the file information considerably.</p></qt>") );
- m_msgfmtButton = new QCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );
+ m_msgfmtButton = new TQCheckBox( i18n("Run &msgfmt before processing a file"), box, "kcfg_msgfmt" );
- QWhatsThis::add( m_msgfmtButton, i18n("<qt><p><b>Run msgfmt before processing a file</b></p>"
+ TQWhatsThis::add( m_msgfmtButton, i18n("<qt><p><b>Run msgfmt before processing a file</b></p>"
"<p>If you enable this, KBabel will run Gettext's "
"msgfmt tool before processing a file.</p>"
"<p>Enabling this setting is recommended, even if it causes processing to be slower. "
@@ -976,26 +976,26 @@ void CatmanPreferences::defaults(const CatManSettings& settings)
m_msgfmtButton->setChecked( settings.msgfmt );
}
-DirCommandsPreferences::DirCommandsPreferences(QWidget* parent)
- : QWidget(parent)
+DirCommandsPreferences::DirCommandsPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box = new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page );
+ TQGroupBox* box = new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Folders") , page );
box->setMargin( KDialog::marginHint() );
layout->addWidget( box );
_dirCmdEdit = new CmdEdit( box );
- new QLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n"
+ new TQLabel( i18n("Replaceables:\n@PACKAGE@, @PODIR@, @POTDIR@\n"
"@POFILES@, @MARKEDPOFILES@"), box);
- connect (_dirCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged()));
+ connect (_dirCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged()));
- QWhatsThis::add( box , i18n("<qt><p><b>Commands for folders</b></p>"
+ TQWhatsThis::add( box , i18n("<qt><p><b>Commands for folders</b></p>"
"<p>Insert here the commands you want to execute in folders from "
"the Catalog Manager. The commands are then shown in the submenu "
"<b>Commands</b> in the Catalog Manager's context menu.</p>"
@@ -1039,26 +1039,26 @@ void DirCommandsPreferences::defaults(const CatManSettings& settings)
}
-FileCommandsPreferences::FileCommandsPreferences(QWidget* parent)
- : QWidget(parent)
+FileCommandsPreferences::FileCommandsPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page );
+ TQGroupBox* box=new TQGroupBox( 1 , Qt::Horizontal , i18n("Commands for Files") , page );
box->setMargin( KDialog::marginHint() );
layout->addWidget( box );
_fileCmdEdit = new CmdEdit( box );
- new QLabel( i18n("Replaceables:\n"
+ new TQLabel( i18n("Replaceables:\n"
"@PACKAGE@, @POFILE@,@POTFILE@,\n@PODIR@, @POTDIR@"), box);
- connect (_fileCmdEdit, SIGNAL(widgetChanged()), this, SIGNAL(settingsChanged()));
+ connect (_fileCmdEdit, TQT_SIGNAL(widgetChanged()), this, TQT_SIGNAL(settingsChanged()));
- QWhatsThis::add( box , i18n("<qt><p><b>Commands for files</b></p>"
+ TQWhatsThis::add( box , i18n("<qt><p><b>Commands for files</b></p>"
"<p>Insert here the commands you want to execute on files from "
"the Catalog Manager. The commands are then shown in the submenu "
"<b>Commands</b> in the Catalog Manager's context menu.</p>"
@@ -1102,28 +1102,28 @@ void FileCommandsPreferences::defaults(const CatManSettings& settings)
_fileCmdEdit->setCommands( settings.fileCommands, settings.fileCommandNames );
}
-ViewPreferences::ViewPreferences(QWidget* parent)
- : QWidget(parent)
+ViewPreferences::ViewPreferences(TQWidget* parent)
+ : TQWidget(parent)
{
- QWidget* page = this;
+ TQWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QGroupBox* box=new QGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page);
+ TQGroupBox* box=new TQGroupBox(2, Qt::Horizontal,i18n("Shown Columns"),page);
box->setMargin(KDialog::marginHint());
layout->addWidget(box);
- _flagColumnCheckbox = new QCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" );
- _fuzzyColumnCheckbox = new QCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" );
- _untranslatedColumnCheckbox = new QCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" );
- _totalColumnCheckbox = new QCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" );
- _cvsColumnCheckbox = new QCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" );
- _revisionColumnCheckbox = new QCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" );
- _translatorColumnCheckbox = new QCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" );
+ _flagColumnCheckbox = new TQCheckBox( i18n("Fla&g"), box, "kcfg_ShowFlagColumn" );
+ _fuzzyColumnCheckbox = new TQCheckBox( i18n("&Fuzzy"), box, "kcfg_ShowFuzzyColumn" );
+ _untranslatedColumnCheckbox = new TQCheckBox( i18n("&Untranslated"), box, "kcfg_ShowUntranslatedColumn" );
+ _totalColumnCheckbox = new TQCheckBox( i18n("&Total"), box, "kcfg_ShowTotalColumn" );
+ _cvsColumnCheckbox = new TQCheckBox( i18n("SVN/&CVS status"), box, "kcfg_ShowCVSColumn" );
+ _revisionColumnCheckbox = new TQCheckBox( i18n("Last &revision"), box, "kcfg_ShowRevisionColumn" );
+ _translatorColumnCheckbox = new TQCheckBox( i18n("Last t&ranslator"), box, "kcfg_ShowTranslatorColumn" );
- QWhatsThis::add(box,i18n("<qt><p><b>Shown columns</b></p>\n"
+ TQWhatsThis::add(box,i18n("<qt><p><b>Shown columns</b></p>\n"
"<p></p></qt>"));
layout->addStretch(1);
@@ -1145,16 +1145,16 @@ void ViewPreferences::defaults(const CatManSettings& _settings)
_translatorColumnCheckbox->setChecked(_settings.translatorColumn);
}
-SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(parent)
+SourceContextPreferences::SourceContextPreferences(TQWidget* parent): TQWidget(parent)
{
- QWidget* page = this;
- QVBoxLayout* layout=new QVBoxLayout(page);
+ TQWidget* page = this;
+ TQVBoxLayout* layout=new TQVBoxLayout(page);
layout->setSpacing(KDialog::spacingHint());
layout->setMargin(KDialog::marginHint());
- QHBox* box = new QHBox(page);
+ TQHBox* box = new TQHBox(page);
box->setSpacing(KDialog::spacingHint());
- QLabel* tempLabel=new QLabel(i18n("&Base folder for source code:"),box);
+ TQLabel* tempLabel=new TQLabel(i18n("&Base folder for source code:"),box);
const KFile::Mode mode = static_cast<KFile::Mode>( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly );
_coderootEdit = new KURLRequester ( box, "kcfg_CodeRoot" );
@@ -1168,8 +1168,8 @@ SourceContextPreferences::SourceContextPreferences(QWidget* parent): QWidget(par
_pathsEditor->setTitle(i18n("Path Patterns"));
layout->addWidget(_pathsEditor);
- connect ( _pathsEditor, SIGNAL (itemsChanged ())
- , this, SIGNAL (itemsChanged ()));
+ connect ( _pathsEditor, TQT_SIGNAL (itemsChanged ())
+ , this, TQT_SIGNAL (itemsChanged ()));
_pathsEditor->installEventFilter(this);
@@ -1195,11 +1195,11 @@ void SourceContextPreferences::defaults(const KBabel::SourceContextSettings& set
_pathsEditor->setList(settings.sourcePaths);
}
-bool SourceContextPreferences::eventFilter( QObject *, QEvent *e )
+bool SourceContextPreferences::eventFilter( TQObject *, TQEvent *e )
{
- if( e->type() == QEvent::KeyPress )
+ if( e->type() == TQEvent::KeyPress )
{
- QKeyEvent *ke = dynamic_cast<QKeyEvent*>(e);
+ TQKeyEvent *ke = dynamic_cast<TQKeyEvent*>(e);
if( ke->key() == Key_Return || ke->key() == Key_Enter )
return true;
}
diff --git a/kbabel/commonui/projectprefwidgets.h b/kbabel/commonui/projectprefwidgets.h
index 81a1b3e6..8dd7b561 100644
--- a/kbabel/commonui/projectprefwidgets.h
+++ b/kbabel/commonui/projectprefwidgets.h
@@ -36,7 +36,7 @@
#define PROJECTPREFWIDGETS_H
#include <ktabctl.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "projectsettings.h"
@@ -66,42 +66,42 @@ class KDE_EXPORT SavePreferences : public KTabCtl
{
Q_OBJECT
public:
- SavePreferences(QWidget* parent=0);
+ SavePreferences(TQWidget* parent=0);
void defaults(const KBabel::SaveSettings& settings);
void setAutoSaveVisible(const bool on);
private:
- QCheckBox* _lastButton;
- QCheckBox* _revisionButton;
- QCheckBox* _languageButton;
- QCheckBox* _charsetButton;
- QCheckBox* _encodingButton;
- QCheckBox* _projectButton;
-
- QCheckBox* _updateButton;
- QCheckBox* _autoCheckButton;
- QCheckBox* _saveObsoleteButton;
-
- QComboBox* _encodingBox;
- QCheckBox* _oldEncodingButton;
-
- QRadioButton* _defaultDateButton;
- QRadioButton* _localDateButton;
- QRadioButton* _customDateButton;
- QLineEdit* _dateFormatEdit;
+ TQCheckBox* _lastButton;
+ TQCheckBox* _revisionButton;
+ TQCheckBox* _languageButton;
+ TQCheckBox* _charsetButton;
+ TQCheckBox* _encodingButton;
+ TQCheckBox* _projectButton;
+
+ TQCheckBox* _updateButton;
+ TQCheckBox* _autoCheckButton;
+ TQCheckBox* _saveObsoleteButton;
+
+ TQComboBox* _encodingBox;
+ TQCheckBox* _oldEncodingButton;
+
+ TQRadioButton* _defaultDateButton;
+ TQRadioButton* _localDateButton;
+ TQRadioButton* _customDateButton;
+ TQLineEdit* _dateFormatEdit;
- QLineEdit* _projectEdit;
+ TQLineEdit* _projectEdit;
- QRadioButton* _removeFSFButton;
- QRadioButton* _updateFSFButton;
- QRadioButton* _nochangeFSFButton;
- QCheckBox* _translatorCopyrightButton;
+ TQRadioButton* _removeFSFButton;
+ TQRadioButton* _updateFSFButton;
+ TQRadioButton* _nochangeFSFButton;
+ TQCheckBox* _translatorCopyrightButton;
- QCheckBox* _descriptionButton;
- QLineEdit* _descriptionEdit;
+ TQCheckBox* _descriptionButton;
+ TQLineEdit* _descriptionEdit;
KIntNumInput * _autoSaveDelay;
- QGroupBox * _autoSaveBox;
+ TQGroupBox * _autoSaveBox;
private slots:
void customDateActivated(bool on);
@@ -112,8 +112,8 @@ class IdentityPreferences : public QWidget
{
Q_OBJECT
public:
- IdentityPreferences(QWidget *parent = 0, const QString& project = "");
- virtual bool eventFilter(QObject *, QEvent*);
+ IdentityPreferences(TQWidget *parent = 0, const TQString& project = "");
+ virtual bool eventFilter(TQObject *, TQEvent*);
void defaults(const KBabel::IdentitySettings& settings);
private slots:
@@ -122,19 +122,19 @@ private slots:
void lookupGnuPluralFormHeader();
private:
- QLineEdit* _nameEdit;
- QLineEdit* _localNameEdit;
- QLineEdit* _mailEdit;
- QLineEdit* _langEdit;
- QLineEdit* _langCodeEdit;
- QLineEdit* _listEdit;
-
- QLineEdit* _timezoneEdit;
- QSpinBox *_pluralFormsBox;
- QPushButton *_testPluralButton;
- QCheckBox* _checkPluralArgumentBox;
- QLineEdit* _gnuPluralFormHeaderEdit;
- QPushButton *_testGnuPluralFormButton;
+ TQLineEdit* _nameEdit;
+ TQLineEdit* _localNameEdit;
+ TQLineEdit* _mailEdit;
+ TQLineEdit* _langEdit;
+ TQLineEdit* _langCodeEdit;
+ TQLineEdit* _listEdit;
+
+ TQLineEdit* _timezoneEdit;
+ TQSpinBox *_pluralFormsBox;
+ TQPushButton *_testPluralButton;
+ TQCheckBox* _checkPluralArgumentBox;
+ TQLineEdit* _gnuPluralFormHeaderEdit;
+ TQPushButton *_testGnuPluralFormButton;
};
@@ -142,32 +142,32 @@ class MiscPreferences : public QWidget
{
Q_OBJECT
public:
- MiscPreferences(QWidget *parent=0);
+ MiscPreferences(TQWidget *parent=0);
void defaults(const KBabel::MiscSettings& settings);
private slots:
void regExpButtonClicked();
private:
- void setContextInfo(QString reg);
- QString contextInfo() const;
+ void setContextInfo(TQString reg);
+ TQString contextInfo() const;
KLineEdit *contextInfoEdit;
KLineEdit *accelMarkerEdit;
- QDialog *_regExpEditDialog;
- QPushButton *_regExpButton;
+ TQDialog *_regExpEditDialog;
+ TQPushButton *_regExpButton;
- QRadioButton* bzipButton;
- QRadioButton* gzipButton;
- QCheckBox* compressSingle;
+ TQRadioButton* bzipButton;
+ TQRadioButton* gzipButton;
+ TQCheckBox* compressSingle;
};
class SpellPreferences : public QWidget
{
Q_OBJECT
public:
- SpellPreferences(QWidget *parent=0);
+ SpellPreferences(TQWidget *parent=0);
void mergeSettings(KBabel::SpellcheckSettings& set) const;
void updateWidgets(const KBabel::SpellcheckSettings& settings);
@@ -178,8 +178,8 @@ signals:
private:
KSpellConfig* spellConfig;
- QCheckBox* remIgnoredBtn;
- QCheckBox* onFlyBtn;
+ TQCheckBox* remIgnoredBtn;
+ TQCheckBox* onFlyBtn;
KURLRequester* ignoreURLEdit;
};
@@ -188,25 +188,25 @@ class CatmanPreferences : public QWidget
{
Q_OBJECT
public:
- CatmanPreferences(QWidget *parent = 0);
+ CatmanPreferences(TQWidget *parent = 0);
void defaults(const KBabel::CatManSettings& settings);
private:
KURLRequester* _poDirEdit;
KURLRequester* _potDirEdit;
- QCheckBox* _openWindowButton;
+ TQCheckBox* _openWindowButton;
- QCheckBox* _killButton;
- QCheckBox* _indexButton;
- QCheckBox* m_msgfmtButton;
+ TQCheckBox* _killButton;
+ TQCheckBox* _indexButton;
+ TQCheckBox* m_msgfmtButton;
};
class DirCommandsPreferences : public QWidget
{
Q_OBJECT
public:
- DirCommandsPreferences(QWidget *parent = 0);
+ DirCommandsPreferences(TQWidget *parent = 0);
virtual ~DirCommandsPreferences();
void mergeSettings(KBabel::CatManSettings& settings) const;
@@ -224,7 +224,7 @@ class FileCommandsPreferences : public QWidget
{
Q_OBJECT
public:
- FileCommandsPreferences(QWidget *parent = 0);
+ FileCommandsPreferences(TQWidget *parent = 0);
virtual ~FileCommandsPreferences();
void mergeSettings(KBabel::CatManSettings& settings) const;
@@ -242,17 +242,17 @@ class ViewPreferences : public QWidget
{
Q_OBJECT
public:
- ViewPreferences(QWidget *parent = 0);
+ ViewPreferences(TQWidget *parent = 0);
void defaults(const KBabel::CatManSettings& settings);
private:
- QCheckBox* _flagColumnCheckbox;
- QCheckBox* _fuzzyColumnCheckbox;
- QCheckBox* _untranslatedColumnCheckbox;
- QCheckBox* _totalColumnCheckbox;
- QCheckBox* _cvsColumnCheckbox;
- QCheckBox* _revisionColumnCheckbox;
- QCheckBox* _translatorColumnCheckbox;
+ TQCheckBox* _flagColumnCheckbox;
+ TQCheckBox* _fuzzyColumnCheckbox;
+ TQCheckBox* _untranslatedColumnCheckbox;
+ TQCheckBox* _totalColumnCheckbox;
+ TQCheckBox* _cvsColumnCheckbox;
+ TQCheckBox* _revisionColumnCheckbox;
+ TQCheckBox* _translatorColumnCheckbox;
};
/**
@@ -265,14 +265,14 @@ class SourceContextPreferences : public QWidget
{
Q_OBJECT
public:
- SourceContextPreferences(QWidget* parent=0);
+ SourceContextPreferences(TQWidget* parent=0);
virtual ~SourceContextPreferences();
void mergeSettings(KBabel::SourceContextSettings& settings) const;
void updateWidgets(const KBabel::SourceContextSettings& settings);
void defaults(const KBabel::SourceContextSettings& settings);
- virtual bool eventFilter(QObject *, QEvent*);
+ virtual bool eventFilter(TQObject *, TQEvent*);
signals:
void itemsChanged ();
diff --git a/kbabel/commonui/projectwizard.cpp b/kbabel/commonui/projectwizard.cpp
index d1202f4a..e5df7285 100644
--- a/kbabel/commonui/projectwizard.cpp
+++ b/kbabel/commonui/projectwizard.cpp
@@ -37,7 +37,7 @@
#include "kbprojectmanager.h"
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
+ProjectWizard::ProjectWizard(TQWidget *parent,const char *name)
: KWizard(parent,name,true)
{
_wizard = new ProjectStep1(this,"project wizard widget");
// fill the known language codes
KConfig all_languages("all_languages", true, false, "locale");
- QStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha();
- for (QStringList::iterator it = lang_codes.begin();
+ TQStringList lang_codes = KGlobal::locale()->allLanguagesTwoAlpha();
+ for (TQStringList::iterator it = lang_codes.begin();
it != lang_codes.end(); ++it)
{
// we need untranslated entries here, because of Translation Robot!
- QString entry = (*it);
+ TQString entry = (*it);
const int i = entry.find('_');
entry.replace(0, i, entry.left(i).lower());
all_languages.setGroup(entry);
@@ -71,9 +71,9 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
}
}
- connect( _wizard->_projectName, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
- connect( _wizard->_projectFile, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
- connect( this, SIGNAL( helpClicked( void ) ), this, SLOT( slotHelpClicked( void ) ) );
+ connect( _wizard->_projectName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &)));
+ connect( _wizard->_projectFile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &)));
+ connect( this, TQT_SIGNAL( helpClicked( void ) ), this, TQT_SLOT( slotHelpClicked( void ) ) );
addPage(_wizard, i18n("Basic Project Information"));
@@ -86,7 +86,7 @@ ProjectWizard::ProjectWizard(QWidget *parent,const char *name)
setNextEnabled (_wizard, false);
}
-QString ProjectWizard::url()
+TQString ProjectWizard::url()
{
return _wizard->_projectFile->url();
}
@@ -133,7 +133,7 @@ Project::Ptr ProjectWizard::project()
void ProjectWizard::next()
{
// check if the file exists
- QFileInfo file(url());
+ TQFileInfo file(url());
if( file.exists() )
{
@@ -145,7 +145,7 @@ void ProjectWizard::next()
KWizard::next();
}
-void ProjectWizard::textChanged(const QString &)
+void ProjectWizard::textChanged(const TQString &)
{
setNextEnabled( _wizard, !_wizard->_projectName->text().isEmpty() && !_wizard->_projectFile->url().isEmpty() );
}
@@ -153,7 +153,7 @@ void ProjectWizard::textChanged(const QString &)
Project::Ptr ProjectWizard::newProject()
{
ProjectWizard* dialog = new ProjectWizard();
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
Project::Ptr res = dialog->project();
delete dialog;
diff --git a/kbabel/commonui/projectwizard.h b/kbabel/commonui/projectwizard.h
index 5c994784..7805190f 100644
--- a/kbabel/commonui/projectwizard.h
+++ b/kbabel/commonui/projectwizard.h
@@ -37,8 +37,8 @@
#include "kbproject.h"
-#include "qmap.h"
-#include "qstring.h"
+#include "tqmap.h"
+#include "tqstring.h"
class ProjectStep1;
class ProjectStep2;
@@ -49,16 +49,16 @@ class KDE_EXPORT ProjectWizard : public KWizard
{
Q_OBJECT
public:
- ProjectWizard(QWidget* parent = 0, const char * name = 0);
+ ProjectWizard(TQWidget* parent = 0, const char * name = 0);
Project::Ptr project();
- QString url();
+ TQString url();
static Project::Ptr newProject();
private slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void slotHelpClicked( void );
virtual void next();
@@ -66,7 +66,7 @@ private:
ProjectStep1* _wizard;
ProjectStep2* _wizard2;
- QMap<QString, QString> m_language_codes;
+ TQMap<TQString, TQString> m_language_codes;
};
}
diff --git a/kbabel/commonui/roughtransdlg.cpp b/kbabel/commonui/roughtransdlg.cpp
index de321044..75395630 100644
--- a/kbabel/commonui/roughtransdlg.cpp
+++ b/kbabel/commonui/roughtransdlg.cpp
@@ -40,16 +40,16 @@
#include "regexpextractor.h"
#include "roughtransdlg.h"
-#include <qmemarray.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qtimer.h>
-#include <qvgroupbox.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqmemarray.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqtimer.h>
+#include <tqvgroupbox.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -64,7 +64,7 @@
using namespace KBabel;
RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
- , QWidget *parent,const char *name)
+ , TQWidget *parent,const char *name)
: KDialogBase(parent,name,true
,i18n("Caption of dialog","Rough Translation")
, User1|User2|User3|Close)
@@ -85,45 +85,45 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
enableButton(User2,false);
enableButton(User3,false);
- QWidget *mw = new QWidget(this);
+ TQWidget *mw = new TQWidget(this);
setMainWidget(mw);
- QVBoxLayout *mainLayout = new QVBoxLayout(mw);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(mw);
- configWidget = new QVBox(mw);
+ configWidget = new TQVBox(mw);
mainLayout->addWidget(configWidget);
- QVGroupBox *box = new QVGroupBox(i18n("What to Translate"),configWidget);
+ TQVGroupBox *box = new TQVGroupBox(i18n("What to Translate"),configWidget);
- QHButtonGroup *bBox = new QHButtonGroup(box);
+ TQHButtonGroup *bBox = new TQHButtonGroup(box);
bBox->setMargin(0);
- bBox->setFrameStyle(QFrame::NoFrame);
+ bBox->setFrameStyle(TQFrame::NoFrame);
whatBox = bBox;
- untransButton = new QCheckBox(i18n("U&ntranslated entries"),bBox);
- fuzzyButton = new QCheckBox(i18n("&Fuzzy entries"),bBox);
- transButton = new QCheckBox(i18n("T&ranslated entries"),bBox);
+ untransButton = new TQCheckBox(i18n("U&ntranslated entries"),bBox);
+ fuzzyButton = new TQCheckBox(i18n("&Fuzzy entries"),bBox);
+ transButton = new TQCheckBox(i18n("T&ranslated entries"),bBox);
- connect(bBox,SIGNAL(clicked(int)),this,SLOT(msgButtonClicked(int)));
+ connect(bBox,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(msgButtonClicked(int)));
- QWhatsThis::add(bBox,i18n("<qt><p><b>What entries to translate</b></p>"
+ TQWhatsThis::add(bBox,i18n("<qt><p><b>What entries to translate</b></p>"
"<p>Choose here, for which entries of the file KBabel "
"tries to find a translation. Changed entries are always "
"marked as fuzzy, no matter which option you choose.</p></qt>"));
- box = new QVGroupBox(i18n("How to Translate"),configWidget);
- bBox = new QHButtonGroup(box);
- bBox->setFrameStyle(QFrame::NoFrame);
+ box = new TQVGroupBox(i18n("How to Translate"),configWidget);
+ bBox = new TQHButtonGroup(box);
+ bBox->setFrameStyle(TQFrame::NoFrame);
bBox->setMargin(0);
- searchMatchButton = new QCheckBox(i18n("&Use dictionary settings")
+ searchMatchButton = new TQCheckBox(i18n("&Use dictionary settings")
,bBox);
- fuzzyMatchButton = new QCheckBox(i18n("Fu&zzy translation (slow)")
+ fuzzyMatchButton = new TQCheckBox(i18n("Fu&zzy translation (slow)")
,bBox);
- singleWordButton = new QCheckBox(i18n("&Single word translation")
+ singleWordButton = new TQCheckBox(i18n("&Single word translation")
,bBox);
- QWhatsThis::add(bBox,i18n("<qt><p><b>How messages get translated</b></p>"
+ TQWhatsThis::add(bBox,i18n("<qt><p><b>How messages get translated</b></p>"
"<p>Here you can define if a message can only get translated "
"completely, if similar messages are acceptable or if KBabel "
"is supposed to try translating "
@@ -131,11 +131,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"complete message or similar message was found.</p></qt>"));
- box = new QVGroupBox(i18n("Options"),configWidget);
+ box = new TQVGroupBox(i18n("Options"),configWidget);
- markFuzzyButton = new QCheckBox(i18n("&Mark changed entries as fuzzy"),box);
+ markFuzzyButton = new TQCheckBox(i18n("&Mark changed entries as fuzzy"),box);
markFuzzyButton->setChecked(true);
- QWhatsThis::add(markFuzzyButton,
+ TQWhatsThis::add(markFuzzyButton,
i18n("<qt><p><b>Mark changed entries as fuzzy</b></p>"
"<p>When a translation for a message is found, the entry "
"will be marked <b>fuzzy</b> by default. This is because the "
@@ -144,25 +144,25 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"you know what you are doing.</p></qt>"));
- connect(markFuzzyButton, SIGNAL(toggled(bool))
- , this, SLOT(fuzzyButtonToggled(bool)));
+ connect(markFuzzyButton, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(fuzzyButtonToggled(bool)));
- kdeButton = new QCheckBox(i18n("Initialize &KDE-specific entries"),box);
+ kdeButton = new TQCheckBox(i18n("Initialize &KDE-specific entries"),box);
kdeButton->setChecked(true);
- QWhatsThis::add(kdeButton,
+ TQWhatsThis::add(kdeButton,
i18n("<qt><p><b>Initialize KDE-specific entries</b></p>"
"<p>Initialize \"Comment=\" and \"Name=\" entries "
"if a translation is not found. Also, \"NAME OF TRANSLATORS\" "
"and \"EMAIL OF TRANSLATORS\" is filled with identity settings.</p></qt>"));
- QVGroupBox *dBox = new QVGroupBox(i18n("Dictionaries"),configWidget);
+ TQVGroupBox *dBox = new TQVGroupBox(i18n("Dictionaries"),configWidget);
configWidget->setStretchFactor(dBox,1);
- QPtrList<ModuleInfo> moduleList = dict->moduleInfos();
+ TQPtrList<ModuleInfo> moduleList = dict->moduleInfos();
KConfig *config = KGlobal::config();
KConfigGroupSaver gs(config,"RoughTranslation");
- QStringList selectedList=config->readListEntry("Selected");
+ TQStringList selectedList=config->readListEntry("Selected");
if(selectedList.isEmpty())
{
int a = dict->activeModule();
@@ -174,7 +174,7 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
}
dictChooser = new DictChooser(dict,selectedList,dBox,"dictChooser");
- QWhatsThis::add(dictChooser,i18n("<qt><p><b>Dictionaries</b></p>"
+ TQWhatsThis::add(dictChooser,i18n("<qt><p><b>Dictionaries</b></p>"
"<p>Choose here, which dictionaries have to be used for "
"finding a translation. If you select more than one "
"dictionary, they are used in the same order as they "
@@ -183,11 +183,11 @@ RoughTransDlg::RoughTransDlg(KBabelDictBox *dict, Catalog *cat
"configure selected dictionary. The original settings "
"will be restored after closing the dialog.</p></qt>"));
- QLabel* label = new QLabel( i18n("Messages:"), mw );
+ TQLabel* label = new TQLabel( i18n("Messages:"), mw );
progressbar = new KProgress(mw,"progressbar");
progressbar->setTextEnabled(true);
progressbar->setFormat("%v/%m (%p%)");
- QHBoxLayout* pblayout= new QHBoxLayout(mainLayout);
+ TQHBoxLayout* pblayout= new TQHBoxLayout(mainLayout);
pblayout->add(label);
pblayout->add(progressbar);
@@ -249,7 +249,7 @@ void RoughTransDlg::slotUser1()
partTransCounter=0;
totalTried=0;
- QTimer::singleShot(0,this, SLOT(translate()));
+ TQTimer::singleShot(0,this, TQT_SLOT(translate()));
}
void RoughTransDlg::translate()
@@ -263,16 +263,16 @@ void RoughTransDlg::translate()
int total=catalog->numberOfEntries();
progressbar->setTotalSteps(total);
- QStringList dictList = dictChooser->selectedDicts();
+ TQStringList dictList = dictChooser->selectedDicts();
catalog->applyBeginCommand(0,Msgstr,0);
bool singleWords=singleWordButton->isChecked();
bool fuzzyMatch=fuzzyMatchButton->isChecked();
bool searchMatch=searchMatchButton->isChecked();
- QRegExp contextReg=catalog->miscSettings().contextInfo;
- QChar accelMarker=catalog->miscSettings().accelMarker;
- QRegExp endPunctReg("[\\.?!: ]+$");
+ TQRegExp contextReg=catalog->miscSettings().contextInfo;
+ TQChar accelMarker=catalog->miscSettings().accelMarker;
+ TQRegExp endPunctReg("[\\.?!: ]+$");
for(int i = 0; i < total; i++)
@@ -283,18 +283,18 @@ void RoughTransDlg::translate()
if(stop || cancel) break;
// FIXME: should care about plural forms
- QString msg=catalog->msgid(i,true).first();
- QString translation;
+ TQString msg=catalog->msgid(i,true).first();
+ TQString translation;
// this is KDE specific:
if( kdeSpecific )
{
if( catalog->pluralForm(i) == NoPluralForm )
{
- QString origTrans = catalog->msgstr(i).first();
+ TQString origTrans = catalog->msgstr(i).first();
if(msg.find("_: NAME OF TRANSLATORS\\n")==0)
{
- QString authorName;
+ TQString authorName;
if( !catalog->identitySettings().authorLocalizedName.isEmpty() )
authorName = catalog->identitySettings().authorLocalizedName;
else // fallback to non-localized name
@@ -302,7 +302,7 @@ void RoughTransDlg::translate()
authorName = catalog->identitySettings().authorName;
else continue; // there is no name to be inserted
- if( !QStringList::split(',', origTrans).contains(authorName) )
+ if( !TQStringList::split(',', origTrans).contains(authorName) )
{
if(origTrans.isEmpty() ) translation=authorName;
else translation+=origTrans+","+authorName;
@@ -313,7 +313,7 @@ void RoughTransDlg::translate()
// skip, if email is not specified in settings
if( catalog->identitySettings().authorEmail.isEmpty() ) continue;
- if( !QStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
+ if( !TQStringList::split(',', origTrans).contains(catalog->identitySettings().authorEmail) )
{
if(origTrans.isEmpty() ) translation=catalog->identitySettings().authorEmail;
else translation=origTrans+","+catalog->identitySettings().authorEmail;
@@ -321,7 +321,7 @@ void RoughTransDlg::translate()
}
else if (msg.find("ROLES_OF_TRANSLATORS") == 0)
{
- QString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
+ TQString temp = "<othercredit role=\\\"translator\\\">\n<firstname></firstname>"
"<surname></surname>\n<affiliation><address><email>" +
catalog->identitySettings( ).authorEmail+"</email></address>\n"
"</affiliation><contrib></contrib></othercredit>";
@@ -332,12 +332,12 @@ void RoughTransDlg::translate()
}
else if (msg.find("CREDIT_FOR_TRANSLATORS") == 0)
{
- QString authorName;
+ TQString authorName;
if (!catalog->identitySettings( ).authorLocalizedName.isEmpty( ))
authorName = catalog->identitySettings( ).authorLocalizedName;
else if (!catalog->identitySettings( ).authorName.isEmpty( ))
authorName = catalog->identitySettings( ).authorName;
- QString temp = "<para>" + authorName + "\n" + "<email>" +
+ TQString temp = "<para>" + authorName + "\n" + "<email>" +
catalog->identitySettings( ).authorEmail + "</email></para>";
if (origTrans.isEmpty( ))
translation = temp;
@@ -370,7 +370,7 @@ void RoughTransDlg::translate()
}
// try exact translation
- QStringList::Iterator dit = dictList.begin();
+ TQStringList::Iterator dit = dictList.begin();
while(translation.isEmpty() && dit != dictList.end())
{
dictBox->setActiveModule(*dit);
@@ -386,7 +386,7 @@ void RoughTransDlg::translate()
// try search settings translation
else if (searchMatch) {
- QString tr;
+ TQString tr;
int score, best_score = 0;
dit = dictList.begin();
while(dit != dictList.end())
@@ -412,7 +412,7 @@ void RoughTransDlg::translate()
// try fuzzy translation
else if (fuzzyMatch) {
- QString tr;
+ TQString tr;
int score, best_score = 0;
dit = dictList.begin();
while(dit != dictList.end())
@@ -439,9 +439,9 @@ void RoughTransDlg::translate()
// try single word translation
if(translation.isEmpty() && singleWords)
{
- QStringList wordList;
- QChar accel;
- QString endingPunctuation;
+ TQStringList wordList;
+ TQChar accel;
+ TQString endingPunctuation;
int pos = msg.findRev(endPunctReg);
if(pos >= 0)
{
@@ -456,12 +456,12 @@ void RoughTransDlg::translate()
te.setString(msg);
msg=te.matchesReplaced(" KBABELTAG ");
- QString word;
+ TQString word;
int length = msg.length();
- QRegExp digitReg("^[0-9]*$");
+ TQRegExp digitReg("^[0-9]*$");
for(int index=0; index < length; index++)
{
- QChar c=msg[index];
+ TQChar c=msg[index];
if(c==accelMarker)
{
@@ -478,7 +478,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -486,7 +486,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
@@ -503,7 +503,7 @@ void RoughTransDlg::translate()
if(!word.isEmpty() && !word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
wordList.append("\\n\n");
index+=2;
@@ -513,7 +513,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -521,7 +521,7 @@ void RoughTransDlg::translate()
if(!word.contains(digitReg))
wordList.append(word);
- word=QString::null;
+ word=TQString::null;
}
}
else if(!word.isEmpty())
@@ -530,7 +530,7 @@ void RoughTransDlg::translate()
wordList.append(word);
}
- word=QString::null;
+ word=TQString::null;
}
}
@@ -543,7 +543,7 @@ void RoughTransDlg::translate()
{
dictBox->setActiveModule(*dit);
- for(QStringList::Iterator it=wordList.begin();
+ for(TQStringList::Iterator it=wordList.begin();
it!=wordList.end(); ++it)
{
if( (*it)=="\\n\n" )
@@ -556,7 +556,7 @@ void RoughTransDlg::translate()
}
else
{
- QString trans = dictBox->translate(*it);
+ TQString trans = dictBox->translate(*it);
if(!trans.isEmpty())
{
@@ -571,7 +571,7 @@ void RoughTransDlg::translate()
}
if(wordCounter==0)
- translation=QString::null;
+ translation=TQString::null;
++dit;
}
@@ -610,9 +610,9 @@ void RoughTransDlg::translate()
{
if(!catalog->isUntranslated(i))
{
- QStringList msgs = catalog->msgstr(i);
+ TQStringList msgs = catalog->msgstr(i);
uint counter = 0;
- for( QStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it)
+ for( TQStringList::Iterator it = msgs.begin() ; it != msgs.end() ; ++it)
{
DelTextCmd* delCmd = new DelTextCmd(0
,(*it),counter++);
@@ -668,7 +668,7 @@ void RoughTransDlg::showStatistics()
{
int nothing=totalTried-partTransCounter-exactTransCounter;
KLocale *locale = KGlobal::locale();
- QString statMsg = i18n("Result of the translation:\n"
+ TQString statMsg = i18n("Result of the translation:\n"
"Edited entries: %1\n"
"Exact translations: %2 (%3%)\n"
"Approximate translations: %4 (%5%)\n"
@@ -717,7 +717,7 @@ void RoughTransDlg::msgButtonClicked(int id)
if(!transButton->isChecked() && !untransButton->isChecked()
&& !fuzzyButton->isChecked())
{
- QButton *button = whatBox->find(id);
+ TQButton *button = whatBox->find(id);
if(button == transButton)
{
transButton->setChecked(true);
@@ -741,14 +741,14 @@ void RoughTransDlg::fuzzyButtonToggled(bool on)
{
if(!on)
{
- QString msg=i18n("<qt><p>"
+ TQString msg=i18n("<qt><p>"
"When a translation for a message is found, the entry "
"will be marked <b>fuzzy</b> by default. This is because the "
"translation is just guessed by KBabel and you should always "
"check the results carefully. Deactivate this option only if "
"you know what you are doing.</p></qt>");
- KMessageBox::information(this, msg, QString::null,"MarkFuzzyWarningInRoughTransDlg");
+ KMessageBox::information(this, msg, TQString::null,"MarkFuzzyWarningInRoughTransDlg");
}
}
diff --git a/kbabel/commonui/roughtransdlg.h b/kbabel/commonui/roughtransdlg.h
index e51378a5..d9e582f2 100644
--- a/kbabel/commonui/roughtransdlg.h
+++ b/kbabel/commonui/roughtransdlg.h
@@ -55,7 +55,7 @@ class KDE_EXPORT RoughTransDlg : public KDialogBase
Q_OBJECT
public:
- RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, QWidget *parent
+ RoughTransDlg(KBabelDictBox* dictBox, KBabel::Catalog* catalog, TQWidget *parent
, const char *name=0);
~RoughTransDlg();
@@ -87,20 +87,20 @@ private:
KBabelDictBox *dictBox;
DictChooser *dictChooser;
- QVBox *configWidget;
+ TQVBox *configWidget;
- QHButtonGroup *whatBox;
- QCheckBox *transButton;
- QCheckBox *untransButton;
- QCheckBox *fuzzyButton;
+ TQHButtonGroup *whatBox;
+ TQCheckBox *transButton;
+ TQCheckBox *untransButton;
+ TQCheckBox *fuzzyButton;
- QCheckBox *singleWordButton;
- QCheckBox *fuzzyMatchButton;
- QCheckBox *searchMatchButton;
+ TQCheckBox *singleWordButton;
+ TQCheckBox *fuzzyMatchButton;
+ TQCheckBox *searchMatchButton;
- QCheckBox *markFuzzyButton;
- QCheckBox *kdeButton;
+ TQCheckBox *markFuzzyButton;
+ TQCheckBox *kdeButton;
int exactTransCounter;
int partTransCounter;
diff --git a/kbabel/commonui/toolaction.cpp b/kbabel/commonui/toolaction.cpp
index bec1363a..20dac847 100644
--- a/kbabel/commonui/toolaction.cpp
+++ b/kbabel/commonui/toolaction.cpp
@@ -33,9 +33,9 @@
#include <kdebug.h>
-ToolAction::ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command,
- QObject * parent, const char * name )
- : KAction( text, info.iconName() == "unknown" ? QString::null : info.iconName(), cut, parent, name ),
+ToolAction::ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command,
+ TQObject * parent, const char * name )
+ : KAction( text, info.iconName() == "unknown" ? TQString::null : info.iconName(), cut, parent, name ),
m_command( command ),
m_info( info )
{
@@ -46,37 +46,37 @@ void ToolAction::slotActivated()
emit toolActivated( m_info, m_command );
}
-QPtrList<KAction> ToolAction::dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent, const QString& namePrefix )
+TQPtrList<KAction> ToolAction::dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent, const TQString& namePrefix )
{
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if ( tools.isEmpty() )
return actionList;
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList commands = (*entry).commands();
- QStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList commands = (*entry).commands();
+ TQStringList shortcuts = (*entry).service()->property("Shortcuts").toStringList();
Q_ASSERT(!commands.isEmpty());
if ( commands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()
<< "). " << commands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = commands.begin();
- QStringList::ConstIterator sit = shortcuts.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = commands.begin();
+ TQStringList::ConstIterator sit = shortcuts.begin();
for (; uit != userCommands.end() && cit != commands.end(); ++uit, ++cit)
{
if( !excludeCommand == command.contains(*cit) )
{
- QString sc=*sit;
+ TQString sc=*sit;
- ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?QString::null:sc), *entry, *cit
+ ToolAction * action = new ToolAction( *uit, (sc.isEmpty()?TQString::null:sc), *entry, *cit
, parent
- , QString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() );
- connect( action, SIGNAL( toolActivated( const KDataToolInfo &, const QString & ) ),
+ , TQString(namePrefix+(*entry).service()->library()+"_"+(*cit)).utf8() );
+ connect( action, TQT_SIGNAL( toolActivated( const KDataToolInfo &, const TQString & ) ),
receiver, slot );
actionList.append( action );
@@ -88,13 +88,13 @@ QPtrList<KAction> ToolAction::dataToolActionList( const QValueList<KDataToolInfo
return actionList;
}
-QValueList<KDataToolInfo> ToolAction::validationTools()
+TQValueList<KDataToolInfo> ToolAction::validationTools()
{
- QValueList<KDataToolInfo> result;
+ TQValueList<KDataToolInfo> result;
- QValueList<KDataToolInfo> tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
+ TQValueList<KDataToolInfo> tools = KDataToolInfo::query("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
- for( QValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
+ for( TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin(); entry != tools.end(); ++entry )
{
if( (*entry).commands().contains("validate") )
{
diff --git a/kbabel/commonui/toolaction.h b/kbabel/commonui/toolaction.h
index fba7863c..7159aaf2 100644
--- a/kbabel/commonui/toolaction.h
+++ b/kbabel/commonui/toolaction.h
@@ -32,7 +32,7 @@
#ifndef TOOLACTION_H
#define TOOLACTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include <kdatatool.h>
@@ -43,29 +43,29 @@ class KDE_EXPORT ToolAction : public KAction
{
Q_OBJECT
public:
- ToolAction( const QString & text, const KShortcut& cut, const KDataToolInfo & info, const QString & command, QObject * parent = 0, const char * name = 0);
+ ToolAction( const TQString & text, const KShortcut& cut, const KDataToolInfo & info, const TQString & command, TQObject * parent = 0, const char * name = 0);
/**
* return the list of KActions created for a list of tools. @ref command
* allows to specify rescriction of commands, for which the list should
* or shouldn't be created according to the @ref excludeCommand flag.
*/
- static QPtrList<KAction> dataToolActionList( const QValueList<KDataToolInfo> & tools, const QObject *receiver, const char* slot, const QStringList& command, bool excludeCommand, KActionCollection* parent=0, const QString& namePrefix=QString::null );
+ static TQPtrList<KAction> dataToolActionList( const TQValueList<KDataToolInfo> & tools, const TQObject *receiver, const char* slot, const TQStringList& command, bool excludeCommand, KActionCollection* parent=0, const TQString& namePrefix=TQString::null );
/**
* returns information about all available validation tools (KDataTools with support for CatalogItem
* and the "validate" command.
*/
- static QValueList<KDataToolInfo> validationTools();
+ static TQValueList<KDataToolInfo> validationTools();
signals:
- void toolActivated( const KDataToolInfo & info, const QString & command );
+ void toolActivated( const KDataToolInfo & info, const TQString & command );
protected:
virtual void slotActivated();
private:
- QString m_command;
+ TQString m_command;
KDataToolInfo m_info;
};
diff --git a/kbabel/commonui/toolselectionwidget.cpp b/kbabel/commonui/toolselectionwidget.cpp
index 56759490..1e97f473 100644
--- a/kbabel/commonui/toolselectionwidget.cpp
+++ b/kbabel/commonui/toolselectionwidget.cpp
@@ -34,33 +34,33 @@
#include <kdatatool.h>
#include <kdebug.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
-ToolSelectionWidget::ToolSelectionWidget( QWidget * parent, const char * name )
+ToolSelectionWidget::ToolSelectionWidget( TQWidget * parent, const char * name )
: KActionSelector( parent, name )
{
}
-void ToolSelectionWidget::loadTools( const QStringList &commands,
- const QValueList<KDataToolInfo>& tools)
+void ToolSelectionWidget::loadTools( const TQStringList &commands,
+ const TQValueList<KDataToolInfo>& tools)
{
if ( tools.isEmpty() ) return;
_allTools = tools;
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList userCommands = (*entry).userCommands();
- QStringList toolCommands = (*entry).commands();
+ TQStringList userCommands = (*entry).userCommands();
+ TQStringList toolCommands = (*entry).commands();
Q_ASSERT(!toolCommands.isEmpty());
if ( toolCommands.count() != userCommands.count() )
kdWarning() << "KDataTool desktop file error (" << (*entry).service()
<< "). " << toolCommands.count() << " commands and "
<< userCommands.count() << " descriptions." << endl;
- QStringList::ConstIterator uit = userCommands.begin();
- QStringList::ConstIterator cit = toolCommands.begin();
+ TQStringList::ConstIterator uit = userCommands.begin();
+ TQStringList::ConstIterator cit = toolCommands.begin();
for (; uit != userCommands.end() && cit != toolCommands.end(); ++uit, ++cit )
{
if( commands.contains(*cit) )
@@ -71,14 +71,14 @@ void ToolSelectionWidget::loadTools( const QStringList &commands,
}
}
-void ToolSelectionWidget::setSelectedTools( const QStringList& tools )
+void ToolSelectionWidget::setSelectedTools( const TQStringList& tools )
{
availableListBox()->clear();
selectedListBox()->clear();
- QValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
- QString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
+ TQString uic=*(*entry).userCommands().at((*entry).commands().findIndex("validate"));
if( tools.contains((*entry).service()->library()) )
selectedListBox()->insertItem( uic );
else
@@ -86,14 +86,14 @@ void ToolSelectionWidget::setSelectedTools( const QStringList& tools )
}
}
-QStringList ToolSelectionWidget::selectedTools()
+TQStringList ToolSelectionWidget::selectedTools()
{
- QStringList usedNames;
+ TQStringList usedNames;
for( uint i=0; i<selectedListBox()->count() ; i++ )
usedNames += selectedListBox()->text(i);
- QStringList result;
- QValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
+ TQStringList result;
+ TQValueList<KDataToolInfo>::ConstIterator entry = _allTools.begin();
for( ; entry != _allTools.end(); ++entry )
{
if( usedNames.contains(*((*entry).userCommands().at((*entry).commands().findIndex("validate")))) )
diff --git a/kbabel/commonui/toolselectionwidget.h b/kbabel/commonui/toolselectionwidget.h
index 391f15dd..bbc08ca0 100644
--- a/kbabel/commonui/toolselectionwidget.h
+++ b/kbabel/commonui/toolselectionwidget.h
@@ -41,17 +41,17 @@ class KDE_EXPORT ToolSelectionWidget : public KActionSelector
{
Q_OBJECT
public:
- ToolSelectionWidget(QWidget* parent=0, const char* name=0 );
+ ToolSelectionWidget(TQWidget* parent=0, const char* name=0 );
- QStringList selectedTools();
+ TQStringList selectedTools();
- void loadTools (const QStringList& commands, const QValueList<KDataToolInfo> & tools);
+ void loadTools (const TQStringList& commands, const TQValueList<KDataToolInfo> & tools);
public slots:
- void setSelectedTools( const QStringList& tools );
+ void setSelectedTools( const TQStringList& tools );
private:
- QValueList<KDataToolInfo> _allTools;
+ TQValueList<KDataToolInfo> _allTools;
};
#endif
diff --git a/kbabel/datatools/accelerators/main.cc b/kbabel/datatools/accelerators/main.cc
index 2bf6ec90..632eb7b5 100644
--- a/kbabel/datatools/accelerators/main.cc
+++ b/kbabel/datatools/accelerators/main.cc
@@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_accelstool, KGenericFactory<AcceleratorTool>
using namespace KBabel;
-AcceleratorTool::AcceleratorTool( QObject* parent, const char* name, const QStringList & )
+AcceleratorTool::AcceleratorTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
// bogus translation just for allowing the translation
i18n("what check found errors","accelerator");
}
-bool AcceleratorTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool AcceleratorTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -96,26 +96,26 @@ bool AcceleratorTool::run( const QString& command, void* data, const QString& da
if(!item->isUntranslated())
{
// FIXME: this should care about plural forms in msgid
- QString lineid=item->msgid().first();
+ TQString lineid=item->msgid().first();
lineid.replace( _context, "");
- lineid.replace(QRegExp("\\n"),"");
+ lineid.replace(TQRegExp("\\n"),"");
lineid.simplifyWhiteSpace();
- QString regStr(_marker);
+ TQString regStr(_marker);
regStr+="[^\\s]";
- QRegExp reg(regStr);
+ TQRegExp reg(regStr);
- QStringList str = item->msgstr(true);
- for( QStringList::Iterator form = str.begin() ; form != str.end(); form++ )
+ TQStringList str = item->msgstr(true);
+ for( TQStringList::Iterator form = str.begin() ; form != str.end(); form++ )
{
- QString linestr=(*form);
+ TQString linestr=(*form);
linestr.simplifyWhiteSpace();
int n = lineid.contains(reg);
if( _marker == '&' )
- n = n - lineid.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ n = n - lineid.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
int m = linestr.contains(reg);
if( _marker == '&' )
- m = m - linestr.contains(QRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
+ m = m - linestr.contains(TQRegExp("(&[a-z,A-Z,\\-,0-9,#]*;)|(&&(?!&+))"));
hasError = hasError || ( n<=1 && m != n);
}
}
diff --git a/kbabel/datatools/accelerators/main.h b/kbabel/datatools/accelerators/main.h
index 4eba780e..ee9ae3a8 100644
--- a/kbabel/datatools/accelerators/main.h
+++ b/kbabel/datatools/accelerators/main.h
@@ -37,19 +37,19 @@
#include <kdatatool.h>
-#include <qregexp.h>
+#include <tqregexp.h>
class AcceleratorTool : public KDataTool
{
Q_OBJECT
public:
- AcceleratorTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ AcceleratorTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- QRegExp _context;
- QChar _marker;
+ TQRegExp _context;
+ TQChar _marker;
KBabel::Project::Ptr _cache_origin;
};
diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc
index fd3daf3c..e80c7c35 100644
--- a/kbabel/datatools/arguments/main.cc
+++ b/kbabel/datatools/arguments/main.cc
@@ -51,13 +51,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory<ArgumentTool> ( "kb
using namespace KBabel;
-ArgumentTool::ArgumentTool( QObject* parent, const char* name, const QStringList & )
+ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n( "what check found errors","arguments");
}
-bool ArgumentTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool ArgumentTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -96,13 +96,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
if(!item->isUntranslated())
{
- QString formatChars="dioxXucsfeEgGp%";
+ TQString formatChars="dioxXucsfeEgGp%";
if( _checkPlurals ) formatChars+="n";
// FIXME: this should care about plural forms in msgid
- QString line=item->msgid().first();
- QStringList argList;
+ TQString line=item->msgid().first();
+ TQStringList argList;
// if( isPluralForm() )
{
@@ -114,17 +114,17 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
line.replace(_context, "");
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
- int index=line.find(QRegExp("%."));
+ int index=line.find(TQRegExp("%."));
while(index>=0)
{
- int endIndex=line.find(QRegExp("[^\\d]"),index+1);
+ int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
@@ -135,15 +135,15 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
if(endIndex - index > 1 ) {
- QString arg = line.mid(index,endIndex-index);
- if( arg.contains( QRegExp("\\d") ) ) {
+ TQString arg = line.mid(index,endIndex-index);
+ if( arg.contains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
- index=line.find(QRegExp("%."),endIndex);
+ index=line.find(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
@@ -157,22 +157,22 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
// generate for each plural form to be checked separately
line=item->msgstr().first();
- QStringList lines;
+ TQStringList lines;
// FIXME; this is KDE specific
if( item->pluralForm() == KDESpecific )
{
- lines = QStringList::split("\\n",line);
+ lines = TQStringList::split("\\n",line);
}
else
{
lines.append(line);
}
- QStringList argCache = argList;
- QStringList foundArgs;
+ TQStringList argCache = argList;
+ TQStringList foundArgs;
- for(QStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
+ for(TQStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
{
// initialize for the next plural form
foundArgs.clear();
@@ -180,9 +180,9 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
line=(*i);
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
- QRegExp argdesc(
+ TQRegExp argdesc(
"%((["+formatChars+"])"
+"|(\\d)+"
+"|(\\d)+\\$(["+formatChars+"])"
@@ -204,7 +204,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
argList = argCache;
if( non_gnu ) {
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
if( argList.find( *it ) == argList.end() ) {
hasError = true;
break;
@@ -220,11 +220,11 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
else
{
// handle GNU with replacements
- QStringList::Iterator oit = argList.begin();
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
+ TQStringList::Iterator oit = argList.begin();
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
if( *it == *oit ) {
// argument is the same, mark as used
- *oit = QString::null;
+ *oit = TQString::null;
} else {
// try to strip replacement
int index = (*it).find( '$' );
@@ -233,13 +233,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
hasError = true;
break;
}
- QString place = (*it).mid( 1, index-1 );
- QString arg = (*it).right( index );
+ TQString place = (*it).mid( 1, index-1 );
+ TQString arg = (*it).right( index );
arg[0] = '%';
- QStringList::Iterator a = argList.at( place.toInt()-1 );
+ TQStringList::Iterator a = argList.at( place.toInt()-1 );
if( a != argList.end() && (*a) == arg )
{
- (*a) = QString::null;
+ (*a) = TQString::null;
}
else
{
@@ -249,7 +249,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
- for ( QStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
+ for ( TQStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
if( ! (*it).isNull () ) {
// argument is the same, mark as used
hasError = true;
diff --git a/kbabel/datatools/arguments/main.h b/kbabel/datatools/arguments/main.h
index 1f258ca9..ea7e4e23 100644
--- a/kbabel/datatools/arguments/main.h
+++ b/kbabel/datatools/arguments/main.h
@@ -37,18 +37,18 @@
#include <kdatatool.h>
-#include <qregexp.h>
+#include <tqregexp.h>
class ArgumentTool : public KDataTool
{
Q_OBJECT
public:
- ArgumentTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ ArgumentTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
bool _checkPlurals;
};
diff --git a/kbabel/datatools/context/main.cc b/kbabel/datatools/context/main.cc
index 7715cedd..066ef430 100644
--- a/kbabel/datatools/context/main.cc
+++ b/kbabel/datatools/context/main.cc
@@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_contexttool, KGenericFactory<ContextTool> ( "
using namespace KBabel;
-ContextTool::ContextTool( QObject* parent, const char* name, const QStringList & )
+ContextTool::ContextTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n("what check found errors","context info");
}
-bool ContextTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool ContextTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
diff --git a/kbabel/datatools/context/main.h b/kbabel/datatools/context/main.h
index 80388d17..8dc24e9f 100644
--- a/kbabel/datatools/context/main.h
+++ b/kbabel/datatools/context/main.h
@@ -42,11 +42,11 @@ class ContextTool : public KDataTool
Q_OBJECT
public:
- ContextTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ ContextTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
};
#endif
diff --git a/kbabel/datatools/equations/main.cc b/kbabel/datatools/equations/main.cc
index 14a03cd6..64d19adf 100644
--- a/kbabel/datatools/equations/main.cc
+++ b/kbabel/datatools/equations/main.cc
@@ -52,13 +52,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_equationstool, KGenericFactory<EquationsTool>
using namespace KBabel;
-EquationsTool::EquationsTool( QObject* parent, const char* name, const QStringList & )
+EquationsTool::EquationsTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _equation("^[a-zA-Z0-9]+=.+")
{
i18n("what check found errors","equations");
}
-bool EquationsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool EquationsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -90,7 +90,7 @@ bool EquationsTool::run( const QString& command, void* data, const QString& data
&& item->msgid().first().contains(_equation))
{
int index = item->msgid().first().find('=');
- QString left = item->msgid().first().left(index);
+ TQString left = item->msgid().first().left(index);
index = item->msgstr().first().find('=');
if(left != item->msgstr().first().left(index))
hasError = true;
diff --git a/kbabel/datatools/equations/main.h b/kbabel/datatools/equations/main.h
index 15337a1b..72fae529 100644
--- a/kbabel/datatools/equations/main.h
+++ b/kbabel/datatools/equations/main.h
@@ -33,7 +33,7 @@
#ifndef __main_h__
#define __main_h__
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdatatool.h>
class EquationsTool : public KDataTool
@@ -41,10 +41,10 @@ class EquationsTool : public KDataTool
Q_OBJECT
public:
- EquationsTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ EquationsTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- QRegExp _equation;
+ TQRegExp _equation;
};
#endif
diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc
index 6e62c626..5b2bc411 100644
--- a/kbabel/datatools/length/main.cc
+++ b/kbabel/datatools/length/main.cc
@@ -55,13 +55,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_lengthtool, KGenericFactory<LengthTool> ( "kb
using namespace KBabel;
-LengthTool::LengthTool( QObject* parent, const char* name, const QStringList & )
+LengthTool::LengthTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n("which check found errors","translation has inconsistent length");
}
-bool LengthTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool LengthTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -89,7 +89,7 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
CatalogItem* item = (CatalogItem*)(data);
bool hasError = false;
- QStringList str, id;
+ TQStringList str, id;
if(!item->isUntranslated()) {
@@ -102,9 +102,9 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//Ensure KDE plural forms are in a StringList
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
@@ -116,11 +116,11 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//FIXME: replace 10% check with configurable setting or a statistical
//based expected length relationship
int idlen, strlen;
- for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- QString iditem = (*i);
- idlen = iditem.replace( QRegExp(_context),"").length();
- for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
- QString stritem = (*j);
+ for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
+ TQString iditem = (*i);
+ idlen = iditem.replace( TQRegExp(_context),"").length();
+ for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
+ TQString stritem = (*j);
strlen = stritem.length();
hasError = hasError || (strlen < (0.1 * idlen))
|| (strlen > (10 * idlen));
diff --git a/kbabel/datatools/length/main.h b/kbabel/datatools/length/main.h
index 7e84cf55..6a4ec06f 100644
--- a/kbabel/datatools/length/main.h
+++ b/kbabel/datatools/length/main.h
@@ -43,12 +43,12 @@ class LengthTool : public KDataTool
Q_OBJECT
public:
- LengthTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ LengthTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
- QRegExp _plurals;
+ TQRegExp _context;
+ TQRegExp _plurals;
};
#endif
diff --git a/kbabel/datatools/not-translated/main.cc b/kbabel/datatools/not-translated/main.cc
index 0714caf3..22e23c84 100644
--- a/kbabel/datatools/not-translated/main.cc
+++ b/kbabel/datatools/not-translated/main.cc
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_nottranslatedtool, KGenericFactory<NotTransla
using namespace KBabel;
-NotTranslatedTool::NotTranslatedTool( QObject* parent, const char* name, const QStringList & )
+NotTranslatedTool::NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ) , _cache_origin( 0 )
{
i18n("which check found errors","English text in translation");
}
-bool NotTranslatedTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool NotTranslatedTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -97,19 +97,19 @@ bool NotTranslatedTool::run( const QString& command, void* data, const QString&
}
//FIXME Expand this to do substring matching of non-translation
- QStringList id, str;
+ TQStringList id, str;
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
- for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- QString id_str = (*i).replace( QRegExp(_context), "");
- for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
- QString str_str = (*j);
+ for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
+ TQString id_str = (*i).replace( TQRegExp(_context), "");
+ for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
+ TQString str_str = (*j);
hasError = hasError || ( id_str == str_str );
}
}
diff --git a/kbabel/datatools/not-translated/main.h b/kbabel/datatools/not-translated/main.h
index 3b1176e8..c1aeabd8 100644
--- a/kbabel/datatools/not-translated/main.h
+++ b/kbabel/datatools/not-translated/main.h
@@ -43,13 +43,13 @@ class NotTranslatedTool : public KDataTool
Q_OBJECT
public:
- NotTranslatedTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ NotTranslatedTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
- QRegExp _plurals;
+ TQRegExp _context;
+ TQRegExp _plurals;
};
#endif
diff --git a/kbabel/datatools/pluralforms/main.cc b/kbabel/datatools/pluralforms/main.cc
index 4d275e60..87dfef71 100644
--- a/kbabel/datatools/pluralforms/main.cc
+++ b/kbabel/datatools/pluralforms/main.cc
@@ -53,13 +53,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_pluraltool, KGenericFactory<PluralsTool> ( "k
using namespace KBabel;
-PluralsTool::PluralsTool( QObject* parent, const char* name, const QStringList & )
+PluralsTool::PluralsTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 ), _neededForms(-1)
{
i18n("what check found errors", "plural forms");
}
-bool PluralsTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool PluralsTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -106,7 +106,7 @@ bool PluralsTool::run( const QString& command, void* data, const QString& dataty
{
hasError = true;
}
- else if( item->msgstr().first().contains(QString("\\n"))+1 != _neededForms )
+ else if( item->msgstr().first().contains(TQString("\\n"))+1 != _neededForms )
{
hasError = true;
}
diff --git a/kbabel/datatools/pluralforms/main.h b/kbabel/datatools/pluralforms/main.h
index f2101975..420824d2 100644
--- a/kbabel/datatools/pluralforms/main.h
+++ b/kbabel/datatools/pluralforms/main.h
@@ -42,11 +42,11 @@ class PluralsTool : public KDataTool
Q_OBJECT
public:
- PluralsTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ PluralsTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _plurals;
+ TQRegExp _plurals;
int _neededForms;
};
diff --git a/kbabel/datatools/punctuation/main.cc b/kbabel/datatools/punctuation/main.cc
index 433d9711..8806b536 100644
--- a/kbabel/datatools/punctuation/main.cc
+++ b/kbabel/datatools/punctuation/main.cc
@@ -51,14 +51,14 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_punctuationtool, KGenericFactory<PunctuationT
using namespace KBabel;
-PunctuationTool::PunctuationTool( QObject* parent, const char* name, const QStringList & )
+PunctuationTool::PunctuationTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
// bogus translation just for allowing the translation
i18n("what check found errors","punctuation");
}
-bool PunctuationTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool PunctuationTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -88,23 +88,23 @@ bool PunctuationTool::run( const QString& command, void* data, const QString& da
if(!item->isUntranslated())
{
- QString lineid=item->msgid().first();
+ TQString lineid=item->msgid().first();
// lookup punctuation in original text
- QRegExp punc("[\\.!\\?:]+$");
+ TQRegExp punc("[\\.!\\?:]+$");
int i = lineid.find(punc);
- QString t("");
+ TQString t("");
if( i != -1 ) t = lineid.right(lineid.length()-i);
if( item->pluralForm() != NoPluralForm )
{
// check, that both plural forms contain the same punctuation
- QString pl = *(item->msgid().at(1));
+ TQString pl = *(item->msgid().at(1));
int j = pl.find(punc);
- QString tp("");
+ TQString tp("");
if( j != -1 ) tp = pl.right(pl.length()-j);
if( tp != t )
@@ -113,14 +113,14 @@ bool PunctuationTool::run( const QString& command, void* data, const QString& da
}
}
- QStringList forms = item->msgstr(true);
+ TQStringList forms = item->msgstr(true);
if( item->pluralForm() == KDESpecific ) {
- forms = QStringList::split("\\n",*item->msgstr(true).at(0));
+ forms = TQStringList::split("\\n",*item->msgstr(true).at(0));
}
- for( QStringList::Iterator form = forms.begin() ; form != forms.end(); form++ )
+ for( TQStringList::Iterator form = forms.begin() ; form != forms.end(); form++ )
{
- QString linestr=(*form);
+ TQString linestr=(*form);
int j = linestr.find(punc);
diff --git a/kbabel/datatools/punctuation/main.h b/kbabel/datatools/punctuation/main.h
index 63a36d62..eb30293f 100644
--- a/kbabel/datatools/punctuation/main.h
+++ b/kbabel/datatools/punctuation/main.h
@@ -40,8 +40,8 @@ class PunctuationTool : public KDataTool
Q_OBJECT
public:
- PunctuationTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ PunctuationTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
};
#endif
diff --git a/kbabel/datatools/regexp/main.cc b/kbabel/datatools/regexp/main.cc
index a101d5c9..eca0be81 100644
--- a/kbabel/datatools/regexp/main.cc
+++ b/kbabel/datatools/regexp/main.cc
@@ -27,11 +27,11 @@
#include "main.h"
#include <math.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -49,16 +49,16 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_regexptool, KGenericFactory<RegExpTool> ( "kb
using namespace KBabel;
-RegExpTool::RegExpTool( QObject* parent, const char* name, const QStringList & )
+RegExpTool::RegExpTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
i18n("which check found errors","translation has inconsistent length");
loadExpressions();
if ( ! _error.isNull() )
- KMessageBox::error( (QWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
+ KMessageBox::error( (TQWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
}
-bool RegExpTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool RegExpTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -86,8 +86,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
if(!item->isUntranslated()) {
ExpressionList::Iterator it( _list.begin() );
ExpressionList::Iterator end( _list.end() );
- QStringList msgs = item->msgstr();
- QStringList results;
+ TQStringList msgs = item->msgstr();
+ TQStringList results;
for ( ; it != end; ++it ) {
results.clear();
results = msgs.grep( (*it).regExp() );
@@ -110,8 +110,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
void RegExpTool::loadExpressions()
{
// TODO: Change file path
- QFile file( QDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
- QDomDocument doc;
+ TQFile file( TQDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
+ TQDomDocument doc;
if ( ! file.open( IO_ReadOnly ) ) {
kdDebug() << "File not found" << endl;
@@ -125,10 +125,10 @@ void RegExpTool::loadExpressions()
}
file.close();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() )
elementToExpression( e );
if ( ! _error.isNull() )
@@ -137,10 +137,10 @@ void RegExpTool::loadExpressions()
}
}
-void RegExpTool::elementToExpression( const QDomElement& e )
+void RegExpTool::elementToExpression( const TQDomElement& e )
{
- QString name;
- QString exp;
+ TQString name;
+ TQString exp;
bool cs = false; //Expressions are case insensitive by default
if ( e.tagName().compare( "item" ) != 0 ) {
@@ -148,13 +148,13 @@ void RegExpTool::elementToExpression( const QDomElement& e )
return;
}
- QDomNode n = e.firstChild();
+ TQDomNode n = e.firstChild();
if ( n.isNull() ) {
_error = i18n( "First child of 'item' is not a node" );
return;
}
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
if ( el.isNull() || el.tagName().compare( "name" ) != 0 ) {
_error = i18n( "Expected tag 'name'" );
return;
@@ -175,7 +175,7 @@ void RegExpTool::elementToExpression( const QDomElement& e )
cs = true;
kdDebug(KBABEL) << "RegExpTool: Adding expression: " << name << endl;
- _list.append( Expression( name, QRegExp( exp, cs ) ) );
+ _list.append( Expression( name, TQRegExp( exp, cs ) ) );
}
#include "main.moc"
diff --git a/kbabel/datatools/regexp/main.h b/kbabel/datatools/regexp/main.h
index 4ae8953b..c81f96a0 100644
--- a/kbabel/datatools/regexp/main.h
+++ b/kbabel/datatools/regexp/main.h
@@ -25,7 +25,7 @@
#define __main_h__
#include <kdatatool.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class QDomElement;
@@ -33,41 +33,41 @@ class Expression
{
public:
Expression() {};
- Expression( const QString& name, const QRegExp& regExp )
+ Expression( const TQString& name, const TQRegExp& regExp )
{
_name = name;
_regExp = regExp;
}
- const QString& name() const
+ const TQString& name() const
{
return _name;
}
- const QRegExp& regExp() const
+ const TQRegExp& regExp() const
{
return _regExp;
}
private:
- QString _name;
- QRegExp _regExp;
+ TQString _name;
+ TQRegExp _regExp;
};
-typedef QValueList<Expression> ExpressionList;
+typedef TQValueList<Expression> ExpressionList;
class RegExpTool : public KDataTool
{
Q_OBJECT
public:
- RegExpTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ RegExpTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
void loadExpressions();
- void elementToExpression( const QDomElement& e );
+ void elementToExpression( const TQDomElement& e );
ExpressionList _list;
- QString _error;
+ TQString _error;
};
#endif
diff --git a/kbabel/datatools/setfuzzy/main.cc b/kbabel/datatools/setfuzzy/main.cc
index 373560ec..54bbcb57 100644
--- a/kbabel/datatools/setfuzzy/main.cc
+++ b/kbabel/datatools/setfuzzy/main.cc
@@ -49,12 +49,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_setfuzzytool, KGenericFactory<SetFuzzyTool> (
using namespace KBabel;
-SetFuzzyTool::SetFuzzyTool( QObject* parent, const char* name, const QStringList & )
+SetFuzzyTool::SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
}
-bool SetFuzzyTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool SetFuzzyTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "allfuzzy" )
{
diff --git a/kbabel/datatools/setfuzzy/main.h b/kbabel/datatools/setfuzzy/main.h
index 5c86bf15..45e0bc38 100644
--- a/kbabel/datatools/setfuzzy/main.h
+++ b/kbabel/datatools/setfuzzy/main.h
@@ -40,8 +40,8 @@ class SetFuzzyTool : public KDataTool
Q_OBJECT
public:
- SetFuzzyTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ SetFuzzyTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
};
#endif
diff --git a/kbabel/datatools/whitespace/main.cc b/kbabel/datatools/whitespace/main.cc
index 882815a5..7bfa50b2 100644
--- a/kbabel/datatools/whitespace/main.cc
+++ b/kbabel/datatools/whitespace/main.cc
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_whitespacetool, KGenericFactory<WhitespaceToo
using namespace KBabel;
-WhitespaceTool::WhitespaceTool( QObject* parent, const char* name, const QStringList & )
+WhitespaceTool::WhitespaceTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 ), _equation("^[a-zA-Z0-9]+=")
{
i18n("which check found errors","whitespace only translation");
}
-bool WhitespaceTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool WhitespaceTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -89,8 +89,8 @@ bool WhitespaceTool::run( const QString& command, void* data, const QString& dat
CatalogItem* item = (CatalogItem*)(data);
bool hasIdError = false;
bool hasStrError = false;
- QRegExp _whitespace("^\\s+$");
- QStringList str, id;
+ TQRegExp _whitespace("^\\s+$");
+ TQStringList str, id;
if(!item->isUntranslated()) {
if( _cache_origin != item->project() )
@@ -102,28 +102,28 @@ bool WhitespaceTool::run( const QString& command, void* data, const QString& dat
//Ensure KDE plural forms are in a StringList
//FIXME Eliminate context information and this could become a generic message splitter
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
}
//Strip equations
- id.first().replace( QRegExp(_equation), "");
- str.first().replace( QRegExp(_equation), "");
+ id.first().replace( TQRegExp(_equation), "");
+ str.first().replace( TQRegExp(_equation), "");
//Ignore Messages with blank msgid components
- for( QStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
- QString resultstring = (*it);
+ for( TQStringList::Iterator it = id.begin() ; it != id.end() ; it++ ) {
+ TQString resultstring = (*it);
hasIdError = hasIdError || resultstring.contains(_whitespace);
}
if( hasIdError ) return true;
- //Check each QString in the List is not whitespace
- for( QStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
- QString resultstring = (*it);
+ //Check each TQString in the List is not whitespace
+ for( TQStringList::Iterator it = str.begin() ; it != str.end() ; it++ ) {
+ TQString resultstring = (*it);
hasStrError = hasStrError || resultstring.contains(_whitespace);
}
diff --git a/kbabel/datatools/whitespace/main.h b/kbabel/datatools/whitespace/main.h
index 2a234457..c8cd373a 100644
--- a/kbabel/datatools/whitespace/main.h
+++ b/kbabel/datatools/whitespace/main.h
@@ -36,7 +36,7 @@
#include "kbproject.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdatatool.h>
class WhitespaceTool : public KDataTool
@@ -44,12 +44,12 @@ class WhitespaceTool : public KDataTool
Q_OBJECT
public:
- WhitespaceTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ WhitespaceTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _plurals;
- QRegExp _equation;
+ TQRegExp _plurals;
+ TQRegExp _equation;
};
#endif
diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc
index cae88b4c..3bcf66da 100644
--- a/kbabel/datatools/xml/main.cc
+++ b/kbabel/datatools/xml/main.cc
@@ -35,7 +35,7 @@
#include "catalogsettings.h"
#include "main.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory<XMLTool> ( "kbabelda
using namespace KBabel;
-XMLTool::XMLTool( QObject* parent, const char* name, const QStringList & )
+XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n( "what check found errors", "XML tags" );
}
-bool XMLTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool XMLTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -93,9 +93,9 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
}
uint correctnessLevel = 0;
- QString msgid = item->msgid().first();
+ TQString msgid = item->msgid().first();
msgid.replace( "\\\"", "\"" ); // Change '\"' to '"'
- msgid.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
msgid.replace( _context, "" );
msgid.replace("\n",""); // delete newlines
@@ -130,12 +130,12 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
if(!item->isUntranslated())
{
- QStringList str = item->msgstr(true);
- for( QStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
+ TQStringList str = item->msgstr(true);
+ for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ )
{
- QString text=(*form);
+ TQString text=(*form);
text.replace( "\\\"", "\"" ); // Change '\"' to '"'
- text.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
+ text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
// isNonCaseWithoutCommonCompliant can fail
// even though higher level checks works
@@ -171,34 +171,34 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype,
return FALSE;
}
-bool XMLTool::isFullyCompliant( const QString& text)
+bool XMLTool::isFullyCompliant( const TQString& text)
{
- QDomDocument doc;
+ TQDomDocument doc;
return doc.setContent("<para>" + text + "</para>" );
}
-bool XMLTool::isNonCaseCompliant( const QString& text)
+bool XMLTool::isNonCaseCompliant( const TQString& text)
{
- QDomDocument doc;
- QString test = text.lower();
+ TQDomDocument doc;
+ TQString test = text.lower();
return doc.setContent("<para>" + test + "</para>" );
}
-bool XMLTool::isNonCaseWithoutCommonCompliant( const QString& text)
+bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text)
{
- QDomDocument doc;
- QString test = text.lower();
- QRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
+ TQDomDocument doc;
+ TQString test = text.lower();
+ TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" );
test.replace( rx, "" );
- QString a;
+ TQString a;
do
{
a = test;
- test.replace( QRegExp("<[^_:A-Za-z/]"), "" );
+ test.replace( TQRegExp("<[^_:A-Za-z/]"), "" );
} while( a!=test);
- test.replace( QRegExp("<$"), "" );
+ test.replace( TQRegExp("<$"), "" );
return doc.setContent("<para>" + test + "</para>" );
}
diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h
index 357a4f0d..68c06cdb 100644
--- a/kbabel/datatools/xml/main.h
+++ b/kbabel/datatools/xml/main.h
@@ -35,7 +35,7 @@
#include "kbproject.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <kdatatool.h>
class XMLTool : public KDataTool
@@ -43,17 +43,17 @@ class XMLTool : public KDataTool
Q_OBJECT
public:
- XMLTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ XMLTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- bool isFullyCompliant( const QString& text);
- bool isNonCaseCompliant( const QString& text);
- bool isNonCaseWithoutCommonCompliant( const QString& text);
+ bool isFullyCompliant( const TQString& text);
+ bool isNonCaseCompliant( const TQString& text);
+ bool isNonCaseWithoutCommonCompliant( const TQString& text);
- QMap<QString,int> _levelCache;
+ TQMap<TQString,int> _levelCache;
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
};
#endif
diff --git a/kbabel/filters/gettext/gettextexport.cpp b/kbabel/filters/gettext/gettextexport.cpp
index e951847b..c2fe9c67 100644
--- a/kbabel/filters/gettext/gettextexport.cpp
+++ b/kbabel/filters/gettext/gettextexport.cpp
@@ -40,8 +40,8 @@
#include "catalogsettings.h"
#include "kbprojectsettings.h"
-#include <qfile.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -51,12 +51,12 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextexport, KGenericFactory<GettextExportP
using namespace KBabel;
-GettextExportPlugin::GettextExportPlugin(QObject* parent, const char* name, const QStringList &) :
+GettextExportPlugin::GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &) :
CatalogExportPlugin(parent,name), m_wrapWidth( -1 )
{
}
-ConversionStatus GettextExportPlugin::save(const QString& localFile , const QString& mimetype, const Catalog* catalog)
+ConversionStatus GettextExportPlugin::save(const TQString& localFile , const TQString& mimetype, const Catalog* catalog)
{
// check, whether we know how to handle the extra data
if( catalog->importPluginID() != "GNU gettext")
@@ -66,14 +66,14 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
if( mimetype != "application/x-gettext")
return UNSUPPORTED_TYPE;
- QFile file(localFile);
+ TQFile file(localFile);
if(file.open(IO_WriteOnly))
{
int progressRatio = QMAX(100/ QMAX(catalog->numberOfEntries(),1), 1);
emit signalResetProgressBar(i18n("saving file"),100);
- QTextStream stream(&file);
+ TQTextStream stream(&file);
SaveSettings _saveSettings = catalog->saveSettings();
@@ -86,26 +86,26 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
switch(_saveSettings.encoding)
{
case ProjectSettingsBase::UTF8:
- stream.setCodec(QTextCodec::codecForName("utf-8"));
+ stream.setCodec(TQTextCodec::codecForName("utf-8"));
break;
case ProjectSettingsBase::UTF16:
- stream.setCodec(QTextCodec::codecForName("utf-16"));
+ stream.setCodec(TQTextCodec::codecForName("utf-16"));
break;
default:
- stream.setCodec(QTextCodec::codecForLocale());
+ stream.setCodec(TQTextCodec::codecForLocale());
break;
}
}
// only save header if it is not empty
- const QString headerComment( catalog->header().comment() );
+ const TQString headerComment( catalog->header().comment() );
// ### TODO: why is this useful to have a header with an empty msgstr?
if( !headerComment.isEmpty() || !catalog->header().msgstr().isEmpty() )
{
// write header
writeComment( stream, headerComment );
- const QString headerMsgid = catalog->header().msgid().first();
+ const TQString headerMsgid = catalog->header().msgid().first();
// Gettext PO files should have an empty msgid as header
if ( !headerMsgid.isEmpty() )
@@ -122,7 +122,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
stream << "\n";
}
- QStringList list;
+ TQStringList list;
for( uint counter = 0; counter < catalog->numberOfEntries() ; counter++ )
{
if(counter%10==0) {
@@ -132,7 +132,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
// write entry
writeComment( stream, catalog->comment(counter) );
- const QString msgctxt = catalog->msgctxt(counter);
+ const TQString msgctxt = catalog->msgctxt(counter);
if (! msgctxt.isEmpty() )
{
writeKeyword( stream, "msgctxt", msgctxt );
@@ -154,8 +154,8 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
const int forms = catalog->msgstr( counter ).count();
for ( int i = 0; i < forms; ++i )
{
- QString keyword ( "msgstr[" );
- keyword += QString::number( i );
+ TQString keyword ( "msgstr[" );
+ keyword += TQString::number( i );
keyword += ']';
writeKeyword( stream, keyword, *( catalog->msgstr( counter ).at( i ) ) );
@@ -173,9 +173,9 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
if( _saveSettings.saveObsolete )
{
- QValueList<QString>::ConstIterator oit;
+ TQValueList<TQString>::ConstIterator oit;
- QStringList _obsolete = catalog->catalogExtraData();
+ TQStringList _obsolete = catalog->catalogExtraData();
for( oit = _obsolete.begin(); oit != _obsolete.end(); ++oit )
{
@@ -203,7 +203,7 @@ ConversionStatus GettextExportPlugin::save(const QString& localFile , const QStr
return OK;
}
-void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comment ) const
+void GettextExportPlugin::writeComment( TQTextStream& stream, const TQString& comment ) const
{
if( !comment.isEmpty() )
{
@@ -218,13 +218,13 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm
stream << "\n";
continue;
}
- const QString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) );
+ const TQString span ( ( newpos == -1 ) ? comment.mid( pos ) : comment.mid( pos, newpos-pos ) );
const int len = span.length();
- QString spaces; // Stored leading spaces
+ TQString spaces; // Stored leading spaces
for ( int i = 0 ; i < len ; ++i )
{
- const QChar& ch = span[ i ];
+ const TQChar& ch = span[ i ];
if ( ch == '#' )
{
stream << spaces << span.mid( i );
@@ -252,7 +252,7 @@ void GettextExportPlugin::writeComment( QTextStream& stream, const QString& comm
}
}
-void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const
+void GettextExportPlugin::writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const
{
if ( text.isEmpty() )
{
@@ -263,20 +263,20 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
else if ( m_wrapWidth == -1 )
{
// Traditional KBabel wrapping
- QStringList list = QStringList::split( '\n', text );
+ TQStringList list = TQStringList::split( '\n', text );
if ( text.startsWith( "\n" ) )
- list.prepend( QString() );
+ list.prepend( TQString() );
if(list.isEmpty())
- list.append( QString() );
+ list.append( TQString() );
if( list.count() > 1 )
- list.prepend( QString() );
+ list.prepend( TQString() );
stream << keyword << " ";
- QStringList::const_iterator it;
+ TQStringList::const_iterator it;
for( it = list.constBegin(); it != list.constEnd(); ++it )
{
stream << "\"" << (*it) << "\"\n";
@@ -290,7 +290,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
// No wrapping (like Gettext's --no.wrap or -w0 )
// we need to remove the \n characters, as they are extra characters
- QString realText( text );
+ TQString realText( text );
realText.remove( '\n' );
stream << keyword << " \"" << realText << "\"\n";
return;
@@ -301,7 +301,7 @@ void GettextExportPlugin::writeKeyword( QTextStream& stream, const QString& keyw
// From here on, we assume that we have an non-empty text and a positive non-null m_wrapWidth
// we need to remove the \n characters, as they are extra characters
- QString realText( text );
+ TQString realText( text );
realText.remove( '\n' );
bool needFirstEmptyLine = false;
diff --git a/kbabel/filters/gettext/gettextexport.h b/kbabel/filters/gettext/gettextexport.h
index 81cbe9c4..3c694d1a 100644
--- a/kbabel/filters/gettext/gettextexport.h
+++ b/kbabel/filters/gettext/gettextexport.h
@@ -35,7 +35,7 @@
#include <catalogfileplugin.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KBabel {
class Catalog;
@@ -53,20 +53,20 @@ class QTextCodec;
class GettextExportPlugin: public KBabel::CatalogExportPlugin
{
public:
- GettextExportPlugin(QObject* parent, const char* name, const QStringList &);
- virtual KBabel::ConversionStatus save(const QString& file, const QString& mimetype, const KBabel::Catalog* catalog);
+ GettextExportPlugin(TQObject* parent, const char* name, const TQStringList &);
+ virtual KBabel::ConversionStatus save(const TQString& file, const TQString& mimetype, const KBabel::Catalog* catalog);
private:
/**
* Write a PO comment to @p stream and take care that each comment lines start with a # character
*/
- void writeComment( QTextStream& stream, const QString& comment ) const;
+ void writeComment( TQTextStream& stream, const TQString& comment ) const;
/**
* Write a PO keyword (msgctxt, msgid, msgstr, msgstr_plural, msgstr[0]) and the corresponding text.
* This includes wrapping the text.
*/
- void writeKeyword( QTextStream& stream, const QString& keyword, const QString& text ) const;
+ void writeKeyword( TQTextStream& stream, const TQString& keyword, const TQString& text ) const;
public:
/**
diff --git a/kbabel/filters/gettext/gettextimport.cpp b/kbabel/filters/gettext/gettextimport.cpp
index 3f54301d..9210c1a9 100644
--- a/kbabel/filters/gettext/gettextimport.cpp
+++ b/kbabel/filters/gettext/gettextimport.cpp
@@ -39,10 +39,10 @@
#include <catalogitem.h>
#include <resources.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -53,11 +53,11 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_gettextimport, KGenericFactory<GettextImportP
using namespace KBabel;
-GettextImportPlugin::GettextImportPlugin(QObject* parent, const char* name, const QStringList &) : CatalogImportPlugin(parent,name)
+GettextImportPlugin::GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &) : CatalogImportPlugin(parent,name)
{
}
-ConversionStatus GettextImportPlugin::load(const QString& filename, const QString&)
+ConversionStatus GettextImportPlugin::load(const TQString& filename, const TQString&)
{
kdDebug( KBABEL ) << k_funcinfo << endl;
@@ -66,7 +66,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
return NO_FILE;
}
- QFileInfo info(filename);
+ TQFileInfo info(filename);
if(!info.exists() || info.isDir())
return NO_FILE;
@@ -74,7 +74,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
if(!info.isReadable())
return NO_PERMISSIONS;
- QFile file(filename);
+ TQFile file(filename);
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
@@ -82,23 +82,23 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
uint oldPercent = 0;
emit signalResetProgressBar(i18n("loading file"),100);
- QByteArray ba = file.readAll();
+ TQByteArray ba = file.readAll();
file.close();
// find codec for file
bool hadCodec;
- QTextCodec* codec=codecForArray( ba, &hadCodec );
+ TQTextCodec* codec=codecForArray( ba, &hadCodec );
bool recoveredErrorInHeader = false;
- QTextStream stream(ba,IO_ReadOnly);
+ TQTextStream stream(ba,IO_ReadOnly);
if(codec)
stream.setCodec(codec);
else
{
kdWarning() << "No encoding declared or found, using UTF-8" << endl;
- stream.setEncoding( QTextStream::UnicodeUTF8 );
+ stream.setEncoding( TQTextStream::UnicodeUTF8 );
#ifdef __GNUC__
# warning Default UTF-8 encoding needs to be improved
#endif
@@ -106,12 +106,12 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
//recoveredErrorInHeader = true;
}
- QIODevice *dev = stream.device();
+ TQIODevice *dev = stream.device();
int fileSize = dev->size();
// if somethings goes wrong with the parsing, we don't have deleted the old contents
CatalogItem tempHeader;
- QStringList tempObsolete;
+ TQStringList tempObsolete;
kdDebug(KBABEL) << "start parsing..." << endl;
@@ -139,15 +139,15 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
{
// The header must have an empty msgid
kdWarning(KBABEL) << "Header entry has non-empty msgid. Creating a temporary header! " << _msgid << endl;
- tempHeader.setMsgid( QStringList() );
- QStringList tmp;
+ tempHeader.setMsgid( TQStringList() );
+ TQStringList tmp;
tmp.append(
"Content-Type: text/plain; charset=UTF-8\\n" // Unknown charset
"Content-Transfer-Encoding: 8bit\\n"
"Mime-Version: 1.0" );
tempHeader.setMsgstr( tmp );
// We keep the comment of the first entry, as it might really be a header comment (at least partially)
- const QString comment( "# Header entry was created by KBabel!\n#\n" + _comment );
+ const TQString comment( "# Header entry was created by KBabel!\n#\n" + _comment );
tempHeader.setComment( comment );
recoveredErrorInHeader = true;
}
@@ -167,7 +167,7 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
// now parse the rest of the file
uint counter=0;
- QValueList<uint> errorIndex;
+ TQValueList<uint> errorIndex;
bool recoveredError=false;
bool docbookFile=false;
@@ -289,17 +289,17 @@ ConversionStatus GettextImportPlugin::load(const QString& filename, const QStrin
}
}
-QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec)
+TQTextCodec* GettextImportPlugin::codecForArray(TQByteArray& array, bool* hadCodec)
{
if(hadCodec)
{
*hadCodec=false;
}
- QTextStream stream( array, IO_ReadOnly );
- // ### TODO Qt4: see if it can be done with QByteArray alone, in an encoding-neutral way.
+ TQTextStream stream( array, IO_ReadOnly );
+ // ### TODO Qt4: see if it can be done with TQByteArray alone, in an encoding-neutral way.
// Set ISO-8859-1 as it is a relatively neutral encoding when reading (compared to UTF-8 or a random locale encoing)
- stream.setEncoding( QTextStream::Latin1 );
+ stream.setEncoding( TQTextStream::Latin1 );
// first read header
ConversionStatus status = readHeader(stream);
@@ -309,19 +309,19 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
return 0;
}
- const QString head = _msgstr.first();
+ const TQString head = _msgstr.first();
- QRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
+ TQRegExp regexp("Content-Type:\\s*\\w+/[-\\w]+;?\\s*charset\\s*=\\s*(\\S+)\\s*\\\\n");
if( regexp.search( head ) == -1 )
{
kdDebug(KBABEL) << "no charset entry found" << endl;
return 0;
}
- const QString charset = regexp.cap(1);
+ const TQString charset = regexp.cap(1);
kdDebug(KBABEL) << "charset: " << charset << endl;
- QTextCodec* codec=0;
+ TQTextCodec* codec=0;
if(!charset.isEmpty())
{
@@ -333,14 +333,14 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
if(hadCodec)
*hadCodec=false;
- codec=QTextCodec::codecForName("utf8");
+ codec=TQTextCodec::codecForName("utf8");
kdDebug(KBABEL)
- << QString("file seems to be a template: using utf-8 encoding.")
+ << TQString("file seems to be a template: using utf-8 encoding.")
<< endl;
}
else
{
- codec=QTextCodec::codecForName(charset.latin1());
+ codec=TQTextCodec::codecForName(charset.latin1());
if(hadCodec)
*hadCodec=true;
}
@@ -360,7 +360,7 @@ QTextCodec* GettextImportPlugin::codecForArray(QByteArray& array, bool* hadCodec
return codec;
}
-ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream)
+ConversionStatus GettextImportPlugin::readHeader(TQTextStream& stream)
{
CatalogItem temp;
int filePos=stream.device()->at();
@@ -380,25 +380,25 @@ ConversionStatus GettextImportPlugin::readHeader(QTextStream& stream)
return PARSE_ERROR;
}
-ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
+ConversionStatus GettextImportPlugin::readEntry(TQTextStream& stream)
{
//kdDebug( KBABEL ) << k_funcinfo << " START" << endl;
enum {Begin,Comment,Msgctxt,Msgid,Msgstr} part=Begin;
- QString line;
+ TQString line;
bool error=false;
bool recoverableError=false;
bool seenMsgctxt=false;
_msgstr.clear();
- _msgstr.append(QString());
+ _msgstr.append(TQString());
_msgid.clear();
- _msgid.append(QString());
- _msgctxt=QString();
- _comment=QString();
+ _msgid.append(TQString());
+ _msgctxt=TQString();
+ _comment=TQString();
_gettextPluralForm=false;
_obsolete=false;
- QStringList::Iterator msgstrIt=_msgstr.begin();
+ TQStringList::Iterator msgstrIt=_msgstr.begin();
while( !stream.eof() )
{
@@ -439,34 +439,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
part=Comment;
_comment=line;
}
- else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgctxt\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgctxt\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -494,34 +494,34 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
_comment+=("\n"+line);
}
- else if(line.find(QRegExp("^msgctxt\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgctxt\\s*\".*\"$")) != -1)
{
part=Msgctxt;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgctxt\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgctxt\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgctxt=line;
seenMsgctxt=true;
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -539,11 +539,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
// add Msgctxt line to item
if(_msgctxt.isEmpty())
@@ -551,24 +551,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
else
_msgctxt+=("\n"+line);
}
- else if(line.find(QRegExp("^msgid\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\".*\"$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\""));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*(_msgid).begin())=line;
@@ -586,13 +586,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
{
if(line.isEmpty())
continue;
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
if(_gettextPluralForm)
it = _msgid.fromLast();
else
@@ -604,26 +604,26 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
else
(*it)+=("\n"+line);
}
- else if(line.find(QRegExp("^msgid_plural\\s*\".*\"$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\".*\"$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid_plural\\s*\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid_plural\\s*\""));
+ line.remove(TQRegExp("\"$"));
_msgid.append(line);
}
// one of the quotation marks is missing
- else if(line.find(QRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
+ else if(line.find(TQRegExp("^msgid_plural\\s*\"?.*\"?$")) != -1)
{
part=Msgid;
_gettextPluralForm = true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgid_plural\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgid_plural\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
_msgid.append(line);
@@ -631,24 +631,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
recoverableError=true;
}
else if(!_gettextPluralForm
- && (line.find(QRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
}
else if(!_gettextPluralForm
- && line.find(QRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
+ && line.find(TQRegExp("^msgstr\\s*\"?.*\\n?\"?$")) != -1)
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
@@ -656,24 +656,24 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
recoverableError=true;
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\".*\\n?\"$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[0\\]\\s*\"?.*\\n?\"?$")) != -1))
{
part=Msgstr;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[0\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[0\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
(*msgstrIt)=line;
@@ -694,15 +694,15 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
break;
}
// a line of the msgid with a missing quotation mark
- else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
- QStringList::Iterator it;
+ TQStringList::Iterator it;
if( _gettextPluralForm )
it = _msgid.fromLast();
else
@@ -726,11 +726,11 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
if(line.isEmpty())
continue;
// another line of the msgstr
- else if(line.find(QRegExp("^\".*\\n?\"$")) != -1)
+ else if(line.find(TQRegExp("^\".*\\n?\"$")) != -1)
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
if((*msgstrIt).isEmpty())
(*msgstrIt)=line;
@@ -738,27 +738,27 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
(*msgstrIt)+=("\n"+line);
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\".*\\n?\"$")) != -1))
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[[0-9]+\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
msgstrIt=_msgstr.append(line);
}
else if( _gettextPluralForm
- && (line.find(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
+ && (line.find(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?.*\\n?\"?$")) != -1))
{
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^msgstr\\[[0-9]\\]\\s*\"?"));
+ line.remove(TQRegExp("\"$"));
msgstrIt=_msgstr.append(line);
if(!line.isEmpty())
recoverableError=true;
}
- else if((line.find(QRegExp("^\\s*msgid")) != -1) || (line.find(QRegExp("^\\s*#")) != -1))
+ else if((line.find(TQRegExp("^\\s*msgid")) != -1) || (line.find(TQRegExp("^\\s*#")) != -1))
{
// We have read successfully one entry, so end loop.
stream.device()->at(pos);// reset position in stream to beginning of this line
@@ -771,13 +771,13 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
break;
}
// another line of the msgstr with a missing quotation mark
- else if(line.find(QRegExp("^\"?.+\\n?\"?$")) != -1)
+ else if(line.find(TQRegExp("^\"?.+\\n?\"?$")) != -1)
{
recoverableError=true;
// remove quotes at beginning and the end of the lines
- line.remove(QRegExp("^\""));
- line.remove(QRegExp("\"$"));
+ line.remove(TQRegExp("^\""));
+ line.remove(TQRegExp("\"$"));
if((*msgstrIt).isEmpty())
(*msgstrIt)=line;
@@ -800,7 +800,7 @@ ConversionStatus GettextImportPlugin::readEntry(QTextStream& stream)
<< "msgid:\n" << _msgid.first() << "\n"
<< "msgid_plural:\n" << _msgid.last() << "\n" << endl;
int counter=0;
- for(QStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it)
+ for(TQStringList::Iterator it = _msgstr.begin(); it != _msgstr.end(); ++it)
{
kdDebug(KBABEL) << "msgstr[" << counter << "]:\n"
<< (*it) << endl;
diff --git a/kbabel/filters/gettext/gettextimport.h b/kbabel/filters/gettext/gettextimport.h
index e28ec790..dc84e404 100644
--- a/kbabel/filters/gettext/gettextimport.h
+++ b/kbabel/filters/gettext/gettextimport.h
@@ -35,7 +35,7 @@
#include <catalogfileplugin.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KURL;
class QFile;
@@ -49,20 +49,20 @@ class QTextCodec;
class GettextImportPlugin: public KBabel::CatalogImportPlugin
{
public:
- GettextImportPlugin(QObject* parent, const char* name, const QStringList &);
- virtual KBabel::ConversionStatus load(const QString& file, const QString& mimetype);
- virtual const QString id() { return "GNU gettext"; }
+ GettextImportPlugin(TQObject* parent, const char* name, const TQStringList &);
+ virtual KBabel::ConversionStatus load(const TQString& file, const TQString& mimetype);
+ virtual const TQString id() { return "GNU gettext"; }
private:
- QTextCodec* codecForArray(QByteArray& arary, bool* hadCodec);
- KBabel::ConversionStatus readHeader(QTextStream& stream);
- KBabel::ConversionStatus readEntry(QTextStream& stream);
+ TQTextCodec* codecForArray(TQByteArray& arary, bool* hadCodec);
+ KBabel::ConversionStatus readHeader(TQTextStream& stream);
+ KBabel::ConversionStatus readEntry(TQTextStream& stream);
// description of the last read entry
- QString _msgctxt;
- QStringList _msgid;
- QStringList _msgstr;
- QString _comment;
+ TQString _msgctxt;
+ TQStringList _msgid;
+ TQStringList _msgstr;
+ TQString _comment;
bool _gettextPluralForm;
bool _obsolete;
};
diff --git a/kbabel/filters/linguist/linguistexport.cpp b/kbabel/filters/linguist/linguistexport.cpp
index 3b69e20a..af0a3298 100644
--- a/kbabel/filters/linguist/linguistexport.cpp
+++ b/kbabel/filters/linguist/linguistexport.cpp
@@ -36,11 +36,11 @@
**************************************************************************** */
-#include <qfile.h>
-#include "qregexp.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include "tqregexp.h"
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kgenericfactory.h>
@@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistexport, KGenericFactory<LinguistExpor
using namespace KBabel;
-LinguistExportPlugin::LinguistExportPlugin( QObject * parent, const char * name, const QStringList& )
+LinguistExportPlugin::LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogExportPlugin( parent, name )
{
}
-ConversionStatus LinguistExportPlugin::save( const QString& filename, const QString&, const Catalog * catalog )
+ConversionStatus LinguistExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog )
{
// Check whether we know how to handle the extra data.
if ( catalog->importPluginID( ) != "Qt translation source" )
return UNSUPPORTED_TYPE;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return OS_ERROR;
SaveSettings settings = catalog->saveSettings( );
// New DOM document.
- QDomDocument doc( "TS" );
+ TQDomDocument doc( "TS" );
// Create the root element.
doc.appendChild( doc.createElement( "TS" ) );
@@ -82,36 +82,36 @@ ConversionStatus LinguistExportPlugin::save( const QString& filename, const QStr
// Regular messages.
for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) {
- QString comment( extractComment( doc, catalog->comment( i ), fuzzy ) );
+ TQString comment( extractComment( doc, catalog->comment( i ), fuzzy ) );
createMessage( doc, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ),
comment, false, fuzzy );
}
// Obsolete messages.
if ( settings.saveObsolete ) {
- QValueList<CatalogItem> obsMessages = catalog->obsoleteEntries( );
- QValueList<CatalogItem>::Iterator it;
+ TQValueList<CatalogItem> obsMessages = catalog->obsoleteEntries( );
+ TQValueList<CatalogItem>::Iterator it;
for ( it = obsMessages.begin( ); it != obsMessages.end( ); ++it ) {
- QString comment( extractComment( doc, (*it).comment( ), fuzzy ) );
+ TQString comment( extractComment( doc, (*it).comment( ), fuzzy ) );
createMessage( doc, (*it).msgid( true ).join( "" ), (*it).msgstr( true ).join( "" ),
comment, true, fuzzy );
}
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
doc.save( stream, 2 );
file.close( );
return OK;
}
-const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QString& s, bool& fuzzy )
+const TQString LinguistExportPlugin::extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy )
{
fuzzy = false;
- QString comment( s );
+ TQString comment( s );
if ( !comment.isEmpty( ) ) {
// Extract the context and the actual comment.
- comment.remove( QRegExp( "^Context:[\\s]*" ) );
+ comment.remove( TQRegExp( "^Context:[\\s]*" ) );
/*
* HACK
*
@@ -129,28 +129,28 @@ const QString LinguistExportPlugin::extractComment( QDomDocument& doc, const QSt
comment.remove("#, fuzzy");
}
- QString newContext;
+ TQString newContext;
pos = comment.find( '\n' );
if ( pos >= 0 ) {
newContext = comment.left( pos );
- comment.replace( 0, pos + 1, "" ); // ### TODO: use QString::remove
+ comment.replace( 0, pos + 1, "" ); // ### TODO: use TQString::remove
} else {
newContext = comment;
- comment = ""; // ### TODO: use QString() instead of ""
+ comment = ""; // ### TODO: use TQString() instead of ""
}
setContext( doc, newContext );
}
return comment;
}
-void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgid,
- const QString& msgstr, const QString& comment,
+void LinguistExportPlugin::createMessage( TQDomDocument& doc, const TQString& msgid,
+ const TQString& msgstr, const TQString& comment,
const bool obsolete, const bool fuzzy )
{
- QDomElement elem;
- QDomText text;
+ TQDomElement elem;
+ TQDomText text;
- QDomElement messageElement = doc.createElement( "message" );
+ TQDomElement messageElement = doc.createElement( "message" );
elem = doc.createElement( "source" );
text = doc.createTextNode( msgid );
@@ -179,17 +179,17 @@ void LinguistExportPlugin::createMessage( QDomDocument& doc, const QString& msgi
contextElement.appendChild( messageElement );
}
-void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext )
+void LinguistExportPlugin::setContext( TQDomDocument& doc, TQString newContext )
{
// Nothing to do here.
if ( newContext == context )
return;
- // Find out whether there is already such a context in the QDomDocument.
- QDomNode node = doc.documentElement( ).firstChild( );
+ // Find out whether there is already such a context in the TQDomDocument.
+ TQDomNode node = doc.documentElement( ).firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.firstChild( ).toElement( );
+ TQDomElement elem = node.firstChild( ).toElement( );
if ( elem.isElement( ) && elem.tagName( ) == "name" && elem.text( ) == newContext ) {
// We found the context.
context = newContext;
@@ -205,8 +205,8 @@ void LinguistExportPlugin::setContext( QDomDocument& doc, QString newContext )
contextElement = doc.createElement( "context" );
doc.documentElement( ).appendChild( contextElement );
// Appropriate name element.
- QDomElement nameElement = doc.createElement( "name" );
- QDomText text = doc.createTextNode( newContext );
+ TQDomElement nameElement = doc.createElement( "name" );
+ TQDomText text = doc.createTextNode( newContext );
nameElement.appendChild( text );
contextElement.appendChild( nameElement );
// Store new context.
diff --git a/kbabel/filters/linguist/linguistexport.h b/kbabel/filters/linguist/linguistexport.h
index 3201f95f..2ad80bd7 100644
--- a/kbabel/filters/linguist/linguistexport.h
+++ b/kbabel/filters/linguist/linguistexport.h
@@ -37,7 +37,7 @@
#ifndef LINGUISTEXPORT_H
#define LINGUISTEXPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -51,18 +51,18 @@ class Catalog;
class LinguistExportPlugin : public KBabel::CatalogExportPlugin
{
public:
- LinguistExportPlugin( QObject * parent, const char * name, const QStringList& );
- virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog );
+ LinguistExportPlugin( TQObject * parent, const char * name, const TQStringList& );
+ virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog );
private:
- const QString extractComment( QDomDocument& doc, const QString& s, bool& fuzzy );
- void createMessage( QDomDocument& doc, const QString& msgid, const QString& msgstr,
- const QString& comment, const bool obsolete, const bool fuzzy );
- void setContext( QDomDocument& doc, QString newContext );
+ const TQString extractComment( TQDomDocument& doc, const TQString& s, bool& fuzzy );
+ void createMessage( TQDomDocument& doc, const TQString& msgid, const TQString& msgstr,
+ const TQString& comment, const bool obsolete, const bool fuzzy );
+ void setContext( TQDomDocument& doc, TQString newContext );
private:
- QString context;
- QDomElement contextElement;
+ TQString context;
+ TQDomElement contextElement;
};
#endif // LINGUISTEXPORT_H
diff --git a/kbabel/filters/linguist/linguistimport.cpp b/kbabel/filters/linguist/linguistimport.cpp
index 220c0634..a1870bd7 100644
--- a/kbabel/filters/linguist/linguistimport.cpp
+++ b/kbabel/filters/linguist/linguistimport.cpp
@@ -38,12 +38,12 @@
**************************************************************************** */
// Qt include files
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -55,19 +55,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_linguistimport, KGenericFactory<LinguistImpor
using namespace KBabel;
-LinguistImportPlugin::LinguistImportPlugin( QObject * parent, const char * name, const QStringList& )
+LinguistImportPlugin::LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogImportPlugin( parent, name )
{
}
-ConversionStatus LinguistImportPlugin::load( const QString& filename, const QString& )
+ConversionStatus LinguistImportPlugin::load( const TQString& filename, const TQString& )
{
if ( filename.isEmpty( ) ) {
kdDebug( ) << "fatal error: empty filename to open" << endl;
return NO_FILE;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.exists( ) || info.isDir( ) )
return NO_FILE;
@@ -75,14 +75,14 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
if ( !info.isReadable( ) )
return NO_PERMISSIONS;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, &errorMsg, &errorLine, &errorColumn ) ) {
file.close( );
kdError() << "Parsing error at line " << errorLine << ", column " << errorColumn << ", error " << errorMsg << endl;
@@ -90,7 +90,7 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
}
file.close( );
- const QDomElement documentElement( doc.documentElement() );
+ const TQDomElement documentElement( doc.documentElement() );
// Count the number of messages in this file. This is needed for updating
// the progress bar correctly.
msgcnt = documentElement.elementsByTagName( "message" ).count();
@@ -113,13 +113,13 @@ ConversionStatus LinguistImportPlugin::load( const QString& filename, const QStr
return OK;
}
-void LinguistImportPlugin::parse( const QDomElement& parentElement )
+void LinguistImportPlugin::parse( const TQDomElement& parentElement )
{
- QDomNode node = parentElement.firstChild( );
+ TQDomNode node = parentElement.firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.toElement( );
+ TQDomElement elem = node.toElement( );
if ( elem.tagName( ) == "context" ) {
// nothing to do here
@@ -127,14 +127,14 @@ void LinguistImportPlugin::parse( const QDomElement& parentElement )
context = elem.text( );
} else if ( elem.tagName( ) == "message" ) {
CatalogItem item;
- QString comment;
+ TQString comment;
bool isObsolete = false;
bool isFuzzy = false;
- QDomNode childNode = node.firstChild();
+ TQDomNode childNode = node.firstChild();
for ( ; ! childNode.isNull() ; childNode = childNode.nextSibling() )
{
- const QDomElement elem = childNode.toElement();
+ const TQDomElement elem = childNode.toElement();
if ( elem.isNull() )
continue;
@@ -155,7 +155,7 @@ void LinguistImportPlugin::parse( const QDomElement& parentElement )
}
}
- QString fullComment = "Context: " + context;
+ TQString fullComment = "Context: " + context;
if ( isFuzzy )
{
/*
diff --git a/kbabel/filters/linguist/linguistimport.h b/kbabel/filters/linguist/linguistimport.h
index 3cdbd7e3..8c6fdbc0 100644
--- a/kbabel/filters/linguist/linguistimport.h
+++ b/kbabel/filters/linguist/linguistimport.h
@@ -37,7 +37,7 @@
#ifndef LINGUISTIMPORT_H
#define LINGUISTIMPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -50,19 +50,19 @@ class QStringList;
class LinguistImportPlugin : public KBabel::CatalogImportPlugin
{
public:
- LinguistImportPlugin( QObject * parent, const char * name, const QStringList& );
+ LinguistImportPlugin( TQObject * parent, const char * name, const TQStringList& );
- virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype );
- virtual const QString id( ) { return "Qt translation source"; }
+ virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype );
+ virtual const TQString id( ) { return "Qt translation source"; }
private:
- void parse( const QDomElement& parentElement );
+ void parse( const TQDomElement& parentElement );
private:
uint msgcnt;
uint cnt;
- QString context;
- //QStringList obsMessages;
+ TQString context;
+ //TQStringList obsMessages;
};
#endif // LINGUISTIMPORT_H
diff --git a/kbabel/filters/xliff/xliffexport.cpp b/kbabel/filters/xliff/xliffexport.cpp
index 53527f2c..9400b9c6 100644
--- a/kbabel/filters/xliff/xliffexport.cpp
+++ b/kbabel/filters/xliff/xliffexport.cpp
@@ -36,11 +36,11 @@
**************************************************************************** */
-#include <qfile.h>
-#include "qregexp.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include "tqregexp.h"
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kgenericfactory.h>
@@ -53,25 +53,25 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffexport, KGenericFactory<XLIFFExportPlugi
using namespace KBabel;
-XLIFFExportPlugin::XLIFFExportPlugin( QObject * parent, const char * name, const QStringList& )
+XLIFFExportPlugin::XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogExportPlugin( parent, name )
{
}
-ConversionStatus XLIFFExportPlugin::save( const QString& filename, const QString&, const Catalog * catalog )
+ConversionStatus XLIFFExportPlugin::save( const TQString& filename, const TQString&, const Catalog * catalog )
{
// Check whether we know how to handle the extra data.
if ( catalog->importPluginID( ) != "XLIFF 1.1" )
return UNSUPPORTED_TYPE;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return OS_ERROR;
SaveSettings settings = catalog->saveSettings( );
// New DOM document.
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
extraData = catalog->catalogExtraData();
kdDebug () << "Setting the document data: " << extraData.first () << endl;
@@ -79,20 +79,20 @@ ConversionStatus XLIFFExportPlugin::save( const QString& filename, const QString
// Regular messages.
for ( uint i = 0; i < catalog->numberOfEntries( ); i++ ) {
- QDomElement element = extractComment( doc, *(extraData.at( i+1 )) );
+ TQDomElement element = extractComment( doc, *(extraData.at( i+1 )) );
createMessage( doc, element, catalog->msgid( i ).join( "" ), catalog->msgstr( i ).join( "" ) );
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
doc.save( stream, 2 );
file.close( );
return OK;
}
-QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString& s )
+TQDomElement XLIFFExportPlugin::extractComment( TQDomDocument& doc, const TQString& s )
{
- QString comment( s );
+ TQString comment( s );
if ( comment.isEmpty () )
{
@@ -100,27 +100,27 @@ QDomElement XLIFFExportPlugin::extractComment( QDomDocument& doc, const QString&
}
// Extract the context and the actual comment.
- comment.remove( QRegExp( "^Context:[\\s]*" ) );
- QString newContext;
- QStringList commentlines = QStringList::split ( '\n', comment);
+ comment.remove( TQRegExp( "^Context:[\\s]*" ) );
+ TQString newContext;
+ TQStringList commentlines = TQStringList::split ( '\n', comment);
- QString file = *(commentlines.at(0));
- QString id = *(commentlines.at(1));
+ TQString file = *(commentlines.at(0));
+ TQString id = *(commentlines.at(1));
kdDebug () << "Looking for file " << file << endl;
return getContext( doc, file, id );
}
-void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translationElement, const QString& msgid,
- const QString& msgstr )
+void XLIFFExportPlugin::createMessage( TQDomDocument& doc, TQDomElement& translationElement, const TQString& msgid,
+ const TQString& msgstr )
{
// for empty messages, don't store anything
if (msgstr.isEmpty ())
return;
// find the trans element
- QDomNode node = translationElement.firstChild( );
+ TQDomNode node = translationElement.firstChild( );
while ( !node.isNull( ) ) {
kdDebug () << node.nodeName () << endl;
if ( node.isElement() && node.toElement().tagName( ) == "target") {
@@ -139,16 +139,16 @@ void XLIFFExportPlugin::createMessage( QDomDocument& doc, QDomElement& translati
node = doc.createElement ("target");
translationElement.appendChild (node);
- QDomText data = doc.createTextNode(msgstr );
+ TQDomText data = doc.createTextNode(msgstr );
node.appendChild( data );
}
}
-QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& file, const QString& id )
+TQDomElement XLIFFExportPlugin::getContext( TQDomDocument& doc, const TQString& file, const TQString& id )
{
- // Find out whether there is already such a context in the QDomDocument.
- QDomNode parentelem = doc.documentElement();
- QDomNode elem = doc.documentElement( ).firstChild( );
+ // Find out whether there is already such a context in the TQDomDocument.
+ TQDomNode parentelem = doc.documentElement();
+ TQDomNode elem = doc.documentElement( ).firstChild( );
while ( !elem.isNull( ) ) {
if ( elem.isElement( ) && elem.toElement().tagName( ) == "file" && elem.toElement().attribute ("original") == file ) {
kdDebug () << "We have found the file" << endl;
@@ -160,7 +160,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "File not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("file");
+ TQDomElement newelem = doc.createElement ("file");
newelem.setAttribute ("original", file);
parentelem.appendChild (newelem);
elem = newelem;
@@ -180,7 +180,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "File body not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("body");
+ TQDomElement newelem = doc.createElement ("body");
parentelem.appendChild (newelem);
elem = newelem;
}
@@ -190,7 +190,7 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
if (elem.isNull ())
{
kdError () << "Trans-unit not found at all, creating" << endl;
- QDomElement newelem = doc.createElement ("trans-unit");
+ TQDomElement newelem = doc.createElement ("trans-unit");
newelem.setAttribute ("id", id);
parentelem.appendChild (newelem);
elem = newelem;
@@ -199,16 +199,16 @@ QDomElement XLIFFExportPlugin::getContext( QDomDocument& doc, const QString& fil
return elem.toElement ();
}
-QDomElement XLIFFExportPlugin::findTransUnit( QDomNode& group, const QString& id )
+TQDomElement XLIFFExportPlugin::findTransUnit( TQDomNode& group, const TQString& id )
{
- QDomNode elem = group.firstChild( );
+ TQDomNode elem = group.firstChild( );
// lookup correct trans-unit tag
while ( !elem.isNull( ) ) {
if ( elem.isElement( ) && elem.toElement().tagName() == "group" )
{
// search recursively
- QDomElement res = findTransUnit( elem, id );
+ TQDomElement res = findTransUnit( elem, id );
if (! res.isNull () )
return res.toElement();
}
diff --git a/kbabel/filters/xliff/xliffexport.h b/kbabel/filters/xliff/xliffexport.h
index 5bf64b25..2e720b82 100644
--- a/kbabel/filters/xliff/xliffexport.h
+++ b/kbabel/filters/xliff/xliffexport.h
@@ -37,7 +37,7 @@
#ifndef XLIFFEXPORT_H
#define XLIFFEXPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -51,16 +51,16 @@ class Catalog;
class XLIFFExportPlugin : public KBabel::CatalogExportPlugin
{
public:
- XLIFFExportPlugin( QObject * parent, const char * name, const QStringList& );
- virtual KBabel::ConversionStatus save( const QString& filename, const QString& mimetype, const KBabel::Catalog * catalog );
+ XLIFFExportPlugin( TQObject * parent, const char * name, const TQStringList& );
+ virtual KBabel::ConversionStatus save( const TQString& filename, const TQString& mimetype, const KBabel::Catalog * catalog );
private:
- QDomElement extractComment( QDomDocument& doc, const QString& s );
- void createMessage( QDomDocument& doc, QDomElement& context, const QString& msgid, const QString& msgstr );
- QDomElement getContext( QDomDocument& doc, const QString& file, const QString& id);
- QDomElement findTransUnit( QDomNode& doc, const QString& id);
+ TQDomElement extractComment( TQDomDocument& doc, const TQString& s );
+ void createMessage( TQDomDocument& doc, TQDomElement& context, const TQString& msgid, const TQString& msgstr );
+ TQDomElement getContext( TQDomDocument& doc, const TQString& file, const TQString& id);
+ TQDomElement findTransUnit( TQDomNode& doc, const TQString& id);
- QStringList extraData;
+ TQStringList extraData;
};
#endif // XLIFFEXPORT_H
diff --git a/kbabel/filters/xliff/xliffimport.cpp b/kbabel/filters/xliff/xliffimport.cpp
index f7de63ce..25f34ec3 100644
--- a/kbabel/filters/xliff/xliffimport.cpp
+++ b/kbabel/filters/xliff/xliffimport.cpp
@@ -48,12 +48,12 @@
*/
// Qt include files
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE include files
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -68,19 +68,19 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xliffimport, KGenericFactory<XLIFFImportPlugi
using namespace KBabel;
-XLIFFImportPlugin::XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& )
+XLIFFImportPlugin::XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& )
: CatalogImportPlugin( parent, name )
{
}
-ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString& )
+ConversionStatus XLIFFImportPlugin::load( const TQString& filename, const TQString& )
{
if ( filename.isEmpty( ) ) {
kdDebug( KDEBUG_AREA ) << "fatal error: empty filename to open" << endl;
return NO_FILE;
}
- QFileInfo info( filename );
+ TQFileInfo info( filename );
if ( !info.exists( ) || info.isDir( ) )
return NO_FILE;
@@ -88,14 +88,14 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
if ( !info.isReadable( ) )
return NO_PERMISSIONS;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
return NO_PERMISSIONS;
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( &file, &errorMsg, &errorLine, &errorColumn ) ) {
file.close( );
kdError ( KDEBUG_AREA ) << "Parsing error at line " << errorLine << ", column " << errorColumn << ", error " << errorMsg << endl;
@@ -105,7 +105,7 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
extraData.clear();
- const QDomElement documentElement( doc.documentElement() );
+ const TQDomElement documentElement( doc.documentElement() );
msgcnt = documentElement.elementsByTagName( "trans-unit" ).count();
extraData.append( doc.toString() );
@@ -128,32 +128,32 @@ ConversionStatus XLIFFImportPlugin::load( const QString& filename, const QString
return OK;
}
-void XLIFFImportPlugin::parse( const QDomElement& parentElement )
+void XLIFFImportPlugin::parse( const TQDomElement& parentElement )
{
- QDomNode node = parentElement.firstChild( );
+ TQDomNode node = parentElement.firstChild( );
while ( !node.isNull( ) ) {
if ( node.isElement( ) ) {
- QDomElement elem = node.toElement( );
+ TQDomElement elem = node.toElement( );
if ( elem.tagName( ) == "body" ) {
// nothing to do here
} else if ( elem.tagName( ) == "file" ) {
- context = elem.attribute( "original", QString() );
+ context = elem.attribute( "original", TQString() );
kdDebug ( KDEBUG_AREA ) << "Found file: " << context << endl;
} else if ( elem.tagName( ) == "trans-unit" ) {
CatalogItem item;
- QString comment;
+ TQString comment;
bool isObsolete = false;
- const QString id = elem.attribute ("id");
+ const TQString id = elem.attribute ("id");
- QDomNode childNode = node.firstChild();
+ TQDomNode childNode = node.firstChild();
for ( ; ! childNode.isNull() ; childNode = childNode.nextSibling() )
{
if ( childNode.isElement() )
{
- const QDomElement elem = childNode.toElement( );
+ const TQDomElement elem = childNode.toElement( );
if ( elem.tagName( ) == "source" ) {
item.setMsgid( elem.text( ) );
} else if ( elem.tagName( ) == "target" ) {
diff --git a/kbabel/filters/xliff/xliffimport.h b/kbabel/filters/xliff/xliffimport.h
index 9cf44835..45dd612e 100644
--- a/kbabel/filters/xliff/xliffimport.h
+++ b/kbabel/filters/xliff/xliffimport.h
@@ -37,7 +37,7 @@
#ifndef XLIFFIMPORT_H
#define XLIFFIMPORT_H
-#include <qdom.h>
+#include <tqdom.h>
#include "catalogfileplugin.h"
@@ -50,19 +50,19 @@ class QStringList;
class XLIFFImportPlugin : public KBabel::CatalogImportPlugin
{
public:
- XLIFFImportPlugin( QObject * parent, const char * name, const QStringList& );
+ XLIFFImportPlugin( TQObject * parent, const char * name, const TQStringList& );
- virtual KBabel::ConversionStatus load( const QString& filename, const QString& mimetype );
- virtual const QString id( ) { return "XLIFF 1.1"; }
+ virtual KBabel::ConversionStatus load( const TQString& filename, const TQString& mimetype );
+ virtual const TQString id( ) { return "XLIFF 1.1"; }
private:
- void parse( const QDomElement& parentElement );
+ void parse( const TQDomElement& parentElement );
private:
uint msgcnt;
uint cnt;
- QString context;
- QStringList extraData;
+ TQString context;
+ TQStringList extraData;
};
#endif // XLIFFIMPORT_H
diff --git a/kbabel/kbabel/charselectview.cpp b/kbabel/kbabel/charselectview.cpp
index 12cd765f..2e58b084 100644
--- a/kbabel/kbabel/charselectview.cpp
+++ b/kbabel/kbabel/charselectview.cpp
@@ -33,11 +33,11 @@
#include "charselectview.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qscrollview.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqscrollview.h>
#include <kconfig.h>
#include <kcursor.h>
@@ -49,24 +49,24 @@
using namespace KBabel;
-CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
layout->setSpacing( KDialog::spacingHint() );
- QHBox* bar = new QHBox(this);
+ TQHBox* bar = new TQHBox(this);
bar->setSpacing( KDialog::spacingHint() );
layout->addWidget (bar);
- QLabel *lTable = new QLabel( i18n( "Table:" ), bar );
- _tableNum = new QSpinBox( 0, 255, 1, bar );
+ TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar );
+ _tableNum = new TQSpinBox( 0, 255, 1, bar );
lTable->setBuddy( _tableNum );
bar->setStretchFactor( _tableNum, 1 );
- QScrollView* scroll = new QScrollView( this );
+ TQScrollView* scroll = new TQScrollView( this );
_table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0);
_table->setNumCols(16);
_table->setNumRows(16);
@@ -74,13 +74,13 @@ CharacterSelectorView::CharacterSelectorView(KBCatalog* catalog,QWidget *parent,
scroll->addChild(_table);
layout->addWidget (scroll);
- connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) );
- connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) ));
+ connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) );
+ connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) ));
- connect( _catalog, SIGNAL( signalFileOpened(bool) ), this, SLOT (setDisabled (bool)));
- connect( _catalog, SIGNAL( signalFileOpened(bool) ), _table, SLOT (setDisabled (bool)));
+ connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), this, TQT_SLOT (setDisabled (bool)));
+ connect( _catalog, TQT_SIGNAL( signalFileOpened(bool) ), _table, TQT_SLOT (setDisabled (bool)));
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>Character Selector</b></p>"
"<p>This tool allows to insert special characters using "
"double click.</p></qt>"));
@@ -101,7 +101,7 @@ void CharacterSelectorView::saveSettings(KConfig* config)
KConfigGroupSaver saver(config, "KBCharSelector" );
config->writeEntry( "TableNum", _tableNum->value() );
- config->writeEntry( "SelectedChar", QString(_table->chr()) );
+ config->writeEntry( "SelectedChar", TQString(_table->chr()) );
}
void CharacterSelectorView::restoreSettings(KConfig* config)
diff --git a/kbabel/kbabel/charselectview.h b/kbabel/kbabel/charselectview.h
index 76ee19b8..7b0fa8a5 100644
--- a/kbabel/kbabel/charselectview.h
+++ b/kbabel/kbabel/charselectview.h
@@ -45,7 +45,7 @@ public:
/**
* Default constructor
*/
- CharacterSelectorView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ CharacterSelectorView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
void saveSettings(KConfig* config);
void restoreSettings(KConfig* config);
@@ -55,7 +55,7 @@ public slots:
virtual void updateView() {}
signals:
- void characterDoubleClicked( QChar ch );
+ void characterDoubleClicked( TQChar ch );
public slots:
void emitChar();
@@ -65,7 +65,7 @@ private slots:
private:
KCharSelectTable* _table;
- QSpinBox* _tableNum;
+ TQSpinBox* _tableNum;
};
#endif // CHARSELECTVIEW_H
diff --git a/kbabel/kbabel/commentview.cpp b/kbabel/kbabel/commentview.cpp
index bf2301de..57d838b9 100644
--- a/kbabel/kbabel/commentview.cpp
+++ b/kbabel/kbabel/commentview.cpp
@@ -35,11 +35,11 @@
#include "commentview.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
-#include <qtextview.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqtextview.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -62,12 +62,12 @@
using namespace KBabel;
-CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+CommentView::CommentView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent, project)
{
setAcceptDrops(true);
- QVBoxLayout* layout=new QVBoxLayout(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(this);
commentEdit = new MsgMultiLineEdit(0, 0, this);
commentEdit->setMinimumHeight(50);
@@ -75,16 +75,16 @@ CommentView::CommentView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec
commentEdit->setHighlightSyntax(false);
KCursor::setAutoHideCursor(commentEdit,true);
- QLabel* label=new QLabel(commentEdit,i18n("&Comment:"),this);
+ TQLabel* label=new TQLabel(commentEdit,i18n("&Comment:"),this);
- QHBoxLayout* hb=new QHBoxLayout(layout);
+ TQHBoxLayout* hb=new TQHBoxLayout(layout);
hb->addSpacing(KDialog::marginHint());
hb->addWidget(label);
layout->addWidget(commentEdit);
layout->setStretchFactor(commentEdit,1);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>Comment Editor</b></p>\n\
This edit window shows you the comments of the currently displayed message.<p>\n\
<p>The comments normally contain information about where the message is found in the source\n\
@@ -94,12 +94,12 @@ Hints from other translators are also sometimes contained in comments.</p>\n\
<b>Options->Show Comments</b>.</p></qt>"));
commentEdit->setReadOnly(true);
- connect(commentEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardCommentEditCmd(KBabel::EditCommand*)));
+ connect(commentEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardCommentEditCmd(KBabel::EditCommand*)));
- connect(commentEdit,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
+ connect(commentEdit,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void CommentView::update(EditCommand* cmd, bool undo)
@@ -178,7 +178,7 @@ void CommentView::readFileSettings()
setReadOnly( _catalog->isReadOnly() );
}
-const QString CommentView::selectText(int from, int to)
+const TQString CommentView::selectText(int from, int to)
{
int line, col, endline, endcol;
@@ -203,12 +203,12 @@ int CommentView::currentIndex ()
return commentEdit->currentIndex ();
}
-const QString CommentView::selectedText ()
+const TQString CommentView::selectedText ()
{
return commentEdit->selectedText ();
}
-void CommentView::installEventFilter( const QObject * filterObj )
+void CommentView::installEventFilter( const TQObject * filterObj )
{
commentEdit->installEventFilter( filterObj );
}
diff --git a/kbabel/kbabel/commentview.h b/kbabel/kbabel/commentview.h
index 1531683b..6d637add 100644
--- a/kbabel/kbabel/commentview.h
+++ b/kbabel/kbabel/commentview.h
@@ -35,7 +35,7 @@
class QTextView;
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kbcatalogview.h"
#include "kbcatalog.h"
@@ -51,7 +51,7 @@ public:
/**
* Default constructor
*/
- CommentView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ CommentView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
/**
* this is called from the catalog when updating his views.
@@ -67,13 +67,13 @@ public:
virtual void textSelectAll ();
virtual void textDeselectAll ();
- const QString selectText( int from, int to );
- const QString selectedText ();
+ const TQString selectText( int from, int to );
+ const TQString selectedText ();
bool isActiveView ();
int currentIndex ();
// this method is not virtual!
- void installEventFilter( const QObject * filterObj );
+ void installEventFilter( const TQObject * filterObj );
bool hasFocus ();
diff --git a/kbabel/kbabel/contextview.cpp b/kbabel/kbabel/contextview.cpp
index e56e15dc..264d4e84 100644
--- a/kbabel/kbabel/contextview.cpp
+++ b/kbabel/kbabel/contextview.cpp
@@ -35,9 +35,9 @@
#include "contextview.h"
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+ContextView::ContextView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
- _textview = new QTextView (this, "context textview");
+ _textview = new TQTextView (this, "context textview");
KCursor::setAutoHideCursor(_textview->viewport(),true);
_textview->setReadOnly(true);
layout->addWidget (_textview);
- QWhatsThis::add(this,
+ TQWhatsThis::add(this,
i18n("<qt><p><b>PO Context</b></p>"
"<p>This window shows the context of the current message "
"in the PO file. Normally it shows four messages in front "
@@ -67,7 +67,7 @@ ContextView::ContextView(KBCatalog* catalog,QWidget *parent, Project::Ptr projec
"<p>You can hide the tools window by deactivating "
"<b>Options->Show Tools</b>.</p></qt></qt>"));
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void ContextView::updateView()
@@ -76,7 +76,7 @@ void ContextView::updateView()
if(total==0)
return;
- QString text;
+ TQString text;
uint startIndex;
uint context = 4;
if(_currentIndex < context)
@@ -100,24 +100,24 @@ void ContextView::updateView()
continue;
}
- QString entry;
- QString temp;
+ TQString entry;
+ TQString temp;
temp = _catalog->comment(i);
if(!temp.isEmpty())
{
- temp = QStyleSheet::convertFromPlainText(temp);
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(temp);
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += "<i>"+temp+"</i><br/>";
}
// FIXME: should care about plural forms
- temp = QStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(_catalog->msgid(i).first());
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp + "<br/>---<br/>";
- QStringList tempList = _catalog->msgstr(i);
+ TQStringList tempList = _catalog->msgstr(i);
if(tempList.isEmpty())
{
@@ -135,14 +135,14 @@ void ContextView::updateView()
{
uint counter = 1;
temp = "";
- for( QStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i)
+ for( TQStringList::Iterator i=tempList.begin() ; i != tempList.end() ; ++i)
{
temp += i18n("Plural %1: %2\n").arg(counter++).arg(*i);
}
}
- temp = QStyleSheet::convertFromPlainText(temp);
- temp.replace(QRegExp("^<p>"),"");
- temp.replace(QRegExp("</p>$"),"");
+ temp = TQStyleSheet::convertFromPlainText(temp);
+ temp.replace(TQRegExp("^<p>"),"");
+ temp.replace(TQRegExp("</p>$"),"");
entry += temp+"<br/>";
}
diff --git a/kbabel/kbabel/contextview.h b/kbabel/kbabel/contextview.h
index 18bd0f4e..f51d3767 100644
--- a/kbabel/kbabel/contextview.h
+++ b/kbabel/kbabel/contextview.h
@@ -44,13 +44,13 @@ public:
/**
* Default constructor
*/
- ContextView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ ContextView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
private:
- QTextView* _textview;
+ TQTextView* _textview;
};
#endif // CONTEXTVIEW_H
diff --git a/kbabel/kbabel/errorlistview.cpp b/kbabel/kbabel/errorlistview.cpp
index 2dcd3b12..c49c7940 100644
--- a/kbabel/kbabel/errorlistview.cpp
+++ b/kbabel/kbabel/errorlistview.cpp
@@ -35,9 +35,9 @@
#include "errorlistview.h"
-#include <qlayout.h>
-#include <qtextview.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtextview.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -47,19 +47,19 @@
using namespace KBabel;
-ErrorListView::ErrorListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+ErrorListView::ErrorListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
- _textview = new QTextView (this);
+ _textview = new TQTextView (this);
KCursor::setAutoHideCursor(_textview->viewport(),true);
_textview->setReadOnly(true);
layout->addWidget(_textview);
- QWhatsThis::add(this, i18n( "<qt><p><b>Error List</b></p>"
+ TQWhatsThis::add(this, i18n( "<qt><p><b>Error List</b></p>"
"<p>This window shows the list of errors found by validator tools "
"so you can know why the current message has been marked with an "
"error.</p></qt>" ) );
diff --git a/kbabel/kbabel/errorlistview.h b/kbabel/kbabel/errorlistview.h
index d50e7ec7..cb1886c9 100644
--- a/kbabel/kbabel/errorlistview.h
+++ b/kbabel/kbabel/errorlistview.h
@@ -43,13 +43,13 @@ public:
/**
* Default constructor
*/
- ErrorListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ ErrorListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
private:
- QTextView* _textview;
+ TQTextView* _textview;
};
#endif // ERRORLISTVIEW_H
diff --git a/kbabel/kbabel/gotodialog.cpp b/kbabel/kbabel/gotodialog.cpp
index f822f0dc..b08b0098 100644
--- a/kbabel/kbabel/gotodialog.cpp
+++ b/kbabel/kbabel/gotodialog.cpp
@@ -31,16 +31,16 @@
**************************************************************************** */
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include <knuminput.h>
#include "gotodialog.h"
-GotoDialog::GotoDialog(int max,QWidget* parent)
+GotoDialog::GotoDialog(int max,TQWidget* parent)
: KDialogBase(parent,0,true,i18n("Go to Entry"),Ok|Cancel)
{
- QGroupBox* box=new QGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this);
+ TQGroupBox* box=new TQGroupBox(1,Qt::Horizontal,i18n("Go to Entry"),this);
_spinBox= new KIntSpinBox(1,max,1,1,10,box);
setMainWidget(box);
diff --git a/kbabel/kbabel/gotodialog.h b/kbabel/kbabel/gotodialog.h
index 4c8378d8..4c033973 100644
--- a/kbabel/kbabel/gotodialog.h
+++ b/kbabel/kbabel/gotodialog.h
@@ -38,14 +38,14 @@
#endif
#include <kdialogbase.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class KIntSpinBox;
class GotoDialog : public KDialogBase
{
public:
- GotoDialog(int max, QWidget* parent);
+ GotoDialog(int max, TQWidget* parent);
virtual ~GotoDialog();
/** reimplemented to select contents when shown*/
diff --git a/kbabel/kbabel/headereditor.cpp b/kbabel/kbabel/headereditor.cpp
index 55ad4eb5..2f686652 100644
--- a/kbabel/kbabel/headereditor.cpp
+++ b/kbabel/kbabel/headereditor.cpp
@@ -49,13 +49,13 @@
using namespace KBabel;
HeaderEditor::HeaderEditor(Catalog* cat,const char* name)
- : KDialogBase((QWidget*)0,name,false,QString::null, Ok|Cancel|Default|User1)
+ : KDialogBase((TQWidget*)0,name,false,TQString::null, Ok|Cancel|Default|User1)
{
restoreSettings();
_catalog=cat;
- connect(_catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(readHeader(bool)));
- connect(_catalog,SIGNAL(signalHeaderChanged()),this,SLOT(updateHeader()));
+ connect(_catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(readHeader(bool)));
+ connect(_catalog,TQT_SIGNAL(signalHeaderChanged()),this,TQT_SLOT(updateHeader()));
setButtonText(User1,i18n("&Apply Settings"));
setButtonWhatsThis (User1, i18n("<qt><p>This button "
@@ -97,7 +97,7 @@ void HeaderEditor::restoreSettings()
KConfigGroupSaver saver(config, "HeaderEditor" );
- QSize defaultSize(350,250);
+ TQSize defaultSize(350,250);
_editorSize = config->readSizeEntry("Size", &defaultSize );
}
@@ -133,7 +133,7 @@ void HeaderEditor::slotUser1()
if(error)
{
- QString msg=i18n("<qt><p>This is not a valid header.</p>\n"
+ TQString msg=i18n("<qt><p>This is not a valid header.</p>\n"
"<p>Please edit the header before updating!</p></qt>");
KMessageBox::sorry(this,msg);
@@ -160,7 +160,7 @@ void HeaderEditor::slotCancel()
{
updateHeader();
- QDialog::reject();
+ TQDialog::reject();
}
void HeaderEditor::slotOk()
@@ -169,7 +169,7 @@ void HeaderEditor::slotOk()
{
if(!isValid())
{
- QString msg=i18n("<qt><p>This is not a valid header.</p>\n"
+ TQString msg=i18n("<qt><p>This is not a valid header.</p>\n"
"<p>Please edit the header before updating.</p></qt>");
switch(KMessageBox::warningYesNo(this,msg,i18n("Warning"),KStdGuiItem::discard(),i18n("Edit")))
@@ -192,15 +192,15 @@ void HeaderEditor::slotOk()
_catalog->setHeader(header);
}
- QDialog::accept();
+ TQDialog::accept();
}
bool HeaderEditor::isValid()
{
// check the comments
- QStringList comments = QStringList::split('\n',_editor->commentEdit->text());
+ TQStringList comments = TQStringList::split('\n',_editor->commentEdit->text());
- for( QStringList::Iterator it = comments.begin(); it != comments.end(); ++it )
+ for( TQStringList::Iterator it = comments.begin(); it != comments.end(); ++it )
{
if( !(*it).startsWith("#") )
{
diff --git a/kbabel/kbabel/headereditor.h b/kbabel/kbabel/headereditor.h
index 9fb9d6fb..88dda5ee 100644
--- a/kbabel/kbabel/headereditor.h
+++ b/kbabel/kbabel/headereditor.h
@@ -79,7 +79,7 @@ private:
KBabel::Catalog* _catalog;
HeaderWidget* _editor;
- QSize _editorSize;
+ TQSize _editorSize;
};
#endif // HEADEREDITOR_H
diff --git a/kbabel/kbabel/hidingmsgedit.cpp b/kbabel/kbabel/hidingmsgedit.cpp
index f18f8b81..60a62da4 100644
--- a/kbabel/kbabel/hidingmsgedit.cpp
+++ b/kbabel/kbabel/hidingmsgedit.cpp
@@ -31,18 +31,18 @@
#include "mymultilineedit.h"
#include "editcmd.h"
-#include <qptrlist.h>
-#include <qsizepolicy.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqsizepolicy.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <klocale.h>
using namespace KBabel;
-HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell* spell, QWidget *parent, const char *name ) :
- QWidgetStack(parent,name)
+HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter, KSpell* spell, TQWidget *parent, const char *name ) :
+ TQWidgetStack(parent,name)
, _singleEdit(0)
, _multipleEdit(0)
, _eventFilter(eventFilter)
@@ -54,8 +54,8 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell*
_allEdits.clear();
setNumberOfPlurals( _numberOfPlurals );
- connect( _multipleEdit, SIGNAL(currentChanged( QWidget* )),
- this, SLOT( newCurrentMultiple( QWidget* )));
+ connect( _multipleEdit, TQT_SIGNAL(currentChanged( TQWidget* )),
+ this, TQT_SLOT( newCurrentMultiple( TQWidget* )));
showSingle();
}
@@ -63,7 +63,7 @@ HidingMsgEdit::HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter, KSpell*
HidingMsgEdit::~HidingMsgEdit(){
}
-void HidingMsgEdit::setText(QStringList texts, QString msgctxt){
+void HidingMsgEdit::setText(TQStringList texts, TQString msgctxt){
if( texts.count() == 0 )
{
kdWarning() << "HidingMsgEdit::setText with empty text" << endl;
@@ -84,7 +84,7 @@ void HidingMsgEdit::setText(QStringList texts, QString msgctxt){
{
if( _numberOfPlurals )
{
- QStringList::iterator text = texts.begin();
+ TQStringList::iterator text = texts.begin();
uint i;
for( i=0 ; i < _numberOfPlurals && text!= texts.end() ; i++, text++ )
{
@@ -172,12 +172,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals )
if( _eventFilter )
_singleEdit->installEventFilter(_eventFilter);
- _multipleEdit = new QTabWidget( this );
+ _multipleEdit = new TQTabWidget( this );
MsgMultiLineEdit* pl;
for(uint i=0 ; i< _numberOfPlurals ; i++)
{
- pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, QString("multipleEdit %1").arg(i).local8Bit());
+ pl = new MsgMultiLineEdit( i, _spell, _multipleEdit, TQString("multipleEdit %1").arg(i).local8Bit());
_allEdits.append(pl);
_multipleEdit->addTab( pl, i18n("Plural %1").arg(i+1));
if( _eventFilter )
@@ -189,12 +189,12 @@ void HidingMsgEdit::setNumberOfPlurals( uint numberOfPlurals )
for( MsgMultiLineEdit* e = _allEdits.first() ; e ; e = _allEdits.next() )
{
- connect( e, SIGNAL( signalUndoCmd( KBabel::EditCommand* )),
- this, SIGNAL( signalUndoCmd( KBabel::EditCommand* )));
- connect( e, SIGNAL( textChanged() ) , this, SIGNAL( textChanged() ));
- connect( e, SIGNAL( textChanged() ) , this, SLOT( emitTextChanged() ));
- connect( e, SIGNAL( cursorPositionChanged( int, int )),
- this, SLOT( emitCursorPositionChanged( int, int )) );
+ connect( e, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* )),
+ this, TQT_SIGNAL( signalUndoCmd( KBabel::EditCommand* )));
+ connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SIGNAL( textChanged() ));
+ connect( e, TQT_SIGNAL( textChanged() ) , this, TQT_SLOT( emitTextChanged() ));
+ connect( e, TQT_SIGNAL( cursorPositionChanged( int, int )),
+ this, TQT_SLOT( emitCursorPositionChanged( int, int )) );
}
showPlurals( plurals );
@@ -213,7 +213,7 @@ uint HidingMsgEdit::currentForm()
else return _multipleEdit->currentPageIndex();
}
-void HidingMsgEdit::newCurrentMultiple( QWidget* widget )
+void HidingMsgEdit::newCurrentMultiple( TQWidget* widget )
{
_currentEdit = dynamic_cast<MsgMultiLineEdit*>(widget);
emit currentFormChanged ( _multipleEdit->currentPageIndex () );
@@ -278,7 +278,7 @@ void HidingMsgEdit::setQuotes(bool on)
}
}
-void HidingMsgEdit::setBgColor( const QColor& color)
+void HidingMsgEdit::setBgColor( const TQColor& color)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -286,8 +286,8 @@ void HidingMsgEdit::setBgColor( const QColor& color)
}
}
-void HidingMsgEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor)
+void HidingMsgEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -328,7 +328,7 @@ void HidingMsgEdit::setHighlightBg( bool on )
}
}
-void HidingMsgEdit::setContextMenu( QPopupMenu *menu )
+void HidingMsgEdit::setContextMenu( TQPopupMenu *menu )
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -351,10 +351,10 @@ bool HidingMsgEdit::hasFocus ()
if( e->hasFocus() ) return true;
}
- return _multipleEdit->hasFocus() || QWidgetStack::hasFocus();
+ return _multipleEdit->hasFocus() || TQWidgetStack::hasFocus();
}
-void HidingMsgEdit::setDiffColors(const QColor& addColor, const QColor& delColor)
+void HidingMsgEdit::setDiffColors(const TQColor& addColor, const TQColor& delColor)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
@@ -378,7 +378,7 @@ void HidingMsgEdit::setDiffDisplayMode(bool underlineAdded, bool strikeOutDelete
}
}
-void HidingMsgEdit::setFont(const QFont& font)
+void HidingMsgEdit::setFont(const TQFont& font)
{
for( MsgMultiLineEdit* e = _allEdits.first(); e ; e = _allEdits.next() )
{
diff --git a/kbabel/kbabel/hidingmsgedit.h b/kbabel/kbabel/hidingmsgedit.h
index 38e5d750..226f6e2d 100644
--- a/kbabel/kbabel/hidingmsgedit.h
+++ b/kbabel/kbabel/hidingmsgedit.h
@@ -30,9 +30,9 @@
#ifndef HIDINGMSGEDIT_H
#define HIDINGMSGEDIT_H
-#include <qwidgetstack.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
#include "mymultilineedit.h"
@@ -49,10 +49,10 @@ namespace KBabel
*@author Stanislav Visnovsky <visnovsky@kde.org>
*/
-class HidingMsgEdit : public QWidgetStack {
+class HidingMsgEdit : public TQWidgetStack {
Q_OBJECT
public:
- HidingMsgEdit(uint numberOfPlurals, QWidget* eventFilter=0, KSpell* spell=0, QWidget *parent=0, const char *name=0);
+ HidingMsgEdit(uint numberOfPlurals, TQWidget* eventFilter=0, KSpell* spell=0, TQWidget *parent=0, const char *name=0);
~HidingMsgEdit();
void setNumberOfPlurals(uint numberOfPlurals);
@@ -64,7 +64,7 @@ public:
bool isOverwriteMode() const { return _currentEdit->isOverwriteMode(); }
bool isModified();
bool hasSelectedText() const { return _currentEdit->hasSelectedText(); }
- QString selectedText () const { return _currentEdit->selectedText(); }
+ TQString selectedText () const { return _currentEdit->selectedText(); }
void processCommand(KBabel::EditCommand* cmd, bool undo=false);
void offset2Pos(int offset, int &row, int &col) const
{ return _currentEdit->offset2Pos(offset, row, col ); }
@@ -74,25 +74,25 @@ public:
{ return _currentEdit->currentIndex(); }
int beginOfLastMarkedText() const
{ return _currentEdit->beginOfLastMarkedText(); }
- virtual void setFont ( const QFont & );
+ virtual void setFont ( const TQFont & );
void setCurrentColor(const MsgMultiLineEdit::TextColor color);
bool spacePoints() const { return _currentEdit->spacePoints(); }
void setSpacePoints(bool on);
bool quotes() const { return _currentEdit->quotes(); }
void setQuotes(bool on);
- void setBgColor( const QColor& color);
+ void setBgColor( const TQColor& color);
bool highlightBg() const { return _currentEdit->highlightBg(); }
bool highlightSyntax() const { return _currentEdit->highlightSyntax(); }
- void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor);
+ void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor);
int beginOfMarkedText() { return _currentEdit->beginOfMarkedText(); }
- virtual void insertAt ( const QString & s, int line, int col, bool mark = false )
+ virtual void insertAt ( const TQString & s, int line, int col, bool mark = false )
{ _currentEdit->insertAt( s, line, col, mark ); }
void setDiffMode(bool on);
void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted);
- void setDiffColors(const QColor& addColor, const QColor& delColor);
- QString text(int para) { return _currentEdit->text(para); }
+ void setDiffColors(const TQColor& addColor, const TQColor& delColor);
+ TQString text(int para) { return _currentEdit->text(para); }
void setSpellChecker(KSpell* spell);
@@ -101,7 +101,7 @@ public:
// reiplemented to return correct value
bool hasFocus ();
public slots: // Public slots
- void setText(QStringList texts, QString msgctxt = QString::null);
+ void setText(TQStringList texts, TQString msgctxt = TQString::null);
void showSingle();
void showMultiple();
void showPlurals( bool on );
@@ -125,12 +125,12 @@ public slots: // Public slots
virtual void selectAll(bool select=true) { _currentEdit->selectAll(select); }
virtual void setCursorPosition ( int para, int index )
{ _currentEdit->setCursorPosition(para,index); }
- virtual void setContextMenu( QPopupMenu *menu );
+ virtual void setContextMenu( TQPopupMenu *menu );
signals:
void signalUndoCmd(KBabel::EditCommand*);
void textChanged();
- void textChanged(const QString&);
+ void textChanged(const TQString&);
void cursorPositionChanged ( int para, int pos );
void currentFormChanged ( uint form );
@@ -139,7 +139,7 @@ private slots:
void emitTextChanged();
// invoked if TabWidget changes the shown widget
- void newCurrentMultiple( QWidget * );
+ void newCurrentMultiple( TQWidget * );
// invoked by inner cursorPositionChanged() to transform line/col for wrapping
void emitCursorPositionChanged( int para, int pos );
@@ -147,15 +147,15 @@ private: // Private attributes
/** Used for editting non-plural messages */
MsgMultiLineEdit* _singleEdit;
/** Used for editting plural forms */
- QTabWidget* _multipleEdit;
- QWidget* _eventFilter;
+ TQTabWidget* _multipleEdit;
+ TQWidget* _eventFilter;
MsgMultiLineEdit* _currentEdit;
- QPtrList<MsgMultiLineEdit> _allEdits;
+ TQPtrList<MsgMultiLineEdit> _allEdits;
uint _numberOfPlurals;
- QGuardedPtr<KSpell> _spell;
+ TQGuardedPtr<KSpell> _spell;
};
#endif
diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp
index cae7bf77..0c3c897d 100644
--- a/kbabel/kbabel/kbabel.cpp
+++ b/kbabel/kbabel/kbabel.cpp
@@ -48,15 +48,15 @@
#include "taglistview.h"
#include "sourceview.h"
-#include <qdragobject.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
-#include <qsize.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqdragobject.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
+#include <tqsize.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <kdatatool.h>
@@ -108,19 +108,19 @@
using namespace KBabel;
-QPtrList<KBabelPreferences> KBabelMW::prefDialogs;
+TQPtrList<KBabelPreferences> KBabelMW::prefDialogs;
class MyKProgress: public KProgress
{
public:
- MyKProgress( QWidget *parent, const char *name ) : KProgress( parent, name )
+ MyKProgress( TQWidget *parent, const char *name ) : KProgress( parent, name )
{
- setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
}
- QSize sizeHint() const { return QSize( 1, 1);}
+ TQSize sizeHint() const { return TQSize( 1, 1);}
};
-KBabelMW::KBabelMW(QString projectFile)
+KBabelMW::KBabelMW(TQString projectFile)
: KDockMainWindow (), m_charselectorview(0)
{
if ( projectFile.isEmpty() )
@@ -138,7 +138,7 @@ KBabelMW::KBabelMW(QString projectFile)
init(catalog);
}
-KBabelMW::KBabelMW(KBCatalog* catalog, QString projectFile)
+KBabelMW::KBabelMW(KBCatalog* catalog, TQString projectFile)
: KDockMainWindow (), m_charselectorview(0)
{
if ( projectFile.isEmpty() )
@@ -170,9 +170,9 @@ void KBabelMW::init(KBCatalog* catalog)
_prefDialog=0;
prefDialogs.setAutoDelete(true);
- _statusbarTimer = new QTimer(this, "statusbartimer");
- connect(_statusbarTimer,SIGNAL(timeout()),this
- ,SLOT(clearStatusbarMsg()));
+ _statusbarTimer = new TQTimer(this, "statusbartimer");
+ connect(_statusbarTimer,TQT_SIGNAL(timeout()),this
+ ,TQT_SLOT(clearStatusbarMsg()));
// FIXME:
Q_ASSERT(_project);
@@ -193,87 +193,87 @@ void KBabelMW::init(KBCatalog* catalog)
stateChanged( "fileopened" , StateReverse );
stateChanged( "readonly", StateNoReverse );
- QPopupMenu* popup;
- popup = (QPopupMenu*)(factory()->container("rmb_edit", this));
+ TQPopupMenu* popup;
+ popup = (TQPopupMenu*)(factory()->container("rmb_edit", this));
if(popup)
{
m_view->setRMBEditMenu(popup);
}
- popup = (QPopupMenu*)(factory()->container("rmb_search", this));
+ popup = (TQPopupMenu*)(factory()->container("rmb_search", this));
if(popup)
{
m_view->setRMBSearchMenu(popup);
}
- connect(catalog,SIGNAL(signalUndoAvailable(bool)),this
- ,SLOT(enableUndo(bool)));
- connect(catalog,SIGNAL(signalRedoAvailable(bool)),this
- ,SLOT(enableRedo(bool)));
- connect(catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)),this
- ,SLOT(setNumberOfFuzzies(uint)));
- connect(catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)),this
- ,SLOT(setNumberOfUntranslated(uint)));
- connect(catalog,SIGNAL(signalTotalNumberChanged(uint)),this
- ,SLOT(setNumberOfTotal(uint)));
- connect(catalog,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int)));
- connect(catalog,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar()));
- connect(catalog,SIGNAL(signalResetProgressBar(QString,int))
- ,this,SLOT(prepareProgressBar(QString,int)));
- connect(catalog,SIGNAL(signalFileOpened(bool)),this,SLOT(enableDefaults(bool)));
- connect(catalog,SIGNAL(signalFileOpened(bool)),m_view,SLOT(newFileOpened(bool)));
- connect(catalog,SIGNAL(signalModified(bool)),this,SLOT(showModified(bool)));
+ connect(catalog,TQT_SIGNAL(signalUndoAvailable(bool)),this
+ ,TQT_SLOT(enableUndo(bool)));
+ connect(catalog,TQT_SIGNAL(signalRedoAvailable(bool)),this
+ ,TQT_SLOT(enableRedo(bool)));
+ connect(catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)),this
+ ,TQT_SLOT(setNumberOfFuzzies(uint)));
+ connect(catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)),this
+ ,TQT_SLOT(setNumberOfUntranslated(uint)));
+ connect(catalog,TQT_SIGNAL(signalTotalNumberChanged(uint)),this
+ ,TQT_SLOT(setNumberOfTotal(uint)));
+ connect(catalog,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int)));
+ connect(catalog,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar()));
+ connect(catalog,TQT_SIGNAL(signalResetProgressBar(TQString,int))
+ ,this,TQT_SLOT(prepareProgressBar(TQString,int)));
+ connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),this,TQT_SLOT(enableDefaults(bool)));
+ connect(catalog,TQT_SIGNAL(signalFileOpened(bool)),m_view,TQT_SLOT(newFileOpened(bool)));
+ connect(catalog,TQT_SIGNAL(signalModified(bool)),this,TQT_SLOT(showModified(bool)));
// allow the view to change the statusbar and caption
- connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(m_view, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
- connect(m_view,SIGNAL(signalFirstDisplayed(bool, bool)),this
- ,SLOT(firstEntryDisplayed(bool, bool)));
- connect(m_view,SIGNAL(signalLastDisplayed(bool, bool)),this
- ,SLOT(lastEntryDisplayed(bool, bool)));
- connect(m_view,SIGNAL(signalFuzzyDisplayed(bool)),this
- ,SLOT(fuzzyDisplayed(bool)));
- connect(m_view,SIGNAL(signalUntranslatedDisplayed(bool)),this
- ,SLOT(untranslatedDisplayed(bool)));
- connect(m_view,SIGNAL(signalFaultyDisplayed(bool)),this
- ,SLOT(faultyDisplayed(bool)));
- connect(m_view,SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this
- ,SLOT(displayedEntryChanged(const KBabel::DocPosition&)));
- connect(m_view,SIGNAL(signalFuzzyAfterwards(bool)),this
- ,SLOT(hasFuzzyAfterwards(bool)));
- connect(m_view,SIGNAL(signalFuzzyInFront(bool)),this
- ,SLOT(hasFuzzyInFront(bool)));
- connect(m_view,SIGNAL(signalUntranslatedAfterwards(bool)),this
- ,SLOT(hasUntranslatedAfterwards(bool)));
- connect(m_view,SIGNAL(signalUntranslatedInFront(bool)),this
- ,SLOT(hasUntranslatedInFront(bool)));
- connect(m_view,SIGNAL(signalErrorAfterwards(bool)),this
- ,SLOT(hasErrorAfterwards(bool)));
- connect(m_view,SIGNAL(signalErrorInFront(bool)),this
- ,SLOT(hasErrorInFront(bool)));
- connect(m_view,SIGNAL(signalBackHistory(bool)),this
- ,SLOT(enableBackHistory(bool)));
- connect(m_view,SIGNAL(signalForwardHistory(bool)),this
- ,SLOT(enableForwardHistory(bool)));
-
-
- connect(m_view,SIGNAL(ledColorChanged(const QColor&)),this
- ,SLOT(setLedColor(const QColor&)));
-
-
- connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(enableStop(bool)));
-
- connect(m_view,SIGNAL(signalProgress(int)),_progressBar,SLOT(setProgress(int)));
- connect(m_view,SIGNAL(signalClearProgressBar()),this,SLOT(clearProgressBar()));
- connect(m_view,SIGNAL(signalResetProgressBar(QString,int))
- ,this,SLOT(prepareProgressBar(QString,int)));
-
- connect(m_view,SIGNAL(signalDictionariesChanged())
- , this, SLOT(buildDictMenus()));
- connect(m_view,SIGNAL(signalCursorPosChanged(int,int)), this
- , SLOT(updateCursorPosition(int,int)));
+ connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
+ connect(m_view,TQT_SIGNAL(signalFirstDisplayed(bool, bool)),this
+ ,TQT_SLOT(firstEntryDisplayed(bool, bool)));
+ connect(m_view,TQT_SIGNAL(signalLastDisplayed(bool, bool)),this
+ ,TQT_SLOT(lastEntryDisplayed(bool, bool)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyDisplayed(bool)),this
+ ,TQT_SLOT(fuzzyDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedDisplayed(bool)),this
+ ,TQT_SLOT(untranslatedDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalFaultyDisplayed(bool)),this
+ ,TQT_SLOT(faultyDisplayed(bool)));
+ connect(m_view,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&)),this
+ ,TQT_SLOT(displayedEntryChanged(const KBabel::DocPosition&)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyAfterwards(bool)),this
+ ,TQT_SLOT(hasFuzzyAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalFuzzyInFront(bool)),this
+ ,TQT_SLOT(hasFuzzyInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedAfterwards(bool)),this
+ ,TQT_SLOT(hasUntranslatedAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalUntranslatedInFront(bool)),this
+ ,TQT_SLOT(hasUntranslatedInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalErrorAfterwards(bool)),this
+ ,TQT_SLOT(hasErrorAfterwards(bool)));
+ connect(m_view,TQT_SIGNAL(signalErrorInFront(bool)),this
+ ,TQT_SLOT(hasErrorInFront(bool)));
+ connect(m_view,TQT_SIGNAL(signalBackHistory(bool)),this
+ ,TQT_SLOT(enableBackHistory(bool)));
+ connect(m_view,TQT_SIGNAL(signalForwardHistory(bool)),this
+ ,TQT_SLOT(enableForwardHistory(bool)));
+
+
+ connect(m_view,TQT_SIGNAL(ledColorChanged(const TQColor&)),this
+ ,TQT_SLOT(setLedColor(const TQColor&)));
+
+
+ connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(enableStop(bool)));
+
+ connect(m_view,TQT_SIGNAL(signalProgress(int)),_progressBar,TQT_SLOT(setProgress(int)));
+ connect(m_view,TQT_SIGNAL(signalClearProgressBar()),this,TQT_SLOT(clearProgressBar()));
+ connect(m_view,TQT_SIGNAL(signalResetProgressBar(TQString,int))
+ ,this,TQT_SLOT(prepareProgressBar(TQString,int)));
+
+ connect(m_view,TQT_SIGNAL(signalDictionariesChanged())
+ , this, TQT_SLOT(buildDictMenus()));
+ connect(m_view,TQT_SIGNAL(signalCursorPosChanged(int,int)), this
+ , TQT_SLOT(updateCursorPosition(int,int)));
if(!catalog->currentURL().isEmpty())
{
@@ -292,18 +292,18 @@ void KBabelMW::init(KBCatalog* catalog)
mailer = new KBabelMailer( this, _project );
- bmHandler = new KBabelBookmarkHandler((QPopupMenu*)factory()->container("bookmark", this));
+ bmHandler = new KBabelBookmarkHandler((TQPopupMenu*)factory()->container("bookmark", this));
// the earlier created KAction for "clear_bookmarks" is now reconnected
KAction* action = actionCollection()->action("clear_bookmarks");
if (action) {
- action->disconnect(SIGNAL(activated()));
- connect(action, SIGNAL(activated()),
- bmHandler, SLOT(slotClearBookmarks()));
+ action->disconnect(TQT_SIGNAL(activated()));
+ connect(action, TQT_SIGNAL(activated()),
+ bmHandler, TQT_SLOT(slotClearBookmarks()));
}
- connect(bmHandler, SIGNAL(signalBookmarkSelected(int)),
- this, SLOT(slotOpenBookmark(int)));
- connect(m_view, SIGNAL(signalNewFileOpened(KURL)),
- bmHandler, SLOT(slotClearBookmarks()));
+ connect(bmHandler, TQT_SIGNAL(signalBookmarkSelected(int)),
+ this, TQT_SLOT(slotOpenBookmark(int)));
+ connect(m_view, TQT_SIGNAL(signalNewFileOpened(KURL)),
+ bmHandler, TQT_SLOT(slotClearBookmarks()));
_config = KSharedConfig::openConfig( "kbabelrc" );
restoreSettings();
@@ -312,17 +312,17 @@ void KBabelMW::init(KBCatalog* catalog)
if(!_config->hasKey("Version"))
{
- QString encodingStr;
+ TQString encodingStr;
switch(catalog->saveSettings().encoding)
{
case KBabel::ProjectSettingsBase::UTF8:
- encodingStr=QTextCodec::codecForName("UTF-8")->name();
+ encodingStr=TQTextCodec::codecForName("UTF-8")->name();
break;
case KBabel::ProjectSettingsBase::UTF16:
- encodingStr=QTextCodec::codecForName("UTF-16")->name();
+ encodingStr=TQTextCodec::codecForName("UTF-16")->name();
break;
default:
- encodingStr=QTextCodec::codecForLocale()->name();
+ encodingStr=TQTextCodec::codecForLocale()->name();
}
if( KBabelSplash::instance ) KBabelSplash::instance->close(); //close splash screen window, if there is one
@@ -335,7 +335,7 @@ void KBabelMW::init(KBCatalog* catalog)
"set to %1. You may want to change this setting "
"according to the settings of your language team.").arg(encodingStr));
- QTimer::singleShot(1,this,SLOT(projectConfigure()));
+ TQTimer::singleShot(1,this,TQT_SLOT(projectConfigure()));
}
_config->writeEntry("Version",VERSION);
@@ -404,296 +404,296 @@ void KBabelMW::setupActions()
KAction* action;
// the file menu
- action = KStdAction::open(this, SLOT(fileOpen()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
- a_recent = KStdAction::openRecent(this, SLOT(openRecent(const KURL&)), actionCollection());
+ a_recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), actionCollection());
a_recent->setMaxItems(MAX_RECENT);
- action = KStdAction::revert(m_view,SLOT(revertToSaved()),actionCollection());
- action=KStdAction::save(this, SLOT(fileSave()), actionCollection());
- action = KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- action = new KAction(i18n("Save Sp&ecial..."), 0, this, SLOT(fileSaveSpecial()),
+ action = KStdAction::revert(m_view,TQT_SLOT(revertToSaved()),actionCollection());
+ action=KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ action = new KAction(i18n("Save Sp&ecial..."), 0, this, TQT_SLOT(fileSaveSpecial()),
actionCollection(), "save_special" );
- action = new KAction(i18n("Set &Package..."), 0, m_view, SLOT(setFilePackage()),
+ action = new KAction(i18n("Set &Package..."), 0, m_view, TQT_SLOT(setFilePackage()),
actionCollection(), "set_package" );
- action = KStdAction::mail(this, SLOT(fileMail()), actionCollection());
+ action = KStdAction::mail(this, TQT_SLOT(fileMail()), actionCollection());
- action = new KAction(i18n("&New View"), 0, this, SLOT(fileNewView()),
+ action = new KAction(i18n("&New View"), 0, this, TQT_SLOT(fileNewView()),
actionCollection(), "file_new_view");
- action = new KAction(i18n("New &Window"), 0, this, SLOT(fileNewWindow()),
+ action = new KAction(i18n("New &Window"), 0, this, TQT_SLOT(fileNewWindow()),
actionCollection(), "file_new_window");
action->setShortcut( KStdAccel::openNew() );
- action = KStdAction::quit(this, SLOT(quit()), actionCollection());
+ action = KStdAction::quit(this, TQT_SLOT(quit()), actionCollection());
// the edit menu
- action = KStdAction::undo(m_view, SLOT(undo()), actionCollection());
- action = KStdAction::redo(m_view, SLOT(redo()), actionCollection());
- action = KStdAction::cut(m_view, SIGNAL(signalCut()), actionCollection());
- action = KStdAction::copy(m_view, SIGNAL(signalCopy()), actionCollection());
- action = KStdAction::paste(m_view, SIGNAL(signalPaste()), actionCollection());
- action = KStdAction::selectAll(m_view, SIGNAL(signalSelectAll()), actionCollection());
- action = KStdAction::find(m_view, SLOT(find()), actionCollection());
- action = KStdAction::findNext(m_view, SLOT(findNext()), actionCollection());
- action = KStdAction::findPrev(m_view, SLOT(findPrev()), actionCollection());
- action = KStdAction::replace(m_view, SLOT(replace()), actionCollection());
-
- action = KStdAction::clear( m_view, SLOT(clear()), actionCollection(), "clear" );
+ action = KStdAction::undo(m_view, TQT_SLOT(undo()), actionCollection());
+ action = KStdAction::redo(m_view, TQT_SLOT(redo()), actionCollection());
+ action = KStdAction::cut(m_view, TQT_SIGNAL(signalCut()), actionCollection());
+ action = KStdAction::copy(m_view, TQT_SIGNAL(signalCopy()), actionCollection());
+ action = KStdAction::paste(m_view, TQT_SIGNAL(signalPaste()), actionCollection());
+ action = KStdAction::selectAll(m_view, TQT_SIGNAL(signalSelectAll()), actionCollection());
+ action = KStdAction::find(m_view, TQT_SLOT(find()), actionCollection());
+ action = KStdAction::findNext(m_view, TQT_SLOT(findNext()), actionCollection());
+ action = KStdAction::findPrev(m_view, TQT_SLOT(findPrev()), actionCollection());
+ action = KStdAction::replace(m_view, TQT_SLOT(replace()), actionCollection());
+
+ action = KStdAction::clear( m_view, TQT_SLOT(clear()), actionCollection(), "clear" );
action = new KAction(i18n("Cop&y Msgid to Msgstr"), "msgid2msgstr", CTRL+Key_Space, m_view
- ,SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr");
+ ,TQT_SLOT(msgid2msgstr()), actionCollection(), "msgid2msgstr");
action = new KAction(i18n("Copy Searc&h Result to Msgstr"), "search2msgstr",
- CTRL+ALT+Key_Space, m_view, SLOT(search2msgstr()),
+ CTRL+ALT+Key_Space, m_view, TQT_SLOT(search2msgstr()),
actionCollection(), "search2msgstr");
action = new KAction(i18n("Copy Msgstr to Other &Plurals"), Key_F11, m_view
- ,SLOT(plural2msgstr()), actionCollection(), "plural2msgstr");
+ ,TQT_SLOT(plural2msgstr()), actionCollection(), "plural2msgstr");
action = new KAction(i18n("Copy Selected Character to Msgstr"), Key_F10, m_charselectorview
- ,SLOT(emitChar()), actionCollection(), "char2msgstr");
+ ,TQT_SLOT(emitChar()), actionCollection(), "char2msgstr");
a_unsetFuzzy = new KAction(i18n("To&ggle Fuzzy Status"), "togglefuzzy", CTRL+Key_U, m_view
- , SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy");
- action = new KAction(i18n("&Edit Header..."), 0, m_view, SLOT(editHeader()),
+ , TQT_SLOT(removeFuzzyStatus()), actionCollection(), "edit_toggle_fuzzy");
+ action = new KAction(i18n("&Edit Header..."), 0, m_view, TQT_SLOT(editHeader()),
actionCollection(), "edit_edit_header");
action = new KAction(i18n("&Insert Next Tag"), "insert_tag", CTRL+ALT+Key_N
- , m_view, SLOT(insertNextTag())
+ , m_view, TQT_SLOT(insertNextTag())
, actionCollection(),"insert_next_tag");
- connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
action = new KAction(i18n("Insert Next Tag From Msgid P&osition"), "insert_tag", CTRL+Key_M
- , m_view, SLOT(insertNextTagMsgid())
+ , m_view, TQT_SLOT(insertNextTagMsgid())
, actionCollection(),"insert_next_tag_msgid");
- connect(m_view,SIGNAL(signalNextTagAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextTagAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
KActionMenu *actionMenu= new KActionMenu(i18n("Inser&t Tag"), "insert_tag"
, actionCollection(),"insert_tag");
m_view->setTagsMenu(actionMenu->popupMenu());
- connect(m_view,SIGNAL(signalTagsAvailable(bool)),actionMenu
- ,SLOT(setEnabled(bool)));
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextTag()));
+ connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),actionMenu
+ ,TQT_SLOT(setEnabled(bool)));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextTag()));
action = new KAction(i18n("Show Tags Menu"),CTRL+Key_Less
- , m_view, SLOT(showTagsMenu()), actionCollection(),"show_tags_menu");
+ , m_view, TQT_SLOT(showTagsMenu()), actionCollection(),"show_tags_menu");
action->setEnabled(false);
- connect(m_view,SIGNAL(signalTagsAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalTagsAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
action = new KAction(i18n("Move to Next Tag"), 0, CTRL+ALT+Key_M
- , m_view, SLOT(skipToNextTag())
+ , m_view, TQT_SLOT(skipToNextTag())
, actionCollection(),"move_to_next_tag");
action = new KAction(i18n("Move to Previous Tag"), 0, CTRL+ALT+Key_B
- , m_view, SLOT(skipToPreviousTag())
+ , m_view, TQT_SLOT(skipToPreviousTag())
, actionCollection(),"move_to_prev_tag");
action = new KAction(i18n("Insert Next Argument"), "insert_arg", CTRL+ALT+Key_G
- , m_view, SLOT(insertNextArg())
+ , m_view, TQT_SLOT(insertNextArg())
, actionCollection(),"insert_next_arg");
- connect(m_view,SIGNAL(signalNextArgAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalNextArgAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
actionMenu= new KActionMenu(i18n("Inser&t Argument"), "insert_arg"
, actionCollection(),"insert_arg");
m_view->setArgsMenu(actionMenu->popupMenu());
- connect(m_view,SIGNAL(signalArgsAvailable(bool)),actionMenu
- ,SLOT(setEnabled(bool)));
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(insertNextArg()));
+ connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),actionMenu
+ ,TQT_SLOT(setEnabled(bool)));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(insertNextArg()));
action = new KAction(i18n("Show Arguments Menu"),CTRL+Key_Percent
- , m_view, SLOT(showArgsMenu()), actionCollection(),"show_args_menu");
+ , m_view, TQT_SLOT(showArgsMenu()), actionCollection(),"show_args_menu");
action->setEnabled(false);
- connect(m_view,SIGNAL(signalArgsAvailable(bool)),action
- ,SLOT(setEnabled(bool)));
+ connect(m_view,TQT_SIGNAL(signalArgsAvailable(bool)),action
+ ,TQT_SLOT(setEnabled(bool)));
// next, the go-menu
action = new KAction(i18n("&Previous"), "previous",
- KStdAccel::shortcut(KStdAccel::Prior), m_view , SLOT(gotoPrev()),
+ KStdAccel::shortcut(KStdAccel::Prior), m_view , TQT_SLOT(gotoPrev()),
actionCollection(),"go_prev_entry");
action = new KAction(i18n("&Next"), "next",
- KStdAccel::shortcut(KStdAccel::Next), m_view , SLOT(gotoNext()),
+ KStdAccel::shortcut(KStdAccel::Next), m_view , TQT_SLOT(gotoNext()),
actionCollection(),"go_next_entry");
- action = KStdAction::goTo(m_view, SLOT(gotoEntry()), actionCollection());
+ action = KStdAction::goTo(m_view, TQT_SLOT(gotoEntry()), actionCollection());
action->setShortcut( KStdAccel::gotoLine());
- action = KStdAction::firstPage(m_view, SLOT(gotoFirst()),actionCollection());
+ action = KStdAction::firstPage(m_view, TQT_SLOT(gotoFirst()),actionCollection());
action->setText(i18n("&First Entry"));
action->setShortcut(CTRL+ALT+Key_Home);
- action = KStdAction::lastPage(m_view, SLOT(gotoLast()),actionCollection());
+ action = KStdAction::lastPage(m_view, TQT_SLOT(gotoLast()),actionCollection());
action->setText(i18n("&Last Entry"));
action->setShortcut(CTRL+ALT+Key_End);
a_prevFoU = new KAction(i18n("P&revious Fuzzy or Untranslated"),"prevfuzzyuntrans",
CTRL+SHIFT+Key_Prior, m_view,
- SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr");
+ TQT_SLOT(gotoPrevFuzzyOrUntrans()),actionCollection(), "go_prev_fuzzyUntr");
a_nextFoU = new KAction(i18n("N&ext Fuzzy or Untranslated"),"nextfuzzyuntrans",
CTRL+SHIFT+Key_Next, m_view,
- SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr");
+ TQT_SLOT(gotoNextFuzzyOrUntrans()),actionCollection(), "go_next_fuzzyUntr");
a_prevFuzzy = new KAction(i18n("Pre&vious Fuzzy"),"prevfuzzy",
CTRL+Key_Prior, m_view,
- SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy");
+ TQT_SLOT(gotoPrevFuzzy()),actionCollection(), "go_prev_fuzzy");
a_nextFuzzy = new KAction(i18n("Ne&xt Fuzzy"), "nextfuzzy",
CTRL+Key_Next, m_view,
- SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
+ TQT_SLOT(gotoNextFuzzy()),actionCollection(), "go_next_fuzzy");
a_prevUntrans = new KAction(i18n("Prev&ious Untranslated"), "prevuntranslated",
ALT+Key_Prior, m_view,
- SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans");
+ TQT_SLOT(gotoPrevUntranslated()),actionCollection(), "go_prev_untrans");
a_nextUntrans = new KAction(i18n("Nex&t Untranslated"), "nextuntranslated",
ALT+Key_Next, m_view,
- SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
+ TQT_SLOT(gotoNextUntranslated()),actionCollection(), "go_next_untrans");
action = new KAction(i18n("Previo&us Error"), "preverror",
SHIFT+Key_Prior, m_view,
- SLOT(gotoPrevError()),actionCollection(), "go_prev_error");
+ TQT_SLOT(gotoPrevError()),actionCollection(), "go_prev_error");
action = new KAction(i18n("Next Err&or"), "nexterror",
SHIFT+Key_Next, m_view,
- SLOT(gotoNextError()),actionCollection(), "go_next_error");
+ TQT_SLOT(gotoNextError()),actionCollection(), "go_next_error");
action = new KAction(i18n("&Back in History"), "back", ALT+Key_Left, m_view,
- SLOT(backHistory()),actionCollection(), "go_back_history");
+ TQT_SLOT(backHistory()),actionCollection(), "go_back_history");
action = new KAction(i18n("For&ward in History"), "forward", ALT+Key_Right, m_view,
- SLOT(forwardHistory()),actionCollection(), "go_forward_history");
+ TQT_SLOT(forwardHistory()),actionCollection(), "go_forward_history");
// the search menu
actionMenu=new KActionMenu(i18n("&Find Text"),
"transsearch",actionCollection(),"dict_search_all");
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSearch()));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSearch()));
dictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(dictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(startSearch(const QString)));
+ connect(dictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(startSearch(const TQString)));
actionMenu=new KActionMenu(i18n("F&ind Selected Text"),
"transsearch",actionCollection(),"dict_search_selected");
- connect(actionMenu,SIGNAL(activated()),m_view,SLOT(startSelectionSearch()));
+ connect(actionMenu,TQT_SIGNAL(activated()),m_view,TQT_SLOT(startSelectionSearch()));
selectionDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(selectionDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(startSelectionSearch(const QString)));
+ connect(selectionDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(startSelectionSearch(const TQString)));
actionMenu=new KActionMenu(i18n("&Edit Dictionary"),
"transsearch",actionCollection(),"dict_edit");
editDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(editDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(editDictionary(const QString)));
+ connect(editDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(editDictionary(const TQString)));
actionMenu=new KActionMenu(i18n("Con&figure Dictionary"),
"transsearch",actionCollection(),"dict_configure");
configDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(configDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(configureDictionary(const QString)));
+ connect(configDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(configureDictionary(const TQString)));
actionMenu=new KActionMenu(i18n("About Dictionary"), "transsearch",
actionCollection(), "dict_about");
aboutDictMenu = new DictionaryMenu(actionMenu->popupMenu(),actionCollection(),this);
- connect(aboutDictMenu,SIGNAL(activated(const QString)), m_view
- , SLOT(aboutDictionary(const QString)));
+ connect(aboutDictMenu,TQT_SIGNAL(activated(const TQString)), m_view
+ , TQT_SLOT(aboutDictionary(const TQString)));
buildDictMenus();
// the project menu
action = new KAction(i18n("&New..."), "filenew"
- , this, SLOT(projectNew()),actionCollection()
+ , this, TQT_SLOT(projectNew()),actionCollection()
,"project_new");
action = new KAction(i18n("&Open..."), "fileopen"
- , this, SLOT(projectOpen()),actionCollection()
+ , this, TQT_SLOT(projectOpen()),actionCollection()
,"project_open");
action = new KAction(i18n("C&lose"), "fileclose"
- , this, SLOT(projectClose()),actionCollection()
+ , this, TQT_SLOT(projectClose()),actionCollection()
,"project_close");
action->setEnabled (_project->filename() != KBabel::ProjectManager::defaultProjectName() );
action = new KAction(i18n("&Configure..."), "configure"
- , this, SLOT(projectConfigure()),actionCollection()
+ , this, TQT_SLOT(projectConfigure()),actionCollection()
,"project_settings");
- a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects");
+ a_recentprojects = new KRecentFilesAction(i18n("Open &Recent"), 0, this, TQT_SLOT(projectOpenRecent(const KURL&)), actionCollection(), "recent_projects");
// the tools menu
action = new KAction(i18n("&Spell Check..."), "spellcheck", CTRL+Key_I
- , m_view, SLOT(spellcheckCommon()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckCommon()),actionCollection()
,"spellcheck_common");
action = new KAction(i18n("&Check All..."), "spellcheck_all", 0
- , m_view, SLOT(spellcheckAll()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckAll()),actionCollection()
,"spellcheck_all");
action = new KAction(i18n("C&heck From Cursor Position..."), "spellcheck_from_cursor", 0
- , m_view, SLOT(spellcheckFromCursor()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckFromCursor()),actionCollection()
,"spellcheck_from_cursor");
action = new KAction(i18n("Ch&eck Current..."), "spellcheck_actual", 0
- , m_view, SLOT(spellcheckCurrent()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckCurrent()),actionCollection()
,"spellcheck_current");
action = new KAction(i18n("Check Fro&m Current to End of File..."), 0
- , m_view, SLOT(spellcheckFromCurrent()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckFromCurrent()),actionCollection()
,"spellcheck_from_current");
action = new KAction(i18n("Chec&k Selected Text..."), "spellcheck_selected", 0
- , m_view, SLOT(spellcheckMarked()),actionCollection()
+ , m_view, TQT_SLOT(spellcheckMarked()),actionCollection()
,"spellcheck_marked");
KToggleAction *toggleAction;
toggleAction = new KToggleAction(i18n("&Diffmode"), "autodiff", 0
,actionCollection(), "diff_toggleDiff");
- connect(toggleAction,SIGNAL(toggled(bool)), m_view, SLOT(toggleAutoDiff(bool)));
- connect(m_view,SIGNAL(signalDiffEnabled(bool)), toggleAction
- , SLOT(setChecked(bool)));
+ connect(toggleAction,TQT_SIGNAL(toggled(bool)), m_view, TQT_SLOT(toggleAutoDiff(bool)));
+ connect(m_view,TQT_SIGNAL(signalDiffEnabled(bool)), toggleAction
+ , TQT_SLOT(setChecked(bool)));
toggleAction->setChecked(m_view->autoDiffEnabled());
action = new KAction(i18n("&Show Diff"), "diff", Key_F5
- , m_view, SLOT(diff()),actionCollection()
+ , m_view, TQT_SLOT(diff()),actionCollection()
,"diff_diff");
action = new KAction(i18n("S&how Original Text"), "contents", Key_F6
- , m_view, SLOT(diffShowOrig()),actionCollection()
+ , m_view, TQT_SLOT(diffShowOrig()),actionCollection()
,"diff_showOrig");
action = new KAction(i18n("&Open File for Diff"), "fileopen" ,0
- , m_view, SLOT(openDiffFile()),actionCollection()
+ , m_view, TQT_SLOT(openDiffFile()),actionCollection()
,"diff_openFile");
action = new KAction(i18n("&Rough Translation..."), 0
- , m_view, SLOT(roughTranslation()),actionCollection()
+ , m_view, TQT_SLOT(roughTranslation()),actionCollection()
,"rough_translation");
action = new KAction(i18n("&Catalog Manager..."),"catalogmanager", 0 , this,
- SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager");
+ TQT_SLOT(openCatalogManager()),actionCollection(), "open_catalog_manager");
- new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode");
+ new KAction( i18n("Toggle Edit Mode"), 0, Key_Insert,this,TQT_SLOT(toggleEditMode()), actionCollection(), "toggle_insert_mode");
- new KAction( i18n("&Word Count"), 0, m_view, SLOT(wordCount()), actionCollection(), "word_count");
+ new KAction( i18n("&Word Count"), 0, m_view, TQT_SLOT(wordCount()), actionCollection(), "word_count");
// next, the settings menu
createStandardStatusBarAction();
- KStdAction::configureToolbars(this,SLOT(optionsEditToolbars()),actionCollection());
+ KStdAction::configureToolbars(this,TQT_SLOT(optionsEditToolbars()),actionCollection());
- KStdAction::keyBindings(guiFactory(),SLOT(configureShortcuts()),actionCollection());
- KStdAction::preferences(this,SLOT(optionsPreferences()),actionCollection());
+ KStdAction::keyBindings(guiFactory(),TQT_SLOT(configureShortcuts()),actionCollection());
+ KStdAction::preferences(this,TQT_SLOT(optionsPreferences()),actionCollection());
setStandardToolBarMenuEnabled ( true );
action = new KAction(i18n("&Stop Searching"), "stop",Key_Escape, m_view,
- SLOT(stopSearch()),actionCollection(), "stop_search");
+ TQT_SLOT(stopSearch()),actionCollection(), "stop_search");
action->setEnabled(false);
new KAction(i18n("&Gettext Info"), 0, this,
- SLOT(gettextHelp()), actionCollection(), "help_gettext");
+ TQT_SLOT(gettextHelp()), actionCollection(), "help_gettext");
// the bookmarks menu
- action = KStdAction::addBookmark(this, SLOT(slotAddBookmark()),
+ action = KStdAction::addBookmark(this, TQT_SLOT(slotAddBookmark()),
actionCollection(), "add_bookmark");
action->setEnabled(false);
// this action is now connected to dummySlot(), and later reconnected
// to bmHandler after that object actually is created
- new KAction(i18n("Clear Bookmarks"), 0, this, SLOT(dummySlot()),
+ new KAction(i18n("Clear Bookmarks"), 0, this, TQT_SLOT(dummySlot()),
actionCollection(), "clear_bookmarks");
setupDynamicActions();
createGUI(0);
- QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("settings",this));
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("settings",this));
popup->insertItem( i18n("&Views"), dockHideShowMenu(), -1, 0 );
}
@@ -707,22 +707,22 @@ void KBabelMW::setupStatusBar()
if(KBabelSettings::ledInStatusbar())
{
- QColor ledColor=KBabelSettings::ledColor();
- QHBox* statusBox = new QHBox(statusBar(),"statusBox");
+ TQColor ledColor=KBabelSettings::ledColor();
+ TQHBox* statusBox = new TQHBox(statusBar(),"statusBox");
statusBox->setSpacing(2);
- new QLabel(" "+i18n("Status: "),statusBox);
+ new TQLabel(" "+i18n("Status: "),statusBox);
_fuzzyLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_fuzzyLed->setFixedSize(15,12);
- new QLabel(i18n("fuzzy")+" ",statusBox);
+ new TQLabel(i18n("fuzzy")+" ",statusBox);
_untransLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_untransLed->setFixedSize(15,12);
- new QLabel(i18n("untranslated")+" ",statusBox);
+ new TQLabel(i18n("untranslated")+" ",statusBox);
_errorLed = new KLed(ledColor,KLed::Off,KLed::Sunken,KLed::Rectangular
,statusBox);
_errorLed->setFixedSize(15,12);
- new QLabel(i18n("faulty")+" ",statusBox);
+ new TQLabel(i18n("faulty")+" ",statusBox);
statusBox->setFixedWidth(statusBox->sizeHint().width());
statusBar()->addWidget(statusBox);
@@ -735,7 +735,7 @@ void KBabelMW::setupStatusBar()
statusBar()->insertItem(i18n("Line: %1 Col: %2").arg(1).arg(1)
,ID_STATUS_CURSOR);
- QHBox* progressBox = new QHBox(statusBar(),"progressBox");
+ TQHBox* progressBox = new TQHBox(statusBar(),"progressBox");
progressBox->setSpacing(2);
_progressLabel = new KSqueezedTextLabel( "", progressBox );
_progressBar=new MyKProgress(progressBox,"progressbar");
@@ -745,7 +745,7 @@ void KBabelMW::setupStatusBar()
statusBar()->addWidget(progressBox,1);
statusBar()->setMinimumHeight(progressBox->sizeHint().height());
- QWhatsThis::add(statusBar(),
+ TQWhatsThis::add(statusBar(),
i18n("<qt><p><b>Statusbar</b></p>\n\
<p>The statusbar displays some information about the opened file,\n\
like the total number of entries and the number of fuzzy and untranslated\n\
@@ -756,23 +756,23 @@ messages. Also the index and the status of the currently displayed entry is show
void KBabelMW::setupDynamicActions()
{
// dynamic validation tools
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QPtrList<KAction> actions = ToolAction::dataToolActionList(
- tools, m_view, SLOT(validateUsingTool( const KDataToolInfo &, const QString & )),
+ TQPtrList<KAction> actions = ToolAction::dataToolActionList(
+ tools, m_view, TQT_SLOT(validateUsingTool( const KDataToolInfo &, const TQString & )),
"validate", false, actionCollection() );
KActionMenu* m_menu = new KActionMenu(i18n("&Validation"), actionCollection(), "dynamic_validation_tools");
KAction* ac = new KAction(i18n("Perform &All Checks"), CTRL+Key_E , m_view,
- SLOT(checkAll()),actionCollection(), "check_all");
+ TQT_SLOT(checkAll()),actionCollection(), "check_all");
ac->setEnabled(false);
m_menu->insert(ac);
m_menu->insert( new KActionSeparator() );
ac = new KAction(i18n("C&heck Syntax"), CTRL+Key_T , m_view,
- SLOT(checkSyntax()),actionCollection(), "check_syntax");
+ TQT_SLOT(checkSyntax()),actionCollection(), "check_syntax");
ac->setEnabled(false);
m_menu->insert(ac);
@@ -784,13 +784,13 @@ void KBabelMW::setupDynamicActions()
// dynamic modify tools
// query available tools
- QValueList<KDataToolInfo> allTools = KDataToolInfo::query
+ TQValueList<KDataToolInfo> allTools = KDataToolInfo::query
("CatalogItem", "application/x-kbabel-catalogitem", KGlobal::instance());
// skip read-only tools for single items
- QValueList<KDataToolInfo> modifyTools;
+ TQValueList<KDataToolInfo> modifyTools;
- QValueList<KDataToolInfo>::ConstIterator entry = allTools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = allTools.begin();
for( ; entry != allTools.end(); ++entry )
{
if( !(*entry).isReadOnly() )
@@ -801,7 +801,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// skip validation actions
@@ -833,7 +833,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// skip validation actions
@@ -844,7 +844,7 @@ void KBabelMW::setupDynamicActions()
// create corresponding actions
actions = ToolAction::dataToolActionList(
- modifyTools, m_view, SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const QString & )),
+ modifyTools, m_view, TQT_SLOT(modifyCatalogUsingTool( const KDataToolInfo &, const TQString & )),
"validate", true, actionCollection() );
// insert tools
@@ -923,7 +923,7 @@ bool KBabelMW::queryClose()
{
if(m_view->isSearching())
{
- connect(m_view,SIGNAL(signalSearchActive(bool)),this,SLOT(quit()));
+ connect(m_view,TQT_SIGNAL(signalSearchActive(bool)),this,TQT_SLOT(quit()));
m_view->stopSearch();
return false;
}
@@ -932,7 +932,7 @@ bool KBabelMW::queryClose()
{
// stop the activity and try again
m_view->catalog()->stop();
- QTimer::singleShot(0, this, SLOT( close() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( close() ));
return false;
}
@@ -973,13 +973,13 @@ void KBabelMW::quit()
}
-void KBabelMW::dragEnterEvent(QDragEnterEvent *event)
+void KBabelMW::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KBabelMW::dropEvent(QDropEvent *event)
+void KBabelMW::dropEvent(TQDropEvent *event)
{
KURL::List uri;
// see if we can decode a URI.. if not, just ignore it
@@ -989,14 +989,14 @@ void KBabelMW::dropEvent(QDropEvent *event)
}
}
-void KBabelMW::wheelEvent(QWheelEvent *e)
+void KBabelMW::wheelEvent(TQWheelEvent *e)
{
m_view->wheelEvent(e);
}
void KBabelMW::openRecent(const KURL& url)
{
- KBabelView *view = KBabelView::viewForURL(url,QString::null);
+ KBabelView *view = KBabelView::viewForURL(url,TQString::null);
if(view)
{
KWin::activateWindow(view->topLevelWidget()->winId());
@@ -1008,10 +1008,10 @@ void KBabelMW::openRecent(const KURL& url)
void KBabelMW::open(const KURL& url)
{
- open(url,QString::null,false);
+ open(url,TQString::null,false);
}
-void KBabelMW::open(const KURL& url, const QString package, bool newWindow)
+void KBabelMW::open(const KURL& url, const TQString package, bool newWindow)
{
kdDebug(KBABEL) << "opening file with project:" << _project->filename() << endl;
kdDebug(KBABEL) << "URL:" << url.prettyURL() << endl;
@@ -1036,7 +1036,7 @@ void KBabelMW::open(const KURL& url, const QString package, bool newWindow)
}
}
-void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow)
+void KBabelMW::openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow)
{
if(newWindow)
{
@@ -1067,7 +1067,7 @@ void KBabelMW::addToRecentFiles(KURL url)
void KBabelMW::fileSave()
{
// do it asynchronously due to kdelibs bug
- QTimer::singleShot( 0, this, SLOT( fileSave_internal() ));
+ TQTimer::singleShot( 0, this, TQT_SLOT( fileSave_internal() ));
}
void KBabelMW::fileSave_internal()
@@ -1091,10 +1091,10 @@ void KBabelMW::fileSave_internal()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
// reenable save action
@@ -1108,10 +1108,10 @@ void KBabelMW::fileSaveAs()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
}
@@ -1122,10 +1122,10 @@ void KBabelMW::fileSaveSpecial()
KURL url=m_view->currentURL();
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << ((url.directory(false)+url.fileName()).utf8()) ;
- if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(QCString)", data ))
+ if( !client->send( "catalogmanager-*", "CatalogManagerIFace", "updatedFile(TQCString)", data ))
kdDebug(KBABEL) << "Unable to send file update info via DCOP" << endl;
}
@@ -1181,7 +1181,7 @@ void KBabelMW::optionsEditToolbars()
{
saveMainWindowSettings( KGlobal::config(), "View" );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -1198,8 +1198,8 @@ void KBabelMW::optionsPreferences()
_prefDialog = new KBabelPreferences(m_view->dictionaries());
prefDialogs.append(_prefDialog);
- connect(_prefDialog,SIGNAL(settingsChanged())
- ,m_view,SLOT(updateSettings()));
+ connect(_prefDialog,TQT_SIGNAL(settingsChanged())
+ ,m_view,TQT_SLOT(updateSettings()));
}
int prefHeight=_prefDialog->height();
@@ -1210,7 +1210,7 @@ void KBabelMW::optionsPreferences()
int x=width/2-prefWidth/2;
int y=height/2-prefHeight/2;
- _prefDialog->move(mapToGlobal(QPoint(x,y)));
+ _prefDialog->move(mapToGlobal(TQPoint(x,y)));
if(!_prefDialog->isVisible())
{
@@ -1221,7 +1221,7 @@ void KBabelMW::optionsPreferences()
KWin::activateWindow(_prefDialog->winId());
}
-void KBabelMW::setLedColor(const QColor& color)
+void KBabelMW::setLedColor(const TQColor& color)
{
if(_fuzzyLed)
{
@@ -1239,8 +1239,8 @@ void KBabelMW::setLedColor(const QColor& color)
void KBabelMW::openCatalogManager()
{
- QCString service;
- QString result;
+ TQCString service;
+ TQString result;
DCOPClient * client = kapp->dcopClient();
@@ -1248,7 +1248,7 @@ void KBabelMW::openCatalogManager()
QCStringList apps = client->registeredApplications();
for( QCStringList::Iterator it = apps.begin() ; it != apps.end() ; ++it )
{
- QString clientID = *it;
+ TQString clientID = *it;
if( clientID.startsWith("catalogmanager") )
{
service = *it;
@@ -1259,8 +1259,8 @@ void KBabelMW::openCatalogManager()
// if there is no running catalog manager, start one
if( service.isEmpty() )
{
- QString prog = "catalogmanager";
- QString url = "";
+ TQString prog = "catalogmanager";
+ TQString url = "";
if( kapp->startServiceByDesktopName(prog,url, &result,&service))
{
KMessageBox::error(this, i18n("Unable to use KLauncher to start "
@@ -1271,8 +1271,8 @@ void KBabelMW::openCatalogManager()
}
// set preferred window
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (this->winId()) ;
if( !client->send( service, "CatalogManagerIFace", "setPreferredWindow( WId )", data )) kdDebug(KBABEL) << "Unable to set preferred window via DCOP" << endl;
}
@@ -1469,7 +1469,7 @@ void KBabelMW::enableForwardHistory(bool on)
}
-void KBabelMW::prepareProgressBar(QString msg,int max)
+void KBabelMW::prepareProgressBar(TQString msg,int max)
{
if(_statusbarTimer->isActive())
_statusbarTimer->stop();
@@ -1489,7 +1489,7 @@ void KBabelMW::clearProgressBar()
}
-void KBabelMW::changeStatusbar(const QString& text)
+void KBabelMW::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
_progressLabel->setText(" "+text);
@@ -1505,7 +1505,7 @@ void KBabelMW::clearStatusbarMsg()
_progressLabel->setText("");
}
-void KBabelMW::changeCaption(const QString& text)
+void KBabelMW::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text + ( _project->filename () != KBabel::ProjectManager::defaultProjectName() ?
@@ -1559,9 +1559,9 @@ void KBabelMW::enableStop(bool flag)
void KBabelMW::gettextHelp()
{
- QString error;
+ TQString error;
KApplication::startServiceByDesktopName("khelpcenter",
- QString("info:/gettext"), &error);
+ TQString("info:/gettext"), &error);
if(!error.isEmpty())
{
@@ -1572,7 +1572,7 @@ void KBabelMW::gettextHelp()
void KBabelMW::buildDictMenus()
{
- QPtrList<ModuleInfo> dictList = m_view->dictionaries();
+ TQPtrList<ModuleInfo> dictList = m_view->dictionaries();
dictList.setAutoDelete(true);
dictMenu->clear();
@@ -1584,10 +1584,10 @@ void KBabelMW::buildDictMenus()
ModuleInfo *info;
for(info = dictList.first(); info !=0; info = dictList.next())
{
- QString accel="Ctrl+Alt+%1";
+ TQString accel="Ctrl+Alt+%1";
dictMenu->add(info->name,info->id, accel);
- accel=QString("Ctrl+%1");
+ accel=TQString("Ctrl+%1");
selectionDictMenu->add(info->name,info->id, accel);
configDictMenu->add(info->name,info->id);
@@ -1607,14 +1607,14 @@ void KBabelMW::updateCursorPosition(int line, int col)
}
-KBabelMW *KBabelMW::winForURL(const KURL& url, QString project)
+KBabelMW *KBabelMW::winForURL(const KURL& url, TQString project)
{
KBabelMW *kb=0;
KBabelView *v = KBabelView::viewForURL(url,project);
if(v)
{
- QObject *p = v->parent();
+ TQObject *p = v->parent();
while(p && !p->inherits("KBabelMW"))
{
p = p->parent();
@@ -1627,14 +1627,14 @@ KBabelMW *KBabelMW::winForURL(const KURL& url, QString project)
return kb;
}
-KBabelMW *KBabelMW::emptyWin(QString project)
+KBabelMW *KBabelMW::emptyWin(TQString project)
{
KBabelMW *kb=0;
KBabelView *v = KBabelView::emptyView(project);
if(v)
{
- QObject *p = v->parent();
+ TQObject *p = v->parent();
while(p && !p->inherits("KBabelMW"))
{
p = p->parent();
@@ -1647,11 +1647,11 @@ KBabelMW *KBabelMW::emptyWin(QString project)
return kb;
}
-void KBabelMW::spellcheckMoreFiles(QStringList filelist)
+void KBabelMW::spellcheckMoreFiles(TQStringList filelist)
{
if( filelist.isEmpty() ) return;
_toSpellcheck = filelist;
- connect( m_view, SIGNAL( signalSpellcheckDone(int) ), this, SLOT( spellcheckDone(int)));
+ connect( m_view, TQT_SIGNAL( signalSpellcheckDone(int) ), this, TQT_SLOT( spellcheckDone(int)));
spellcheckDone( KS_IGNORE ); // use something else than KS_STOP
}
@@ -1659,22 +1659,22 @@ void KBabelMW::spellcheckDone( int result)
{
if( _toSpellcheck.isEmpty() || result == KS_STOP)
{
- disconnect( m_view, SIGNAL( signalSpellcheckDone(int)), this, SLOT(spellcheckDone( int)));
+ disconnect( m_view, TQT_SIGNAL( signalSpellcheckDone(int)), this, TQT_SLOT(spellcheckDone( int)));
KMessageBox::information( this, i18n("MessageBox text", "Spellchecking of multiple files is finished."),
i18n("MessageBox caption", "Spellcheck Done"));
}
else
{
- QString file = _toSpellcheck.first();
+ TQString file = _toSpellcheck.first();
_toSpellcheck.pop_front();
if( m_view->isModified() ) fileSave();
- open(KURL( file ), QString::null, false);
+ open(KURL( file ), TQString::null, false);
kdDebug(KBABEL) << "Starting another spellcheck" << endl;
- QTimer::singleShot( 1, m_view, SLOT(spellcheckAllMulti()));
+ TQTimer::singleShot( 1, m_view, TQT_SLOT(spellcheckAllMulti()));
}
}
-void KBabelMW::initBookmarks(QPtrList<KBabelBookmark> list)
+void KBabelMW::initBookmarks(TQPtrList<KBabelBookmark> list)
{
bmHandler->setBookmarks(list);
}
@@ -1705,12 +1705,12 @@ void KBabelMW::projectNew()
void KBabelMW::projectOpen()
{
- QString oldproject = m_view->project();
+ TQString oldproject = m_view->project();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
- oldproject = QString();
+ oldproject = TQString();
}
- const QString file = KFileDialog::getOpenFileName(oldproject, QString::null, this);
+ const TQString file = KFileDialog::getOpenFileName(oldproject, TQString::null, this);
if (file.isEmpty())
{
return;
@@ -1731,9 +1731,9 @@ void KBabelMW::projectOpenRecent(const KURL& url)
}
}
-void KBabelMW::projectOpen(const QString& file)
+void KBabelMW::projectOpen(const TQString& file)
{
- QString oldproject = m_view->project();
+ TQString oldproject = m_view->project();
if( oldproject == KBabel::ProjectManager::defaultProjectName() )
{
oldproject = "";
@@ -1761,13 +1761,13 @@ void KBabelMW::projectOpen(const QString& file)
void KBabelMW::projectClose()
{
- QString defaultProject = KBabel::ProjectManager::defaultProjectName();
+ TQString defaultProject = KBabel::ProjectManager::defaultProjectName();
m_view->useProject( KBabel::ProjectManager::open(defaultProject) );
_project = ProjectManager::open(defaultProject);
changeProjectActions(defaultProject);
}
-void KBabelMW::changeProjectActions(const QString& project)
+void KBabelMW::changeProjectActions(const TQString& project)
{
bool def = (project == KBabel::ProjectManager::defaultProjectName());
@@ -1792,8 +1792,8 @@ void KBabelMW::projectConfigure()
if(!_projectDialog)
{
_projectDialog = new ProjectDialog(_project);
- connect (_projectDialog, SIGNAL (settingsChanged())
- , m_view, SLOT (updateProjectSettings()));
+ connect (_projectDialog, TQT_SIGNAL (settingsChanged())
+ , m_view, TQT_SLOT (updateProjectSettings()));
}
int prefHeight=_projectDialog->height();
@@ -1804,7 +1804,7 @@ void KBabelMW::projectConfigure()
int x=width/2-prefWidth/2;
int y=height/2-prefHeight/2;
- _projectDialog->move(mapToGlobal(QPoint(x,y)));
+ _projectDialog->move(mapToGlobal(TQPoint(x,y)));
if(!_projectDialog->isVisible())
{
diff --git a/kbabel/kbabel/kbabel.h b/kbabel/kbabel/kbabel.h
index 4ff184c1..f6c5aa18 100644
--- a/kbabel/kbabel/kbabel.h
+++ b/kbabel/kbabel/kbabel.h
@@ -42,8 +42,8 @@
#include <kapplication.h>
#include <kdeversion.h>
#include <kdockwidget.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
#include <kmdimainfrm.h>
#include "kbabelview.h"
@@ -86,23 +86,23 @@ public:
/**
* Default Constructor
*/
- KBabelMW(QString projectFile = QString());
+ KBabelMW(TQString projectFile = TQString());
/** use this contructor, if you just want to create a new view of an existing catalog*/
- KBabelMW(KBCatalog* catalog, QString projectFile = QString());
+ KBabelMW(KBCatalog* catalog, TQString projectFile = TQString());
/**
* Default Destructor
*/
virtual ~KBabelMW();
- QString project() const { return _project->filename(); }
+ TQString project() const { return _project->filename(); }
- void open(const KURL& url, const QString package, bool newWindow);
- void openTemplate(const KURL& openURL,const KURL& saveURL,const QString& package, bool newWindow=false);
- void projectOpen(const QString& filename);
+ void open(const KURL& url, const TQString package, bool newWindow);
+ void openTemplate(const KURL& openURL,const KURL& saveURL,const TQString& package, bool newWindow=false);
+ void projectOpen(const TQString& filename);
- void spellcheckMoreFiles( QStringList filelist);
+ void spellcheckMoreFiles( TQStringList filelist);
void setSettings(KBabel::SaveSettings,KBabel::IdentitySettings);
void updateSettings();
@@ -111,13 +111,13 @@ public:
* @return A pointer to a KBabel, that has opened file URL or 0 if no
* KBabel was found
*/
- static KBabelMW *winForURL(const KURL& url, QString projectFile = QString::null);
+ static KBabelMW *winForURL(const KURL& url, TQString projectFile = TQString::null);
/**
* @return A pointer to a KBabel, that has opened no file URL or 0 if no
* KBabel was found
*/
- static KBabelMW *emptyWin(QString projectFile = QString::null);
+ static KBabelMW *emptyWin(TQString projectFile = TQString::null);
public slots:
void toggleEditMode();
@@ -126,13 +126,13 @@ protected:
/**
* 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);
/**
* Overrriden virtual for wheel event handling to forward to KBabelView
*/
- virtual void wheelEvent(QWheelEvent *e);
+ virtual void wheelEvent(TQWheelEvent *e);
/**
* This function is called when it is time for the app to save its
@@ -212,15 +212,15 @@ private slots:
* activity. message is displayed left to the progressbar
* and max is the maximum number for the progressbar
*/
- void prepareProgressBar(QString message,int max);
+ void prepareProgressBar(TQString message,int max);
/**
* resets the progressBar and enables the window
*/
void clearProgressBar();
- void changeStatusbar(const QString& text);
+ void changeStatusbar(const TQString& text);
void clearStatusbarMsg();
- void changeCaption(const QString& text);
+ void changeCaption(const TQString& text);
void showModified(bool);
/**
@@ -228,7 +228,7 @@ private slots:
*/
void enableDefaults(bool readOnly);
- void setLedColor(const QColor& color);
+ void setLedColor(const TQColor& color);
void buildDictMenus();
@@ -254,7 +254,7 @@ private:
void init(KBCatalog* catalog);
void setupActions();
void setupDynamicActions();
- void changeProjectActions(const QString& project);
+ void changeProjectActions(const TQString& project);
void setupStatusBar();
void saveSettings();
void restoreSettings();
@@ -263,7 +263,7 @@ private:
*
* @param list the list of bookmarks.
*/
- void initBookmarks(QPtrList<KBabelBookmark> list);
+ void initBookmarks(TQPtrList<KBabelBookmark> list);
private:
KBabelView *m_view;
@@ -273,22 +273,22 @@ private:
int _currentIndex;
KProgress* _progressBar;
- QLabel* _progressLabel;
+ TQLabel* _progressLabel;
KLed* _fuzzyLed;
KLed* _untransLed;
KLed* _errorLed;
- QTimer *_statusbarTimer;
+ TQTimer *_statusbarTimer;
KBabelPreferences* _prefDialog;
- QStringList _toSpellcheck;
+ TQStringList _toSpellcheck;
/**
* used for updating preferences, that are common in
* the whole application
*/
- static QPtrList<KBabelPreferences> prefDialogs;
+ static TQPtrList<KBabelPreferences> prefDialogs;
// frequently used actions
@@ -316,7 +316,7 @@ private:
KSharedConfig::Ptr _config;
KBabel::ProjectDialog* _projectDialog;
- QMap<QString,QString> _toolsShortcuts;
+ TQMap<TQString,TQString> _toolsShortcuts;
KBabel::KBabelMailer* mailer;
KBabelBookmarkHandler* bmHandler;
diff --git a/kbabel/kbabel/kbabeliface.h b/kbabel/kbabel/kbabeliface.h
index d03b927d..49d19f5c 100644
--- a/kbabel/kbabel/kbabeliface.h
+++ b/kbabel/kbabel/kbabeliface.h
@@ -36,7 +36,7 @@
#define KBABELIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KBabelIface : virtual public DCOPObject
{
@@ -44,38 +44,38 @@ class KBabelIface : virtual public DCOPObject
public:
k_dcop:
- virtual void openURL(QCString url, QCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";}
- virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile)
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow) { url = ""; window = 0; newWindow = 0; package= "";}
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile)
{ url = ""; window = 0; newWindow = 0; projectFile=""; package= "";}
- virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";}
- virtual void openTemplate(QCString openFilename, QCString package, QCString saveFilename, int newWindow, QCString projectFile)
+ virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow) { openFilename = ""; saveFilename = ""; newWindow = 0; package= "";}
+ virtual void openTemplate(TQCString openFilename, TQCString package, TQCString saveFilename, int newWindow, TQCString projectFile)
{ openFilename = ""; saveFilename = ""; newWindow = 0; projectFile=""; package= "";}
/**
* open file url, if not already opened and goto entry
* that is equal msgid
*/
- virtual void gotoFileEntry(QCString url, QCString msgid)=0;
- virtual void gotoFileEntry(QCString url, QCString package, int msgid)=0;
- virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString msgid)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid)=0;
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile)=0;
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave)=0;
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker,
int ignoreContextInfo, int ask, int askForNextFile, int askForSave)=0;
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project )=0;
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project )=0;
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment, int ignoreAccelMarker,
- int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project )=0;
- virtual void spellcheck(QStringList fileList)=0;
+ int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project )=0;
+ virtual void spellcheck(TQStringList fileList)=0;
};
#endif // KBABELIFACE_H
diff --git a/kbabel/kbabel/kbabelpref.cpp b/kbabel/kbabel/kbabelpref.cpp
index 2907f060..2592385e 100644
--- a/kbabel/kbabel/kbabelpref.cpp
+++ b/kbabel/kbabel/kbabelpref.cpp
@@ -42,14 +42,14 @@
#include "colorpreferences.h"
#include "toolaction.h"
#include "toolselectionwidget.h"
-#include "qcombobox.h"
+#include "tqcombobox.h"
#include <klocale.h>
#include <kapplication.h>
using namespace KBabel;
-KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
+KBabelPreferences::KBabelPreferences(TQPtrList<ModuleInfo> ml)
: KConfigDialog(0, "Preferences", KBabelSettings::self())
{
_editorPage = new EditorPreferences(0, "editor");
@@ -59,12 +59,12 @@ KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
, i18n("Options for Editing"));
// this contains a custom widget for tool selection, set it up
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
_editorPage->_kcfg_AutoCheckTools->loadTools( "validate", tools );
- connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( added( QListBoxItem * ) ),
- this, SLOT (updateButtons()));
- connect( _editorPage->_kcfg_AutoCheckTools, SIGNAL( removed( QListBoxItem * ) ),
- this, SLOT (updateButtons()));
+ connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( added( TQListBoxItem * ) ),
+ this, TQT_SLOT (updateButtons()));
+ connect( _editorPage->_kcfg_AutoCheckTools, TQT_SIGNAL( removed( TQListBoxItem * ) ),
+ this, TQT_SLOT (updateButtons()));
addPage(_searchPage = new SearchPreferences(0, "search")
, i18n("title of page in preferences dialog","Search")
@@ -78,8 +78,8 @@ KBabelPreferences::KBabelPreferences(QPtrList<ModuleInfo> ml)
_searchPage->_kcfg_DefaultModule->insertItem(info->name);
}
moduleList = ml;
- connect( _searchPage->_kcfg_DefaultModule, SIGNAL( activated(int) ),
- this, SLOT (updateButtons()));
+ connect( _searchPage->_kcfg_DefaultModule, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT (updateButtons()));
addPage(new EditorDiffPreferences(0, "diff")
,i18n("title of page in preferences dialog","Diff")
diff --git a/kbabel/kbabel/kbabelpref.h b/kbabel/kbabel/kbabelpref.h
index a275e11e..6d72aaf1 100644
--- a/kbabel/kbabel/kbabelpref.h
+++ b/kbabel/kbabel/kbabelpref.h
@@ -36,7 +36,7 @@
#define KBABELPREF_H
#include <kconfigdialog.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
class SearchPreferences;
class EditorPreferences;
@@ -46,7 +46,7 @@ class KBabelPreferences : public KConfigDialog
{
Q_OBJECT
public:
- KBabelPreferences(QPtrList<ModuleInfo>);
+ KBabelPreferences(TQPtrList<ModuleInfo>);
protected slots:
virtual void slotHelp();
@@ -62,7 +62,7 @@ private:
SearchPreferences* _searchPage;
EditorPreferences* _editorPage;
- QPtrList<ModuleInfo> moduleList;
+ TQPtrList<ModuleInfo> moduleList;
};
diff --git a/kbabel/kbabel/kbabelsplash.cpp b/kbabel/kbabel/kbabelsplash.cpp
index a13d8cd7..4166cffe 100644
--- a/kbabel/kbabel/kbabelsplash.cpp
+++ b/kbabel/kbabel/kbabelsplash.cpp
@@ -28,36 +28,36 @@
#include "kbabelsplash.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
KBabelSplash* KBabelSplash::instance = 0;
-KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
- : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
+KBabelSplash::KBabelSplash( TQWidget* parent, const char* name )
+ : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
{
setMargin( 0 );
setSpacing( 0 );
- QLabel* picLabel = new QLabel( this );
- QPixmap pixmap;
+ TQLabel* picLabel = new TQLabel( this );
+ TQPixmap pixmap;
if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) )
picLabel->setPixmap( pixmap );
- picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
// Set geometry, with support for Xinerama systems
- QRect r;
+ TQRect r;
r.setSize(sizeHint());
- int ps = QApplication::desktop()->primaryScreen();
- r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() );
+ int ps = TQApplication::desktop()->primaryScreen();
+ r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() );
setGeometry(r);
delete instance;
@@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
}
-void KBabelSplash::mousePressEvent( QMouseEvent* )
+void KBabelSplash::mousePressEvent( TQMouseEvent* )
{
close();
}
diff --git a/kbabel/kbabel/kbabelsplash.h b/kbabel/kbabel/kbabelsplash.h
index 3ae14c9a..b9a92c53 100644
--- a/kbabel/kbabel/kbabelsplash.h
+++ b/kbabel/kbabel/kbabelsplash.h
@@ -30,7 +30,7 @@
#ifndef KBABELSPLASH_H
#define KBABELSPLASH_H
-#include <qvbox.h>
+#include <tqvbox.h>
class QLabel;
class QMouseEvent;
@@ -43,13 +43,13 @@ class KBabelSplash : public QVBox
Q_OBJECT
public:
- KBabelSplash( QWidget* parent = 0, const char* name = 0 );
+ KBabelSplash( TQWidget* parent = 0, const char* name = 0 );
~KBabelSplash() { instance = 0; }
static KBabelSplash* instance;
protected:
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
};
#endif
diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp
index 2e9ebfa3..ca41a7ad 100644
--- a/kbabel/kbabel/kbabelview.cpp
+++ b/kbabel/kbabel/kbabelview.cpp
@@ -39,21 +39,21 @@
#include "kbabelsettings.h"
#include "kbprojectsettings.h"
-#include <qlayout.h>
-
-#include <qlabel.h>
-#include <qframe.h>
-#include <qfileinfo.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-#include <qdragobject.h>
-#include <qpopupmenu.h>
-#include <qstylesheet.h>
-#include <qtabwidget.h>
-#include <qtextview.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqfileinfo.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqpopupmenu.h>
+#include <tqstylesheet.h>
+#include <tqtabwidget.h>
+#include <tqtextview.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <dcopclient.h>
#include <kdeversion.h>
@@ -113,17 +113,17 @@
using namespace KBabel;
-QPtrList<KBabelView> *KBabelView::viewList = 0;
+TQPtrList<KBabelView> *KBabelView::viewList = 0;
KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project)
- : QWidget(parent)
+ : TQWidget(parent)
, _redirectedBackSearch (false)
, _project (project)
, m_mainwindow (parent)
, m_sourceview (0)
{
if(!viewList)
- viewList = new QPtrList<KBabelView>;
+ viewList = new TQPtrList<KBabelView>;
viewList->append(this);
@@ -181,7 +181,7 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project
hide();
dictBox = new KBabelDictBox(this,"dictBox");
- QWhatsThis::add(dictBox,
+ TQWhatsThis::add(dictBox,
i18n("<qt><p><b>Search results</b></p>"
"<p>This part of the window shows the results of searching in "
"dictionaries.<p>"
@@ -201,68 +201,68 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project
msgstrEdit->setReadOnly(true);
dictBox->setEnabled(false);
- connect(this, SIGNAL(signalNewFileOpened(KURL)),
- m_cataloglistview, SLOT(slotNewFileOpened()));
+ connect(this, TQT_SIGNAL(signalNewFileOpened(KURL)),
+ m_cataloglistview, TQT_SLOT(slotNewFileOpened()));
- connect(msgstrEdit,SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*)));
- connect(msgstrEdit,SIGNAL(textChanged()),this
- ,SIGNAL(signalMsgstrChanged()));
+ connect(msgstrEdit,TQT_SIGNAL(signalUndoCmd(KBabel::EditCommand*)),this,TQT_SLOT(forwardMsgstrEditCmd(KBabel::EditCommand*)));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged()),this
+ ,TQT_SIGNAL(signalMsgstrChanged()));
- connect(msgstrEdit,SIGNAL(textChanged(const QString&)),m_cataloglistview
- ,SLOT(msgstrChanged(const QString&)));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged(const TQString&)),m_cataloglistview
+ ,TQT_SLOT(msgstrChanged(const TQString&)));
- connect(this,SIGNAL(signalMsgstrChanged()),this,SLOT(autoCheck()));
- connect(msgstrEdit,SIGNAL(currentFormChanged(uint)), this
- ,SLOT(msgstrPluralFormChanged(uint)));
-
- connect(msgidLabel,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
- connect(msgstrEdit,SIGNAL(cursorPositionChanged(int,int))
- , this, SIGNAL(signalCursorPosChanged(int,int)));
-
- connect(dictBox,SIGNAL(searchStarted()),this
- ,SLOT(forwardSearchStart()));
- connect(dictBox, SIGNAL(progressStarts(const QString&)), this
- ,SLOT(forwardProgressStart(const QString&)));
- connect(dictBox,SIGNAL(progressed(int)),this
- ,SIGNAL(signalProgress(int)));
- connect(dictBox,SIGNAL(searchStopped()),this
- ,SLOT(forwardSearchStop()));
- connect(dictBox,SIGNAL(progressEnds()),this
- ,SIGNAL(signalClearProgressBar()));
-
- connect(dictBox,SIGNAL(modulesChanged()),this,
- SIGNAL(signalDictionariesChanged()));
- connect(dictBox,SIGNAL(errorInModule(const QString&)),this
- ,SLOT(showError(const QString&)));
-
- connect(_catalog,SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)),
- this, SLOT(setNewLanguage()));
-
- connect(_catalog,SIGNAL(signalNumberOfFuzziesChanged(uint)),
- this, SLOT(checkFuzzies()));
- connect(_catalog,SIGNAL(signalNumberOfUntranslatedChanged(uint)),
- this, SLOT(checkUntranslated()));
+ connect(this,TQT_SIGNAL(signalMsgstrChanged()),this,TQT_SLOT(autoCheck()));
+ connect(msgstrEdit,TQT_SIGNAL(currentFormChanged(uint)), this
+ ,TQT_SLOT(msgstrPluralFormChanged(uint)));
+
+ connect(msgidLabel,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
+ connect(msgstrEdit,TQT_SIGNAL(cursorPositionChanged(int,int))
+ , this, TQT_SIGNAL(signalCursorPosChanged(int,int)));
+
+ connect(dictBox,TQT_SIGNAL(searchStarted()),this
+ ,TQT_SLOT(forwardSearchStart()));
+ connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&)), this
+ ,TQT_SLOT(forwardProgressStart(const TQString&)));
+ connect(dictBox,TQT_SIGNAL(progressed(int)),this
+ ,TQT_SIGNAL(signalProgress(int)));
+ connect(dictBox,TQT_SIGNAL(searchStopped()),this
+ ,TQT_SLOT(forwardSearchStop()));
+ connect(dictBox,TQT_SIGNAL(progressEnds()),this
+ ,TQT_SIGNAL(signalClearProgressBar()));
+
+ connect(dictBox,TQT_SIGNAL(modulesChanged()),this,
+ TQT_SIGNAL(signalDictionariesChanged()));
+ connect(dictBox,TQT_SIGNAL(errorInModule(const TQString&)),this
+ ,TQT_SLOT(showError(const TQString&)));
+
+ connect(_catalog,TQT_SIGNAL(signalSettingsChanged(KBabel::IdentitySettings)),
+ this, TQT_SLOT(setNewLanguage()));
+
+ connect(_catalog,TQT_SIGNAL(signalNumberOfFuzziesChanged(uint)),
+ this, TQT_SLOT(checkFuzzies()));
+ connect(_catalog,TQT_SIGNAL(signalNumberOfUntranslatedChanged(uint)),
+ this, TQT_SLOT(checkUntranslated()));
if(buildLeds)
{
- connect(this,SIGNAL(signalFuzzyDisplayed(bool))
- ,this,SLOT(toggleFuzzyLed(bool)));
- connect(this,SIGNAL(signalUntranslatedDisplayed(bool))
- ,this,SLOT(toggleUntransLed(bool)));
- connect(this,SIGNAL(signalFaultyDisplayed(bool))
- ,this,SLOT(toggleErrorLed(bool)));
+ connect(this,TQT_SIGNAL(signalFuzzyDisplayed(bool))
+ ,this,TQT_SLOT(toggleFuzzyLed(bool)));
+ connect(this,TQT_SIGNAL(signalUntranslatedDisplayed(bool))
+ ,this,TQT_SLOT(toggleUntransLed(bool)));
+ connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool))
+ ,this,TQT_SLOT(toggleErrorLed(bool)));
}
- _dropMenu = new QPopupMenu(this);
+ _dropMenu = new TQPopupMenu(this);
_dropMenu->insertItem(i18n("Menu item", "Open"),ID_DROP_OPEN);
_dropMenu->insertItem(i18n("Open Template"),ID_DROP_OPEN_TEMPLATE);
readSettings(_config);
readProject(_project);
- connect (project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
if(!_catalog->currentURL().isEmpty())
{
@@ -304,10 +304,10 @@ KBabelView::~KBabelView()
void KBabelView::initDockWidgets()
{
// setup main dock widget - original text
- QWidget *tempWidget=new QWidget(this,"msgidWidget");
+ TQWidget *tempWidget=new TQWidget(this,"msgidWidget");
tempWidget->setMinimumSize(350,150);
- QVBoxLayout *layout=new QVBoxLayout(tempWidget);
+ TQVBoxLayout *layout=new TQVBoxLayout(tempWidget);
msgidLabel = new HidingMsgEdit(2, this, 0, tempWidget,"msgidLabel");
msgidLabel->installEventFilter(this);
@@ -330,22 +330,22 @@ void KBabelView::initDockWidgets()
"Many good ideas, especially for the Catalog Manager, are taken\n"
"from KTranslator by Andrea Rizzi.").arg(VERSION).arg(2006));
- QLabel *label=new QLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget);
+ TQLabel *label=new TQLabel(msgidLabel,i18n("O&riginal string (msgid):"),tempWidget);
- QHBoxLayout* hb=new QHBoxLayout(layout);
+ TQHBoxLayout* hb=new TQHBoxLayout(layout);
hb->addSpacing(KDialog::marginHint());
hb->addWidget(label);
layout->addWidget(msgidLabel);
layout->setStretchFactor(msgidLabel,1);
- QWhatsThis::add(tempWidget,
+ TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Original String</b></p>\n\
<p>This part of the window shows the original message\n\
of the currently displayed entry.</p></qt>"));
KDockWidget* mainDock;
- mainDock = m_mainwindow->createDockWidget( "Original", QPixmap ());
+ mainDock = m_mainwindow->createDockWidget( "Original", TQPixmap ());
//i18n: translators: Dock window caption
mainDock->setCaption(i18n("Original Text"));
mainDock->setGeometry(50, 50, 100, 100);
@@ -356,12 +356,12 @@ of the currently displayed entry.</p></qt>"));
m_mainwindow->setMainDockWidget(mainDock); // master dockwidget
mainDock->show ();
m_mainwindow->setView (mainDock);
- connect (this, SIGNAL (signalCopy ()), this, SLOT (textCopy ()));
- connect (this, SIGNAL (signalCut ()), this, SLOT (textCut ()));
- connect (this, SIGNAL (signalPaste ()), this, SLOT (textPaste ()));
- connect (this, SIGNAL (signalSelectAll ()), this, SLOT (selectAll ()));
+ connect (this, TQT_SIGNAL (signalCopy ()), this, TQT_SLOT (textCopy ()));
+ connect (this, TQT_SIGNAL (signalCut ()), this, TQT_SLOT (textCut ()));
+ connect (this, TQT_SIGNAL (signalPaste ()), this, TQT_SLOT (textPaste ()));
+ connect (this, TQT_SIGNAL (signalSelectAll ()), this, TQT_SLOT (selectAll ()));
- KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", QPixmap ());
+ KDockWidget* comment_dock = m_mainwindow->createDockWidget( "Comment", TQPixmap ());
//i18n: translators: Dock window caption
comment_dock->setCaption(i18n("Comment"));
comment_dock->setGeometry(50, 50, 100, 100);
@@ -372,17 +372,17 @@ of the currently displayed entry.</p></qt>"));
KDockWidget::DockRight, // dock site
20 ); // relation target/this (in percent)
comment_dock->show ();
- connect (this, SIGNAL (signalCopy ()), m_commentview, SLOT (textCopy ()));
- connect (this, SIGNAL (signalCut ()), m_commentview, SLOT (textCut ()));
- connect (this, SIGNAL (signalPaste ()), m_commentview, SLOT (textPaste ()));
- connect (this, SIGNAL (signalSelectAll ()), m_commentview, SLOT (textSelectAll ()));
+ connect (this, TQT_SIGNAL (signalCopy ()), m_commentview, TQT_SLOT (textCopy ()));
+ connect (this, TQT_SIGNAL (signalCut ()), m_commentview, TQT_SLOT (textCut ()));
+ connect (this, TQT_SIGNAL (signalPaste ()), m_commentview, TQT_SLOT (textPaste ()));
+ connect (this, TQT_SIGNAL (signalSelectAll ()), m_commentview, TQT_SLOT (textSelectAll ()));
m_commentview->installEventFilter( this );
// build the msgstr widget
- tempWidget=new QWidget(this,"msgstrWidget");
+ tempWidget=new TQWidget(this,"msgstrWidget");
tempWidget->setMinimumSize(350,150);
- layout=new QVBoxLayout(tempWidget);
+ layout=new TQVBoxLayout(tempWidget);
// if undefined number of plural forms, use 1
int pf = _catalog->defaultNumberOfPluralForms();
@@ -393,9 +393,9 @@ of the currently displayed entry.</p></qt>"));
msgstrEdit->installEventFilter(this);
KCursor::setAutoHideCursor(msgstrEdit,true);
- label=new QLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget);
+ label=new TQLabel(msgstrEdit,i18n("Trans&lated string (msgstr):"),tempWidget);
- hb=new QHBoxLayout(layout);
+ hb=new TQHBoxLayout(layout);
hb->setSpacing(KDialog::spacingHint());
hb->addSpacing(KDialog::marginHint());
@@ -407,7 +407,7 @@ of the currently displayed entry.</p></qt>"));
_fuzzyLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_fuzzyLed->setFixedSize(15,12);
- label = new QLabel(i18n("fuzzy"),tempWidget);
+ label = new TQLabel(i18n("fuzzy"),tempWidget);
hb->addWidget(_fuzzyLed);
hb->addWidget(label);
@@ -416,7 +416,7 @@ of the currently displayed entry.</p></qt>"));
_untransLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_untransLed->setFixedSize(15,12);
- label = new QLabel(i18n("untranslated"),tempWidget);
+ label = new TQLabel(i18n("untranslated"),tempWidget);
hb->addWidget(_untransLed);
hb->addWidget(label);
@@ -425,7 +425,7 @@ of the currently displayed entry.</p></qt>"));
_errorLed = new KLed(Qt::red,KLed::Off,KLed::Sunken,KLed::Rectangular
,tempWidget);
_errorLed->setFixedSize(15,12);
- label = new QLabel(i18n("faulty"),tempWidget);
+ label = new TQLabel(i18n("faulty"),tempWidget);
hb->addWidget(_errorLed);
hb->addWidget(label);
@@ -434,24 +434,24 @@ of the currently displayed entry.</p></qt>"));
hb->addStretch(1);
// ### TODO: perhaps it should be moreprecise where the setting can be changed
- QString ledMsg=i18n("<qt><p><b>Status LEDs</b></p>\n"
+ TQString ledMsg=i18n("<qt><p><b>Status LEDs</b></p>\n"
"<p>These LEDs display the status of the currently displayed message.\n"
"You can change their color in the preferences dialog section\n"
"<b>Editor</b> on page <b>Appearance</b></p></qt>");
- QWhatsThis::add(_fuzzyLed,ledMsg);
- QWhatsThis::add(_untransLed,ledMsg);
- QWhatsThis::add(_errorLed,ledMsg);
+ TQWhatsThis::add(_fuzzyLed,ledMsg);
+ TQWhatsThis::add(_untransLed,ledMsg);
+ TQWhatsThis::add(_errorLed,ledMsg);
}
layout->addWidget(msgstrEdit);
layout->setStretchFactor(msgstrEdit,1);
- QWhatsThis::add(tempWidget,
+ TQWhatsThis::add(tempWidget,
i18n("<qt><p><b>Translation Editor</b></p>\n\
<p>This editor displays and lets you edit the translation of the currently displayed message.<p></qt>"));
- KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", QPixmap ());
+ KDockWidget* msgstr_dock = m_mainwindow->createDockWidget( "Msgstr", TQPixmap ());
//i18n: translators: Dock window caption
msgstr_dock->setCaption(i18n("Translated String"));
msgstr_dock->setEnableDocking(KDockWidget::DockCorner);
@@ -461,7 +461,7 @@ of the currently displayed entry.</p></qt>"));
50 ); // relation target/this (in percent)
msgstr_dock->show ();
- KDockWidget* dock = m_mainwindow->createDockWidget( "Search", QPixmap ());
+ KDockWidget* dock = m_mainwindow->createDockWidget( "Search", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("the search (noun)","Search"));
//i18n: translators: Dock tab caption
@@ -475,7 +475,7 @@ of the currently displayed entry.</p></qt>"));
KDockWidget* tools = dock;
- dock = m_mainwindow->createDockWidget( "PO context", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "PO context", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("PO Context"));
//i18n: translators: Dock tab caption
@@ -488,7 +488,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- dock = m_mainwindow->createDockWidget( "Charselector", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Charselector", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Character Table"));
//i18n: translators: Dock tab caption
@@ -502,7 +502,7 @@ of the currently displayed entry.</p></qt>"));
dock->show ();
- dock = m_mainwindow->createDockWidget( "Tag List", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Tag List", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Tag List"));
//i18n: translators: Dock tab caption
@@ -515,7 +515,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- dock = m_mainwindow->createDockWidget( "Source Context", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Source Context", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Source Context"));
//i18n: translators: Dock tab caption
@@ -528,7 +528,7 @@ of the currently displayed entry.</p></qt>"));
20 ); // relation target/this (in percent)
dock->show ();
- KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", QPixmap ());
+ KDockWidget* translist_dock = m_mainwindow->createDockWidget( "Translation List", TQPixmap ());
translist_dock->setCaption(i18n("Translation List"));
translist_dock->setGeometry(50, 50, 100, 100);
translist_dock->setEnableDocking(KDockWidget::DockFullSite);
@@ -537,7 +537,7 @@ of the currently displayed entry.</p></qt>"));
translist_dock->manualDock( mainDock, KDockWidget::DockTop,100);
translist_dock->show ();
- dock = m_mainwindow->createDockWidget( "Error List", QPixmap ());
+ dock = m_mainwindow->createDockWidget( "Error List", TQPixmap ());
//i18n: translators: Dock window caption
dock->setCaption(i18n("Error List"));
//i18n: translators: Dock tab caption
@@ -550,33 +550,33 @@ of the currently displayed entry.</p></qt>"));
20 );
dock->show ();
- connect(m_cataloglistview,SIGNAL(signalSelectionChanged(const KBabel::DocPosition&))
- ,this,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_commentview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_contextview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_taglistview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_sourceview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalDisplayed(const KBabel::DocPosition&))
- ,m_errorlistview,SLOT(gotoEntry(const KBabel::DocPosition&)));
- connect(this,SIGNAL(signalFaultyDisplayed(bool))
- ,m_errorlistview,SLOT(updateView()));
- connect(m_charselectorview, SIGNAL( characterDoubleClicked(QChar) )
- ,this, SLOT( insertChar(QChar) ));
- connect(m_taglistview,SIGNAL(signalTagSelected(const QString&))
- , this, SLOT(insertTagFromTool(const QString&)));
- connect(m_taglistview,SIGNAL(signalHighlightedTagChanged(int))
- , this, SLOT(skipToTagFromTool(int)));
- connect(this, SIGNAL(signalNextTag(int))
- , m_taglistview, SLOT(highlightTag(int)));
- connect(m_commentview,SIGNAL(signalCursorPosChanged(int,int))
- , m_mainwindow, SLOT(updateCursorPosition(int,int)));
+ connect(m_cataloglistview,TQT_SIGNAL(signalSelectionChanged(const KBabel::DocPosition&))
+ ,this,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_commentview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_contextview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_taglistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_sourceview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalDisplayed(const KBabel::DocPosition&))
+ ,m_errorlistview,TQT_SLOT(gotoEntry(const KBabel::DocPosition&)));
+ connect(this,TQT_SIGNAL(signalFaultyDisplayed(bool))
+ ,m_errorlistview,TQT_SLOT(updateView()));
+ connect(m_charselectorview, TQT_SIGNAL( characterDoubleClicked(TQChar) )
+ ,this, TQT_SLOT( insertChar(TQChar) ));
+ connect(m_taglistview,TQT_SIGNAL(signalTagSelected(const TQString&))
+ , this, TQT_SLOT(insertTagFromTool(const TQString&)));
+ connect(m_taglistview,TQT_SIGNAL(signalHighlightedTagChanged(int))
+ , this, TQT_SLOT(skipToTagFromTool(int)));
+ connect(this, TQT_SIGNAL(signalNextTag(int))
+ , m_taglistview, TQT_SLOT(highlightTag(int)));
+ connect(m_commentview,TQT_SIGNAL(signalCursorPosChanged(int,int))
+ , m_mainwindow, TQT_SLOT(updateCursorPosition(int,int)));
}
-KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
+KBabelView *KBabelView::viewForURL(const KURL& url, const TQString project)
{
if(url.isEmpty())
return 0;
@@ -587,7 +587,7 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
KURL u = url;
u.cleanPath();
- QPtrListIterator<KBabelView> it(*viewList);
+ TQPtrListIterator<KBabelView> it(*viewList);
KBabelView *view=0;
while( it.current() && !view)
{
@@ -605,12 +605,12 @@ KBabelView *KBabelView::viewForURL(const KURL& url, const QString project)
return view;
}
-KBabelView *KBabelView::emptyView(const QString)
+KBabelView *KBabelView::emptyView(const TQString)
{
if(!viewList)
return 0;
- QPtrListIterator<KBabelView> it(*viewList);
+ TQPtrListIterator<KBabelView> it(*viewList);
KBabelView *view=0;
while( it.current() && !view)
{
@@ -684,8 +684,8 @@ void KBabelView::readSettings(KConfig* config)
if(KBabelSettings::autoUnsetFuzzy())
{
- connect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
setupAutoCheckTools();
@@ -770,7 +770,7 @@ void KBabelView::readProject(Project::Ptr project)
spell2.config->setEncoding(_spellcheckSettings.spellEncoding);
spell2.config->setDictionary(_spellcheckSettings.spellDict);
- spell2.kspell= new KSpell(this, "", this, SLOT(dummy(KSpell *)),
+ spell2.kspell= new KSpell(this, "", this, TQT_SLOT(dummy(KSpell *)),
spell2.config, false, false);
if(spell2.kspell->status() == KSpell::Error)
kdWarning(KBABEL) << "Something's wrong with KSpell, can't start on-the-fly checking" << endl;
@@ -853,13 +853,13 @@ void KBabelView::updateSettings()
_errorLed->setColor(KBabelSettings::ledColor());
}
- disconnect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
if(KBabelSettings::autoUnsetFuzzy())
{
- connect(msgstrEdit,SIGNAL(textChanged())
- ,this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged())
+ ,this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgstrEdit->setCleverEditing(KBabelSettings::cleverEditing());
@@ -926,9 +926,9 @@ void KBabelView::setupAutoCheckTools()
if(!KBabelSettings::autoCheckTools().isEmpty() )
{
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QValueList<KDataToolInfo>::Iterator it;
+ TQValueList<KDataToolInfo>::Iterator it;
for( it=tools.begin(); it!=tools.end() ; ++it )
{
if(KBabelSettings::autoCheckTools().contains((*it).service()->library()) )
@@ -942,14 +942,14 @@ void KBabelView::setupAutoCheckTools()
}
}
-void KBabelView::setRMBEditMenu(QPopupMenu* popup)
+void KBabelView::setRMBEditMenu(TQPopupMenu* popup)
{
msgidLabel->setContextMenu( popup );
msgstrEdit->setContextMenu( popup );
KContextMenuManager::insert(this,popup);
}
-void KBabelView::setRMBSearchMenu(QPopupMenu* popup)
+void KBabelView::setRMBSearchMenu(TQPopupMenu* popup)
{
dictBox->setRMBMenu(popup);
}
@@ -965,7 +965,7 @@ void KBabelView::restoreView(KConfig *)
void KBabelView::saveSession(KConfig* config)
{
- QString focus;
+ TQString focus;
int line=0,col=0;
if(msgstrEdit->hasFocus())
{
@@ -1009,11 +1009,11 @@ void KBabelView::saveSession(KConfig* config)
void KBabelView::restoreSession(KConfig* config)
{
- QString url=config->readPathEntry("URL");
+ TQString url=config->readPathEntry("URL");
if(!url.isEmpty())
{
- open(KURL( url ), QString::null, false,true);
+ open(KURL( url ), TQString::null, false,true);
}
@@ -1031,7 +1031,7 @@ void KBabelView::restoreSession(KConfig* config)
pos.form=config->readNumEntry("PluralForm");
gotoEntry(pos);
- QString focus=config->readEntry("Focus");
+ TQString focus=config->readEntry("Focus");
int line=config->readNumEntry("CursorLine");
int col=config->readNumEntry("CursorCol");
if(focus=="msgstr")
@@ -1067,7 +1067,7 @@ void KBabelView::newFileOpened(bool readOnly)
msgstrEdit->setReadOnly(readOnly);
msgstrEdit->setFocus();
- QString caption=_catalog->package();
+ TQString caption=_catalog->package();
if(readOnly)
caption+=i18n(" [readonly]");
emit signalChangeCaption(caption);
@@ -1103,7 +1103,7 @@ void KBabelView::open()
open(KURL());
}
-void KBabelView::open(const KURL& _url, const QString & package, bool checkIfModified, bool newView)
+void KBabelView::open(const KURL& _url, const TQString & package, bool checkIfModified, bool newView)
{
#if KDE_IS_VERSION( 3, 5, 0)
KURL url = KIO::NetAccess::mostLocalURL(_url,this);
@@ -1126,7 +1126,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
{
if(url.isEmpty())
{
- QString filename;
+ TQString filename;
if ((url = KFileDialog::getOpenURL(currentURL().url(), CatalogImportPlugin::availableImportMimeTypes().join(" ")
,this)).isEmpty())
{
@@ -1192,7 +1192,7 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
}
case RECOVERED_PARSE_ERROR:
{
- QString msg=i18n(
+ TQString msg=i18n(
"The file contained syntax errors and an attempt has been "
"made to recover it.\n"
"Please check the questionable entries by using "
@@ -1243,8 +1243,8 @@ void KBabelView::open(const KURL& _url, const QString & package, bool checkIfMod
_autoSaveDelay = _catalog->saveSettings( ).autoSaveDelay;
if ( _autoSaveDelay ) {
if ( !autoSaveTimer ) {
- autoSaveTimer = new QTimer( this, "AUTOSAVE TIMER" );
- connect( autoSaveTimer, SIGNAL( timeout( ) ), this, SLOT( slotAutoSaveTimeout( ) ) );
+ autoSaveTimer = new TQTimer( this, "AUTOSAVE TIMER" );
+ connect( autoSaveTimer, TQT_SIGNAL( timeout( ) ), this, TQT_SLOT( slotAutoSaveTimeout( ) ) );
}
autoSaveTimer->stop( );
autoSaveTimer->start( 1000 * 60 * _autoSaveDelay );
@@ -1268,7 +1268,7 @@ void KBabelView::revertToSaved()
}
}
- open(_catalog->currentURL(),QString::null,false);
+ open(_catalog->currentURL(),TQString::null,false);
}
void KBabelView::openTemplate(const KURL& openURL, const KURL& saveURL)
@@ -1448,7 +1448,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
if (KIO::NetAccess::exists(url, false, this))
{
- if(KMessageBox::warningContinueCancel(this,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if(KMessageBox::warningContinueCancel(this,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url.prettyURL())),i18n("Warning"),i18n("&Overwrite"))==KMessageBox::Cancel)
{
return false;
@@ -1468,7 +1468,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
do
{
// select the right error message
- QString message;
+ TQString message;
switch(stat)
{
case NO_PERMISSIONS:
@@ -1569,7 +1569,7 @@ bool KBabelView::saveFileAs(KURL url, bool syntaxCheck)
bool KBabelView::saveFileSpecial()
{
- QString tmpname;
+ TQString tmpname;
bool result = false;
{
@@ -1596,7 +1596,7 @@ bool KBabelView::saveFileSpecial()
, "filesave"
, i18n("Options for File Saving"));
- if( _prefDialog->exec() == QDialog::Accepted )
+ if( _prefDialog->exec() == TQDialog::Accepted )
{
SaveSettings settings = project->saveSettings();
SaveSettings originalSettings = _catalog->saveSettings();
@@ -1607,7 +1607,7 @@ bool KBabelView::saveFileSpecial()
}
}
- QFile::remove( tmpname );
+ TQFile::remove( tmpname );
return result;
}
@@ -1623,11 +1623,11 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
return false;
bool returnCode=true;
- QString output;
+ TQString output;
Msgfmt::Status result=_catalog->checkSyntax( output );
- const QStringList outputLines = QStringList::split("\n",output);
+ const TQStringList outputLines = TQStringList::split("\n",output);
switch(result)
{
@@ -1654,7 +1654,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
case Msgfmt::HeaderError:
case Msgfmt::SyntaxError:
{
- QString msg = ( result == Msgfmt::SyntaxError )
+ TQString msg = ( result == Msgfmt::SyntaxError )
? i18n("msgfmt detected a syntax error.\n")
: i18n("msgfmt detected a header syntax error.\n");
@@ -1695,7 +1695,7 @@ bool KBabelView::checkSyntax(bool msgOnlyAtError,bool question)
case Msgfmt::NoExecutable:
case Msgfmt::Error:
{
- QString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n"
+ TQString msg = i18n("While trying to check syntax with msgfmt an error occurred.\n"
"Please make sure that you have installed\n"
"the GNU gettext package properly.");
if(question)
@@ -1742,9 +1742,9 @@ bool KBabelView::checkAll()
bool a,badresult=false;
- QValueList<KDataToolInfo> tools = ToolAction::validationTools();
+ TQValueList<KDataToolInfo> tools = ToolAction::validationTools();
- QValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::ConstIterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
KDataTool* tool = (*entry).createTool();
@@ -1756,7 +1756,7 @@ bool KBabelView::checkAll()
}
}
- QString output;
+ TQString output;
a = (_catalog->checkSyntax(output, false)!=Msgfmt::Ok);
badresult=badresult||a;
@@ -1831,7 +1831,7 @@ void KBabelView::updateEditor(int form, bool delay)
if(KBabelSettings::autoUnsetFuzzy() && !msgstrEdit->isModified())
{
- disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgidLabel->setText(_catalog->msgid(_currentIndex), _catalog->msgctxt(_currentIndex));
@@ -1844,7 +1844,7 @@ void KBabelView::updateEditor(int form, bool delay)
if(KBabelSettings::autoUnsetFuzzy() && _catalog->isFuzzy(_currentIndex))
{
- connect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ connect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
}
msgstrEdit->blockSignals(false);
@@ -1862,7 +1862,7 @@ void KBabelView::updateEditor(int form, bool delay)
{
if (delay)
{
- QTimer::singleShot(0, this, SLOT (startSearch()));
+ TQTimer::singleShot(0, this, TQT_SLOT (startSearch()));
}
else
{
@@ -2034,7 +2034,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>End of document reached.<br>Continue from the beginning?</qt>",
"<qt>%n replacements made.<br>End of document reached.<br>Continue from the beginning?</qt>",
- _replacesTotal), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2042,7 +2042,7 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue from the beginning?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the beginning?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
if(opts.inMsgid && !forReplace)
@@ -2078,23 +2078,23 @@ bool KBabelView::findNext_internal(DocPosition& pos, bool forReplace, bool gui)
if( opts.askForNextFile )
{
int r = KMessageBox::questionYesNo(this,i18n("End of document reached.\n"
- "Continue in the next file?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue in the next file?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
if( r != KMessageBox::Yes ) return false;
}
if( isModified() && !opts.askForSave ) saveFile();
DCOPClient *client = kapp->dcopClient();
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
bool morefiles = false; // more files to lookup in
if( !client->call( _fileSource,"CatalogManagerIFace",
"findNextFile()", data, replyType, replyData) ) kdDebug(KBABEL) << "unable to call, reply type is " << replyType << endl;
- else if( replyType == "QCString" )
+ else if( replyType == "TQCString" )
{
- QDataStream rep( replyData, IO_ReadOnly);
- QCString f;
+ TQDataStream rep( replyData, IO_ReadOnly);
+ TQCString f;
rep >> f;
- QString foundFile = QString::fromUtf8(f);
+ TQString foundFile = TQString::fromUtf8(f);
morefiles = !f.isEmpty() && !f.isNull();
if( morefiles )
{
@@ -2219,7 +2219,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
r = KMessageBox::questionYesNo(this,
i18n("<qt>%n replacement made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
"<qt>%n replacements made.<br>Beginning of document reached.<br>Continue from the end?</qt>",
- _replacesTotal),QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ _replacesTotal),TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
else {
r = KMessageBox::Yes;
@@ -2228,7 +2228,7 @@ bool KBabelView::findPrev_internal(DocPosition& pos, bool forReplace, bool gui)
}
else {
r = KMessageBox::questionYesNo(this,i18n("Beginning of document reached.\n"
- "Continue from the end?"), QString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
+ "Continue from the end?"), TQString::null, KStdGuiItem::cont(), KStdGuiItem::cancel());
}
if(r == KMessageBox::Yes) {
pos.item = _catalog->numberOfEntries()-1;
@@ -2345,7 +2345,7 @@ void KBabelView::find()
_findDialog = new FindDialog(false,this);
}
- QString marked;
+ TQString marked;
if(msgstrEdit->hasFocus()) {
marked=msgstrEdit->selectedText();
msgstrEdit->selectAll(false);
@@ -2363,7 +2363,7 @@ void KBabelView::find()
if(marked==_lastFoundString)
marked="";
- if( _findDialog->exec(marked) == QDialog::Accepted ) {
+ if( _findDialog->exec(marked) == TQDialog::Accepted ) {
DocPosition pos;
FindOptions opts=_findDialog->findOpts();
opts.askFile = false; // do not search in more files
@@ -2443,7 +2443,7 @@ void KBabelView::replace()
if( !_replaceDialog ) {
_replaceDialog = new FindDialog(true,this);
}
- QString marked;
+ TQString marked;
if(msgstrEdit->hasFocus()) {
marked=msgstrEdit->selectedText();
msgstrEdit->selectAll(false);
@@ -2460,7 +2460,7 @@ void KBabelView::replace()
if(marked==_lastFoundString)
marked="";
- if( _replaceDialog->exec(marked) == QDialog::Accepted ) {
+ if( _replaceDialog->exec(marked) == TQDialog::Accepted ) {
KBabel::ReplaceOptions opts=_replaceDialog->replaceOpts();
if(opts.fromCursor) {
_findBreakAtEnd=false;
@@ -2518,9 +2518,9 @@ void KBabelView::replace()
if(success) {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext()));
- connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace()));
- connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
if(opts.ask) {
@@ -2551,7 +2551,7 @@ void KBabelView::replaceNext()
Part part;
uint form = 0;
- QString str;
+ TQString str;
if(_replacePos.part==Msgstr) {
part=Msgstr;
@@ -2629,7 +2629,7 @@ void KBabelView::replaceAll()
Part part;
uint form=0;
- QString str;
+ TQString str;
if(_replacePos.part==Msgstr) {
part=Msgstr;
@@ -2689,7 +2689,7 @@ void KBabelView::findNextReplace()
}
-void KBabelView::findInFile(QCString fileSource, FindOptions options)
+void KBabelView::findInFile(TQCString fileSource, FindOptions options)
{
DocPosition pos;
pos.item=0;
@@ -2714,7 +2714,7 @@ void KBabelView::findInFile(QCString fileSource, FindOptions options)
findNext_internal(pos);
}
-void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions options)
+void KBabelView::replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options)
{
_replacePos.item=0;
_replacePos.part=Msgid;
@@ -2749,9 +2749,9 @@ void KBabelView::replaceInFile(QCString fileSource, KBabel::ReplaceOptions optio
else {
if(!_replaceAskDialog) {
_replaceAskDialog = new ReplaceDialog(this);
- connect(_replaceAskDialog,SIGNAL(replace()),this,SLOT(replaceNext()));
- connect(_replaceAskDialog,SIGNAL(next()),this,SLOT(findNextReplace()));
- connect(_replaceAskDialog,SIGNAL(replaceAll()),this,SLOT(replaceAll()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replaceNext()));
+ connect(_replaceAskDialog,TQT_SIGNAL(next()),this,TQT_SLOT(findNextReplace()));
+ connect(_replaceAskDialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replaceAll()));
}
if(options.ask) {
@@ -2800,7 +2800,7 @@ void KBabelView::clear()
void KBabelView::msgid2msgstr()
{
// FIXME: should care about plural forms
- QString text = _catalog->msgid(_currentIndex).first();
+ TQString text = _catalog->msgid(_currentIndex).first();
// this is KDE specific:
if(text.find("_: NAME OF TRANSLATORS\\n")==0)
@@ -2830,7 +2830,7 @@ void KBabelView::msgid2msgstr()
// end of KDE specific part
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(text.contains(reg))
{
text.replace(reg,"");
@@ -3182,7 +3182,7 @@ void KBabelView::editHeader()
int x=w/2-editWidth/2;
int y=h/2-editHeight/2;
- editor->move(mapToGlobal(QPoint(x,y)));
+ editor->move(mapToGlobal(TQPoint(x,y)));
editor->show();
editor->raise();
@@ -3202,8 +3202,8 @@ void KBabelView::startSearch()
void KBabelView::startSearch(bool delay)
{
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3220,11 +3220,11 @@ void KBabelView::startSearch(bool delay)
}
}
-void KBabelView::startSearch(const QString module)
+void KBabelView::startSearch(const TQString module)
{
// FIXME: should care about plural forms
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3240,7 +3240,7 @@ void KBabelView::startSelectionSearch()
startSelectionSearch(KBabelSettings::defaultModule());
}
-void KBabelView::startSelectionSearch(const QString module)
+void KBabelView::startSelectionSearch(const TQString module)
{
dictBox->setActiveModule(module);
@@ -3256,8 +3256,8 @@ void KBabelView::startSelectionSearch(const QString module)
else
{
// should care about plural forms
- QString msg = _catalog->msgid(_currentIndex,true).first();
- QRegExp reg=_catalog->miscSettings().contextInfo;
+ TQString msg = _catalog->msgid(_currentIndex,true).first();
+ TQRegExp reg=_catalog->miscSettings().contextInfo;
if(msg.contains(reg))
{
msg.replace(reg,"");
@@ -3299,8 +3299,8 @@ void KBabelView::emitEntryState()
if(isError)
{
- QPalette palette=msgstrEdit->palette();
- palette.setColor( QColorGroup::Text, red );
+ TQPalette palette=msgstrEdit->palette();
+ palette.setColor( TQColorGroup::Text, red );
if( _catalog->itemStatus(_currentIndex).contains("syntax error"))
{
@@ -3335,7 +3335,7 @@ void KBabelView::checkUntranslated()
void KBabelView::autoRemoveFuzzyStatus()
{
// only at first text change remove fuzzy status
- disconnect(msgstrEdit,SIGNAL(textChanged()),this,SLOT(autoRemoveFuzzyStatus()));
+ disconnect(msgstrEdit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(autoRemoveFuzzyStatus()));
//removeFuzzyStatus();
}
@@ -3398,18 +3398,18 @@ void KBabelView::toggleErrorLed(bool on)
-void KBabelView::showError(const QString& message)
+void KBabelView::showError(const TQString& message)
{
KMessageBox::error(this,message);
}
-void KBabelView::dragEnterEvent(QDragEnterEvent *event)
+void KBabelView::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KBabelView::dropEvent(QDropEvent *event)
+void KBabelView::dropEvent(TQDropEvent *event)
{
KURL::List uri;
@@ -3421,33 +3421,33 @@ void KBabelView::dropEvent(QDropEvent *event)
}
-bool KBabelView::eventFilter( QObject* object, QEvent* event)
+bool KBabelView::eventFilter( TQObject* object, TQEvent* event)
{
- if(event->type() == QEvent::DragEnter)
+ if(event->type() == TQEvent::DragEnter)
{
- QDragEnterEvent* e = (QDragEnterEvent*) event;
+ TQDragEnterEvent* e = (TQDragEnterEvent*) event;
if(KURLDrag::canDecode(e))
{
e->accept(true);
return true;
}
}
- else if(event->type() == QEvent::Drop)
+ else if(event->type() == TQEvent::Drop)
{
KURL::List uri;
// see if we can decode a URI.. if not, just ignore it
- if (KURLDrag::decode((QDropEvent*)event, uri))
+ if (KURLDrag::decode((TQDropEvent*)event, uri))
{
- processUriDrop(uri ,( (QWidget*)object)->mapToGlobal( ( (QDropEvent*)event )->pos()));
+ processUriDrop(uri ,( (TQWidget*)object)->mapToGlobal( ( (TQDropEvent*)event )->pos()));
return true;
}
}
- else if(event->type() == QEvent::KeyPress)
+ else if(event->type() == TQEvent::KeyPress)
{
// This is a little workaround to use CTRL+ALT+Home, CTRL+ALT+End, Undo keys
// to go to the first and the last entry. Because otherwise
// CTRL+Home and CTRL+End and Undo are caught by QTextEdit
- QKeyEvent *ke = (QKeyEvent*)event;
+ TQKeyEvent *ke = (TQKeyEvent*)event;
if(ke->key() == Key_Home && ke->state() == (AltButton | ControlButton))
{
@@ -3480,7 +3480,7 @@ bool KBabelView::eventFilter( QObject* object, QEvent* event)
return false;
}
-void KBabelView::processUriDrop(KURL::List& uriList, const QPoint& pos)
+void KBabelView::processUriDrop(KURL::List& uriList, const TQPoint& pos)
{
// if we have two entries, the chance is high, that it
// is a drag from the catalog manager
@@ -3526,12 +3526,12 @@ void KBabelView::forwardMsgstrEditCmd(EditCommand* cmd)
/*
if(cmd->terminator()!=0)
{
- kdDebug(KBABEL) << QString::number(cmd->terminator()) << endl;
+ kdDebug(KBABEL) << TQString::number(cmd->terminator()) << endl;
}
else
{
DelTextCmd* delcmd = (DelTextCmd*) cmd;
- kdDebug(KBABEL) << QString::number(delcmd->offset)+":"+delcmd->str+"|" << endl;
+ kdDebug(KBABEL) << TQString::number(delcmd->offset)+":"+delcmd->str+"|" << endl;
}
*/
bool fuzzyRemoved=false;
@@ -3576,9 +3576,9 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
{
if( !_autocheckTools.isEmpty() )
{
- QStringList oldStatus = _catalog->itemStatus(_currentIndex);
+ TQStringList oldStatus = _catalog->itemStatus(_currentIndex);
- QStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools );
+ TQStringList status = _catalog->itemStatus( _currentIndex,true, _autocheckTools );
// if there is more than one view, the status changes only in
// one view, so we have to update always.
@@ -3587,12 +3587,12 @@ void KBabelView::autoCheck(bool onlyWhenChanged)
if( !status.isEmpty() )
{
- QString msg = "";
+ TQString msg = "";
// ### TODO: whynot use i18n("context",text) directly?
KLocale* locale=KGlobal::locale();
- for( QStringList::iterator it=status.begin() ; it != status.end() ; ++it )
+ for( TQStringList::iterator it=status.begin() ; it != status.end() ; ++it )
{
if( msg.isEmpty() ) msg = locale->translate("what check found errors",(*it).utf8());
else msg += ", "+locale->translate("what check found errors",(*it).utf8());
@@ -3712,20 +3712,20 @@ void KBabelView::spellcheckCommon()
delete spellDlg;
}
-void KBabelView::addSpellcheckWords( uint pos, QString text, uint index, uint form )
+void KBabelView::addSpellcheckWords( uint pos, TQString text, uint index, uint form )
{
// special format chars
- QString spclChars="abfnrtv'\"?\\";
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQString spclChars="abfnrtv'\"?\\";
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
uint textLength=text.length();
do
{
- QString word="";
+ TQString word="";
bool wordBegin=false;
while(!wordBegin && pos < textLength)
{
- QChar c=text[pos];
+ TQChar c=text[pos];
if(c.isLetter() || c==accelMarker)
{
wordBegin=true;
@@ -3830,7 +3830,7 @@ void KBabelView::spellcheck()
spell.lastIndex=_currentIndex;
_tagExtractor->setString(msgstrEdit->selectedText());
- QString marked=_tagExtractor->plainString(true);
+ TQString marked=_tagExtractor->plainString(true);
addSpellcheckWords(msgstrEdit->beginOfMarkedText(),marked
,_currentIndex,msgstrEdit->currentForm());
@@ -3839,7 +3839,7 @@ void KBabelView::spellcheck()
{
uint first=0;
uint last=_catalog->numberOfEntries()-1;
- QString text;
+ TQString text;
bool emitProgress=false;
@@ -3863,12 +3863,12 @@ void KBabelView::spellcheck()
int pos=msgstrEdit->currentIndex();
int form=msgstrEdit->currentForm();
- QStringList msgs = _catalog->msgstr(_currentIndex);
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
_tagExtractor->setString((*msgs.at(form)));
text=_tagExtractor->plainString(true);
addSpellcheckWords( pos, text, _currentIndex, form++ );
- for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
+ for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
{
_tagExtractor->setString(*i);
text=_tagExtractor->plainString(true);
@@ -3903,9 +3903,9 @@ void KBabelView::spellcheck()
kapp->processEvents(100);
}
- QStringList msgs=_catalog->msgstr(i);
+ TQStringList msgs=_catalog->msgstr(i);
uint formCounter=0;
- for(QStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j)
+ for(TQStringList::Iterator j=msgs.begin() ; j!=msgs.end() ; ++j)
{
_tagExtractor->setString(*j);
text=_tagExtractor->plainString(true);
@@ -3918,12 +3918,12 @@ void KBabelView::spellcheck()
int pos=msgstrEdit->currentIndex();
int form=msgstrEdit->currentForm();
- QStringList msgs = _catalog->msgstr(_currentIndex);
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
_tagExtractor->setString((*msgs.at(form)).left(pos));
text=_tagExtractor->plainString(true);
addSpellcheckWords( 0, text, _currentIndex, form++ );
- for( QStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
+ for( TQStringList::Iterator i=msgs.at(form++) ; i!=msgs.end(); i++)
{
_tagExtractor->setString(*i);
text=_tagExtractor->plainString(true);
@@ -3943,7 +3943,7 @@ void KBabelView::spellcheck()
_dontBeep=true;
spell.kspell= new KSpell (this, i18n("Spellcheck"),
- this, SLOT(spellStart(KSpell *)), spell.config, true, true);
+ this, TQT_SLOT(spellStart(KSpell *)), spell.config, true, true);
if( spell.kspell->status() == KSpell::Error )
{
KMessageBox::error( this, i18n("KBabel cannot start spell checker. "
@@ -3951,20 +3951,20 @@ void KBabelView::spellcheck()
return;
}
- connect(spell.kspell, SIGNAL(death()),this, SLOT(spellCleanDone()));
+ connect(spell.kspell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone()));
- connect(spell.kspell, SIGNAL(misspelling(const QString &, const QStringList &
+ connect(spell.kspell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &
, unsigned int)), this
- , SLOT(spellMisspelled(const QString &, const QStringList &, unsigned int)));
+ , TQT_SLOT(spellMisspelled(const TQString &, const TQStringList &, unsigned int)));
- connect(spell.kspell, SIGNAL(corrected(const QString &, const QString &, unsigned int))
- , this, SLOT(spellCorrected(const QString &, const QString &, unsigned int)));
+ connect(spell.kspell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int))
+ , this, TQT_SLOT(spellCorrected(const TQString &, const TQString &, unsigned int)));
- connect(spell.kspell,SIGNAL(ignoreall(const QString &))
- , this, SLOT(spellAddIgnore(const QString &)));
+ connect(spell.kspell,TQT_SIGNAL(ignoreall(const TQString &))
+ , this, TQT_SLOT(spellAddIgnore(const TQString &)));
- connect(spell.kspell, SIGNAL(done(bool))
- , this, SLOT(spellResult(bool)));
+ connect(spell.kspell, TQT_SIGNAL(done(bool))
+ , this, TQT_SLOT(spellResult(bool)));
spell.kspell->setAutoDelete(true); // let KSpell handle delete
}
@@ -3980,7 +3980,7 @@ void KBabelView::spellStart(KSpell *)
// set ignored words
if(_spellcheckSettings.rememberIgnored)
{
- QString urlString = _spellcheckSettings.ignoreURL;
+ TQString urlString = _spellcheckSettings.ignoreURL;
if(urlString.contains("@PACKAGE@"))
{
urlString.replace("@PACKAGE@",_catalog->packageName());
@@ -3989,15 +3989,15 @@ void KBabelView::spellStart(KSpell *)
KURL url(urlString);
if(url.isLocalFile())
{
- QFile file(url.path());
+ TQFile file(url.path());
if(file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString contents = stream.read();
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString contents = stream.read();
file.close();
- spell.ignoreList = QStringList::split('\n',contents);
+ spell.ignoreList = TQStringList::split('\n',contents);
}
else if(file.exists())
{
@@ -4023,7 +4023,7 @@ void KBabelView::spellStart(KSpell *)
uint total = spell.ignoreList.count();
uint oldPercent=0;
uint counter=0;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it=spell.ignoreList.begin(); it != spell.ignoreList.end(); ++it)
{
counter++;
@@ -4045,7 +4045,7 @@ void KBabelView::spellStart(KSpell *)
}
-bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
+bool KBabelView::markMisspelled(const TQString &orig, unsigned int pos)
{
Position *p = spell.posDict.at(pos);
if(!p)
@@ -4081,9 +4081,9 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
int end=p->end+spell.posCorrection-spell.inWordCorrection;
// check if this is the correct word
- QString text = *_catalog->msgstr(p->index).at(p->form);
+ TQString text = *_catalog->msgstr(p->index).at(p->form);
text=text.mid(begin,end-begin);
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(text.contains(accelMarker))
{
@@ -4104,7 +4104,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
if( n > 0 )
{
// re-get the original text since we replace some things above
- QString text = *_catalog->msgstr(p->index).at(p->form);
+ TQString text = *_catalog->msgstr(p->index).at(p->form);
text=text.mid(begin,end-begin);
bool textFound=false;
@@ -4126,7 +4126,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
if(e<0) e=text.length();
- QString w=text.mid(lastPos,e-lastPos);
+ TQString w=text.mid(lastPos,e-lastPos);
if(w.contains(accelMarker))
{
w.replace(accelMarker,"");
@@ -4183,7 +4183,7 @@ bool KBabelView::markMisspelled(const QString &orig, unsigned int pos)
return textOk;
}
-void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsigned int pos)
+void KBabelView::spellMisspelled(const TQString &orig, const TQStringList &, unsigned int pos)
{
kdDebug(KBABEL) << "misspelled: " << orig << " pos: " << pos << endl;
@@ -4192,11 +4192,11 @@ void KBabelView::spellMisspelled(const QString &orig, const QStringList &, unsig
markMisspelled(orig,pos);
}
-void KBabelView::spellCorrected(const QString &orig, const QString &word, unsigned int pos)
+void KBabelView::spellCorrected(const TQString &orig, const TQString &word, unsigned int pos)
{
if(orig != word)
{
- QString newWord(word);
+ TQString newWord(word);
kdDebug(KBABEL) << "corrected: " << orig << " " << newWord
<< " pos: " << pos << endl;
@@ -4222,12 +4222,12 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign
if(markMisspelled(orig,pos))
{
- QString marked=msgstrEdit->selectedText();
+ TQString marked=msgstrEdit->selectedText();
spell.origWords.append(marked);
if(marked.contains("\n") && !newWord.contains('\n'))
{
- QString s1=newWord;
+ TQString s1=newWord;
s1.replace(" ","\n");
// if only a newline has been replaced with a white space
@@ -4240,11 +4240,11 @@ void KBabelView::spellCorrected(const QString &orig, const QString &word, unsign
// check if the old word had an accelerator. If yes and the new
// word has no accelerator, try to add the accelerator for
// the same char else add in at the same position
- QChar accelMarker=_catalog->miscSettings().accelMarker;
+ TQChar accelMarker=_catalog->miscSettings().accelMarker;
if(marked.contains(accelMarker) && !newWord.contains(accelMarker))
{
int b=marked.find(accelMarker);
- QChar accel=marked[b+1];
+ TQChar accel=marked[b+1];
int nb=newWord.find(accel,0,false);
if(nb>=0)
{
@@ -4308,9 +4308,9 @@ void KBabelView::spellResult(bool flag)
else if(spell.replaced > 0 && spell.what2Check!=Current
&& spell.what2Check!=Marked)
{
- QStringList list;
- QStringList::Iterator origIt;
- QStringList::Iterator newIt;
+ TQStringList list;
+ TQStringList::Iterator origIt;
+ TQStringList::Iterator newIt;
origIt=spell.origWords.begin();
newIt=spell.newWords.begin();
@@ -4332,12 +4332,12 @@ void KBabelView::spellResult(bool flag)
KURL url(_spellcheckSettings.ignoreURL);
if(url.isLocalFile())
{
- QFile file(url.path());
+ TQFile file(url.path());
if(file.open(IO_WriteOnly|IO_Append))
{
- QStringList::Iterator it;
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQStringList::Iterator it;
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
for(it=spell.newIgnoreList.begin();
it!=spell.newIgnoreList.end();
@@ -4368,7 +4368,7 @@ void KBabelView::spellResult(bool flag)
spell.kspell->cleanUp();
emit signalSpellcheckDone(s);
- QTimer::singleShot(0,this,SLOT(cleanUpSpellStruct()));
+ TQTimer::singleShot(0,this,TQT_SLOT(cleanUpSpellStruct()));
}
@@ -4420,7 +4420,7 @@ void KBabelView::cancelSpellcheck()
spell.active=false;
}
-void KBabelView::spellAddIgnore(const QString &word)
+void KBabelView::spellAddIgnore(const TQString &word)
{
if(!spell.ignoreList.contains(word))
{
@@ -4440,7 +4440,7 @@ void KBabelView::forwardSearchStop()
emit signalSearchActive(false);
}
-void KBabelView::forwardProgressStart(const QString& msg)
+void KBabelView::forwardProgressStart(const TQString& msg)
{
emit signalResetProgressBar(msg,100);
}
@@ -4458,16 +4458,16 @@ void KBabelView::slotAutoSaveTimeout( )
void KBabelView::useProject (Project::Ptr project)
{
// FIXME: close the current project first
- disconnect (_project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ disconnect (_project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
_project = project;
_catalog->useProject(_project);
readProject(_project);
- connect (project, SIGNAL(signalSpellcheckSettingsChanged()),
- this, SLOT(updateProjectSettings()));
+ connect (project, TQT_SIGNAL(signalSpellcheckSettingsChanged()),
+ this, TQT_SLOT(updateProjectSettings()));
}
#include "kbabelview.moc"
diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h
index a52ed4dc..fb86cd6b 100644
--- a/kbabel/kbabel/kbabelview.h
+++ b/kbabel/kbabel/kbabelview.h
@@ -65,8 +65,8 @@ struct ModuleInfo;
#include <kdockwidget.h>
#include <kurl.h>
#include <kconfig.h>
-#include <qwidget.h>
-#include <qstrlist.h>
+#include <tqwidget.h>
+#include <tqstrlist.h>
#include <resources.h>
#include <catalogview.h>
@@ -90,7 +90,7 @@ class TagListView;
* @author Matthias Kiefer <matthias.kiefer@gmx.de>
* @version 0.1
*/
-class KBabelView : public QWidget, public KBabel::CatalogView
+class KBabelView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
@@ -109,16 +109,16 @@ public:
* @return the view, that has opened file url or 0 if this
* file is not opened
*/
- static KBabelView *viewForURL(const KURL& url, const QString project);
+ static KBabelView *viewForURL(const KURL& url, const TQString project);
/**
* @return the view, that has no opened file url or 0 if there
* is no such view
*/
- static KBabelView *emptyView(const QString project);
+ static KBabelView *emptyView(const TQString project);
KURL currentURL() const;
- QString project() const { return _project->filename(); }
+ TQString project() const { return _project->filename(); }
void useProject (KBabel::Project::Ptr project);
bool isLastView() const;
@@ -178,7 +178,7 @@ public:
KBCatalog* catalog() const{return _catalog;}
- void processUriDrop(KURL::List& uriList, const QPoint & pos);
+ void processUriDrop(KURL::List& uriList, const TQPoint & pos);
/**
* checks the status of the displayed entry: last, first, fuzzy,...
@@ -186,12 +186,12 @@ public:
*/
void emitEntryState();
- void setRMBEditMenu(QPopupMenu*);
- void setRMBSearchMenu(QPopupMenu*);
- void setTagsMenu(QPopupMenu*);
- void setArgsMenu(QPopupMenu*);
+ void setRMBEditMenu(TQPopupMenu*);
+ void setRMBSearchMenu(TQPopupMenu*);
+ void setTagsMenu(TQPopupMenu*);
+ void setArgsMenu(TQPopupMenu*);
- QPtrList<ModuleInfo> dictionaries();
+ TQPtrList<ModuleInfo> dictionaries();
KBabelDictBox* searchView() { return dictBox; }
bool autoDiffEnabled() const {return _diffEnabled;}
@@ -202,7 +202,7 @@ public slots:
/** opens a filedialog and asks for an url */
void open();
- void open(const KURL& url, const QString & package=QString::null, bool checkModified=true, bool newView=false);
+ void open(const KURL& url, const TQString & package=TQString::null, bool checkModified=true, bool newView=false);
void setFilePackage();
void revertToSaved();
@@ -217,8 +217,8 @@ public slots:
bool findNext();
bool findPrev();
void find();
- void findInFile(QCString fileSource, KBabel::FindOptions options);
- void replaceInFile(QCString fileSource, KBabel::ReplaceOptions options);
+ void findInFile(TQCString fileSource, KBabel::FindOptions options);
+ void replaceInFile(TQCString fileSource, KBabel::ReplaceOptions options);
void replace();
void selectAll();
void deselectAll();
@@ -259,7 +259,7 @@ public slots:
void insertNextTag();
void insertNextTagMsgid();
void insertNextArg();
- void insertTagFromTool( const QString& tag );
+ void insertTagFromTool( const TQString& tag );
void showTagsMenu();
void showArgsMenu();
void skipToNextTag();
@@ -282,23 +282,23 @@ public slots:
void stopSearch();
void startSearch();
void startSelectionSearch();
- void startSearch(const QString id);
- void startSelectionSearch(const QString id);
+ void startSearch(const TQString id);
+ void startSelectionSearch(const TQString id);
- void configureDictionary(const QString id);
- void editDictionary(const QString id);
- void aboutDictionary(const QString id);
+ void configureDictionary(const TQString id);
+ void editDictionary(const TQString id);
+ void aboutDictionary(const TQString id);
/**
* this was originally protected, but we need this to expose for
* KBabelMW forwarding
*/
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
protected:
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
- virtual bool eventFilter(QObject*, QEvent* event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
+ virtual bool eventFilter(TQObject*, TQEvent* event);
signals:
/** emited when a fuzzy catalogentry is shown */
@@ -346,15 +346,15 @@ signals:
/**
* 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 signalNewFileOpened(KURL url);
- void signalResetProgressBar(QString,int);
+ void signalResetProgressBar(TQString,int);
void signalProgress(int);
void signalClearProgressBar();
@@ -365,7 +365,7 @@ signals:
void signalForwardHistory(bool have);
void signalBackHistory(bool have);
- void ledColorChanged(const QColor& color);
+ void ledColorChanged(const TQColor& color);
void signalDictionariesChanged();
@@ -441,12 +441,12 @@ private:
* Inserts a text into the msgstr (into the current form) using undoable commands.
* if @param clearFirst is set to true, it will clear the contents of msgstr before inserting
*/
- void modifyMsgstrText(const uint offset, const QString& text, bool clearFirst=false);
+ void modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst=false);
protected slots:
- bool validateUsingTool( const KDataToolInfo & info, const QString & command );
- void modifyUsingTool( const KDataToolInfo & info, const QString & command );
- void modifyCatalogUsingTool( const KDataToolInfo & info, const QString & command );
+ bool validateUsingTool( const KDataToolInfo & info, const TQString & command );
+ void modifyUsingTool( const KDataToolInfo & info, const TQString & command );
+ void modifyCatalogUsingTool( const KDataToolInfo & info, const TQString & command );
private slots:
void msgstrPluralFormChanged (uint index);
@@ -455,7 +455,7 @@ private slots:
/** connected to the catalog. it is called when a new file is opened*/
void newFileOpened(bool readOnly);
- void showError(const QString& message);
+ void showError(const TQString& message);
void toggleFuzzyLed(bool on);
void toggleUntransLed(bool on);
@@ -493,7 +493,7 @@ private slots:
void informDictionary();
void setNewLanguage();
- void forwardProgressStart(const QString& msg);
+ void forwardProgressStart(const TQString& msg);
void forwardSearchStart();
void forwardSearchStop();
@@ -520,14 +520,14 @@ private slots:
void insertArg(int n);
void updateArgs();
- void insertChar(QChar ch);
+ void insertChar(TQChar ch);
void showTryLaterMessageBox();
void dummy(KSpell*) {}
private:
- static QPtrList<KBabelView> *viewList;
+ static TQPtrList<KBabelView> *viewList;
HidingMsgEdit* msgstrEdit;
HidingMsgEdit* msgidLabel;
@@ -537,7 +537,7 @@ private:
FindDialog* _replaceDialog;
ReplaceDialog* _replaceAskDialog;
- QPopupMenu* _dropMenu;
+ TQPopupMenu* _dropMenu;
KLed* _fuzzyLed;
KLed* _untransLed;
@@ -551,8 +551,8 @@ private:
bool _autoSearchTempDisabled;
- QValueList<uint> _backHistory;
- QValueList<uint> _forwardHistory;
+ TQValueList<uint> _backHistory;
+ TQValueList<uint> _forwardHistory;
// flag to not beep, when switching to the next entry, because
// go -> next or prev entry was used.
@@ -566,7 +566,7 @@ private:
/**
* the string that was marked during the last search
*/
- QString _lastFoundString;
+ TQString _lastFoundString;
/*
* flag, if internal find functions should break at end or ask for
@@ -590,13 +590,13 @@ private:
int _replaceExtraOffset;
/** appId for a source of the next files to be searched */
- QCString _fileSource;
+ TQCString _fileSource;
- QStringList _tags;
- QPopupMenu *_tagsMenu;
+ TQStringList _tags;
+ TQPopupMenu *_tagsMenu;
- QStringList _args;
- QPopupMenu *_argsMenu;
+ TQStringList _args;
+ TQPopupMenu *_argsMenu;
bool _diffEnabled;
bool _loadingDiffFile;
@@ -606,7 +606,7 @@ private:
* flag, set if editing KDE documentation PO-file
*/
bool _editingDocumentation;
- QPtrList<KDataTool> _autocheckTools;
+ TQPtrList<KDataTool> _autocheckTools;
//spellcheck things
private:
@@ -624,13 +624,13 @@ private:
{
KSpell *kspell;
KSpellConfig* config;
- QStringList wordList;
+ TQStringList wordList;
bool active;
int misspelled;
int replaced;
int posCorrection;
uint lastIndex;
- QPtrList<Position> posDict;
+ TQPtrList<Position> posDict;
SpellWhat what2Check;
// the last word, that was misspelled
@@ -639,11 +639,11 @@ private:
// needed if words with '-' are treated as seperate words
int inWordCorrection;
- QStringList origWords;
- QStringList newWords;
+ TQStringList origWords;
+ TQStringList newWords;
- QStringList ignoreList;
- QStringList newIgnoreList;
+ TQStringList ignoreList;
+ TQStringList newIgnoreList;
} spell;
struct {
@@ -665,23 +665,23 @@ private:
* @returns false, if the there is a synchronization error,
* means the word has not been found in the editor.
*/
- bool markMisspelled(const QString &orig, unsigned int pos);
+ bool markMisspelled(const TQString &orig, unsigned int pos);
private slots:
void spellcheck();
void cancelSpellcheck();
void spellStart(KSpell*);
- void spellMisspelled(const QString &orig, const QStringList &sug, unsigned int pos);
- void spellCorrected(const QString &orig, const QString &newWord, unsigned int pos);
+ void spellMisspelled(const TQString &orig, const TQStringList &sug, unsigned int pos);
+ void spellCorrected(const TQString &orig, const TQString &newWord, unsigned int pos);
void spellResult(bool);
void spellCleanDone();
- void spellAddIgnore(const QString &);
+ void spellAddIgnore(const TQString &);
// initialize spellchecking struct
void cleanUpSpellStruct();
void slotAutoSaveTimeout( );
private:
- void addSpellcheckWords(uint pos, QString text, uint index, uint form);
+ void addSpellcheckWords(uint pos, TQString text, uint index, uint form);
private:
// configuration file
@@ -692,7 +692,7 @@ private:
KBabel::RegExpExtractor* _tagExtractor;
KBabel::RegExpExtractor* _argExtractor;
- QTimer * autoSaveTimer;
+ TQTimer * autoSaveTimer;
int _autoSaveDelay;
int _currentTag;
diff --git a/kbabel/kbabel/kbabelview2.cpp b/kbabel/kbabel/kbabelview2.cpp
index c07990d0..101674a3 100644
--- a/kbabel/kbabel/kbabelview2.cpp
+++ b/kbabel/kbabel/kbabelview2.cpp
@@ -43,12 +43,12 @@
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqpopupmenu.h>
+#include <tqvbox.h>
#include "catalogsettings.h"
#include "editcmd.h"
@@ -65,25 +65,25 @@
using namespace KBabel;
-QPtrList<ModuleInfo> KBabelView::dictionaries()
+TQPtrList<ModuleInfo> KBabelView::dictionaries()
{
- QPtrList<ModuleInfo> list = dictBox->moduleInfos();
+ TQPtrList<ModuleInfo> list = dictBox->moduleInfos();
return list;
}
-void KBabelView::configureDictionary(const QString id)
+void KBabelView::configureDictionary(const TQString id)
{
dictBox->configure(id);
}
-void KBabelView::editDictionary(const QString id)
+void KBabelView::editDictionary(const TQString id)
{
dictBox->edit(id);
}
-void KBabelView::aboutDictionary(const QString id)
+void KBabelView::aboutDictionary(const TQString id)
{
dictBox->aboutModule(id);
}
@@ -121,7 +121,7 @@ void KBabelView::setNewLanguage()
}
-void KBabelView::wheelEvent(QWheelEvent *e)
+void KBabelView::wheelEvent(TQWheelEvent *e)
{
if( _catalog->numberOfEntries() == 0 ) return;
@@ -196,12 +196,12 @@ void KBabelView::updateTags()
{
_tagsMenu->clear();
- QStringList tList;
- QStringList::Iterator it;
+ TQStringList tList;
+ TQStringList::Iterator it;
int counter=0;
for(it=_tags.begin(); it!=_tags.end(); ++it)
{
- QString s = *it;
+ TQString s = *it;
if( s.startsWith("&") ) s = "&"+s;
if(!tList.contains(s))
{
@@ -259,7 +259,7 @@ void KBabelView::selectTag()
// count number of eofs in tag
uint diff=0;
// FIXME: what about plural forms
- QString msgid = _catalog->msgid(_currentIndex).first();
+ TQString msgid = _catalog->msgid(_currentIndex).first();
for( uint i = _tagExtractor->matchIndex(_currentTag); i < _tagExtractor->matchIndex(_currentTag)+_tags[_currentTag].length()+1; i++ )
{
@@ -269,14 +269,14 @@ void KBabelView::selectTag()
emit signalNextTag (_currentTag);
}
-void KBabelView::setTagsMenu(QPopupMenu *menu)
+void KBabelView::setTagsMenu(TQPopupMenu *menu)
{
_tagsMenu=menu;
- connect(_tagsMenu,SIGNAL(activated(int)),this,SLOT(insertTag(int)));
+ connect(_tagsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertTag(int)));
}
-void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool clearFirst)
+void KBabelView::modifyMsgstrText(const uint offset, const TQString& text, bool clearFirst)
{
_catalog->applyBeginCommand( _currentIndex, Msgstr ,this);
@@ -296,7 +296,7 @@ void KBabelView::modifyMsgstrText(const uint offset, const QString& text, bool c
void KBabelView::insertTag(int n)
{
- QString tag = _tagsMenu->text(n);
+ TQString tag = _tagsMenu->text(n);
if( tag.startsWith( "&&" ) ) tag = tag.remove(0,1); // replace && -> &. && is used for correct menu display
modifyMsgstrText( msgstrEdit->currentIndex(), tag );
@@ -324,9 +324,9 @@ void KBabelView::insertNextTagMsgid()
int offset = msgstrEdit->beginOfLastMarkedText(); //msgstrEdit->currentIndex();
- QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
+ TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
- QString t;
+ TQString t;
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
@@ -359,7 +359,7 @@ void KBabelView::showTagsMenu()
{
int y=msgstrEdit->height()/2;
int x=msgstrEdit->width()/2;
- _tagsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) );
+ _tagsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) );
return;
}
@@ -376,12 +376,12 @@ void KBabelView::updateArgs()
{
_argsMenu->clear();
- QStringList tList;
- QStringList::Iterator it;
+ TQStringList tList;
+ TQStringList::Iterator it;
int counter=0;
for(it=_args.begin(); it!=_args.end(); ++it)
{
- QString s = *it;
+ TQString s = *it;
if(!tList.contains(s))
{
_argsMenu->insertItem(s,counter);
@@ -403,17 +403,17 @@ void KBabelView::updateArgs()
}
}
-void KBabelView::setArgsMenu(QPopupMenu *menu)
+void KBabelView::setArgsMenu(TQPopupMenu *menu)
{
_argsMenu=menu;
- connect(_argsMenu,SIGNAL(activated(int)),this,SLOT(insertArg(int)));
+ connect(_argsMenu,TQT_SIGNAL(activated(int)),this,TQT_SLOT(insertArg(int)));
}
void KBabelView::insertArg(int n)
{
- QString arg = _argsMenu->text(n);
+ TQString arg = _argsMenu->text(n);
modifyMsgstrText( msgstrEdit->currentIndex(), arg );
}
@@ -422,7 +422,7 @@ void KBabelView::insertNextArg()
{
int offset = msgstrEdit->currentIndex();
- QString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
+ TQString s = (*_catalog->msgstr(_currentIndex).at(msgstrEdit->currentForm())).left(offset);
if( _catalog->pluralForm( _currentIndex ) == KDESpecific )
{
@@ -444,7 +444,7 @@ void KBabelView::insertNextArg()
return;
}
- QString t=_args[num];
+ TQString t=_args[num];
modifyMsgstrText( offset,t );
}
@@ -455,7 +455,7 @@ void KBabelView::showArgsMenu()
{
int y=msgstrEdit->height()/2;
int x=msgstrEdit->width()/2;
- _argsMenu->exec(msgstrEdit->mapToGlobal( QPoint(x,y) ) );
+ _argsMenu->exec(msgstrEdit->mapToGlobal( TQPoint(x,y) ) );
return;
}
@@ -507,7 +507,7 @@ void KBabelView::diffInternal(bool autoDf)
_diffing = true;
uint diffIndex = _currentIndex;
- QString diffString;
+ TQString diffString;
Catalog::DiffResult r = _catalog->diff(_currentIndex, &diffString);
@@ -521,9 +521,9 @@ void KBabelView::diffInternal(bool autoDf)
bool wasEnabled=_diffEnabled;
_diffEnabled=false;
- QValueList<DiffEntry> diffList;
- QString error;
- QString package = _catalog->packageName()+".po";
+ TQValueList<DiffEntry> diffList;
+ TQString error;
+ TQString package = _catalog->packageName()+".po";
kdDebug(KBABEL) << "getting list for " << package << endl;
if(dictBox->messagesForPackage(package,diffList,error))
@@ -569,12 +569,12 @@ void KBabelView::diffInternal(bool autoDf)
case 2:
{
// get the list of all entries
- QValueList<DiffEntry> diffList = _catalog->asDiffList();
+ TQValueList<DiffEntry> diffList = _catalog->asDiffList();
- QValueList<DiffEntry> resultList;
+ TQValueList<DiffEntry> resultList;
// swap msgstr and msgid
- QValueList<DiffEntry>::iterator it;
+ TQValueList<DiffEntry>::iterator it;
DiffEntry entry;
for ( it = diffList.begin(); it != diffList.end(); ++it )
@@ -663,18 +663,18 @@ bool KBabelView::openDiffFile(bool autoDiff)
KURL poBaseURL( _project->catManSettings().poBaseDir );
- QString poBase = poBaseURL.path();
+ TQString poBase = poBaseURL.path();
int len = poBase.length();
if(fileURL.path().left(len) == poBase)
{
- QString fileRelPath = fileURL.path().mid(len);
+ TQString fileRelPath = fileURL.path().mid(len);
if(fileRelPath[0] == '/')
fileRelPath=fileRelPath.mid(1);
if(_project->settings()->diffBaseDir().right(1) != "/")
_project->settings()->diffBaseDir() += '/';
- QString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath;
+ TQString diffFilePath = _project->settings()->diffBaseDir() + fileRelPath;
KURL diffFileURL(diffFilePath);
@@ -706,7 +706,7 @@ bool KBabelView::openDiffFile(bool autoDiff)
Catalog cat;
- connect(&cat,SIGNAL(signalProgress(int)),this,SIGNAL(signalProgress(int)));
+ connect(&cat,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(signalProgress(int)));
emit signalResetProgressBar(i18n("loading file for diff"),100);
ConversionStatus stat = cat.openURL(url);
@@ -786,19 +786,19 @@ void KBabelView::showTryLaterMessageBox()
this, "information", true, true,
KStdGuiItem::ok() );
- 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( i18n("The search string has not been found yet.\n"
+ TQLabel *label2 = new TQLabel( i18n("The search string has not been found yet.\n"
"However, the string might be found "
"in the files being searched at the moment.\n"
"Please try later."), contents);
@@ -807,11 +807,11 @@ void KBabelView::showTryLaterMessageBox()
lay->add( label2 );
lay->addStretch(1);
- QCheckBox *checkbox = new QCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
+ TQCheckBox *checkbox = new TQCheckBox(i18n("Do not show in this find/replace session again"), topcontents);
dialog->setMainWidget(topcontents);
dialog->enableButtonSeparator(false);
- dialog->incInitialSize( QSize(50,0) );
+ dialog->incInitialSize( TQSize(50,0) );
dialog->exec();
@@ -822,7 +822,7 @@ void KBabelView::showTryLaterMessageBox()
void KBabelView::setFilePackage()
{
bool result=false;
- QString p = KInputDialog::getText(QString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this);
+ TQString p = KInputDialog::getText(TQString::null, i18n("Enter new package for the current file:"),_catalog->package(),&result,this);
if( result )
{
_catalog->setPackage(p);
@@ -830,7 +830,7 @@ void KBabelView::setFilePackage()
}
}
-void KBabelView::insertTagFromTool( const QString& tag )
+void KBabelView::insertTagFromTool( const TQString& tag )
{
modifyMsgstrText(msgstrEdit->currentIndex(),tag);
@@ -848,14 +848,14 @@ void KBabelView::plural2msgstr()
int currentFormBegin, currentFormEnd, pos;
uint i;
- QStringList msgs = _catalog->msgstr(_currentIndex);
- QString text= *msgs.at(msgstrEdit->currentForm());
+ TQStringList msgs = _catalog->msgstr(_currentIndex);
+ TQString text= *msgs.at(msgstrEdit->currentForm());
uint numForms = _catalog->numberOfPluralForms(_currentIndex);
if( text.isEmpty() || _catalog->pluralForm(_currentIndex) == NoPluralForm) return;
- QString result;
+ TQString result;
switch( _catalog->pluralForm(_currentIndex) )
{
@@ -864,7 +864,7 @@ void KBabelView::plural2msgstr()
_catalog->applyBeginCommand( _currentIndex, Msgstr ,this);
i=0;
- for( QStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it )
+ for( TQStringList::Iterator it=msgs.begin() ; it!=msgs.end() ; ++it )
{
if( i!= msgstrEdit->currentForm() )
{
@@ -912,7 +912,7 @@ void KBabelView::plural2msgstr()
text=text.mid(currentFormBegin,currentFormEnd-currentFormBegin);
- QString result=text;
+ TQString result=text;
for( i=1; i<numForms ; i++ )
result+="\\n\n"+text;
@@ -925,7 +925,7 @@ void KBabelView::plural2msgstr()
}
-bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &command )
+bool KBabelView::validateUsingTool( const KDataToolInfo & info, const TQString &command )
{
if(currentURL().isEmpty())
return false;
@@ -940,7 +940,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &c
bool result=_catalog->checkUsingTool(tool);
emitEntryState();
- QString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
+ TQString checkName = *(info.userCommands().at( info.commands().findIndex(command) ));
if(result)
{
@@ -972,7 +972,7 @@ bool KBabelView::validateUsingTool( const KDataToolInfo & info, const QString &c
return result;
}
-void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &command )
+void KBabelView::modifyUsingTool( const KDataToolInfo & info, const TQString &command )
{
KDataTool* tool = info.createTool();
if( !tool )
@@ -987,7 +987,7 @@ void KBabelView::modifyUsingTool( const KDataToolInfo & info, const QString &com
delete tool;
}
-void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QString &command )
+void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const TQString &command )
{
KDataTool* tool = info.createTool();
if( !tool )
@@ -1002,7 +1002,7 @@ void KBabelView::modifyCatalogUsingTool( const KDataToolInfo & info, const QStri
delete tool;
}
-void KBabelView::insertChar( QChar ch )
+void KBabelView::insertChar( TQChar ch )
{
if( isReadOnly() || _catalog->package().isEmpty() )
return;
diff --git a/kbabel/kbabel/kbbookmarkhandler.cpp b/kbabel/kbabel/kbbookmarkhandler.cpp
index fde1b051..2685905b 100644
--- a/kbabel/kbabel/kbbookmarkhandler.cpp
+++ b/kbabel/kbabel/kbbookmarkhandler.cpp
@@ -31,15 +31,15 @@
**************************************************************************** */
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqstring.h>
#include "kbbookmarkhandler.h"
// implementation of KBabelBookmark
-KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext)
+KBabelBookmark::KBabelBookmark(int msgindex, TQString msgtext)
{
_msgindex = msgindex;
if (msgtext.length() > 32) {
@@ -49,7 +49,7 @@ KBabelBookmark::KBabelBookmark(int msgindex, QString msgtext)
// insert one '&' before every consecutive group of ampersands to keep the
// first of these from acting either as accelerator or mask in the menu
- QRegExp rx("&+");
+ TQRegExp rx("&+");
int pos = msgtext.find(rx);
while (pos >= 0) {
msgtext.insert(pos, '&');
@@ -64,14 +64,14 @@ int KBabelBookmark::msgindex() const
return _msgindex;
}
-QString KBabelBookmark::msgtext() const
+TQString KBabelBookmark::msgtext() const
{
return _msgtext;
}
// implementation of KBabelBookmarkHandler
-KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu)
+KBabelBookmarkHandler::KBabelBookmarkHandler(TQPopupMenu* menu)
{
_menu = menu;
_list.setAutoDelete(true);
@@ -80,7 +80,7 @@ KBabelBookmarkHandler::KBabelBookmarkHandler(QPopupMenu* menu)
void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b)
{
// check if a bookmark to the current msgid exists already
- QPtrListIterator<KBabelBookmark> it(_list);
+ TQPtrListIterator<KBabelBookmark> it(_list);
KBabelBookmark* temp;
while((temp = it.current()) != 0) {
@@ -94,18 +94,18 @@ void KBabelBookmarkHandler::addBookmark(KBabelBookmark* b)
// if it's okay then add the bookmark
_list.append(b);
- _menu->insertItem(QString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()),
- this, SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex());
+ _menu->insertItem(TQString("#%1 - %2").arg(b->msgindex()).arg(b->msgtext()),
+ this, TQT_SIGNAL(signalBookmarkSelected(int)), 0, b->msgindex());
}
-void KBabelBookmarkHandler::addBookmark(int msgindex, QString msgtext)
+void KBabelBookmarkHandler::addBookmark(int msgindex, TQString msgtext)
{
addBookmark(new KBabelBookmark(msgindex, msgtext));
}
-void KBabelBookmarkHandler::setBookmarks(QPtrList<KBabelBookmark> list)
+void KBabelBookmarkHandler::setBookmarks(TQPtrList<KBabelBookmark> list)
{
- QPtrListIterator<KBabelBookmark> it(list);
+ TQPtrListIterator<KBabelBookmark> it(list);
KBabelBookmark* temp;
while((temp = it.current()) != 0) {
@@ -114,7 +114,7 @@ void KBabelBookmarkHandler::setBookmarks(QPtrList<KBabelBookmark> list)
}
}
-QPtrList<KBabelBookmark> KBabelBookmarkHandler::bookmarks() const
+TQPtrList<KBabelBookmark> KBabelBookmarkHandler::bookmarks() const
{
return _list;
}
diff --git a/kbabel/kbabel/kbbookmarkhandler.h b/kbabel/kbabel/kbbookmarkhandler.h
index f47c2dbf..42e94959 100644
--- a/kbabel/kbabel/kbbookmarkhandler.h
+++ b/kbabel/kbabel/kbbookmarkhandler.h
@@ -34,8 +34,8 @@
#ifndef KBBOOKMARKHANDLER_H
#define KBBOOKMARKHANDLER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class QPopupMenu;
class QString;
@@ -55,7 +55,7 @@ class KBabelBookmark
* @param msgindex the index of the bookmarked msgid.
* @param msgtext the msgid.
*/
- KBabelBookmark(int msgindex, QString msgtext);
+ KBabelBookmark(int msgindex, TQString msgtext);
/**
* Return the index of the msgid.
@@ -68,7 +68,7 @@ class KBabelBookmark
*
* @return the msgid.
*/
- QString msgtext() const;
+ TQString msgtext() const;
private:
/**
@@ -78,7 +78,7 @@ class KBabelBookmark
/**
* The classes' own copy of the msgid.
*/
- QString _msgtext;
+ TQString _msgtext;
};
@@ -96,7 +96,7 @@ class KBabelBookmarkHandler : public QObject
* @param menu the pointer to the menu where the bookmarks will be
* displayed.
*/
- KBabelBookmarkHandler(QPopupMenu* menu);
+ KBabelBookmarkHandler(TQPopupMenu* menu);
/**
* Add a bookmark.
@@ -113,20 +113,20 @@ class KBabelBookmarkHandler : public QObject
* @param msgindex the index of the bookmark's msgid.
* @param msgtext the msgindex of the bookmark to be added.
*/
- void addBookmark(int msgindex, QString msgtext);
+ void addBookmark(int msgindex, TQString msgtext);
/**
* Provide the handler with a list of bookmarks.
* Especially useful when creating a new view of the KBabel window.
*
* @param list the list to be copied.
*/
- void setBookmarks(QPtrList<KBabelBookmark> list);
+ void setBookmarks(TQPtrList<KBabelBookmark> list);
/**
* Return the list of bookmarks for a new view of the KBabel window.
*
* @return the internal list of bookmarks
*/
- QPtrList<KBabelBookmark> bookmarks() const;
+ TQPtrList<KBabelBookmark> bookmarks() const;
public slots:
/**
@@ -145,11 +145,11 @@ class KBabelBookmarkHandler : public QObject
/**
* The pointer to the menu.
*/
- QPopupMenu* _menu;
+ TQPopupMenu* _menu;
/**
* The internal list for storing the bookmarks.
*/
- QPtrList<KBabelBookmark> _list;
+ TQPtrList<KBabelBookmark> _list;
};
#endif // KBBOOKMARKHANDLER_H
diff --git a/kbabel/kbabel/kbcatalog.cpp b/kbabel/kbabel/kbcatalog.cpp
index 52205484..4c4e269a 100644
--- a/kbabel/kbabel/kbcatalog.cpp
+++ b/kbabel/kbabel/kbcatalog.cpp
@@ -35,7 +35,7 @@
#include "headereditor.h"
-KBCatalog::KBCatalog(QString configFile, QObject* parent, const char* name)
+KBCatalog::KBCatalog(TQString configFile, TQObject* parent, const char* name)
: KBabel::Catalog(parent,name,configFile)
{
_headerEditor=0;
diff --git a/kbabel/kbabel/kbcatalog.h b/kbabel/kbabel/kbcatalog.h
index ae6508cf..2c2846d4 100644
--- a/kbabel/kbabel/kbcatalog.h
+++ b/kbabel/kbabel/kbcatalog.h
@@ -48,7 +48,7 @@ class KBCatalog : public KBabel::Catalog
Q_OBJECT
public:
- KBCatalog(QString configFile = QString::null ,QObject* parent=0, const char* name=0);
+ KBCatalog(TQString configFile = TQString::null ,TQObject* parent=0, const char* name=0);
virtual ~KBCatalog();
HeaderEditor* headerEditor();
diff --git a/kbabel/kbabel/kbcataloglistview.cpp b/kbabel/kbabel/kbcataloglistview.cpp
index 51f9b008..e04da3c2 100644
--- a/kbabel/kbabel/kbcataloglistview.cpp
+++ b/kbabel/kbabel/kbcataloglistview.cpp
@@ -28,17 +28,17 @@
#include <klocale.h>
#include <klistview.h>
-#include <qcolor.h>
-#include <qlayout.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
#include <kglobalsettings.h>
using namespace KBabel;
-KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project)
- : QWidget(parent)
+KBCatalogListView::KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project)
+ : TQWidget(parent)
{
m_catalog= catalog;
- QVBoxLayout* layout=new QVBoxLayout(this);
+ TQVBoxLayout* layout=new TQVBoxLayout(this);
m_listview = new KListView(this, "catalogListView");
m_listview->addColumn(i18n("Id"));
@@ -52,7 +52,7 @@ KBCatalogListView::KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel
layout->addWidget(m_listview);
layout->setStretchFactor(m_listview,1);
- connect(m_listview,SIGNAL(selectionChanged(QListViewItem *)), this,SLOT(selectionChanged(QListViewItem *)));
+ connect(m_listview,TQT_SIGNAL(selectionChanged(TQListViewItem *)), this,TQT_SLOT(selectionChanged(TQListViewItem *)));
}
KBCatalogListView::~KBCatalogListView()
@@ -60,7 +60,7 @@ KBCatalogListView::~KBCatalogListView()
}
-void KBCatalogListView::selectionChanged ( QListViewItem * item)
+void KBCatalogListView::selectionChanged ( TQListViewItem * item)
{
DocPosition pos;
int number = m_items->find(reinterpret_cast<KBCatalogListViewItem*>(item));
@@ -74,7 +74,7 @@ void KBCatalogListView::selectionChanged ( QListViewItem * item)
void KBCatalogListView::setSelectedItem(int index)
{
- QListViewItem * item = m_items->at(index);
+ TQListViewItem * item = m_items->at(index);
// block signals - don't reemit the selected item signal
blockSignals(true);
@@ -100,7 +100,7 @@ void KBCatalogListView::update(EditCommand* cmd, bool undo)
*/
}
-void KBCatalogListView::msgstrChanged(const QString& str)
+void KBCatalogListView::msgstrChanged(const TQString& str)
{
KBCatalogListViewItem * item = reinterpret_cast<KBCatalogListViewItem *>(m_listview->selectedItem());
item->setMsgStr(str);
@@ -112,12 +112,12 @@ void KBCatalogListView::slotNewFileOpened()
KBCatalogListViewItem * tempItem;
if(m_catalog)
{
- m_items = new QPtrVector<KBCatalogListViewItem>(m_catalog->numberOfEntries());
+ m_items = new TQPtrVector<KBCatalogListViewItem>(m_catalog->numberOfEntries());
for(uint i=0;i<m_catalog->numberOfEntries();i++)
{
- QString msgid = ( *m_catalog->msgid(i).at(0) );
- QString msgstr = ( *m_catalog->msgstr(i).at(0) );
+ TQString msgid = ( *m_catalog->msgid(i).at(0) );
+ TQString msgstr = ( *m_catalog->msgstr(i).at(0) );
tempItem = new KBCatalogListViewItem(m_listview,0,i+1,
msgid,
msgstr);
diff --git a/kbabel/kbabel/kbcataloglistview.h b/kbabel/kbabel/kbcataloglistview.h
index d9737871..c2c46bdf 100644
--- a/kbabel/kbabel/kbcataloglistview.h
+++ b/kbabel/kbabel/kbcataloglistview.h
@@ -23,11 +23,11 @@
#ifndef KBCATALOGLISTVIEW_H
#define KBCATALOGLISTVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <catalogview.h>
#include <kconfig.h>
-#include <qwidget.h>
-//#include <qstrlist.h>
+#include <tqwidget.h>
+//#include <tqstrlist.h>
#include <resources.h>
#include "catalog.h"
#include "kbcatalog.h"
@@ -47,11 +47,11 @@ class KListView;
/**
@author
*/
-class KBCatalogListView : public QWidget, public KBabel::CatalogView
+class KBCatalogListView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
- KBCatalogListView(KBCatalog* catalog, QWidget *parent, KBabel::Project::Ptr project);
+ KBCatalogListView(KBCatalog* catalog, TQWidget *parent, KBabel::Project::Ptr project);
~KBCatalogListView();
@@ -68,15 +68,15 @@ signals:
public slots:
virtual void slotNewFileOpened();
- void msgstrChanged(const QString&);
+ void msgstrChanged(const TQString&);
private:
KListView * m_listview;
KBCatalog* m_catalog;
- QPtrVector<KBCatalogListViewItem>* m_items;
+ TQPtrVector<KBCatalogListViewItem>* m_items;
private slots:
- void selectionChanged ( QListViewItem * item);
+ void selectionChanged ( TQListViewItem * item);
};
#endif
diff --git a/kbabel/kbabel/kbcataloglistviewitem.cpp b/kbabel/kbabel/kbcataloglistviewitem.cpp
index 5a4012a2..4bbc3049 100644
--- a/kbabel/kbabel/kbcataloglistviewitem.cpp
+++ b/kbabel/kbabel/kbcataloglistviewitem.cpp
@@ -23,10 +23,10 @@
#include "kbcataloglistviewitem.h"
#include <assert.h>
-KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr)
+KBCatalogListViewItem::KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr)
: Super(lv, parent, "","",""), m_id(id), m_msgid(msgid), m_msgstr(msgstr)
{
- setText(0,QString::number(id));
+ setText(0,TQString::number(id));
}
@@ -34,14 +34,14 @@ KBCatalogListViewItem::~KBCatalogListViewItem()
{
}
-void KBCatalogListViewItem::setMsgId(const QString& st)
+void KBCatalogListViewItem::setMsgId(const TQString& st)
{
m_msgid = st;
setup();
repaint();
}
-void KBCatalogListViewItem::setMsgStr(const QString& st)
+void KBCatalogListViewItem::setMsgStr(const TQString& st)
{
m_msgstr = st;
setup();
@@ -60,10 +60,10 @@ void KBCatalogListViewItem::setId(const uint id)
repaint();
}
-QString KBCatalogListViewItem::key ( int column, bool ascending ) const{
+TQString KBCatalogListViewItem::key ( int column, bool ascending ) const{
if(column==0)
- return QString().sprintf("%.8u", m_id);
+ return TQString().sprintf("%.8u", m_id);
else if(column==1)
return m_msgid;
else if(column==2)
@@ -84,7 +84,7 @@ void KBCatalogListViewItem::setup()
makeDocAvailable();
- QListView* lv = listView();
+ TQListView* lv = listView();
m_doc_msgid->setWidth(std::max(1, int(lv->columnWidth(1))));
m_doc_msgstr->setWidth(std::max(1, int(lv->columnWidth(2))));
@@ -97,7 +97,7 @@ void KBCatalogListViewItem::setup()
}
-void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintMsgIdCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
// check width
@@ -123,11 +123,11 @@ void KBCatalogListViewItem::paintMsgIdCell(QPainter* p, const QColorGroup& cg,
// draw it
- m_doc_msgid->draw(p, 0, 0, QRect(0,0, width, height()), cg);
+ m_doc_msgid->draw(p, 0, 0, TQRect(0,0, width, height()), cg);
}
-void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintMsgStrCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
// check width
@@ -162,11 +162,11 @@ void KBCatalogListViewItem::paintMsgStrCell(QPainter* p, const QColorGroup& cg,
// draw it
- m_doc_msgstr->draw(p, 0, 0, QRect(0,0, width, height()), cg);
+ m_doc_msgstr->draw(p, 0, 0, TQRect(0,0, width, height()), cg);
}
-void KBCatalogListViewItem::paintCell(QPainter* p, const QColorGroup& cg,
+void KBCatalogListViewItem::paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
assert(m_doc_msgid.get() && m_doc_msgstr.get() && p);
@@ -195,16 +195,16 @@ void KBCatalogListViewItem::makeDocAvailable()
assert(listView());
- m_doc_msgid.reset(new QSimpleRichText(
+ m_doc_msgid.reset(new TQSimpleRichText(
formatMsg(m_msgid), listView()->font()));
- m_doc_msgstr.reset(new QSimpleRichText(
+ m_doc_msgstr.reset(new TQSimpleRichText(
formatMsg(m_msgstr), listView()->font()));
}
-QString KBCatalogListViewItem::formatMsg(const QString str)
+TQString KBCatalogListViewItem::formatMsg(const TQString str)
{
// TODO: Use KBHighlighting for this
- QString tmp_msgid = str;
+ TQString tmp_msgid = str;
tmp_msgid = tmp_msgid.replace( "\\n", "<br>" );
tmp_msgid = tmp_msgid.replace( "<", "&lt;" );
tmp_msgid = tmp_msgid.replace( ">", "&gt;" );
diff --git a/kbabel/kbabel/kbcataloglistviewitem.h b/kbabel/kbabel/kbcataloglistviewitem.h
index 8fa6704a..4a24c159 100644
--- a/kbabel/kbabel/kbcataloglistviewitem.h
+++ b/kbabel/kbabel/kbcataloglistviewitem.h
@@ -24,7 +24,7 @@
#define KBCATALOGLISTVIEWITEM_H
#include <memory>
#include <klistview.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
#include "mymultilineedit.h"
/**
@@ -34,39 +34,39 @@ class KBCatalogListViewItem : public KListViewItem
{
typedef KListViewItem Super;
public:
- KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, QString msgid, QString msgstr);
+ KBCatalogListViewItem(KListView* lv, KListViewItem* parent, uint id, TQString msgid, TQString msgstr);
~KBCatalogListViewItem();
- void setMsgId(const QString& st);
- void setMsgStr(const QString& st);
+ void setMsgId(const TQString& st);
+ void setMsgStr(const TQString& st);
void setId(const uint id);
uint getId();
protected:
virtual void setup();
- virtual QString key ( int column, bool ascending ) const;
+ virtual TQString key ( int column, bool ascending ) const;
- virtual void paintCell(QPainter* p, const QColorGroup& cg,
+ virtual void paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
private:
void makeDocAvailable();
- void paintMsgIdCell(QPainter* p, const QColorGroup& cg,
+ void paintMsgIdCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
- void paintMsgStrCell(QPainter* p, const QColorGroup& cg,
+ void paintMsgStrCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
- QString formatMsg(const QString str);
+ TQString formatMsg(const TQString str);
uint m_id;
- QString m_msgid;
- QString m_msgstr;
+ TQString m_msgid;
+ TQString m_msgstr;
- std::auto_ptr<QSimpleRichText> m_doc_msgid;
- std::auto_ptr<QSimpleRichText> m_doc_msgstr;
+ std::auto_ptr<TQSimpleRichText> m_doc_msgid;
+ std::auto_ptr<TQSimpleRichText> m_doc_msgstr;
};
#endif
diff --git a/kbabel/kbabel/kbcatalogview.cpp b/kbabel/kbabel/kbcatalogview.cpp
index ba8e9c03..ae701c4e 100644
--- a/kbabel/kbabel/kbcatalogview.cpp
+++ b/kbabel/kbabel/kbcatalogview.cpp
@@ -36,8 +36,8 @@
using namespace KBabel;
-KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr project)
- : QWidget (parent), KBabel::CatalogView () , _project (project)
+KBCatalogView::KBCatalogView(KBCatalog* catalog, TQWidget* parent, Project::Ptr project)
+ : TQWidget (parent), KBabel::CatalogView () , _project (project)
{
if (catalog == 0)
kdFatal(KBABEL) << "catalog==0" << endl;
@@ -49,8 +49,8 @@ KBCatalogView::KBCatalogView(KBCatalog* catalog, QWidget* parent, Project::Ptr p
_currentIndex=1; // here we use 1 to accept update at opening a file
- connect ( _project, SIGNAL (signalSettingsChanged()), this, SLOT (readProjectSettings()) );
- connect ( _catalog, SIGNAL (signalFileOpened(bool)), this, SLOT (readFileSettings() ) );
+ connect ( _project, TQT_SIGNAL (signalSettingsChanged()), this, TQT_SLOT (readProjectSettings()) );
+ connect ( _catalog, TQT_SIGNAL (signalFileOpened(bool)), this, TQT_SLOT (readFileSettings() ) );
readProjectSettings();
readFileSettings();
diff --git a/kbabel/kbabel/kbcatalogview.h b/kbabel/kbabel/kbcatalogview.h
index 5f23381a..355e2a4c 100644
--- a/kbabel/kbabel/kbcatalogview.h
+++ b/kbabel/kbabel/kbcatalogview.h
@@ -33,21 +33,21 @@
#ifndef KBCATALOGVIEW_H
#define KBCATALOGVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <catalogview.h>
#include "kbcatalog.h"
#include "kbproject.h"
#include "projectsettings.h"
-class KBCatalogView : public QWidget, public KBabel::CatalogView
+class KBCatalogView : public TQWidget, public KBabel::CatalogView
{
Q_OBJECT
public:
/**
* Default constructor
*/
- KBCatalogView(KBCatalog* catalog, QWidget* parent, KBabel::Project::Ptr project);
+ KBCatalogView(KBCatalog* catalog, TQWidget* parent, KBabel::Project::Ptr project);
/**
* Destructor
diff --git a/kbabel/kbabel/kbcharselect.cpp b/kbabel/kbabel/kbcharselect.cpp
index 63316255..8dd87bcc 100644
--- a/kbabel/kbabel/kbcharselect.cpp
+++ b/kbabel/kbabel/kbcharselect.cpp
@@ -37,32 +37,32 @@
#include <kdialog.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qscrollview.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqscrollview.h>
-KBCharSelect::KBCharSelect(QWidget* parent,const char* name)
- : QVBox(parent,name)
+KBCharSelect::KBCharSelect(TQWidget* parent,const char* name)
+ : TQVBox(parent,name)
{
setSpacing( KDialog::spacingHint() );
- QHBox* bar = new QHBox(this);
+ TQHBox* bar = new TQHBox(this);
bar->setSpacing( KDialog::spacingHint() );
- QLabel *lTable = new QLabel( i18n( "Table:" ), bar );
- _tableNum = new QSpinBox( 0, 255, 1, bar );
+ TQLabel *lTable = new TQLabel( i18n( "Table:" ), bar );
+ _tableNum = new TQSpinBox( 0, 255, 1, bar );
lTable->setBuddy( _tableNum );
bar->setStretchFactor( _tableNum, 1 );
- QScrollView* scroll = new QScrollView( this );
+ TQScrollView* scroll = new TQScrollView( this );
_table = new KCharSelectTable(scroll,"charselector","helvetica",' ',0);
_table->setNumCols(16);
_table->setNumRows(16);
scroll->addChild(_table);
- connect( _table, SIGNAL( doubleClicked() ), this, SLOT( emitChar() ) );
- connect( _tableNum, SIGNAL( valueChanged(int) ), this, SLOT( setTab(int) ));
+ connect( _table, TQT_SIGNAL( doubleClicked() ), this, TQT_SLOT( emitChar() ) );
+ connect( _tableNum, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( setTab(int) ));
}
void KBCharSelect::emitChar()
@@ -80,7 +80,7 @@ void KBCharSelect::saveSettings(KConfig* config)
KConfigGroupSaver saver(config, "KBCharSelector" );
config->writeEntry( "TableNum", _tableNum->value() );
- config->writeEntry( "SelectedChar", QString(_table->chr()) );
+ config->writeEntry( "SelectedChar", TQString(_table->chr()) );
}
void KBCharSelect::restoreSettings(KConfig* config)
diff --git a/kbabel/kbabel/kbcharselect.h b/kbabel/kbabel/kbcharselect.h
index 4de3460f..7b42318c 100644
--- a/kbabel/kbabel/kbcharselect.h
+++ b/kbabel/kbabel/kbcharselect.h
@@ -33,7 +33,7 @@
#ifndef KBCHARSELECT_H
#define KBCHARSELECT_H
-#include <qvbox.h>
+#include <tqvbox.h>
class KConfig;
class KCharSelectTable;
@@ -43,13 +43,13 @@ class KBCharSelect : public QVBox
{
Q_OBJECT
public:
- KBCharSelect(QWidget* parent, const char* name=0);
+ KBCharSelect(TQWidget* parent, const char* name=0);
void saveSettings(KConfig* config);
void restoreSettings(KConfig* config);
signals:
- void characterDoubleClicked( QChar ch );
+ void characterDoubleClicked( TQChar ch );
public slots:
void emitChar();
@@ -59,7 +59,7 @@ private slots:
private:
KCharSelectTable* _table;
- QSpinBox* _tableNum;
+ TQSpinBox* _tableNum;
};
#endif // KBCHARSELECT_H
diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp
index ce58c483..3d555d7b 100644
--- a/kbabel/kbabel/kbhighlighting.cpp
+++ b/kbabel/kbabel/kbhighlighting.cpp
@@ -34,10 +34,10 @@
**************************************************************************** */
-#include <qcolor.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextedit.h>
+#include <tqcolor.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextedit.h>
#include "kapplication.h"
#include <kconfig.h>
@@ -49,7 +49,7 @@
#include "kbhighlighting.h"
#include "resources.h"
-KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObject()
+KBabelHighlighter::KBabelHighlighter( TQTextEdit * edit, KSpell *spell ) : TQObject()
, _edit( edit )
, syntaxHighlighting(true)
, mSpell(0), alwaysEndsWithSpace(true)
@@ -74,7 +74,7 @@ KBabelHighlighter::KBabelHighlighter( QTextEdit * edit, KSpell *spell ) : QObjec
readSettings( );
regexps << accelMarker + "[\\w]";
- connect( _edit, SIGNAL( textChanged( ) ), this, SLOT( highlight( ) ) );
+ connect( _edit, TQT_SIGNAL( textChanged( ) ), this, TQT_SLOT( highlight( ) ) );
setSpellChecker(spell);
}
@@ -97,10 +97,10 @@ void KBabelHighlighter::highlight( )
// create a single line out of the text: remove "\n", so that we only
// have to deal with one single line of text.
- QString text = _edit->text( );
+ TQString text = _edit->text( );
text.replace( "\n", "" );
- QRegExp rx;
+ TQRegExp rx;
int pos;
if (syntaxHighlighting)
@@ -180,7 +180,7 @@ void KBabelHighlighter::doHighlighting( HighlightType type, int pos, int length
_edit->removeSelection( );
}
-void KBabelHighlighter::setHighlightColor( HighlightType type, QColor color )
+void KBabelHighlighter::setHighlightColor( HighlightType type, TQColor color )
{
colors[type] = color;
}
@@ -195,7 +195,7 @@ void KBabelHighlighter::readSettings( )
// FIXME: does not care about different projects yet
KConfig * config = KGlobal::config( );
config->setGroup( "Misc" );
- QString temp = config->readEntry( "AccelMarker", "&" );
+ TQString temp = config->readEntry( "AccelMarker", "&" );
accelMarker = temp[0];
}
@@ -210,14 +210,14 @@ void KBabelHighlighter::flushCurrentWord()
currentPos++;
}
- QChar ch;
+ TQChar ch;
while ((ch = currentWord[(int) currentWord.length() - 1]).isPunct()
&& ch != '(' && ch != '@')
currentWord.truncate( currentWord.length() - 1 );
// try to remove tags (they might not be fully compliant, but
// we don't want to check them anyway
- QRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|(</[-_.:A-Za-z0-9]*[\\s]*>)");
+ TQRegExp tags("(<[-_.:A-Za-z0-9]*([\\s]*[-_.:A-Za-z0-9]*=\\\\\"[^<>]*\\\\\")*[\\s]*/?>)|(</[-_.:A-Za-z0-9]*[\\s]*>)");
if( tags.search (currentWord) != -1 )
{
currentPos += tags.matchedLength();
@@ -228,7 +228,7 @@ void KBabelHighlighter::flushCurrentWord()
if (!currentWord.isEmpty()) {
bool isPlainWord = true;
for (int i = 0; i < (int) currentWord.length(); i++) {
- QChar ch = currentWord[i];
+ TQChar ch = currentWord[i];
if (ch.upper() == ch) {
isPlainWord = false;
break;
@@ -241,15 +241,15 @@ void KBabelHighlighter::flushCurrentWord()
currentWord = "";
}
-QDict<int> KBabelHighlighter::dict(50021);
+TQDict<int> KBabelHighlighter::dict(50021);
-bool KBabelHighlighter::isMisspelled(const QString& wordRaw)
+bool KBabelHighlighter::isMisspelled(const TQString& wordRaw)
{
// We have to treat ampersands (like in "&go" or "g&o") in a special way.
// they must not break the word. And we cannot change the parameter, as
// then the highlight would be one character short. So we have to copy the
// word first.
- QString word = wordRaw;
+ TQString word = wordRaw;
kdDebug(KBABEL) << "isampersand: checking (raw):" << word << endl;
word.replace("&", "" );
kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl;
@@ -271,8 +271,8 @@ bool KBabelHighlighter::isMisspelled(const QString& wordRaw)
return false;
}
-void KBabelHighlighter::slotMisspelling(const QString & originalword,
- const QStringList & suggestions, unsigned int)
+void KBabelHighlighter::slotMisspelling(const TQString & originalword,
+ const TQStringList & suggestions, unsigned int)
{
kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl;
dict.replace( originalword, NotOkay );
@@ -285,8 +285,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell )
{
if( mSpell )
{
- disconnect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int)));
+ disconnect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int)));
// cleanup the cache
dict.clear();
@@ -296,8 +296,8 @@ void KBabelHighlighter::setSpellChecker( KSpell* spell )
if( mSpell )
{
- connect(mSpell, SIGNAL(misspelling(const QString &, const QStringList &, unsigned int)),
- this, SLOT(slotMisspelling(const QString &, const QStringList &, unsigned int)));
+ connect(mSpell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList &, unsigned int)),
+ this, TQT_SLOT(slotMisspelling(const TQString &, const TQStringList &, unsigned int)));
// wait for KSpell to startup correctly
kapp->processEvents(500);
diff --git a/kbabel/kbabel/kbhighlighting.h b/kbabel/kbabel/kbhighlighting.h
index 91a6202d..fe93e0ef 100644
--- a/kbabel/kbabel/kbhighlighting.h
+++ b/kbabel/kbabel/kbhighlighting.h
@@ -37,10 +37,10 @@
#ifndef KBHIGHLIGHTING_H
#define KBHIGHLIGHTING_H
-#include <qmemarray.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqmemarray.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KSpell;
class QColor;
@@ -63,21 +63,21 @@ class KBabelHighlighter : public QObject
SpellcheckError
};
- KBabelHighlighter( QTextEdit * edit, KSpell *spell );
+ KBabelHighlighter( TQTextEdit * edit, KSpell *spell );
- void setHighlightColor( HighlightType type, QColor color );
+ void setHighlightColor( HighlightType type, TQColor color );
void setHasErrors( bool err );
void setSpellChecker( KSpell* spell);
- bool isMisspelled(const QString& word);
+ bool isMisspelled(const TQString& word);
public slots:
void highlight( );
void setSyntaxHighlighting( bool enable );
protected slots:
- void slotMisspelling (const QString & originalword,
- const QStringList & suggestions, unsigned int pos);
+ void slotMisspelling (const TQString & originalword,
+ const TQStringList & suggestions, unsigned int pos);
private:
void doHighlighting( HighlightType type, int pos, int length );
@@ -85,18 +85,18 @@ class KBabelHighlighter : public QObject
void flushCurrentWord();
private:
- QTextEdit * _edit;
+ TQTextEdit * _edit;
bool syntaxHighlighting;
- QStringList regexps;
- QMemArray<QColor> colors;
+ TQStringList regexps;
+ TQMemArray<TQColor> colors;
bool _hasErrors;
- QString accelMarker;
+ TQString accelMarker;
- static QDict<int> dict;
- QGuardedPtr<KSpell> mSpell;
- QString currentWord;
+ static TQDict<int> dict;
+ TQGuardedPtr<KSpell> mSpell;
+ TQString currentWord;
int currentPos;
bool alwaysEndsWithSpace;
};
diff --git a/kbabel/kbabel/main.cpp b/kbabel/kbabel/main.cpp
index 40c28926..5758d563 100644
--- a/kbabel/kbabel/main.cpp
+++ b/kbabel/kbabel/main.cpp
@@ -49,41 +49,41 @@
#include <kuniqueapplication.h>
#include <kwin.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtimer.h>
class KBabelInterface : public KBabelIface
{
public:
KBabelInterface();
- virtual void openURL(QCString url, QCString package, WId window, int newWindow);
- virtual void openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile);
- virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow );
- virtual void openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile );
- virtual void gotoFileEntry(QCString url, QCString msgid);
- virtual void gotoFileEntry(QCString url, QCString package, int msgid);
- virtual void gotoFileEntry(QCString url, QCString package, int msgid, QCString projectFile);
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow);
+ virtual void openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile);
+ virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow );
+ virtual void openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile );
+ virtual void gotoFileEntry(TQCString url, TQCString msgid);
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid);
+ virtual void gotoFileEntry(TQCString url, TQCString package, int msgid, TQCString projectFile);
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave);
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave);
- virtual bool findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+ virtual bool findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project );
- virtual bool replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project );
+ virtual bool replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, QCString project );
- virtual void spellcheck(QStringList fileList);
+ int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave, TQCString project );
+ virtual void spellcheck(TQStringList fileList);
private:
- KBabelMW* findInstance( const KURL& url, const QString& project, const QString& package) const;
+ KBabelMW* findInstance( const KURL& url, const TQString& project, const TQString& package) const;
};
@@ -130,8 +130,8 @@ int KBabelApp::newInstance()
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QTimer timer;
- QWidget *splash=0;
+ TQTimer timer;
+ TQWidget *splash=0;
bool showSplash=args->isSet("splash");
if( showSplash && first )
@@ -142,10 +142,10 @@ int KBabelApp::newInstance()
timer.start(4000,true);
}
- QString projectFile=args->getOption("project");
+ TQString projectFile=args->getOption("project");
if( !projectFile.isEmpty() )
{
- QFileInfo fi(projectFile);
+ TQFileInfo fi(projectFile);
projectFile = fi.absFilePath();
}
else
@@ -155,11 +155,11 @@ int KBabelApp::newInstance()
}
kdDebug() << "Project: " << projectFile << endl;
- QCString msgid=args->getOption("gotomsgid");
+ TQCString msgid=args->getOption("gotomsgid");
if(!msgid.isEmpty() && args->count() > 0)
{
kdDebug(KBABEL) << "gotomsgid" << endl;
- QString m = QString::fromLocal8Bit(msgid);
+ TQString m = TQString::fromLocal8Bit(msgid);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -187,7 +187,7 @@ int KBabelApp::newInstance()
widget->show();
for (int i=0; i < args->count(); i++)
{
- widget->open( args->url(i) , QString::null, i != 0 );
+ widget->open( args->url(i) , TQString::null, i != 0 );
}
kdDebug () << "Resuming DCOP" << endl;
@@ -223,18 +223,18 @@ KBabelInterface::KBabelInterface()
{
}
-void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow)
+void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow)
{
openURL(url,package,window,newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit());
}
-void KBabelInterface::openURL(QCString url, QCString package, WId window, int newWindow, QCString projectFile)
+void KBabelInterface::openURL(TQCString url, TQCString package, WId window, int newWindow, TQCString projectFile)
{
- const QString project( QString::fromLocal8Bit( projectFile ) );
+ const TQString project( TQString::fromLocal8Bit( projectFile ) );
kdDebug() << "openURL " << url << endl;
- KURL u(QString::fromLocal8Bit(url));
+ KURL u(TQString::fromLocal8Bit(url));
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
@@ -256,7 +256,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
{
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u, QString::fromUtf8(package),newWindow);
+ kb->open(u, TQString::fromUtf8(package),newWindow);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -274,7 +274,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
// it's empty
KWin::setActiveWindow(kb->topLevelWidget()->winId());
kb->projectOpen(projectFile);
- kb->open(u,QString::fromUtf8(package),false);
+ kb->open(u,TQString::fromUtf8(package),false);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -290,7 +290,7 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
{
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u, QString::fromUtf8(package),newWindow);
+ kb->open(u, TQString::fromUtf8(package),newWindow);
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
@@ -306,24 +306,24 @@ void KBabelInterface::openURL(QCString url, QCString package, WId window, int ne
kb->show();
} else kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->open(u,QString::fromUtf8(package),newWindow);
+ kb->open(u,TQString::fromUtf8(package),newWindow);
}
kdDebug () << "Resuming DCOP" << endl;
kapp->dcopClient()->resume();
}
-void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow)
+void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow)
{
openTemplate(openFilename, saveFilename, package, newWindow, KBabel::ProjectManager::defaultProjectName().local8Bit());
}
-void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename, QCString package, int newWindow, QCString projectFile)
+void KBabelInterface::openTemplate(TQCString openFilename, TQCString saveFilename, TQCString package, int newWindow, TQCString projectFile)
{
- const QString project( QString::fromLocal8Bit( projectFile ) );
+ const TQString project( TQString::fromLocal8Bit( projectFile ) );
- const KURL u( QString::fromLocal8Bit( saveFilename ) );
- const KURL t( QString::fromLocal8Bit( openFilename ) );
+ const KURL u( TQString::fromLocal8Bit( saveFilename ) );
+ const KURL t( TQString::fromLocal8Bit( openFilename ) );
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
@@ -344,14 +344,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename,
kb = static_cast<KBabelMW*>(mw);
KWin::activateWindow(kb->topLevelWidget()->winId());
kb->projectOpen(projectFile);
- kb->openTemplate(t,u,QString::fromUtf8(package),newWindow);
+ kb->openTemplate(t,u,TQString::fromUtf8(package),newWindow);
}
else
{
kb = new KBabelMW(project);
kb->show();
KWin::activateWindow(kb->topLevelWidget()->winId());
- kb->openTemplate(t,u,QString::fromUtf8(package));
+ kb->openTemplate(t,u,TQString::fromUtf8(package));
}
}
@@ -359,14 +359,14 @@ void KBabelInterface::openTemplate(QCString openFilename, QCString saveFilename,
kapp->dcopClient()->resume();
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString m)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString m)
{
- const KURL u( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), QString() );
+ const KURL u( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, KBabel::ProjectManager::defaultProjectName(), TQString() );
if(!kb) return;
- QString msgid = QString::fromUtf8(m);
+ TQString msgid = TQString::fromUtf8(m);
int index = kb->m_view->catalog()->indexForMsgid(msgid);
if(index >= 0)
{
@@ -377,15 +377,15 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString m)
}
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m)
{
gotoFileEntry(url, package, m, KBabel::ProjectManager::defaultProjectName().local8Bit() );
}
-void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCString projectFile)
+void KBabelInterface::gotoFileEntry(TQCString url, TQCString package, int m, TQCString projectFile)
{
- const KURL u ( QString::fromLocal8Bit( url ) );
- const QString p ( QString::fromUtf8( package ) ); // ### VERIFY encoding!
+ const KURL u ( TQString::fromLocal8Bit( url ) );
+ const TQString p ( TQString::fromUtf8( package ) ); // ### VERIFY encoding!
KBabelMW *kb = findInstance( u, projectFile, p );
if(!kb) return;
@@ -396,8 +396,8 @@ void KBabelInterface::gotoFileEntry(QCString url, QCString package, int m, QCStr
kb->m_view->gotoEntry(pos);
}
-bool KBabelInterface::findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave)
{
@@ -408,15 +408,15 @@ bool KBabelInterface::findInFile(QCString fileSource, QCString url,
KBabel::ProjectManager::defaultProjectName().utf8() );
}
-bool KBabelInterface::findInFile(QCString fileSource, QCString url,
- QString findStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::findInFile(TQCString fileSource, TQCString url,
+ TQString findStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
- int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, QCString project )
+ int ignoreAccelMarker, int ignoreContextInfo, int askForNextFile, int askForSave, TQCString project )
{
kdDebug(KBABEL) << "findInFile (" <<fileSource<< "): " << url << " for " << findStr << endl;
- const KURL u( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, QString::fromLocal8Bit(project), QString() );
+ const KURL u( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, TQString::fromLocal8Bit(project), TQString() );
if(!kb) return false;
@@ -439,8 +439,8 @@ bool KBabelInterface::findInFile(QCString fileSource, QCString url,
return true;
}
-bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave)
{
@@ -451,16 +451,16 @@ bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
KBabel::ProjectManager::defaultProjectName().utf8() );
}
-bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
- QString findStr, QString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
+bool KBabelInterface::replaceInFile(TQCString fileSource, TQCString url,
+ TQString findStr, TQString replaceStr, int caseSensitive, int wholeWords, int isRegExp,
int inMsgid, int inMsgstr, int inComment,
int ignoreAccelMarker, int ignoreContextInfo, int ask, int askForNextFile, int askForSave,
- QCString project )
+ TQCString project )
{
kdDebug(KBABEL) << "replaceInFile (" <<fileSource<< "): " << url << " for " << findStr << endl;
- const KURL u ( QString::fromLocal8Bit( url ) );
- KBabelMW *kb = findInstance( u, QString::fromLocal8Bit(project), QString() );
+ const KURL u ( TQString::fromLocal8Bit( url ) );
+ KBabelMW *kb = findInstance( u, TQString::fromLocal8Bit(project), TQString() );
if( !kb ) return false;
@@ -485,15 +485,15 @@ bool KBabelInterface::replaceInFile(QCString fileSource, QCString url,
return true;
}
-void KBabelInterface::spellcheck(QStringList fileList)
+void KBabelInterface::spellcheck(TQStringList fileList)
{
// ### FIXME: the default project might use the wrong language!
- KBabelMW *kb = findInstance( KURL(), KBabel::ProjectManager::defaultProjectName(), QString() );
+ KBabelMW *kb = findInstance( KURL(), KBabel::ProjectManager::defaultProjectName(), TQString() );
kb->show();
kb->spellcheckMoreFiles( fileList );
}
-KBabelMW* KBabelInterface::findInstance( const KURL& url, const QString& project, const QString& package) const
+KBabelMW* KBabelInterface::findInstance( const KURL& url, const TQString& project, const TQString& package) const
{
kdDebug () << "Suspending DCOP" << endl;
kapp->dcopClient()->suspend();
diff --git a/kbabel/kbabel/mymultilineedit.cpp b/kbabel/kbabel/mymultilineedit.cpp
index 820d493e..9b7913d1 100644
--- a/kbabel/kbabel/mymultilineedit.cpp
+++ b/kbabel/kbabel/mymultilineedit.cpp
@@ -41,16 +41,16 @@
#include "editcmd.h"
#include "resources.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qdragobject.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
+#include <tqdragobject.h>
//#include <private/qrichtext_p.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -62,7 +62,7 @@
using namespace KBabel;
-MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name)
+MyMultiLineEdit::MyMultiLineEdit(int ID, TQWidget* parent,const char* name)
:KTextEdit(parent,name), emitUndo(true),
_firstChangedLine(0),
_lastChangedLine(0),
@@ -77,7 +77,7 @@ MyMultiLineEdit::MyMultiLineEdit(int ID, QWidget* parent,const char* name)
setWordWrap( WidgetWidth );
viewport()->setAcceptDrops( false ); // we need our parent to get drops
- connect(this, SIGNAL(selectionChanged()), this, SLOT( onSelectionChanged() ) );
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT( onSelectionChanged() ) );
}
void MyMultiLineEdit::onSelectionChanged()
@@ -118,11 +118,11 @@ void MyMultiLineEdit::processCommand(EditCommand* cmd, bool undo)
bool oldEmitUndo = emitUndo;
emitUndo = false;
- QPalette _visibleHighlight( palette() );
- QPalette _invisibleHighlight( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::HighlightedText, newcg.text() );
- newcg.setColor( QColorGroup::Highlight, newcg.base() );
+ TQPalette _visibleHighlight( palette() );
+ TQPalette _invisibleHighlight( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::HighlightedText, newcg.text() );
+ newcg.setColor( TQColorGroup::Highlight, newcg.base() );
if( hasFocus() ) _invisibleHighlight.setActive( newcg );
else _invisibleHighlight.setInactive( newcg );
setPalette( _invisibleHighlight );
@@ -213,34 +213,34 @@ void MyMultiLineEdit::emitCursorPosition()
emit cursorPositionChanged(line, col);
}
-void MyMultiLineEdit::wheelEvent(QWheelEvent *e)
+void MyMultiLineEdit::wheelEvent(TQWheelEvent *e)
{
e->ignore();
}
-void MyMultiLineEdit::focusInEvent(QFocusEvent *e)
+void MyMultiLineEdit::focusInEvent(TQFocusEvent *e)
{
KTextEdit::focusInEvent(e);
emitCursorPosition();
}
-void MyMultiLineEdit::contentsContextMenuEvent( QContextMenuEvent * e)
+void MyMultiLineEdit::contentsContextMenuEvent( TQContextMenuEvent * e)
{
e->accept();
if( _menu ) _menu->exec( e->globalPos() );
}
-QPopupMenu * MyMultiLineEdit::createPopupMenu()
+TQPopupMenu * MyMultiLineEdit::createPopupMenu()
{
return _menu;
}
-QPopupMenu * MyMultiLineEdit::createPopupMenu(const QPoint &)
+TQPopupMenu * MyMultiLineEdit::createPopupMenu(const TQPoint &)
{
return 0;
}
-void MyMultiLineEdit::setContextMenu( QPopupMenu * menu )
+void MyMultiLineEdit::setContextMenu( TQPopupMenu * menu )
{
_menu = menu;
}
@@ -270,10 +270,10 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action )
{
int x,y;
getCursorPosition( &x, &y );
- QString s = text(x);
+ TQString s = text(x);
if( y < (int)s.length()-1 ) // not the end of paragraph
{
- QString delText = s.mid( y, s.length()-y-1);
+ TQString delText = s.mid( y, s.length()-y-1);
emit signalUndoCmd( new DelTextCmd(currentIndex(), delText, _myID ) );
} else
if( x < paragraphs()-1 ) // not the end of text
@@ -288,7 +288,7 @@ void MyMultiLineEdit::doKeyboardAction( KeyboardAction action )
emitCursorPosition();
}
-void MyMultiLineEdit::setText(const QString& s)
+void MyMultiLineEdit::setText(const TQString& s)
{
_lastParagraph=0;
_lastParagraphOffset=0;
@@ -303,7 +303,7 @@ void MyMultiLineEdit::setText(const QString& s)
emitCursorPosition();
}
-void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark )
+void MyMultiLineEdit::insertAt( const TQString & s, int line, int col, bool mark )
{
// it will invoke insert, don't need to send InsTextCmd
KTextEdit::insertAt(s,line,col);
@@ -316,7 +316,7 @@ void MyMultiLineEdit::insertAt( const QString & s, int line, int col, bool mark
emitCursorPosition();
}
-void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLine, bool removeSelected )
+void MyMultiLineEdit::insert( const TQString & text, bool indent, bool checkNewLine, bool removeSelected )
{
int row,col;
@@ -360,11 +360,11 @@ void MyMultiLineEdit::insert( const QString & text, bool indent, bool checkNewLi
// setup palettes
- QPalette _visibleHighlight( palette() );
- QPalette _invisibleHighlight( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::HighlightedText, newcg.text() );
- newcg.setColor( QColorGroup::Highlight, newcg.base() );
+ TQPalette _visibleHighlight( palette() );
+ TQPalette _invisibleHighlight( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::HighlightedText, newcg.text() );
+ newcg.setColor( TQColorGroup::Highlight, newcg.base() );
if( hasFocus() ) _invisibleHighlight.setActive( newcg );
else _invisibleHighlight.setInactive( newcg );
setPalette( _invisibleHighlight );
@@ -391,7 +391,7 @@ void MyMultiLineEdit::clear()
_dontUpdate=true;
- QString s = text();
+ TQString s = text();
if( !s.isEmpty() && emitUndo ) {
emit signalUndoCmd( new BeginCommand(-1,UndefPart) );
emit signalUndoCmd( new DelTextCmd(0,s,_myID) );
@@ -423,10 +423,10 @@ void MyMultiLineEdit::my_backspace()
{
int offset = currentIndex();
- QString s= text(cursorY);
+ TQString s= text(cursorY);
if(cursorX != 0)
{
- QString delTxt(s[cursorX-1]);
+ TQString delTxt(s[cursorX-1]);
emit signalUndoCmd(new DelTextCmd(offset-1,delTxt,_myID));
}
else if( cursorY > 0 || cursorX > 0 ) // not at the beginning
@@ -453,10 +453,10 @@ void MyMultiLineEdit::my_del()
{
int offset = pos2Offset(cursorY, cursorX);
- QString s=text(cursorY);
+ TQString s=text(cursorY);
if(cursorX != (int)s.length()-1)
{
- QString delTxt(s[cursorX]);
+ TQString delTxt(s[cursorX]);
emit signalUndoCmd(new DelTextCmd(offset,delTxt,_myID));
}
else if( cursorY < (int)paragraphs()-1 || ( (cursorY == (int)paragraphs()-1) && (cursorX < (int)text( paragraphs()-1 ).length()-1 ) ) )// !atEnd() )
@@ -583,7 +583,7 @@ void MyMultiLineEdit::setReadOnly(bool on)
setBackgroundMode(PaletteBase);
}
- QTextEdit::setReadOnly(on);
+ TQTextEdit::setReadOnly(on);
}
void MyMultiLineEdit::setOverwriteMode( bool b )
@@ -592,7 +592,7 @@ void MyMultiLineEdit::setOverwriteMode( bool b )
}
/*******************************************************************************/
-MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const char* name)
+MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, TQWidget* parent,const char* name)
:MyMultiLineEdit(ID, parent,name),
_quotes(false),
_cleverEditing(false),
@@ -620,32 +620,32 @@ MsgMultiLineEdit::MsgMultiLineEdit(int ID, KSpell* spell, QWidget* parent,const
diffPos.setAutoDelete(true);
diffPos.clear();
- _whitespace = new QPixmap(2,2,-1,QPixmap::BestOptim);
+ _whitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim);
_whitespace->fill(_textColor);
- _errorWhitespace = new QPixmap(2,2,-1,QPixmap::BestOptim);
+ _errorWhitespace = new TQPixmap(2,2,-1,TQPixmap::BestOptim);
_errorWhitespace->fill(_errorColor);
- _whitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim);
+ _whitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim);
_whitespaceNB->fill();
- _errorWhitespaceNB = new QPixmap(3,3,-1,QPixmap::BestOptim);
+ _errorWhitespaceNB = new TQPixmap(3,3,-1,TQPixmap::BestOptim);
_errorWhitespaceNB->fill();
- QPainter p(_whitespaceNB);
+ TQPainter p(_whitespaceNB);
p.setPen( _textColor );
p.drawEllipse(_whitespaceNB->rect());
- QPainter q(_errorWhitespaceNB);
+ TQPainter q(_errorWhitespaceNB);
q.setPen( _errorColor );
q.drawEllipse(_errorWhitespaceNB->rect());
// this will setup bitBlt pixmaps
setFont( font() );
highlighter = new KBabelHighlighter( this, spell );
- connect( this, SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, SLOT( setSyntaxHighlighting( bool ) ) );
+ connect( this, TQT_SIGNAL( signalSyntaxHighlightingChanged( bool ) ), highlighter, TQT_SLOT( setSyntaxHighlighting( bool ) ) );
- connect( this, SIGNAL( selectionChanged() ), this, SLOT( paintSpacePoints() ) );
- connect( this, SIGNAL( cursorPositionChanged( int, int ) ), this, SLOT( paintSpacePoints(int, int) ) );
- connect( this, SIGNAL( textChanged() ), this, SLOT( emittedTextChanged() ) );
+ connect( this, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( paintSpacePoints() ) );
+ connect( this, TQT_SIGNAL( cursorPositionChanged( int, int ) ), this, TQT_SLOT( paintSpacePoints(int, int) ) );
+ connect( this, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( emittedTextChanged() ) );
}
MsgMultiLineEdit::~MsgMultiLineEdit ()
@@ -654,9 +654,9 @@ MsgMultiLineEdit::~MsgMultiLineEdit ()
delete highlighter;
}
-void MsgMultiLineEdit::setText(const QString& s)
+void MsgMultiLineEdit::setText(const TQString& s)
{
- QString str = s;
+ TQString str = s;
if(_showDiff)
{
@@ -664,13 +664,13 @@ void MsgMultiLineEdit::setText(const QString& s)
int lines = s.contains('\n');
diffPos.resize(lines+1);
- QStringList lineList = QStringList::split('\n',s,true);
+ TQStringList lineList = TQStringList::split('\n',s,true);
int lineCounter=-1;
bool haveAdd=false;
bool haveDel=false;
bool multiline=false;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for(it = lineList.begin(); it != lineList.end(); ++it)
{
lineCounter++;
@@ -791,10 +791,10 @@ void MsgMultiLineEdit::setText(const QString& s)
if(di.begin >= 0)
{
- QValueList<DiffInfo> *list = diffPos[lineCounter];
+ TQValueList<DiffInfo> *list = diffPos[lineCounter];
if(!list)
{
- list = new QValueList<DiffInfo>;
+ list = new TQValueList<DiffInfo>;
diffPos.insert(lineCounter,list);
}
@@ -804,7 +804,7 @@ void MsgMultiLineEdit::setText(const QString& s)
}
}
- QRegExp reg("</?KBABELADD>");
+ TQRegExp reg("</?KBABELADD>");
str.replace(reg,"");
reg.setPattern("</?KBABELDEL>");
str.replace(reg,"");
@@ -833,7 +833,7 @@ void MsgMultiLineEdit::setHighlightBg(bool on)
}
-void MsgMultiLineEdit::setBgColor(const QColor& color)
+void MsgMultiLineEdit::setBgColor(const TQColor& color)
{
_bgColor=color;
@@ -857,8 +857,8 @@ void MsgMultiLineEdit::setHighlightSyntax(bool on)
update();
}
-void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor)
+void MsgMultiLineEdit::setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor)
{
_quoteColor=quoteColor;
_unquoteColor=unquoteColor;
@@ -875,13 +875,13 @@ void MsgMultiLineEdit::setHighlightColors(const QColor& quoteColor, const QColor
}
-void MsgMultiLineEdit::setFont(const QFont& font)
+void MsgMultiLineEdit::setFont(const TQFont& font)
{
KTextEdit::setFont(font);
// we don't need to calculate a special offset for non-breaking space, since
// they are very similar in size
- QFontMetrics fm(font);
+ TQFontMetrics fm(font);
_wsOffsetX = QMAX(fm.width(' ')/2-2,1);
_wsOffsetY = QMAX(fm.height()/2-1,0);
@@ -897,8 +897,8 @@ void MsgMultiLineEdit::setDiffDisplayMode(bool addUnderline, bool delStrikeOut)
update();
}
-void MsgMultiLineEdit::setDiffColors(const QColor& addColor
- , const QColor& delColor)
+void MsgMultiLineEdit::setDiffColors(const TQColor& addColor
+ , const TQColor& delColor)
{
_diffAddColor = addColor;
_diffDelColor = delColor;
@@ -907,11 +907,11 @@ void MsgMultiLineEdit::setDiffColors(const QColor& addColor
update();
}
-void MsgMultiLineEdit::setTextColor(const QColor &color )
+void MsgMultiLineEdit::setTextColor(const TQColor &color )
{
- QPalette p( palette() );
- QColorGroup newcg( colorGroup() );
- newcg.setColor( QColorGroup::Text, color );
+ TQPalette p( palette() );
+ TQColorGroup newcg( colorGroup() );
+ newcg.setColor( TQColorGroup::Text, color );
if( hasFocus() ) p.setActive( newcg );
else p.setInactive( newcg );
setPalette( p );
@@ -919,7 +919,7 @@ void MsgMultiLineEdit::setTextColor(const QColor &color )
highlighter->setHighlightColor( KBabelHighlighter::Normal, color );
}
-void MsgMultiLineEdit::setErrorColor(const QColor &color )
+void MsgMultiLineEdit::setErrorColor(const TQColor &color )
{
_errorColor = color;
highlighter->setHighlightColor( KBabelHighlighter::Error, color );
@@ -961,17 +961,17 @@ void MsgMultiLineEdit::paintSpacePoints(int, int )
void MsgMultiLineEdit::paintSpacePoints()
{
- QRect r;
- QPainter painter(viewport() );
- const QFontMetrics& fm = fontMetrics();
+ TQRect r;
+ TQPainter painter(viewport() );
+ const TQFontMetrics& fm = fontMetrics();
- int paranum = paragraphAt(QPoint(contentsX(), contentsY()));
+ int paranum = paragraphAt(TQPoint(contentsX(), contentsY()));
if( _spacePoints )
{
int curpara = paranum;
painter.setPen( _currentColor );
- QPixmap* ws, *wsnb;
+ TQPixmap* ws, *wsnb;
if( _currentColor== _errorColor )
{
@@ -988,12 +988,12 @@ void MsgMultiLineEdit::paintSpacePoints()
{
if ( paragraphRect( curpara ).top() > contentsY()+visibleHeight()) break;
- const QString& s = text(curpara);
+ const TQString& s = text(curpara);
int i = s.find( " " );
while( (i >= 0) && (i < (int)s.length()-1) ) // -1 because text will end by EOLN
{
- QPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws;
- QRect r = mapToView( curpara, i );
+ TQPixmap* pm = ( s.at(i).unicode() == 0x00A0U ) ? wsnb : ws;
+ TQRect r = mapToView( curpara, i );
r.moveBy( r.width()/2, (r.height() - fm.descent())/2 );
r.moveBy( -pm->rect().width()/2, -pm->rect().height()/2-1 );
bitBlt(viewport(), r.topLeft(), pm, pm->rect(), Qt::CopyROP);
@@ -1005,19 +1005,19 @@ void MsgMultiLineEdit::paintSpacePoints()
if( _quotes )
{
- QFontMetrics fm( font());
- QRect qs = fm.boundingRect("\"");
+ TQFontMetrics fm( font());
+ TQRect qs = fm.boundingRect("\"");
for( int curpara = paranum; curpara < paragraphs() ; curpara++ )
{
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- painter.drawText( QPoint( 0, mapToView( curpara, 0 ).top()) +
- QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
+ painter.drawText( TQPoint( 0, mapToView( curpara, 0 ).top()) +
+ TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
painter.drawText( mapToView( curpara, QMAX( 0,
((int)text( curpara ).length())-1)).topRight() +
- QPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
+ TQPoint(0, qs.height() + 4), "\""); // 4 = hardcoded margin in QT
}
}
@@ -1031,16 +1031,16 @@ void MsgMultiLineEdit::paintSpacePoints()
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- QValueList<DiffInfo> *list = diffPos[curpara];
+ TQValueList<DiffInfo> *list = diffPos[curpara];
if(list)
{
- QValueList<DiffInfo>::ConstIterator it;
+ TQValueList<DiffInfo>::ConstIterator it;
for(it = list->begin(); it != list->end(); ++it)
{
- QRect beg = mapToView( curpara, (*it).begin );
- QRect end = mapToView( curpara, (*it).end );
+ TQRect beg = mapToView( curpara, (*it).begin );
+ TQRect end = mapToView( curpara, (*it).end );
- QColor* c = 0;
+ TQColor* c = 0;
if( (*it).add && !_diffUnderlineAdd)
c = &_diffAddColor;
else if(!(*it).add && !_diffStrikeOutDel)
@@ -1051,23 +1051,23 @@ void MsgMultiLineEdit::paintSpacePoints()
// Single or multiple lines?
if ( beg.top() == end.top())
{
- painter.fillRect( QRect( beg.topLeft(),
- QPoint( end.right(), end.bottom())), *c );
+ painter.fillRect( TQRect( beg.topLeft(),
+ TQPoint( end.right(), end.bottom())), *c );
}
else
{
- painter.fillRect( QRect(
+ painter.fillRect( TQRect(
beg.topLeft(),
- QPoint( r.right(), beg.bottom())), *c );
+ TQPoint( r.right(), beg.bottom())), *c );
if( end.top()-beg.bottom() > 2 ) {
// there is a line, not only thin space
- painter.fillRect( QRect(
- QPoint( r.left(), beg.bottom()),
- QPoint( r.right(), end.top())), *c );
+ painter.fillRect( TQRect(
+ TQPoint( r.left(), beg.bottom()),
+ TQPoint( r.right(), end.top())), *c );
}
- painter.fillRect( QRect(
- QPoint( r.left(), end.top()),
- QPoint( end.right(), end.bottom())), *c );
+ painter.fillRect( TQRect(
+ TQPoint( r.left(), end.top()),
+ TQPoint( end.right(), end.bottom())), *c );
}
}
}
@@ -1085,18 +1085,18 @@ void MsgMultiLineEdit::paintSpacePoints()
r = paragraphRect(curpara);
if( r.y() > contentsY()+visibleHeight() ) break;
- QValueList<DiffInfo> *list = diffPos[curpara];
+ TQValueList<DiffInfo> *list = diffPos[curpara];
if(list)
{
- QPen addPen(_diffAddColor,2);
- QPen delPen(_diffDelColor,2);
- QValueList<DiffInfo>::ConstIterator it;
+ TQPen addPen(_diffAddColor,2);
+ TQPen delPen(_diffDelColor,2);
+ TQValueList<DiffInfo>::ConstIterator it;
for(it = list->begin(); it != list->end(); ++it)
{
- QRect beg = mapToView( curpara, (*it).begin );
- QRect end = mapToView( curpara, (*it).end );
+ TQRect beg = mapToView( curpara, (*it).begin );
+ TQRect end = mapToView( curpara, (*it).end );
- QPen* p = 0;
+ TQPen* p = 0;
int dy = 0;
if( (*it).add && _diffUnderlineAdd)
p = &addPen;
@@ -1113,25 +1113,25 @@ void MsgMultiLineEdit::paintSpacePoints()
// Single or multiple lines?
if ( beg.top() == end.top())
painter.drawLine(
- beg.topLeft() + QPoint(0, fm.ascent()-dy),
- end.topRight()+ QPoint(0, fm.ascent()-dy));
+ beg.topLeft() + TQPoint(0, fm.ascent()-dy),
+ end.topRight()+ TQPoint(0, fm.ascent()-dy));
else
{
int y = beg.top() + fm.ascent();
painter.drawLine(
- QPoint(beg.left(), y),
- QPoint(r.right(), y));
+ TQPoint(beg.left(), y),
+ TQPoint(r.right(), y));
y += fm.lineSpacing();
while (y < end.top() + fm.ascent())
{
painter.drawLine(
- QPoint(r.left(), y),
- QPoint(r.right(), y));
+ TQPoint(r.left(), y),
+ TQPoint(r.right(), y));
y += fm.lineSpacing();
}
painter.drawLine(
- QPoint(r.left(), end.top() + fm.ascent()),
- QPoint(end.right(), end.top() + fm.ascent()));
+ TQPoint(r.left(), end.top() + fm.ascent()),
+ TQPoint(end.right(), end.top() + fm.ascent()));
}
}
}
@@ -1165,7 +1165,7 @@ void MsgMultiLineEdit::highlight()
{
/* if( _dontUpdate ) return;
- QColor bg;
+ TQColor bg;
if( _highlightBg ) bg = _bgColor;
else bg = colorGroup().base();
@@ -1185,19 +1185,19 @@ void MsgMultiLineEdit::highlight()
uint i;
- QRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)"
+ TQRegExp markup("(\\\\)|(\")|(\\\\[abfnrtv'\"\?\\\\])|(\\\\\\d+)|(\\\\x[\\dabcdef]+)"
"|(%[\\ddioxXucsfeEgGphln]+)|(&[^\\s])|(&[\\w-]+;)");
for( i = QMAX(_firstChangedLine,0) ; i < QMIN(_lastChangedLine+1,(uint)paragraphs()) ; i++ ) {
- QString line=text(i);
+ TQString line=text(i);
//remove old highlighting
setSelection(i,0,i,line.length());
setColor( _currentColor );
removeSelection();
- QColor colorToUse;
+ TQColor colorToUse;
int index=0;
index=markup.search( line, index );
@@ -1234,7 +1234,7 @@ void MsgMultiLineEdit::highlight()
int lineindex=0;
uint index=0;
int startPara, endPara, startIndex, endIndex;
- QString t= text();
+ TQString t= text();
if(_lastParagraph <= _firstChangedLine)
{
@@ -1245,19 +1245,19 @@ void MsgMultiLineEdit::highlight()
for( ; index<_firstChangedLine ; index++)
lineindex+=paragraphLength(index)+1;
- QRegExp re("<.*>");
+ TQRegExp re("<.*>");
re.setMinimal(true);
if( _firstChangedLine >0 )
{
- QColor c;
- QFont f;
+ TQColor c;
+ TQFont f;
VerticalAlignment v;
getFormat(_firstChangedLine-1, paragraphLength(_firstChangedLine-1)-1, &f, &c, &v);
- QString l = text(_firstChangedLine-1);
+ TQString l = text(_firstChangedLine-1);
if( c==_tagColor && !l.endsWith(">") ) // hope _tagColor will be different than other colors
{
- QRegExp endtag("[^<]*>");
+ TQRegExp endtag("[^<]*>");
tagindex=endtag.search(t, lineindex);
taglength=endtag.matchedLength();
} else {
@@ -1311,26 +1311,26 @@ void MsgMultiLineEdit::highlight()
*/
}
-void MsgMultiLineEdit::drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph )
+void MsgMultiLineEdit::drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
{
MyMultiLineEdit::drawContents( painter, clipx, clipy, clipw, cliph );
paintSpacePoints();
}
-void MsgMultiLineEdit::paintEvent( QPaintEvent *event )
+void MsgMultiLineEdit::paintEvent( TQPaintEvent *event )
{
MyMultiLineEdit::paintEvent( event );
paintSpacePoints();
}
-QRect MsgMultiLineEdit::mapToView( int para, int index )
+TQRect MsgMultiLineEdit::mapToView( int para, int index )
{
if( para < 0 || para > paragraphs() ||
index < 0 || index > paragraphLength(para) )
- return QRect(); //invalid rectangle
+ return TQRect(); //invalid rectangle
- const QFontMetrics& fm = fontMetrics();
- const QString& paratext = text(para);
+ const TQFontMetrics& fm = fontMetrics();
+ const TQString& paratext = text(para);
// Find index of the first character on the same line as parameter
// 'index' using binary search. Very fast, even for long texts.
@@ -1377,9 +1377,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
// no tag on the line, no bold
linewidth = fm.width( paratext.mid( linestart, index-linestart ));
} else {
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
- QFontMetrics bfm( f );
+ TQFontMetrics bfm( f );
// is tag single displayed line?
if( _tagStartPara == _tagEndPara
&& lineOfChar( _tagStartPara, _tagStartIndex ) == lineOfChar( _tagEndPara, _tagEndIndex ) )
@@ -1400,9 +1400,9 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
}
else {
// in tag
- QFont f( font() );
+ TQFont f( font() );
f.setBold( true );
- QFontMetrics bfm( f );
+ TQFontMetrics bfm( f );
// is it the first line of the tag?
if( para == _tagStartPara && indexline == lineOfChar( _tagStartPara, _tagStartIndex ) ) {
// start of the line is normal
@@ -1415,23 +1415,23 @@ QRect MsgMultiLineEdit::mapToView( int para, int index )
}
}
- // FIXME as soon as it's possible to ask real margins from QTextEdit:
+ // FIXME as soon as it's possible to ask real margins from TQTextEdit:
const int left_margin = 4;
// const int top_margin = 4;
- QPainter painter( viewport());
- const QRect& linerect = paragraphRect(para);
- return QRect(
- contentsToViewport( QPoint(
+ TQPainter painter( viewport());
+ const TQRect& linerect = paragraphRect(para);
+ return TQRect(
+ contentsToViewport( TQPoint(
left_margin + linerect.left() + linewidth ,
/*top_margin + */linerect.top() + indexline * fm.lineSpacing() + fm.leading())),
- QSize(
+ TQSize(
fm.charWidth( paratext, index ),
fm.lineSpacing()
));
}
-void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
+void MsgMultiLineEdit::keyPressEvent(TQKeyEvent *e)
{
if(!_cleverEditing || isReadOnly())
{
@@ -1447,7 +1447,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(e->state() & ShiftButton)
{
@@ -1491,7 +1491,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
if( !str.isEmpty())
{
// construct new event without modifiers
- MyMultiLineEdit::keyPressEvent( new QKeyEvent(e->type(), e->key(), e->ascii(), 0,
+ MyMultiLineEdit::keyPressEvent( new TQKeyEvent(e->type(), e->key(), e->ascii(), 0,
e->text(), e->isAutoRepeat(), e->count() ) );
e->accept();
}
@@ -1515,12 +1515,12 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
{
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(!str.isEmpty() && col < (int)str.length() && str.at(col) == '\\'
&& !isMasked(&str,col))
{
- QString spclChars="abfnrtv'\"?\\";
+ TQString spclChars="abfnrtv'\"?\\";
if(col < (int)str.length()-1
&& spclChars.contains(str.at(col+1)))
{
@@ -1545,9 +1545,9 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
{
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
- QString spclChars="abfnrtv'\"?\\";
+ TQString spclChars="abfnrtv'\"?\\";
if(!str.isEmpty() && col > 0 && spclChars.contains(str.at(col-1)))
{
if(col > 1 && str.at(col-2)=='\\' && !isMasked(&str,col-2))
@@ -1571,7 +1571,7 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
int row, col;
getCursorPosition(&row,&col);
- QString str=text(row);
+ TQString str=text(row);
if(col == 0 || str.at(col-1) != '\\' || isMasked(&str,col-1) )
{
@@ -1589,14 +1589,14 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
}
else if(e->key() == Key_Space && ( e->state() & AltButton ) )
{
- insert( QChar( 0x00a0U ) );
+ insert( TQChar( 0x00a0U ) );
e->accept();
return;
}
// ALT+123 feature
else if(( e->state() & AltButton ) && e->text()[0].isDigit() )
{
- QString text=e->text();
+ TQString text=e->text();
while ( text[0].isDigit() ) {
_currentUnicodeNumber = 10*_currentUnicodeNumber+(text[0].digitValue());
text.remove( 0, 1 );
@@ -1608,11 +1608,11 @@ void MsgMultiLineEdit::keyPressEvent(QKeyEvent *e)
}
}
-void MsgMultiLineEdit::keyReleaseEvent(QKeyEvent* e)
+void MsgMultiLineEdit::keyReleaseEvent(TQKeyEvent* e)
{
if ( e->key() == Key_Alt && _currentUnicodeNumber >= 32 )
{
- QString text = QChar( _currentUnicodeNumber );
+ TQString text = TQChar( _currentUnicodeNumber );
_currentUnicodeNumber=0;
insert( text );
}
@@ -1628,7 +1628,7 @@ void MsgMultiLineEdit::setDiffMode(bool on)
}
}
-bool MsgMultiLineEdit::isMasked(QString *str, uint col)
+bool MsgMultiLineEdit::isMasked(TQString *str, uint col)
{
if(col == 0 || !str)
return false;
diff --git a/kbabel/kbabel/mymultilineedit.h b/kbabel/kbabel/mymultilineedit.h
index 30771610..4f076af5 100644
--- a/kbabel/kbabel/mymultilineedit.h
+++ b/kbabel/kbabel/mymultilineedit.h
@@ -36,7 +36,7 @@
#define MYMULTILINEEDIT_H
#include <ktextedit.h>
-#include <qptrvector.h>
+#include <tqptrvector.h>
namespace KBabel
{
@@ -51,7 +51,7 @@ class MyMultiLineEdit : public KTextEdit
{
Q_OBJECT
public:
- MyMultiLineEdit(int ID,QWidget* parent,const char* name=0);
+ MyMultiLineEdit(int ID,TQWidget* parent,const char* name=0);
/**
applies cmd to the displayed text, but does not emit
@@ -79,7 +79,7 @@ public:
*/
int endOfLastMarkedText();
- virtual void insertAt ( const QString & s, int line, int col, bool mark = false );
+ virtual void insertAt ( const TQString & s, int line, int col, bool mark = false );
virtual void removeLine ( int line );
int pos2Offset(uint paragraph, uint index);
@@ -98,7 +98,7 @@ public:
/**
* need to override deleting of popup menus :-(
*/
- void contentsContextMenuEvent( QContextMenuEvent *e );
+ void contentsContextMenuEvent( TQContextMenuEvent *e );
/**
* need to reimplement overwrite mode :-(
@@ -110,27 +110,27 @@ public slots:
virtual void clear();
virtual void paste();
virtual void setReadOnly(bool on);
- virtual void setContextMenu( QPopupMenu *menu );
- virtual void setText(const QString& s);
+ virtual void setContextMenu( TQPopupMenu *menu );
+ virtual void setText(const TQString& s);
virtual void doKeyboardAction( KeyboardAction action );
virtual void removeSelectedText(int selNum = 0);
virtual void onSelectionChanged();
/**
- reimplemented overwrite mode, since QTextEdit handles this internally and does
+ reimplemented overwrite mode, since TQTextEdit handles this internally and does
not use any accessible virtual methods :-((.
*/
virtual void setOverwriteMode(bool b);
protected:
- virtual void focusInEvent(QFocusEvent*);
- virtual QPopupMenu *createPopupMenu();
- virtual QPopupMenu *createPopupMenu(const QPoint &pos);
+ virtual void focusInEvent(TQFocusEvent*);
+ virtual TQPopupMenu *createPopupMenu();
+ virtual TQPopupMenu *createPopupMenu(const TQPoint &pos);
/* the parent handles this */
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
bool emitUndo;
@@ -154,7 +154,7 @@ protected:
bool _dontUpdate;
protected slots:
- virtual void insert ( const QString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE );
+ virtual void insert ( const TQString & text, bool indent = FALSE, bool checkNewLine = TRUE, bool removeSelected = TRUE );
virtual void emitCursorPosition();
signals:
@@ -165,7 +165,7 @@ protected:
int _myID;
private:
- QPopupMenu *_menu;
+ TQPopupMenu *_menu;
bool _overwrite;
};
@@ -176,7 +176,7 @@ class MsgMultiLineEdit : public MyMultiLineEdit
public:
enum TextColor { NormalColor, ErrorColor };
- MsgMultiLineEdit(int ID, KSpell* spell=0, QWidget* parent=0,const char* name=0);
+ MsgMultiLineEdit(int ID, KSpell* spell=0, TQWidget* parent=0,const char* name=0);
virtual ~MsgMultiLineEdit();
/** is displaying surrounding quotes enabled? */
@@ -192,8 +192,8 @@ public:
bool highlightBg() const { return _highlightBg; }
/** enable or disable highlighting background*/
void setHighlightBg(bool on);
- QColor bgColor() const { return _bgColor; }
- void setBgColor(const QColor& color);
+ TQColor bgColor() const { return _bgColor; }
+ void setBgColor(const TQColor& color);
bool spacePoints() const { return _spacePoints; }
void setSpacePoints(bool on);
@@ -201,17 +201,17 @@ public:
bool highlightSyntax() const { return _hlSyntax; }
void highlight();
void setHighlightSyntax(bool on);
- void setHighlightColors(const QColor& quoteColor, const QColor& unquoteColor
- , const QColor& cformatColor, const QColor& accelColor, const QColor& tagColor);
+ void setHighlightColors(const TQColor& quoteColor, const TQColor& unquoteColor
+ , const TQColor& cformatColor, const TQColor& accelColor, const TQColor& tagColor);
- void setFont(const QFont& font);
+ void setFont(const TQFont& font);
void setDiffMode(bool on);
void setDiffDisplayMode(bool underlineAdded, bool strikeOutDeleted);
- void setDiffColors(const QColor& addColor, const QColor& delColor);
+ void setDiffColors(const TQColor& addColor, const TQColor& delColor);
- void setTextColor(const QColor &color);
- void setErrorColor(const QColor &color);
+ void setTextColor(const TQColor &color);
+ void setErrorColor(const TQColor &color);
void setCurrentColor(const TextColor color);
@@ -220,9 +220,9 @@ public:
void selectTag(int start, int length);
public slots:
- virtual void setText(const QString& s);
+ virtual void setText(const TQString& s);
void paintSpacePoints();
- void paintSpacePoints( int para, int pos ); // overloaded for signal QTextEdit::cursorPositionChanged
+ void paintSpacePoints( int para, int pos ); // overloaded for signal TQTextEdit::cursorPositionChanged
/**
* reimplemented to call highlight()
@@ -237,49 +237,49 @@ public slots:
void ensureCursorVisible();
protected:
- virtual void paintEvent (QPaintEvent * event );
- virtual void drawContents( QPainter *painter, int clipx, int clipy, int clipw, int cliph );
+ virtual void paintEvent (TQPaintEvent * event );
+ virtual void drawContents( TQPainter *painter, int clipx, int clipy, int clipw, int cliph );
- virtual void keyPressEvent(QKeyEvent*);
- virtual void keyReleaseEvent(QKeyEvent*);
+ virtual void keyPressEvent(TQKeyEvent*);
+ virtual void keyReleaseEvent(TQKeyEvent*);
private:
/**
* Computes the pixel position in line which corresponds to
* character position xIndex
*/
- QRect mapToView( int para, int index );
+ TQRect mapToView( int para, int index );
/**
* tests if the character in string str at position col is masked with
* '\' by counting the number of '\' backwards
*/
- static bool isMasked(QString *str,uint col);
+ static bool isMasked(TQString *str,uint col);
private:
bool _quotes;
bool _cleverEditing;
bool _highlightBg;
bool _spacePoints;
- QColor _bgColor;
- QColor _textColor;
- QColor _errorColor;
- QColor _currentColor;
+ TQColor _bgColor;
+ TQColor _textColor;
+ TQColor _errorColor;
+ TQColor _currentColor;
- QPixmap* _whitespace;
- QPixmap* _whitespaceNB;
- QPixmap* _errorWhitespace;
- QPixmap* _errorWhitespaceNB;
+ TQPixmap* _whitespace;
+ TQPixmap* _whitespaceNB;
+ TQPixmap* _errorWhitespace;
+ TQPixmap* _errorWhitespaceNB;
int _wsOffsetX;
int _wsOffsetY;
bool _hlSyntax;
- QColor _quoteColor;
- QColor _unquoteColor;
- QColor _cformatColor;
- QColor _accelColor;
- QColor _tagColor;
+ TQColor _quoteColor;
+ TQColor _unquoteColor;
+ TQColor _cformatColor;
+ TQColor _accelColor;
+ TQColor _tagColor;
struct DiffInfo
{
@@ -288,12 +288,12 @@ private:
int end;
};
- QPtrVector< QValueList<DiffInfo> > diffPos;
+ TQPtrVector< TQValueList<DiffInfo> > diffPos;
bool _showDiff;
bool _diffUnderlineAdd;
bool _diffStrikeOutDel;
- QColor _diffAddColor;
- QColor _diffDelColor;
+ TQColor _diffAddColor;
+ TQColor _diffDelColor;
// for Alt+123 feature
int _currentUnicodeNumber;
diff --git a/kbabel/kbabel/sourceview.cpp b/kbabel/kbabel/sourceview.cpp
index 08c0f8a4..00d8a3b2 100644
--- a/kbabel/kbabel/sourceview.cpp
+++ b/kbabel/kbabel/sourceview.cpp
@@ -34,8 +34,8 @@
#include "sourceview.h"
#include "context.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klocale.h>
@@ -45,16 +45,16 @@
using namespace KBabel;
-SourceView::SourceView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+SourceView::SourceView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
_contextView = new SourceContext (this, project);
layout->addWidget (_contextView);
- connect(_catalog, SIGNAL(signalFileOpened(bool)), this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool)), this, TQT_SLOT(setDisabled(bool)));
}
void SourceView::updateView()
diff --git a/kbabel/kbabel/sourceview.h b/kbabel/kbabel/sourceview.h
index 8caeed35..a12ca767 100644
--- a/kbabel/kbabel/sourceview.h
+++ b/kbabel/kbabel/sourceview.h
@@ -44,7 +44,7 @@ public:
/**
* Default constructor
*/
- SourceView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ SourceView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
diff --git a/kbabel/kbabel/spelldlg.cpp b/kbabel/kbabel/spelldlg.cpp
index 49500e09..de9f2ce6 100644
--- a/kbabel/kbabel/spelldlg.cpp
+++ b/kbabel/kbabel/spelldlg.cpp
@@ -33,14 +33,14 @@
#include "spelldlg.h"
#include "spelldlgwidget.h"
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include <kconfig.h>
#include <kglobal.h>
#include <klocale.h>
-SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name)
+SpellDlg::SpellDlg(bool haveMarkedText,TQWidget *parent,const char *name)
: KDialogBase(parent,name,true,i18n("Caption of dialog","Spelling")
, Ok|Cancel)
{
@@ -61,7 +61,7 @@ SpellDlg::SpellDlg(bool haveMarkedText,QWidget *parent,const char *name)
KConfig *config = KGlobal::config();
KConfigGroupSaver cs(config,"SpellDlg");
- QString what=config->readEntry("Default","All");
+ TQString what=config->readEntry("Default","All");
if(what=="All")
_mainWidget->allBtn->setChecked(true);
@@ -85,7 +85,7 @@ SpellDlg::~SpellDlg()
KConfig *config=KGlobal::config();
KConfigGroupSaver cs(config,"SpellDlg");
- QString what="All";
+ TQString what="All";
if(_mainWidget->endBtn->isChecked())
what="End";
else if(_mainWidget->beginBtn->isChecked())
diff --git a/kbabel/kbabel/spelldlg.h b/kbabel/kbabel/spelldlg.h
index ea857777..e12fc515 100644
--- a/kbabel/kbabel/spelldlg.h
+++ b/kbabel/kbabel/spelldlg.h
@@ -43,7 +43,7 @@ class SpellDlg : public KDialogBase
Q_OBJECT
public:
- SpellDlg(bool haveMarkedText, QWidget* parent, const char *name=0);
+ SpellDlg(bool haveMarkedText, TQWidget* parent, const char *name=0);
~SpellDlg();
bool all() const;
diff --git a/kbabel/kbabel/taglistview.cpp b/kbabel/kbabel/taglistview.cpp
index 8dedccea..476c2ed7 100644
--- a/kbabel/kbabel/taglistview.cpp
+++ b/kbabel/kbabel/taglistview.cpp
@@ -33,8 +33,8 @@
#include "taglistview.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kcursor.h>
#include <klistbox.h>
@@ -44,23 +44,23 @@
using namespace KBabel;
-TagListView::TagListView(KBCatalog* catalog,QWidget *parent, Project::Ptr project)
+TagListView::TagListView(KBCatalog* catalog,TQWidget *parent, Project::Ptr project)
: KBCatalogView(catalog,parent,project)
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setResizeMode( QLayout::Minimum );
+ TQVBoxLayout* layout = new TQVBoxLayout( this );
+ layout->setResizeMode( TQLayout::Minimum );
_tagBox = new KListBox (this, "taglist textview");
layout->addWidget (_tagBox);
- connect(_tagBox,SIGNAL(selected(const QString&))
- , this, SIGNAL(signalTagSelected(const QString&)));
- connect(_tagBox,SIGNAL(highlighted(int))
- , this, SIGNAL(signalHighlightedTagChanged(int)));
+ connect(_tagBox,TQT_SIGNAL(selected(const TQString&))
+ , this, TQT_SIGNAL(signalTagSelected(const TQString&)));
+ connect(_tagBox,TQT_SIGNAL(highlighted(int))
+ , this, TQT_SIGNAL(signalHighlightedTagChanged(int)));
- connect(_catalog, SIGNAL(signalFileOpened(bool))
- , this, SLOT(setDisabled(bool)));
+ connect(_catalog, TQT_SIGNAL(signalFileOpened(bool))
+ , this, TQT_SLOT(setDisabled(bool)));
}
void TagListView::updateView()
diff --git a/kbabel/kbabel/taglistview.h b/kbabel/kbabel/taglistview.h
index 0435e3ba..d4361a23 100644
--- a/kbabel/kbabel/taglistview.h
+++ b/kbabel/kbabel/taglistview.h
@@ -44,7 +44,7 @@ public:
/**
* Default constructor
*/
- TagListView(KBCatalog* catalog,QWidget *parent, KBabel::Project::Ptr project);
+ TagListView(KBCatalog* catalog,TQWidget *parent, KBabel::Project::Ptr project);
public slots:
virtual void updateView();
@@ -52,7 +52,7 @@ public slots:
signals:
void signalHighlightedTagChanged (int index);
- void signalTagSelected (const QString& tag);
+ void signalTagSelected (const TQString& tag);
private:
KListBox* _tagBox;
diff --git a/kbabel/kbabeldict/aboutmoduledlg.cpp b/kbabel/kbabeldict/aboutmoduledlg.cpp
index eaab8b3b..5de3f0fb 100644
--- a/kbabel/kbabeldict/aboutmoduledlg.cpp
+++ b/kbabel/kbabeldict/aboutmoduledlg.cpp
@@ -35,7 +35,7 @@
#include <kbugreport.h>
#include <klocale.h>
-AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent)
+AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, TQWidget *parent)
: KAboutApplication(aboutData, parent)
, _aboutData(aboutData)
{
@@ -43,7 +43,7 @@ AboutModuleDlg::AboutModuleDlg(const KAboutData *aboutData, QWidget *parent)
enableLinkedHelp(true);
}
-void AboutModuleDlg::helpClickedSlot(const QString&)
+void AboutModuleDlg::helpClickedSlot(const TQString&)
{
KBugReport *bugReport = new KBugReport(0,true,_aboutData);
diff --git a/kbabel/kbabeldict/aboutmoduledlg.h b/kbabel/kbabeldict/aboutmoduledlg.h
index f79d77ec..09f13f8f 100644
--- a/kbabel/kbabeldict/aboutmoduledlg.h
+++ b/kbabel/kbabeldict/aboutmoduledlg.h
@@ -43,10 +43,10 @@ class AboutModuleDlg : public KAboutApplication
Q_OBJECT
public:
- AboutModuleDlg(const KAboutData *aboutData, QWidget* parent=0);
+ AboutModuleDlg(const KAboutData *aboutData, TQWidget* parent=0);
public slots:
- virtual void helpClickedSlot(const QString&);
+ virtual void helpClickedSlot(const TQString&);
private:
const KAboutData *_aboutData;
diff --git a/kbabel/kbabeldict/dictchooser.cpp b/kbabel/kbabeldict/dictchooser.cpp
index f9360b61..f99c3709 100644
--- a/kbabel/kbabeldict/dictchooser.cpp
+++ b/kbabel/kbabeldict/dictchooser.cpp
@@ -35,42 +35,42 @@
#include "dictchooser.h"
#include "resources.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klistbox.h>
#include <klocale.h>
#include <kdialog.h>
#include <ktempfile.h>
-DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
- , QWidget *parent, const char *name)
- : QWidget(parent,name), box(b)
+DictChooser::DictChooser(KBabelDictBox*b, TQStringList selected
+ , TQWidget *parent, const char *name)
+ : TQWidget(parent,name), box(b)
{
tempConfig.clear();
tempConfig.setAutoDelete(true);
dictList = box->moduleInfos();
- QGridLayout *layout = new QGridLayout(this);
+ TQGridLayout *layout = new TQGridLayout(this);
layout->setSpacing(KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("dictionary to not use","Do not use:"),this);
+ TQLabel *label = new TQLabel(i18n("dictionary to not use","Do not use:"),this);
layout->addWidget(label,0,0);
- label = new QLabel(i18n("dictionary to use","Use:"),this);
+ label = new TQLabel(i18n("dictionary to use","Use:"),this);
layout->addWidget(label,0,2);
unselectedBox = new KListBox(this,"unselectedBox");
layout->addWidget(unselectedBox,1,0);
- QVBoxLayout *bLayout = new QVBoxLayout();
- selectBtn = new QPushButton(" &>> ", this);
+ TQVBoxLayout *bLayout = new TQVBoxLayout();
+ selectBtn = new TQPushButton(" &>> ", this);
selectBtn->setEnabled(false);
bLayout->addWidget(selectBtn);
- unselectBtn = new QPushButton(" &<< ", this);
+ unselectBtn = new TQPushButton(" &<< ", this);
unselectBtn->setEnabled(false);
bLayout->addWidget(unselectBtn);
bLayout->addStretch();
@@ -80,14 +80,14 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
layout->addWidget(selectedBox,1,2);
- bLayout = new QVBoxLayout();
- upBtn = new QPushButton(i18n("Move &Up"), this);
+ bLayout = new TQVBoxLayout();
+ upBtn = new TQPushButton(i18n("Move &Up"), this);
upBtn->setEnabled(false);
bLayout->addWidget(upBtn);
- downBtn = new QPushButton(i18n("Move &Down"), this);
+ downBtn = new TQPushButton(i18n("Move &Down"), this);
downBtn->setEnabled(false);
bLayout->addWidget(downBtn);
- configureBtn = new QPushButton(i18n("Con&figure..."), this);
+ configureBtn = new TQPushButton(i18n("Con&figure..."), this);
bLayout->addWidget(configureBtn);
bLayout->addStretch();
layout->addLayout(bLayout,1,3);
@@ -95,7 +95,7 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
dictList.setAutoDelete(true);
ModuleInfo *mi;
- for(QStringList::Iterator it=selected.begin(); it!=selected.end();
+ for(TQStringList::Iterator it=selected.begin(); it!=selected.end();
++it)
{
for(mi = dictList.first(); mi != 0; mi = dictList.next())
@@ -122,17 +122,17 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
}
- connect(selectedBox,SIGNAL(highlighted(int)), this
- , SLOT(selectedMarked(int)));
- connect(unselectedBox,SIGNAL(highlighted(int)), this
- , SLOT(unselectedMarked(int)));
+ connect(selectedBox,TQT_SIGNAL(highlighted(int)), this
+ , TQT_SLOT(selectedMarked(int)));
+ connect(unselectedBox,TQT_SIGNAL(highlighted(int)), this
+ , TQT_SLOT(unselectedMarked(int)));
- connect(selectBtn, SIGNAL(clicked()), this, SLOT(select()));
- connect(unselectBtn, SIGNAL(clicked()), this, SLOT(unselect()));
- connect(upBtn, SIGNAL(clicked()), this, SLOT(up()));
- connect(downBtn, SIGNAL(clicked()), this, SLOT(down()));
- connect(configureBtn,SIGNAL(clicked()), this
- , SLOT(configureSelected()));
+ connect(selectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(select()));
+ connect(unselectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(unselect()));
+ connect(upBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(up()));
+ connect(downBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(down()));
+ connect(configureBtn,TQT_SIGNAL(clicked()), this
+ , TQT_SLOT(configureSelected()));
selectedBox->installEventFilter(this);
@@ -144,13 +144,13 @@ DictChooser::DictChooser(KBabelDictBox*b, QStringList selected
}
-QStringList DictChooser::selectedDicts()
+TQStringList DictChooser::selectedDicts()
{
- QStringList selected;
+ TQStringList selected;
for(int i = 0; i < (int)selectedBox->count(); i++)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
ModuleInfo *mi;
for(mi = dictList.first(); mi!=0; mi = dictList.next())
@@ -192,7 +192,7 @@ void DictChooser::select()
int i = unselectedBox->currentItem();
if(i >= 0)
{
- QString text = unselectedBox->text(i);
+ TQString text = unselectedBox->text(i);
selectedBox->insertItem(text);
unselectedBox->removeItem(i);
@@ -214,7 +214,7 @@ void DictChooser::unselect()
int i = selectedBox->currentItem();
if(i >= 0 && selectedBox->count() > 1)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
unselectedBox->insertItem(text);
selectedBox->removeItem(i);
@@ -236,7 +236,7 @@ void DictChooser::up()
int i = selectedBox->currentItem();
if(i > 0)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
selectedBox->changeItem(selectedBox->text(i-1),i);
selectedBox->changeItem(text,i-1);
selectedBox->setSelected(i-1,true);
@@ -249,7 +249,7 @@ void DictChooser::down()
int i = selectedBox->currentItem();
if(i < (int)selectedBox->count()-1)
{
- QString text = selectedBox->text(i);
+ TQString text = selectedBox->text(i);
selectedBox->changeItem(selectedBox->text(i+1),i);
selectedBox->changeItem(text,i+1);
selectedBox->setSelected(i+1,true);
@@ -257,9 +257,9 @@ void DictChooser::down()
}
-bool DictChooser::eventFilter(QObject *object, QEvent *event)
+bool DictChooser::eventFilter(TQObject *object, TQEvent *event)
{
- if(event->type() == QEvent::FocusIn)
+ if(event->type() == TQEvent::FocusIn)
{
if(object==selectedBox)
{
@@ -289,7 +289,7 @@ void DictChooser::configureSelected()
{
int ci = selectedBox->currentItem();
if( ci == -1 ) ci = 0; // there is always at least one item
- QString module = selectedBox->text(ci);
+ TQString module = selectedBox->text(ci);
ModuleInfo *mi;
for(mi = dictList.first(); mi!=0; mi = dictList.next())
@@ -320,7 +320,7 @@ void DictChooser::restoreConfig()
{
kdDebug( KBABEL_SEARCH ) << "Cleanup" << endl;
// cleanup
- QDictIterator<KTempFile> it( tempConfig ); // See QDictIterator
+ TQDictIterator<KTempFile> it( tempConfig ); // See QDictIterator
for( ; it.current(); ++it )
{
KConfig config( it.current()->name() );
diff --git a/kbabel/kbabeldict/dictchooser.h b/kbabel/kbabeldict/dictchooser.h
index 2b757455..c5740d33 100644
--- a/kbabel/kbabeldict/dictchooser.h
+++ b/kbabel/kbabeldict/dictchooser.h
@@ -35,9 +35,9 @@
#ifndef DICTCHOOSER_H
#define DICTCHOOSER_H
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kbabeldictbox.h>
class KListBox;
@@ -52,17 +52,17 @@ class KDE_EXPORT DictChooser : public QWidget
Q_OBJECT
public:
- DictChooser(KBabelDictBox* box, QStringList selected,
- QWidget *parent , const char *name=0);
+ DictChooser(KBabelDictBox* box, TQStringList selected,
+ TQWidget *parent , const char *name=0);
- QStringList selectedDicts();
+ TQStringList selectedDicts();
/** If the user configured some of the modules, this
* restores the original configuration of all these modules
*/
void restoreConfig();
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
private slots:
void select();
@@ -77,18 +77,18 @@ private slots:
private:
KBabelDictBox* box;
- QPtrList<ModuleInfo> dictList;
+ TQPtrList<ModuleInfo> dictList;
KListBox *selectedBox;
KListBox *unselectedBox;
- QPushButton *selectBtn;
- QPushButton *unselectBtn;
- QPushButton *upBtn;
- QPushButton *downBtn;
- QPushButton *configureBtn;
+ TQPushButton *selectBtn;
+ TQPushButton *unselectBtn;
+ TQPushButton *upBtn;
+ TQPushButton *downBtn;
+ TQPushButton *configureBtn;
- QDict<KTempFile> tempConfig;
+ TQDict<KTempFile> tempConfig;
};
#endif // DICTCHOOSER_H
diff --git a/kbabel/kbabeldict/dictionarymenu.cpp b/kbabel/kbabeldict/dictionarymenu.cpp
index 2ed57d5f..5d648697 100644
--- a/kbabel/kbabeldict/dictionarymenu.cpp
+++ b/kbabel/kbabeldict/dictionarymenu.cpp
@@ -36,11 +36,11 @@
#include <kdebug.h>
#include <kshortcut.h>
-#include <qsignalmapper.h>
+#include <tqsignalmapper.h>
DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collection
- , QObject *parent)
- : QObject(parent, "dictionarymenu")
+ , TQObject *parent)
+ : TQObject(parent, "dictionarymenu")
, popup(popupMenu)
, actionCollection(collection)
, maxId(10)
@@ -50,12 +50,12 @@ DictionaryMenu::DictionaryMenu(KPopupMenu *popupMenu, KActionCollection *collect
if(popup)
{
- connect(popup,SIGNAL(activated(int)),this,SLOT(activated(int)));
+ connect(popup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activated(int)));
}
- dictionaryMapper = new QSignalMapper( this );
- connect( dictionaryMapper, SIGNAL( mapped( int ) ),
- this, SLOT( activated( int ) ) );
+ dictionaryMapper = new TQSignalMapper( this );
+ connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( activated( int ) ) );
}
@@ -68,7 +68,7 @@ void DictionaryMenu::clear()
{
if(popup)
{
- QIntDictIterator<QString> it( num2id ); // iterator for dict
+ TQIntDictIterator<TQString> it( num2id ); // iterator for dict
while ( it.current() )
{
popup->removeItem(it.currentKey());
@@ -80,49 +80,49 @@ void DictionaryMenu::clear()
// create new mapper
delete dictionaryMapper;
- dictionaryMapper = new QSignalMapper( this );
- connect( dictionaryMapper, SIGNAL( mapped( int ) ),
- this, SLOT( activated( int ) ) );
+ dictionaryMapper = new TQSignalMapper( this );
+ connect( dictionaryMapper, TQT_SIGNAL( mapped( int ) ),
+ this, TQT_SLOT( activated( int ) ) );
}
-void DictionaryMenu::add(const QString& name, const QString& moduleId)
+void DictionaryMenu::add(const TQString& name, const TQString& moduleId)
{
if(popup)
{
- KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, SLOT(map()), actionCollection, moduleId.utf8() );
+ KAction* dictionaryAction = new KAction( name, 0, dictionaryMapper, TQT_SLOT(map()), actionCollection, moduleId.utf8() );
uint id = maxId++;
dictionaryAction->plug(popup, id);
dictionaryMapper->setMapping( dictionaryAction, id );
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
num2id.insert(id,idString);
}
}
-void DictionaryMenu::add(const QString& n, const QString& moduleId
- , const QString& key)
+void DictionaryMenu::add(const TQString& n, const TQString& moduleId
+ , const TQString& key)
{
if(popup)
{
- QString name=n;
+ TQString name=n;
- QString keyString=key;
+ TQString keyString=key;
if(keyString.contains("%1"))
{
keyString=key.arg(accel2id.count()+1);
}
KShortcut k(keyString);
- KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, SLOT(map()), actionCollection, key.arg(moduleId).utf8() );
+ KAction* dictionaryAction = new KAction( name, k, dictionaryMapper, TQT_SLOT(map()), actionCollection, key.arg(moduleId).utf8() );
uint id = maxId++;
dictionaryAction->plug(popup,id);
if(!k.isNull())
{
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
accel2id.insert(id,idString);
dictionaryMapper->setMapping( dictionaryAction, id );
@@ -135,7 +135,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId
kdWarning() << "key not valid" << endl;
}
- QString *idString = new QString(moduleId);
+ TQString *idString = new TQString(moduleId);
num2id.insert(id,idString);
}
}
@@ -143,7 +143,7 @@ void DictionaryMenu::add(const QString& n, const QString& moduleId
void DictionaryMenu::activated(int id)
{
- QString *idString = num2id[id];
+ TQString *idString = num2id[id];
if(idString)
{
diff --git a/kbabel/kbabeldict/dictionarymenu.h b/kbabel/kbabeldict/dictionarymenu.h
index c688508e..c520501a 100644
--- a/kbabel/kbabeldict/dictionarymenu.h
+++ b/kbabel/kbabeldict/dictionarymenu.h
@@ -33,10 +33,10 @@
#ifndef DICTIONARYMENU_H
#define DICTIONARYMENU_H
-#include <qintdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
#include <kdemacros.h>
class QSignalMapper;
@@ -48,31 +48,31 @@ class KDE_EXPORT DictionaryMenu : public QObject
Q_OBJECT
public:
- DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, QObject *parent=0);
+ DictionaryMenu(KPopupMenu *menu, KActionCollection *collection, TQObject *parent=0);
~DictionaryMenu();
- void add(const QString& name,const QString& id);
+ void add(const TQString& name,const TQString& id);
/**
* Adds an item to this menu and to the keyboard accelerator.
* If key contains %1 it is replaced with a number 1-9
*/
- void add(const QString& name,const QString& id, const QString& key);
+ void add(const TQString& name,const TQString& id, const TQString& key);
void clear();
signals:
- void activated(const QString moduleId);
+ void activated(const TQString moduleId);
private slots:
void activated(int);
private:
- QGuardedPtr<KPopupMenu> popup;
- QGuardedPtr<KActionCollection> actionCollection;
- QIntDict<QString> num2id;
- QIntDict<QString> accel2id;
- QSignalMapper* dictionaryMapper;
+ TQGuardedPtr<KPopupMenu> popup;
+ TQGuardedPtr<KActionCollection> actionCollection;
+ TQIntDict<TQString> num2id;
+ TQIntDict<TQString> accel2id;
+ TQSignalMapper* dictionaryMapper;
uint maxId;
};
diff --git a/kbabel/kbabeldict/kbabeldict.cpp b/kbabel/kbabeldict/kbabeldict.cpp
index ebb68227..cae04d07 100644
--- a/kbabel/kbabeldict/kbabeldict.cpp
+++ b/kbabel/kbabeldict/kbabeldict.cpp
@@ -47,13 +47,13 @@ KBabelDict::KBabelDict()
, i18n("About"), i18n("About Module")
, i18n("Hide Sett&ings"))
{
- connect(this, SIGNAL(closeClicked()),this,SLOT(saveConfig()));
- connect(this, SIGNAL(closeClicked()),this,SLOT(quit()));
+ connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(saveConfig()));
+ connect(this, TQT_SIGNAL(closeClicked()),this,TQT_SLOT(quit()));
view = new KBabelDictView(this);
- connect(this, SIGNAL(user1Clicked()), view, SLOT(about()));
- connect(this, SIGNAL(user2Clicked()), view, SLOT(aboutModule()));
- connect(this, SIGNAL(user3Clicked()), this, SLOT(togglePref()));
+ connect(this, TQT_SIGNAL(user1Clicked()), view, TQT_SLOT(about()));
+ connect(this, TQT_SIGNAL(user2Clicked()), view, TQT_SLOT(aboutModule()));
+ connect(this, TQT_SIGNAL(user3Clicked()), this, TQT_SLOT(togglePref()));
// HACK: hide default button, otherwise it would be Help button
showButtonOK(false);
diff --git a/kbabel/kbabeldict/kbabeldictbox.cpp b/kbabel/kbabeldict/kbabeldictbox.cpp
index 2beed684..f6ca948f 100644
--- a/kbabel/kbabeldict/kbabeldictbox.cpp
+++ b/kbabel/kbabeldict/kbabeldictbox.cpp
@@ -58,17 +58,17 @@
#include <ktrader.h>
#include <kwin.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qtextview.h>
-#include <qstylesheet.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqtextview.h>
+#include <tqstylesheet.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#define KBABELDICT 5321
@@ -77,9 +77,9 @@ using namespace KBabel;
class ResultListItem : public QListViewItem
{
public:
- ResultListItem(QListView *parent, const SearchResult& result,bool richText);
+ ResultListItem(TQListView *parent, const SearchResult& result,bool richText);
- virtual QString key(int column, bool ascending) const;
+ virtual TQString key(int column, bool ascending) const;
const SearchResult* result() const;
bool richText() const { return _richText; }
@@ -88,9 +88,9 @@ private:
bool _richText;
};
-ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
+ResultListItem::ResultListItem(TQListView *parent, const SearchResult& result
, bool richText)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
, _result(result)
, _richText(richText)
{
@@ -99,9 +99,9 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
score=0;
else if(score>100)
score=100;
- setText(0,QString::number(score));
+ setText(0,TQString::number(score));
- QString tmp;
+ TQString tmp;
if(richText)
tmp=_result.plainFound;
else
@@ -160,17 +160,17 @@ ResultListItem::ResultListItem(QListView *parent, const SearchResult& result
}
-QString ResultListItem::key(int column, bool ascending) const
+TQString ResultListItem::key(int column, bool ascending) const
{
if(column==0)
{
- QString result=QString::number(_result.score);
+ TQString result=TQString::number(_result.score);
result=result.rightJustify(10,'0');
return result;
}
- return QListViewItem::key(column,ascending);
+ return TQListViewItem::key(column,ascending);
}
const SearchResult *ResultListItem::result() const
@@ -182,8 +182,8 @@ const SearchResult *ResultListItem::result() const
* Constructs a KBabelDictBox which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
- : DCOPObject("KBabelDict"), QWidget( parent, name, fl )
+KBabelDictBox::KBabelDictBox( TQWidget* parent, const char* name, WFlags fl )
+ : DCOPObject("KBabelDict"), TQWidget( parent, name, fl )
{
active=-1;
currentResult=0;
@@ -191,39 +191,39 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
moduleList.setAutoDelete(false);
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
mainLayout->setMargin(KDialog::marginHint());
mainLayout->setSpacing(KDialog::spacingHint());
- QGridLayout *grid = new QGridLayout(mainLayout);
+ TQGridLayout *grid = new TQGridLayout(mainLayout);
- QHBoxLayout *hbox = new QHBoxLayout;
- QLabel *label = new QLabel(i18n("Total:"),this);
+ TQHBoxLayout *hbox = new QHBoxLayout;
+ TQLabel *label = new TQLabel(i18n("Total:"),this);
hbox->addWidget(label);
- totalResultsLabel = new QLabel("0",this);
+ totalResultsLabel = new TQLabel("0",this);
hbox->addWidget(totalResultsLabel);
grid->addLayout(hbox,0,0);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Current:"), this);
+ label = new TQLabel(i18n("Current:"), this);
hbox->addWidget(label);
- currentLabel = new QLabel("0",this);
+ currentLabel = new TQLabel("0",this);
hbox->addWidget(currentLabel);
grid->addLayout(hbox,1,0);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Found in:"), this);
+ label = new TQLabel(i18n("Found in:"), this);
hbox->addWidget(label);
- locationLabel = new QLabel(this);
+ locationLabel = new TQLabel(this);
hbox->addWidget(locationLabel);
hbox->setStretchFactor(locationLabel,2);
grid->addLayout(hbox,0,1);
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Translator:"), this);
+ label = new TQLabel(i18n("Translator:"), this);
hbox->addWidget(label);
- translatorLabel = new QLabel(this);
+ translatorLabel = new TQLabel(this);
translatorLabel->setMinimumSize(50,0);
hbox->addWidget(translatorLabel);
hbox->setStretchFactor(translatorLabel,2);
@@ -233,14 +233,14 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
- label = new QLabel(i18n("Date:"),this);
+ label = new TQLabel(i18n("Date:"),this);
hbox->addWidget(label);
- dateLabel = new QLabel(this);
+ dateLabel = new TQLabel(this);
dateLabel->setMinimumSize(50,0);
hbox->addWidget(dateLabel);
hbox->setStretchFactor(dateLabel,2);
- moreButton = new QPushButton(this,"moreButton");
+ moreButton = new TQPushButton(this,"moreButton");
moreButton->setText(i18n("&More"));
moreButton->setEnabled(false);
moreButton->setAutoRepeat(true);
@@ -251,33 +251,33 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
hbox->addStretch(1);
- listButton = new QToolButton(Qt::UpArrow,this);
+ listButton = new TQToolButton(Qt::UpArrow,this);
listButton->setFixedSize(20,15);
listButton->setAutoRepeat(false);
- connect(listButton,SIGNAL(clicked()),this,SLOT(showListOnly()));
+ connect(listButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showListOnly()));
hbox->addWidget(listButton);
- detailButton = new QToolButton(Qt::DownArrow,this);
+ detailButton = new TQToolButton(Qt::DownArrow,this);
detailButton->setFixedSize(20,15);
detailButton->setAutoRepeat(false);
- connect(detailButton,SIGNAL(clicked()),this,SLOT(showDetailsOnly()));
+ connect(detailButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showDetailsOnly()));
hbox->addWidget(detailButton);
mainLayout->addLayout(hbox);
- resultSplitter = new QSplitter(Qt::Vertical,this
+ resultSplitter = new TQSplitter(Qt::Vertical,this
,"resultsplitter");
mainLayout->addWidget(resultSplitter);
- viewContainer = new QSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter");
- QVBoxLayout *vbox = new QVBoxLayout(viewContainer);
- vbox->setResizeMode(QLayout::FreeResize);
- origView = new QTextView(viewContainer,"origView");
- origView->setWordWrap( QTextEdit::WidgetWidth );
+ viewContainer = new TQSplitter(Qt::Vertical,resultSplitter, "singleEntrySplitter");
+ TQVBoxLayout *vbox = new TQVBoxLayout(viewContainer);
+ vbox->setResizeMode(TQLayout::FreeResize);
+ origView = new TQTextView(viewContainer,"origView");
+ origView->setWordWrap( TQTextEdit::WidgetWidth );
origView->setMinimumSize(1,1);
vbox->addWidget(origView);
- translationView = new QTextView(viewContainer,"translationView");
- origView->setWordWrap( QTextEdit::WidgetWidth );
+ translationView = new TQTextView(viewContainer,"translationView");
+ origView->setWordWrap( TQTextEdit::WidgetWidth );
translationView->setMinimumSize(1,1);
vbox->addWidget(translationView);
viewContainer->setMinimumSize(1,1);
@@ -291,17 +291,17 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
resultListView->installEventFilter(this);
connect(resultListView
- , SIGNAL(doubleClicked(QListViewItem *,const QPoint&,int))
- , this, SLOT(editFile()));
- connect(resultListView, SIGNAL(returnPressed(QListViewItem *))
- , this, SLOT(editFile()));
+ , TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint&,int))
+ , this, TQT_SLOT(editFile()));
+ connect(resultListView, TQT_SIGNAL(returnPressed(TQListViewItem *))
+ , this, TQT_SLOT(editFile()));
connect(resultListView
- , SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint&))
+ , TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint&))
, this
- , SLOT(showContextMenu(KListView *,QListViewItem *,const QPoint&)));
+ , TQT_SLOT(showContextMenu(KListView *,TQListViewItem *,const TQPoint&)));
- resultSplitter->setResizeMode(viewContainer,QSplitter::KeepSize);
- QValueList<int> sizes;
+ resultSplitter->setResizeMode(viewContainer,TQSplitter::KeepSize);
+ TQValueList<int> sizes;
sizes.append(50);
sizes.append(50);
resultSplitter->setSizes(sizes);
@@ -310,12 +310,12 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
hbox = new QHBoxLayout;
hbox->addStretch(1);
- prevButton = new QPushButton(i18n("< &Previous"),this);
+ prevButton = new TQPushButton(i18n("< &Previous"),this);
prevButton->setEnabled(false);
prevButton->setAutoRepeat(true);
hbox->addWidget(prevButton);
- nextButton = new QPushButton(i18n("&Next >"),this);
+ nextButton = new TQPushButton(i18n("&Next >"),this);
nextButton->setEnabled(false);
nextButton->setAutoRepeat(true);
hbox->addWidget(nextButton);
@@ -330,21 +330,21 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
currentLabel->setFixedSize(currentLabel->sizeHint());
currentLabel->setNum(0);
- setRMBMenu(new QPopupMenu(this));
- QStringList fileList;
+ setRMBMenu(new TQPopupMenu(this));
+ TQStringList fileList;
#if 0
// try to find installed modules by looking into directories
// kbabeldict/modules and getting all files *.rc
- QStringList dirList = KGlobal::dirs()->findDirs("data"
+ TQStringList dirList = KGlobal::dirs()->findDirs("data"
,"kbabeldict/modules");
- for ( QStringList::Iterator it = dirList.begin(); it != dirList.end()
+ for ( TQStringList::Iterator it = dirList.begin(); it != dirList.end()
; ++it )
{
- QDir dir((*it),"*.rc");
- QStringList list = dir.entryList(QDir::Files|QDir::Readable);
+ TQDir dir((*it),"*.rc");
+ TQStringList list = dir.entryList(TQDir::Files|TQDir::Readable);
- for ( QStringList::Iterator fit = list.begin(); fit != list.end()
+ for ( TQStringList::Iterator fit = list.begin(); fit != list.end()
; ++fit )
{
if(!fileList.contains((*fit)))
@@ -357,28 +357,28 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
// use locate to locate the actual file, because rcfiles in the users
// directory is prefered for systemwide rc files
- QStringList rcList;
- for( QStringList::Iterator fit = fileList.begin(); fit != fileList.end();
+ TQStringList rcList;
+ for( TQStringList::Iterator fit = fileList.begin(); fit != fileList.end();
++fit)
{
rcList.append(locate("data","kbabeldict/modules/"+(*fit)));
}
- for( QStringList::Iterator rit = rcList.begin(); rit != rcList.end();
+ for( TQStringList::Iterator rit = rcList.begin(); rit != rcList.end();
++rit)
{
KConfig rcConfig((*rit),true,false);
rcConfig.setGroup("SearchEngine");
- QStringList appList = rcConfig.readListEntry("Applications");
+ TQStringList appList = rcConfig.readListEntry("Applications");
KInstance *inst = KGlobal::instance();
if(inst && !appList.isEmpty() && !appList.contains(inst->instanceName()))
{
continue;
}
- QString libName = rcConfig.readEntry("Lib");
+ TQString libName = rcConfig.readEntry("Lib");
if(!libName.isNull())
{
@@ -464,9 +464,9 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
}
}
- connect(nextButton,SIGNAL(clicked()),this,SLOT(slotNextResult()));
- connect(prevButton,SIGNAL(clicked()),this,SLOT(slotPrevResult()));
- connect(moreButton,SIGNAL(clicked()),this,SLOT(nextInfo()));
+ connect(nextButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextResult()));
+ connect(prevButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPrevResult()));
+ connect(moreButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(nextInfo()));
origView->installEventFilter(this);
@@ -475,8 +475,8 @@ KBabelDictBox::KBabelDictBox( QWidget* parent, const char* name, WFlags fl )
resultListView->setSorting(0,false);
resultListView->setAllColumnsShowFocus(true);
- connect(resultListView,SIGNAL(selectionChanged(QListViewItem*))
- , this, SLOT(showResult(QListViewItem*)));
+ connect(resultListView,TQT_SIGNAL(selectionChanged(TQListViewItem*))
+ , this, TQT_SLOT(showResult(TQListViewItem*)));
}
/*
@@ -490,18 +490,18 @@ void KBabelDictBox::registerModule( SearchEngine* e )
{
active = 0;
moduleList.append(e);
- connect(e, SIGNAL(started()),this,SIGNAL(searchStarted()));
- connect(e, SIGNAL(finished()),this,SIGNAL(searchStopped()));
- connect(e, SIGNAL(finished()),this
- ,SLOT(clearModuleResults()));
- connect(e, SIGNAL(progress(int)),this,SIGNAL(progressed(int)));
- connect(e, SIGNAL(progressStarts(const QString&)),this
- , SIGNAL(progressStarts(const QString&)));
- connect(e, SIGNAL(progressEnds()),this,SIGNAL(progressEnds()));
- connect(e, SIGNAL(resultFound(const SearchResult*)), this
- , SLOT(addResult(const SearchResult*)));
- connect(e, SIGNAL(hasError(const QString&)), this
- , SIGNAL(errorInModule(const QString&)));
+ connect(e, TQT_SIGNAL(started()),this,TQT_SIGNAL(searchStarted()));
+ connect(e, TQT_SIGNAL(finished()),this,TQT_SIGNAL(searchStopped()));
+ connect(e, TQT_SIGNAL(finished()),this
+ ,TQT_SLOT(clearModuleResults()));
+ connect(e, TQT_SIGNAL(progress(int)),this,TQT_SIGNAL(progressed(int)));
+ connect(e, TQT_SIGNAL(progressStarts(const TQString&)),this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(e, TQT_SIGNAL(progressEnds()),this,TQT_SIGNAL(progressEnds()));
+ connect(e, TQT_SIGNAL(resultFound(const SearchResult*)), this
+ , TQT_SLOT(addResult(const SearchResult*)));
+ connect(e, TQT_SIGNAL(hasError(const TQString&)), this
+ , TQT_SIGNAL(errorInModule(const TQString&)));
}
void KBabelDictBox::saveSettings(KConfigBase *config)
@@ -527,7 +527,7 @@ void KBabelDictBox::saveSettings(KConfigBase *config)
}
-void KBabelDictBox::saveSettings(const QString& moduleId, KConfigBase *config)
+void KBabelDictBox::saveSettings(const TQString& moduleId, KConfigBase *config)
{
SearchEngine *e;
@@ -545,11 +545,11 @@ void KBabelDictBox::readSettings(KConfigBase *config)
{
SearchEngine *e;
KConfigGroupSaver cs(config,"KBabelDict");
- QValueList<int> sizes=config->readIntListEntry("ResultSplitter");
+ TQValueList<int> sizes=config->readIntListEntry("ResultSplitter");
if(!sizes.isEmpty())
resultSplitter->setSizes(sizes);
- QString m = config->readEntry("ActiveModule");
+ TQString m = config->readEntry("ActiveModule");
if(!m.isEmpty())
{
setActiveModule(m);
@@ -562,7 +562,7 @@ void KBabelDictBox::readSettings(KConfigBase *config)
}
}
-void KBabelDictBox::readSettings(const QString& moduleId, KConfigBase *config)
+void KBabelDictBox::readSettings(const TQString& moduleId, KConfigBase *config)
{
SearchEngine *e;
@@ -626,7 +626,7 @@ void KBabelDictBox::setActiveModule(int a)
}
}
-void KBabelDictBox::setActiveModule(QString id)
+void KBabelDictBox::setActiveModule(TQString id)
{
SearchEngine *e;
@@ -647,7 +647,7 @@ void KBabelDictBox::setActiveModule(QString id)
/*
* public slot
*/
-void KBabelDictBox::startSearch(const QString text)
+void KBabelDictBox::startSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -661,8 +661,8 @@ void KBabelDictBox::startSearch(const QString text)
if(engine->isSearching())
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
searchText=text;
}
@@ -673,7 +673,7 @@ void KBabelDictBox::startSearch(const QString text)
/*
* public slot
*/
-void KBabelDictBox::startTranslationSearch(const QString text)
+void KBabelDictBox::startTranslationSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -687,8 +687,8 @@ void KBabelDictBox::startTranslationSearch(const QString text)
if(engine->isSearching())
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
searchText=text;
}
@@ -696,7 +696,7 @@ void KBabelDictBox::startTranslationSearch(const QString text)
}
}
-void KBabelDictBox::startDelayedSearch(const QString text)
+void KBabelDictBox::startDelayedSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -713,18 +713,18 @@ void KBabelDictBox::startDelayedSearch(const QString text)
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
}
else
{
- QTimer::singleShot(5,this,SLOT(startDelayedSearch()));
+ TQTimer::singleShot(5,this,TQT_SLOT(startDelayedSearch()));
}
}
}
-void KBabelDictBox::startDelayedTranslationSearch(const QString text)
+void KBabelDictBox::startDelayedTranslationSearch(const TQString text)
{
clear();
SearchEngine *engine = moduleList.at(active);
@@ -741,25 +741,25 @@ void KBabelDictBox::startDelayedTranslationSearch(const QString text)
{
engine->stopSearch();
- connect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ connect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
}
else
{
- QTimer::singleShot(5,this,SLOT(startDelayedTranslationSearch()));
+ TQTimer::singleShot(5,this,TQT_SLOT(startDelayedTranslationSearch()));
}
}
}
-QString KBabelDictBox::translate(const QString text)
+TQString KBabelDictBox::translate(const TQString text)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -772,14 +772,14 @@ QString KBabelDictBox::translate(const QString text)
}
}
-QString KBabelDictBox::fuzzyTranslation(const QString text, int &score)
+TQString KBabelDictBox::fuzzyTranslation(const TQString text, int &score)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -792,14 +792,14 @@ QString KBabelDictBox::fuzzyTranslation(const QString text, int &score)
}
}
-QString KBabelDictBox::searchTranslation(const QString text, int &score)
+TQString KBabelDictBox::searchTranslation(const TQString text, int &score)
{
SearchEngine *engine = moduleList.at(active);
if(!engine)
{
kdDebug(KBABELDICT) << "no module available" << endl;
- return QString::null;
+ return TQString::null;
}
else
{
@@ -824,8 +824,8 @@ void KBabelDictBox::startDelayedSearch()
}
else
{
- disconnect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedSearch()));
+ disconnect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedSearch()));
engine->startSearch(searchText);
@@ -844,8 +844,8 @@ void KBabelDictBox::startDelayedTranslationSearch()
}
else
{
- disconnect(this, SIGNAL(searchStopped()), this
- , SLOT(startDelayedTranslationSearch()));
+ disconnect(this, TQT_SIGNAL(searchStopped()), this
+ , TQT_SLOT(startDelayedTranslationSearch()));
engine->startSearchInTranslation(searchText);
@@ -884,9 +884,9 @@ bool KBabelDictBox::isSearching()
}
-QStringList KBabelDictBox::moduleNames()
+TQStringList KBabelDictBox::moduleNames()
{
- QStringList list;
+ TQStringList list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -897,9 +897,9 @@ QStringList KBabelDictBox::moduleNames()
return list;
}
-QStringList KBabelDictBox::modules()
+TQStringList KBabelDictBox::modules()
{
- QStringList list;
+ TQStringList list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -910,9 +910,9 @@ QStringList KBabelDictBox::modules()
return list;
}
-QPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
+TQPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
{
- QPtrList<ModuleInfo> list;
+ TQPtrList<ModuleInfo> list;
SearchEngine *e;
for(e = moduleList.first(); e != 0; e = moduleList.next())
@@ -929,9 +929,9 @@ QPtrList<ModuleInfo> KBabelDictBox::moduleInfos()
}
-QPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(QWidget *parent)
+TQPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(TQWidget *parent)
{
- QPtrList<PrefWidget> list;
+ TQPtrList<PrefWidget> list;
list.setAutoDelete(false);
SearchEngine *e;
@@ -945,7 +945,7 @@ QPtrList<PrefWidget> KBabelDictBox::modPrefWidgets(QWidget *parent)
}
-void KBabelDictBox::showResult(QListViewItem *item)
+void KBabelDictBox::showResult(TQListViewItem *item)
{
ResultListItem *resultItem = static_cast<ResultListItem*>(item);
@@ -979,14 +979,14 @@ void KBabelDictBox::showResult(QListViewItem *item)
else
{
// FIXME: what about plural forms?
- origView->setText(QStyleSheet::convertFromPlainText(result->found.first()));
+ origView->setText(TQStyleSheet::convertFromPlainText(result->found.first()));
translationView->setText(
- QStyleSheet::convertFromPlainText(result->translation));
+ TQStyleSheet::convertFromPlainText(result->translation));
}
if(result->descriptions.count() > 0)
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
TranslationInfo *info=it.current();
if(info)
{
@@ -1030,7 +1030,7 @@ void KBabelDictBox::showResult(QListViewItem *item)
moreButton->setEnabled((result->descriptions.count() > 1));
- currentLabel->setText(QString::number(currentResult+1));
+ currentLabel->setText(TQString::number(currentResult+1));
prevButton->setEnabled(currentResult > 0);
nextButton->setEnabled(currentResult+1 < total);
@@ -1040,7 +1040,7 @@ void KBabelDictBox::showResult(QListViewItem *item)
void KBabelDictBox::nextResult()
{
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
item=item->itemBelow();
@@ -1054,7 +1054,7 @@ void KBabelDictBox::nextResult()
void KBabelDictBox::prevResult()
{
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
item=item->itemAbove();
@@ -1077,7 +1077,7 @@ void KBabelDictBox::addResult(const SearchResult* result)
return;
}
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
int index=0;
if(item)
{
@@ -1086,7 +1086,7 @@ void KBabelDictBox::addResult(const SearchResult* result)
new ResultListItem(resultListView, *result,e->usesRichTextResults());
total++;
- totalResultsLabel->setText(QString::number(total));
+ totalResultsLabel->setText(TQString::number(total));
if(total==1)
{
@@ -1108,8 +1108,8 @@ void KBabelDictBox::clear()
dateLabel->setText("");
locationLabel->setText("");
translatorLabel->setText("");
- currentLabel->setText(QString::number(0));
- totalResultsLabel->setText(QString::number(0));
+ currentLabel->setText(TQString::number(0));
+ totalResultsLabel->setText(TQString::number(0));
origView->setText("");
translationView->setText("");
currentResult=0;
@@ -1150,13 +1150,13 @@ void KBabelDictBox::nextInfo()
TranslationInfo *info;
if(currentInfo == (int)result->descriptions.count())
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
info = it.current();
currentInfo = 0;
}
else
{
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
for(int i=0; i < currentInfo; i++)
{
++it;
@@ -1199,7 +1199,7 @@ void KBabelDictBox::nextInfo()
void KBabelDictBox::showListOnly()
{
int h=resultSplitter->height();
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes.append(1);
sizes.append(h-1);
resultSplitter->setSizes(sizes);
@@ -1208,7 +1208,7 @@ void KBabelDictBox::showListOnly()
void KBabelDictBox::showDetailsOnly()
{
int h=resultSplitter->height();
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes.append(h-1);
sizes.append(h);
resultSplitter->setSizes(sizes);
@@ -1234,7 +1234,7 @@ void KBabelDictBox::about()
if(aboutData)
{
- QString text = aboutData->programName() + " " +
+ TQString text = aboutData->programName() + " " +
aboutData->version() + "\n";
text += "\n"+aboutData->shortDescription()+"\n";
@@ -1258,7 +1258,7 @@ void KBabelDictBox::about()
.arg(aboutData->bugAddress()) +"\n";
}
- QLabel *label = new QLabel(text,0);
+ TQLabel *label = new TQLabel(text,0);
page->addWidget(label);
int authorCount = aboutData->authors().count();
@@ -1269,10 +1269,10 @@ void KBabelDictBox::about()
else
text=i18n("Authors:");
- label = new QLabel(text,0);
+ label = new TQLabel(text,0);
page->addWidget(label);
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for(it = aboutData->authors().begin();
it != aboutData->authors().end(); ++it)
{
@@ -1284,10 +1284,10 @@ void KBabelDictBox::about()
if(creditsCount)
{
text = i18n("Thanks to:");
- label = new QLabel(text,0);
+ label = new TQLabel(text,0);
page->addWidget(label);
- QValueList<KAboutPerson>::ConstIterator it;
+ TQValueList<KAboutPerson>::ConstIterator it;
for(it = aboutData->credits().begin();
it != aboutData->credits().end(); ++it)
{
@@ -1299,14 +1299,14 @@ void KBabelDictBox::about()
}
else
{
- QString text = i18n("No information available.");
- QLabel *label = new QLabel(text,0);
+ TQString text = i18n("No information available.");
+ TQLabel *label = new TQLabel(text,0);
page->addWidget(label);
}
}
- aboutDlg->setInitialSize(QSize(400,1));
+ aboutDlg->setInitialSize(TQSize(400,1));
aboutDlg->exec();
delete aboutDlg;
@@ -1321,7 +1321,7 @@ void KBabelDictBox::aboutActiveModule()
aboutModule(engine->id());
}
-void KBabelDictBox::aboutModule(const QString& id)
+void KBabelDictBox::aboutModule(const TQString& id)
{
SearchEngine *e;
@@ -1360,12 +1360,12 @@ void KBabelDictBox::slotStopSearch()
stopSearch();
}
-void KBabelDictBox::slotStartSearch(const QString& text)
+void KBabelDictBox::slotStartSearch(const TQString& text)
{
startSearch(text);
}
-void KBabelDictBox::setEditedPackage(const QString& name)
+void KBabelDictBox::setEditedPackage(const TQString& name)
{
SearchEngine *e;
@@ -1376,7 +1376,7 @@ void KBabelDictBox::setEditedPackage(const QString& name)
}
-void KBabelDictBox::setEditedFile(const QString& path)
+void KBabelDictBox::setEditedFile(const TQString& path)
{
SearchEngine *e;
@@ -1386,8 +1386,8 @@ void KBabelDictBox::setEditedFile(const QString& path)
}
}
-void KBabelDictBox::setLanguage(const QString& languageCode,
- const QString& languageName)
+void KBabelDictBox::setLanguage(const TQString& languageCode,
+ const TQString& languageName)
{
SearchEngine *e;
@@ -1415,11 +1415,11 @@ void KBabelDictBox::copy()
}
}
-QString KBabelDictBox::translation()
+TQString KBabelDictBox::translation()
{
- QString trans;
+ TQString trans;
- QListViewItem *item=resultListView->selectedItem();
+ TQListViewItem *item=resultListView->selectedItem();
if(item)
{
ResultListItem *r=static_cast<ResultListItem*>(item);
@@ -1439,7 +1439,7 @@ QString KBabelDictBox::translation()
return trans;
}
-void KBabelDictBox::setRMBMenu(QPopupMenu *popup)
+void KBabelDictBox::setRMBMenu(TQPopupMenu *popup)
{
if(popup)
{
@@ -1447,7 +1447,7 @@ void KBabelDictBox::setRMBMenu(QPopupMenu *popup)
popup->insertSeparator();
editFileIndex = popup->insertItem(i18n("Edit File")
- , this, SLOT(editFile()));
+ , this, TQT_SLOT(editFile()));
popup->setItemEnabled(editFileIndex,false);
KContextMenuManager::insert(origView,popup);
@@ -1474,9 +1474,9 @@ bool KBabelDictBox::hasSelectedText() const
return have;
}
-QString KBabelDictBox::selectedText() const
+TQString KBabelDictBox::selectedText() const
{
- QString text;
+ TQString text;
if(origView->hasSelectedText())
text=origView->selectedText();
else if(translationView->hasSelectedText())
@@ -1487,10 +1487,10 @@ QString KBabelDictBox::selectedText() const
-void KBabelDictBox::configure(const QString& id, bool modal)
+void KBabelDictBox::configure(const TQString& id, bool modal)
{
- QWidget* w = prefDialogs[id];
+ TQWidget* w = prefDialogs[id];
if(w)
{
KWin::setActiveWindow(w->winId());
@@ -1502,23 +1502,23 @@ void KBabelDictBox::configure(const QString& id, bool modal)
{
if(e->id() == id)
{
- QString caption = i18n("Configure Dictionary %1").arg(e->name());
+ TQString caption = i18n("Configure Dictionary %1").arg(e->name());
KDialogBase *dialog = new KDialogBase(this,"prefDialog"
, modal, caption
, KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel|
KDialogBase::Default);
- QWhatsThis::add(dialog,"");
+ TQWhatsThis::add(dialog,"");
PrefWidget *prefWidget = e->preferencesWidget(dialog);
dialog->setMainWidget(prefWidget);
- connect(dialog, SIGNAL(okClicked()),prefWidget,SLOT(apply()));
- connect(dialog, SIGNAL(applyClicked()),prefWidget,SLOT(apply()));
- connect(dialog, SIGNAL(defaultClicked()),prefWidget,SLOT(standard()));
- connect(dialog, SIGNAL(cancelClicked()),prefWidget,SLOT(cancel()));
+ connect(dialog, TQT_SIGNAL(okClicked()),prefWidget,TQT_SLOT(apply()));
+ connect(dialog, TQT_SIGNAL(applyClicked()),prefWidget,TQT_SLOT(apply()));
+ connect(dialog, TQT_SIGNAL(defaultClicked()),prefWidget,TQT_SLOT(standard()));
+ connect(dialog, TQT_SIGNAL(cancelClicked()),prefWidget,TQT_SLOT(cancel()));
- connect(dialog, SIGNAL(finished()),this,SLOT(destroyConfigDialog()));
+ connect(dialog, TQT_SIGNAL(finished()),this,TQT_SLOT(destroyConfigDialog()));
prefDialogs.insert(id,dialog);
@@ -1534,7 +1534,7 @@ void KBabelDictBox::configure(const QString& id, bool modal)
void KBabelDictBox::destroyConfigDialog()
{
- const QObject *obj = sender();
+ const TQObject *obj = sender();
if(obj && obj->inherits("KDialogBase"))
{
KDialogBase *dialog = (KDialogBase*)obj;
@@ -1542,7 +1542,7 @@ void KBabelDictBox::destroyConfigDialog()
{
dialog->delayedDestruct();
- QDictIterator<QWidget> it(prefDialogs);
+ TQDictIterator<TQWidget> it(prefDialogs);
while(it.current() != dialog)
{
++it;
@@ -1553,7 +1553,7 @@ void KBabelDictBox::destroyConfigDialog()
}
}
-void KBabelDictBox::edit(const QString& id)
+void KBabelDictBox::edit(const TQString& id)
{
SearchEngine *e;
@@ -1579,8 +1579,8 @@ void KBabelDictBox::edit()
engine->edit();
}
-void KBabelDictBox::setTextChanged(const QStringList& orig,
- const QString& translation, uint pluralForm, const QString& description)
+void KBabelDictBox::setTextChanged(const TQStringList& orig,
+ const TQString& translation, uint pluralForm, const TQString& description)
{
SearchEngine *e;
@@ -1591,7 +1591,7 @@ void KBabelDictBox::setTextChanged(const QStringList& orig,
}
-void KBabelDictBox::wheelEvent(QWheelEvent *we)
+void KBabelDictBox::wheelEvent(TQWheelEvent *we)
{
if(we->delta() > 0)
{
@@ -1605,18 +1605,18 @@ void KBabelDictBox::wheelEvent(QWheelEvent *we)
we->accept();
}
-bool KBabelDictBox::eventFilter(QObject *o, QEvent *e)
+bool KBabelDictBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(e->type() == QEvent::Wheel)
+ if(e->type() == TQEvent::Wheel)
{
- QWheelEvent *we = static_cast<QWheelEvent*>(e);
+ TQWheelEvent *we = static_cast<TQWheelEvent*>(e);
if(we)
{
wheelEvent(we);
return true;
}
}
- else if(e->type() == QEvent::Resize && o == resultListView)
+ else if(e->type() == TQEvent::Resize && o == resultListView)
{
if(resultListView->height() < 2)
{
@@ -1655,7 +1655,7 @@ void KBabelDictBox::editFile()
if(!result->descriptions.isEmpty())
{
TranslationInfo *info;
- QPtrListIterator<TranslationInfo> it(result->descriptions);
+ TQPtrListIterator<TranslationInfo> it(result->descriptions);
for(int i=0; i < currentInfo; i++)
{
++it;
@@ -1664,8 +1664,8 @@ void KBabelDictBox::editFile()
if(!info->filePath.isEmpty())
{
- QString url = info->filePath;
- QString msgid;
+ TQString url = info->filePath;
+ TQString msgid;
if( item->richText() )
{
@@ -1685,8 +1685,8 @@ void KBabelDictBox::editFile()
{
kdDebug(KBABELDICT) << "kbabel is not registered" << endl;
- QString error;
- QStringList argList;
+ TQString error;
+ TQStringList argList;
argList.append("--nosplash");
argList.append("--gotomsgid");
argList.append(msgid.local8Bit());
@@ -1702,11 +1702,11 @@ void KBabelDictBox::editFile()
}
else
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << url.utf8() << msgid.utf8();
if (!dcop->send("kbabel", "KBabelIFace"
- , "gotoFileEntry(QCString,QCString)",data))
+ , "gotoFileEntry(TQCString,TQCString)",data))
{
KMessageBox::sorry(this
,i18n("There was an error using DCOP."));
@@ -1717,7 +1717,7 @@ void KBabelDictBox::editFile()
}
}
-void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p)
+void KBabelDictBox::showContextMenu(KListView *,TQListViewItem *,const TQPoint& p)
{
if(rmbPopup)
{
@@ -1726,8 +1726,8 @@ void KBabelDictBox::showContextMenu(KListView *,QListViewItem *,const QPoint& p)
}
-bool KBabelDictBox::messagesForPackage(const QString& package
- , QValueList<DiffEntry>& resultList, QString& error)
+bool KBabelDictBox::messagesForPackage(const TQString& package
+ , TQValueList<DiffEntry>& resultList, TQString& error)
{
setActiveModule("dbsearchengine");
SearchEngine *engine = moduleList.at(active);
@@ -1740,7 +1740,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package
return false;
}
- QValueList<SearchResult> rList;
+ TQValueList<SearchResult> rList;
SearchFilter* filter = new SearchFilter();
filter->setLocation(package);
@@ -1749,7 +1749,7 @@ bool KBabelDictBox::messagesForPackage(const QString& package
if(success)
{
- QValueList<SearchResult>::Iterator it;
+ TQValueList<SearchResult>::Iterator it;
for(it=rList.begin(); it != rList.end(); ++it)
{
// FIXME: what about plural forms?
diff --git a/kbabel/kbabeldict/kbabeldictbox.h b/kbabel/kbabeldict/kbabeldictbox.h
index 8168786e..2c3992f1 100644
--- a/kbabel/kbabeldict/kbabeldictbox.h
+++ b/kbabel/kbabeldict/kbabeldictbox.h
@@ -37,10 +37,10 @@
#include "searchengine.h"
#include "catalog.h"
-#include <qdict.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqdict.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
class KListView;
class QLabel;
@@ -53,36 +53,36 @@ class QToolButton;
struct ModuleInfo
{
- QString id;
- QString name;
+ TQString id;
+ TQString name;
bool editable;
};
-class KDE_EXPORT KBabelDictBox : public QWidget, virtual public KBabelDictIFace
+class KDE_EXPORT KBabelDictBox : public TQWidget, virtual public KBabelDictIFace
{
Q_OBJECT
public:
- KBabelDictBox( QWidget* parent = 0, const char* name = 0
+ KBabelDictBox( TQWidget* parent = 0, const char* name = 0
, WFlags fl = 0 );
~KBabelDictBox();
/** @returns ids of available modules */
- virtual QStringList modules();
+ virtual TQStringList modules();
/** @returns (translated) names of available modules */
- QStringList moduleNames();
+ TQStringList moduleNames();
/**
* @returns a list with information about the available modules
* Take care about, that you have to delete the items by yourself.
*/
- QPtrList<ModuleInfo> moduleInfos();
+ TQPtrList<ModuleInfo> moduleInfos();
/** @returns preferencesWidgets of modules */
- QPtrList<PrefWidget> modPrefWidgets(QWidget* parent);
+ TQPtrList<PrefWidget> modPrefWidgets(TQWidget* parent);
int activeModule();
bool activeModuleEditable();
@@ -95,15 +95,15 @@ public:
void nextResult();
void prevResult();
- void startSearch(const QString);
- void startTranslationSearch(const QString);
- void startDelayedSearch(const QString);
- void startDelayedTranslationSearch(const QString);
- QString translate(const QString);
- QString searchTranslation(const QString, int& score);
- QString fuzzyTranslation(const QString, int& score);
+ void startSearch(const TQString);
+ void startTranslationSearch(const TQString);
+ void startDelayedSearch(const TQString);
+ void startDelayedTranslationSearch(const TQString);
+ TQString translate(const TQString);
+ TQString searchTranslation(const TQString, int& score);
+ TQString fuzzyTranslation(const TQString, int& score);
void stopSearch();
- void setActiveModule(QString name);
+ void setActiveModule(TQString name);
/**
* @returns true, if a search is active at the moment
@@ -120,7 +120,7 @@ public:
* Saves the settings of the given module
* in the given config object.
*/
- void saveSettings(const QString& moduleId, KConfigBase *config);
+ void saveSettings(const TQString& moduleId, KConfigBase *config);
/**
* Reads the settings including the settings of the different modules
@@ -132,20 +132,20 @@ public:
* Reads the settings of the given module
* from the given config object.
*/
- void readSettings(const QString& moduleId, KConfigBase *config);
+ void readSettings(const TQString& moduleId, KConfigBase *config);
/** @returns the translation of the current search result */
- QString translation();
+ TQString translation();
bool hasSelectedText() const;
- QString selectedText() const;
+ TQString selectedText() const;
- void setRMBMenu(QPopupMenu *popup);
+ void setRMBMenu(TQPopupMenu *popup);
- virtual bool eventFilter(QObject *, QEvent*);
+ virtual bool eventFilter(TQObject *, TQEvent*);
/**
@@ -153,37 +153,37 @@ public:
* from dbsearchengine. When dbsearchengine allows multiple access to
* the database this will get removed.
*/
- bool messagesForPackage(const QString& package
- , QValueList<KBabel::DiffEntry>& resultList, QString& error);
+ bool messagesForPackage(const TQString& package
+ , TQValueList<KBabel::DiffEntry>& resultList, TQString& error);
public slots:
virtual void setActiveModule(int);
- void slotStartSearch(const QString&);
+ void slotStartSearch(const TQString&);
void slotStopSearch();
void slotNextResult();
void slotPrevResult();
void about();
- void aboutModule(const QString& moduleID);
+ void aboutModule(const TQString& moduleID);
void aboutActiveModule();
/**
* sets the name of the package currently edited
*/
- void setEditedPackage(const QString& packageName);
+ void setEditedPackage(const TQString& packageName);
/**
* sets the filepath of the package currently edited
*/
- void setEditedFile(const QString& path);
+ void setEditedFile(const TQString& path);
/** sets the language code to use */
- void setLanguage(const QString& languageCode
- , const QString& languageName);
+ void setLanguage(const TQString& languageCode
+ , const TQString& languageName);
- void setTextChanged(const QStringList& orig, const QString& translation,
- uint pluralForm, const QString& description);
+ void setTextChanged(const TQStringList& orig, const TQString& translation,
+ uint pluralForm, const TQString& description);
/**
* if text is marked, copy this into the clipboard, otherwise
@@ -191,8 +191,8 @@ public slots:
*/
void copy();
- void configure(const QString& moduleID, bool modal=false);
- void edit(const QString& moduleID);
+ void configure(const TQString& moduleID, bool modal=false);
+ void edit(const TQString& moduleID);
void edit();
void clear();
@@ -202,11 +202,11 @@ signals:
void searchStarted();
void searchStopped();
void progressed(int);
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
void activeModuleChanged(int);
void activeModuleChanged(bool editable);
- void errorInModule(const QString& error);
+ void errorInModule(const TQString& error);
/**
* emitted when either the order
@@ -215,14 +215,14 @@ signals:
void modulesChanged();
protected slots:
- void showResult(QListViewItem*);
+ void showResult(TQListViewItem*);
void addResult(const SearchResult*);
void nextInfo();
void showDetailsOnly();
void showListOnly();
void clearModuleResults();
void editFile();
- void showContextMenu(KListView *, QListViewItem *, const QPoint&);
+ void showContextMenu(KListView *, TQListViewItem *, const TQPoint&);
/**
* This slots gets connected to a SearchEngine's searchStopped() signal,
@@ -239,7 +239,7 @@ protected slots:
void destroyConfigDialog();
protected:
- virtual void wheelEvent(QWheelEvent*);
+ virtual void wheelEvent(TQWheelEvent*);
private:
/**
@@ -247,36 +247,36 @@ private:
*/
void registerModule( SearchEngine* module);
- QPtrList<SearchEngine> moduleList;
+ TQPtrList<SearchEngine> moduleList;
int active;
int currentResult;
int currentInfo;
int total;
/** stores a string to be used with delayed search */
- QString searchText;
-
- QDict<QWidget> prefDialogs;
-
- QLabel *translatorLabel;
- QLabel *locationLabel;
- QLabel *totalResultsLabel;
- QLabel *currentLabel;
- QLabel *dateLabel;
- QPushButton *moreButton;
- QPushButton *nextButton;
- QPushButton *prevButton;
- QTextView *origView;
- QTextView *translationView;
- QSplitter *viewContainer;
+ TQString searchText;
+
+ TQDict<TQWidget> prefDialogs;
+
+ TQLabel *translatorLabel;
+ TQLabel *locationLabel;
+ TQLabel *totalResultsLabel;
+ TQLabel *currentLabel;
+ TQLabel *dateLabel;
+ TQPushButton *moreButton;
+ TQPushButton *nextButton;
+ TQPushButton *prevButton;
+ TQTextView *origView;
+ TQTextView *translationView;
+ TQSplitter *viewContainer;
KListView *resultListView;
- QSplitter *resultSplitter;
+ TQSplitter *resultSplitter;
- QToolButton *listButton;
- QToolButton *detailButton;
+ TQToolButton *listButton;
+ TQToolButton *detailButton;
int editFileIndex;
- QGuardedPtr<QPopupMenu> rmbPopup;
+ TQGuardedPtr<TQPopupMenu> rmbPopup;
};
#endif // KBABELDICTBOX_H
diff --git a/kbabel/kbabeldict/kbabeldictiface.h b/kbabel/kbabeldict/kbabeldictiface.h
index 0b98a565..d576d4c5 100644
--- a/kbabel/kbabeldict/kbabeldictiface.h
+++ b/kbabel/kbabeldict/kbabeldictiface.h
@@ -35,17 +35,17 @@
#define KBABELDICTINTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KBabelDictIFace : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual QStringList modules() = 0;
- virtual ASYNC setActiveModule(QString modulename) = 0;
+ virtual TQStringList modules() = 0;
+ virtual ASYNC setActiveModule(TQString modulename) = 0;
- virtual ASYNC startSearch(const QString searchstring) = 0;
+ virtual ASYNC startSearch(const TQString searchstring) = 0;
virtual ASYNC stopSearch() = 0;
virtual ASYNC nextResult()=0;
diff --git a/kbabel/kbabeldict/kbabeldictview.cpp b/kbabel/kbabeldict/kbabeldictview.cpp
index 26afd981..b5be8399 100644
--- a/kbabel/kbabeldict/kbabeldictview.cpp
+++ b/kbabel/kbabeldict/kbabeldictview.cpp
@@ -37,17 +37,17 @@
#include "searchengine.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qwidgetstack.h>
-#include <qsplitter.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqwidgetstack.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
#include <kcombobox.h>
#include <kconfig.h>
@@ -64,37 +64,37 @@
* Constructs a KBabelDictView which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+KBabelDictView::KBabelDictView( TQWidget* parent, const char* name, WFlags fl )
+ : TQWidget( parent, name, fl )
{
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
mainLayout->setSpacing(KDialog::spacingHint());
mainLayout->setMargin(KDialog::marginHint());
- splitter = new QSplitter(this);
+ splitter = new TQSplitter(this);
mainLayout->addWidget(splitter);
- QWidget *w = new QWidget(splitter);
- QVBoxLayout *wLayout= new QVBoxLayout(w);
+ TQWidget *w = new TQWidget(splitter);
+ TQVBoxLayout *wLayout= new TQVBoxLayout(w);
wLayout->setSpacing(KDialog::spacingHint());
wLayout->setMargin(KDialog::marginHint());
- QHBoxLayout *hbox = new QHBoxLayout(wLayout);
- QLabel *label = new QLabel(i18n("Search in module:"), w);
+ TQHBoxLayout *hbox = new TQHBoxLayout(wLayout);
+ TQLabel *label = new TQLabel(i18n("Search in module:"), w);
hbox->addWidget(label);
moduleCombo = new KComboBox(w);
hbox->addWidget(moduleCombo);
- QWidget *temp = new QWidget(w);
+ TQWidget *temp = new TQWidget(w);
hbox->addWidget(temp);
hbox->setStretchFactor(temp,2);
- editButton = new QPushButton(i18n("&Edit"),w);
+ editButton = new TQPushButton(i18n("&Edit"),w);
editButton->setEnabled(false);
hbox->addWidget(editButton);
// added a button "clear search" here
- hbox = new QHBoxLayout(wLayout);
- QPushButton* clearButton = new QPushButton(w);
+ hbox = new TQHBoxLayout(wLayout);
+ TQPushButton* clearButton = new TQPushButton(w);
clearButton->setFlat(true);
clearButton->setPixmap(SmallIcon("locationbar_erase"));
hbox->addWidget(clearButton);
@@ -102,13 +102,13 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
textEdit->setFocus();
hbox->addWidget(textEdit);
- hbox = new QHBoxLayout(wLayout);
- startButton = new QPushButton(i18n("&Start Search"),w);
+ hbox = new TQHBoxLayout(wLayout);
+ startButton = new TQPushButton(i18n("&Start Search"),w);
hbox->addWidget(startButton);
- inTransButton = new QCheckBox(i18n("Sea&rch in translations"),w);
+ inTransButton = new TQCheckBox(i18n("Sea&rch in translations"),w);
hbox->addWidget(inTransButton);
hbox->addStretch(1);
- stopButton = new QPushButton(i18n("S&top"),w);
+ stopButton = new TQPushButton(i18n("S&top"),w);
stopButton->setEnabled(false);
hbox->addWidget(stopButton);
@@ -117,15 +117,15 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
dictBox = new KBabelDictBox(w,"kbabeldictbox");
wLayout->addWidget(dictBox);
- prefWidget = new QWidget(splitter);
- QVBoxLayout *tempLayout= new QVBoxLayout(prefWidget);
+ prefWidget = new TQWidget(splitter);
+ TQVBoxLayout *tempLayout= new TQVBoxLayout(prefWidget);
tempLayout->setSpacing(KDialog::spacingHint());
tempLayout->setMargin(KDialog::marginHint());
- label = new QLabel(i18n("Settings:"),prefWidget);
+ label = new TQLabel(i18n("Settings:"),prefWidget);
tempLayout->addWidget(label);
- prefStack = new QWidgetStack(prefWidget);
+ prefStack = new TQWidgetStack(prefWidget);
tempLayout->addWidget(prefStack);
tempLayout->addStretch(1);
@@ -133,10 +133,10 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
dictBox->readSettings(config);
dictBox->setAutoUpdateOptions(true);
- QStringList modules = dictBox->moduleNames();
+ TQStringList modules = dictBox->moduleNames();
moduleCombo->insertStringList(modules);
- QPtrList<PrefWidget> prefs = dictBox->modPrefWidgets(prefStack);
+ TQPtrList<PrefWidget> prefs = dictBox->modPrefWidgets(prefStack);
prefs.setAutoDelete(false);
PrefWidget *p;
@@ -152,31 +152,31 @@ KBabelDictView::KBabelDictView( QWidget* parent, const char* name, WFlags fl )
moduleCombo->setCurrentItem(active);
- QHBox *h = new QHBox(this);
+ TQHBox *h = new TQHBox(this);
h->setSpacing(KDialog::spacingHint());
mainLayout->addWidget(h);
- progressLabel = new QLabel(h);
+ progressLabel = new TQLabel(h);
progressBar = new KProgress(h);
- connect(textEdit,SIGNAL(returnPressed()),startButton,SLOT(animateClick()));
- connect(startButton,SIGNAL(clicked()),this, SLOT(startSearch()));
- connect(stopButton, SIGNAL(clicked()), dictBox,SLOT(slotStopSearch()));
- connect(editButton, SIGNAL(clicked()), dictBox, SLOT(edit()));
- connect(dictBox, SIGNAL(searchStarted()), this, SLOT(searchStarted()));
- connect(dictBox, SIGNAL(searchStopped()), this, SLOT(searchStopped()));
- connect(dictBox, SIGNAL(progressed(int)), progressBar, SLOT(setProgress(int)));
- connect(dictBox, SIGNAL(activeModuleChanged(bool))
- , editButton, SLOT(setEnabled(bool)));
+ connect(textEdit,TQT_SIGNAL(returnPressed()),startButton,TQT_SLOT(animateClick()));
+ connect(startButton,TQT_SIGNAL(clicked()),this, TQT_SLOT(startSearch()));
+ connect(stopButton, TQT_SIGNAL(clicked()), dictBox,TQT_SLOT(slotStopSearch()));
+ connect(editButton, TQT_SIGNAL(clicked()), dictBox, TQT_SLOT(edit()));
+ connect(dictBox, TQT_SIGNAL(searchStarted()), this, TQT_SLOT(searchStarted()));
+ connect(dictBox, TQT_SIGNAL(searchStopped()), this, TQT_SLOT(searchStopped()));
+ connect(dictBox, TQT_SIGNAL(progressed(int)), progressBar, TQT_SLOT(setProgress(int)));
+ connect(dictBox, TQT_SIGNAL(activeModuleChanged(bool))
+ , editButton, TQT_SLOT(setEnabled(bool)));
- connect(dictBox, SIGNAL(progressStarts(const QString&))
- , this, SLOT(progressStarted(const QString&)));
- connect(dictBox, SIGNAL(progressEnds()), this, SLOT(progressStopped()));
+ connect(dictBox, TQT_SIGNAL(progressStarts(const TQString&))
+ , this, TQT_SLOT(progressStarted(const TQString&)));
+ connect(dictBox, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(progressStopped()));
- connect(moduleCombo, SIGNAL(activated(int)),
- dictBox, SLOT(setActiveModule(int)));
- connect(dictBox, SIGNAL(activeModuleChanged(int))
- , this, SLOT(switchModule(int)));
- connect(clearButton, SIGNAL(clicked()), this, SLOT(slotClearSearch()));
+ connect(moduleCombo, TQT_SIGNAL(activated(int)),
+ dictBox, TQT_SLOT(setActiveModule(int)));
+ connect(dictBox, TQT_SIGNAL(activeModuleChanged(int))
+ , this, TQT_SLOT(switchModule(int)));
+ connect(clearButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearSearch()));
}
/*
@@ -194,7 +194,7 @@ KBabelDictView::~KBabelDictView()
*/
void KBabelDictView::startSearch()
{
- QString text = textEdit->text();
+ TQString text = textEdit->text();
if(!text.isEmpty())
{
@@ -219,7 +219,7 @@ void KBabelDictView::progressStopped()
stopButton->setEnabled(false);
}
-void KBabelDictView::progressStarted(const QString& msg)
+void KBabelDictView::progressStarted(const TQString& msg)
{
progressLabel->setText(msg);
startButton->setEnabled(false);
diff --git a/kbabel/kbabeldict/kbabeldictview.h b/kbabel/kbabeldict/kbabeldictview.h
index 510936c4..838d3ba3 100644
--- a/kbabel/kbabeldict/kbabeldictview.h
+++ b/kbabel/kbabeldict/kbabeldictview.h
@@ -35,7 +35,7 @@
#ifndef KBABELDICTVIEW_H
#define KBABELDICTVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -48,12 +48,12 @@ class QWidgetStack;
class KBabelDictBox;
-class KBabelDictView : public QWidget
+class KBabelDictView : public TQWidget
{
Q_OBJECT
public:
- KBabelDictView( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ KBabelDictView( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KBabelDictView();
bool prefVisible();
@@ -69,7 +69,7 @@ private slots:
void searchStarted();
void switchModule(int);
void progressStopped();
- void progressStarted(const QString&);
+ void progressStarted(const TQString&);
void slotClearSearch();
private:
@@ -77,16 +77,16 @@ private:
KComboBox *moduleCombo;
KLineEdit *textEdit;
- QCheckBox *inTransButton;
- QPushButton *startButton;
- QPushButton *stopButton;
- QPushButton *editButton;
- QWidgetStack *prefStack;
+ TQCheckBox *inTransButton;
+ TQPushButton *startButton;
+ TQPushButton *stopButton;
+ TQPushButton *editButton;
+ TQWidgetStack *prefStack;
KProgress *progressBar;
- QLabel *progressLabel;
- QSplitter *splitter;
+ TQLabel *progressLabel;
+ TQSplitter *splitter;
- QWidget *prefWidget;
+ TQWidget *prefWidget;
};
#endif // KBABELDICTVIEW_H
diff --git a/kbabel/kbabeldict/kbabelsplash.cpp b/kbabel/kbabeldict/kbabelsplash.cpp
index 16ac2352..7b62f31e 100644
--- a/kbabel/kbabeldict/kbabelsplash.cpp
+++ b/kbabel/kbabeldict/kbabelsplash.cpp
@@ -28,36 +28,36 @@
#include "kbabelsplash.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qevent.h>
-#include <qstring.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqevent.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
#include <kstandarddirs.h>
KBabelSplash* KBabelSplash::instance = 0;
-KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
- : QVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
+KBabelSplash::KBabelSplash( TQWidget* parent, const char* name )
+ : TQVBox( parent, name, WType_Dialog|WShowModal|WStyle_Customize|WStyle_NoBorder|WDestructiveClose )
{
setMargin( 0 );
setSpacing( 0 );
- QLabel* picLabel = new QLabel( this );
- QPixmap pixmap;
+ TQLabel* picLabel = new TQLabel( this );
+ TQPixmap pixmap;
if( pixmap.load( locate( "data", "kbabel/pics/splash.png" ) ) )
picLabel->setPixmap( pixmap );
- picLabel->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
+ picLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
// Set geometry, with support for Xinerama systems
- QRect r;
+ TQRect r;
r.setSize(sizeHint());
- int ps = QApplication::desktop()->primaryScreen();
- r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() );
+ int ps = TQApplication::desktop()->primaryScreen();
+ r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() );
setGeometry(r);
if( instance ) delete instance;
@@ -65,7 +65,7 @@ KBabelSplash::KBabelSplash( QWidget* parent, const char* name )
}
-void KBabelSplash::mousePressEvent( QMouseEvent* )
+void KBabelSplash::mousePressEvent( TQMouseEvent* )
{
close();
}
diff --git a/kbabel/kbabeldict/kbabelsplash.h b/kbabel/kbabeldict/kbabelsplash.h
index c10b4fec..c381d11b 100644
--- a/kbabel/kbabeldict/kbabelsplash.h
+++ b/kbabel/kbabeldict/kbabelsplash.h
@@ -30,7 +30,7 @@
#ifndef KBABELSPLASH_H
#define KBABELSPLASH_H
-#include <qvbox.h>
+#include <tqvbox.h>
class QLabel;
class QMouseEvent;
@@ -43,13 +43,13 @@ class KBabelSplash : public QVBox
Q_OBJECT
public:
- KBabelSplash( QWidget* parent = 0, const char* name = 0 );
+ KBabelSplash( TQWidget* parent = 0, const char* name = 0 );
~KBabelSplash() { instance = 0; }
static KBabelSplash* instance;
protected:
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
};
#endif
diff --git a/kbabel/kbabeldict/main.cpp b/kbabel/kbabeldict/main.cpp
index be6ca67e..c327196b 100644
--- a/kbabel/kbabeldict/main.cpp
+++ b/kbabel/kbabeldict/main.cpp
@@ -41,7 +41,7 @@
#include <kapplication.h>
#include <kwin.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "kbabeldict.h"
#include "kbabelsplash.h"
@@ -63,8 +63,8 @@ KBabelDictApplication::KBabelDictApplication()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QTimer timer;
- QWidget *splash=0;
+ TQTimer timer;
+ TQWidget *splash=0;
bool showSplash=args->isSet("splash");
if(showSplash)
{
@@ -91,8 +91,8 @@ KBabelDictApplication::KBabelDictApplication()
KApplication::restoreOverrideCursor();
}
- QObject::connect( topLevel, SIGNAL( destroyed() ),
- this, SLOT( quit() ) );
+ TQObject::connect( topLevel, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( quit() ) );
}
KBabelDictApplication::~KBabelDictApplication()
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
index ac55335d..5c5c6a6d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.cpp
@@ -28,10 +28,10 @@
* your version. *
*/
-#include <qtextedit.h>
-#include <qprogressdialog.h>
+#include <tqtextedit.h>
+#include <tqprogressdialog.h>
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kdebug.h>
@@ -52,17 +52,17 @@
#include <sys/time.h>
#include "preferenceswidget.h"
#include "dbse_factory.h"
-#include <qprogressbar.h>
-#include <qpushbutton.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kconfig.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qmemarray.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqmemarray.h>
#include "database.h"
@@ -72,7 +72,7 @@
using namespace KBabel;
-KDBSearchEngine::KDBSearchEngine (QObject * parent, const char *name):
+KDBSearchEngine::KDBSearchEngine (TQObject * parent, const char *name):
SearchEngine (parent, name)
{
edited = "unknown";
@@ -82,8 +82,8 @@ SearchEngine (parent, name)
dbOpened = false;
dbname = "";
lasterror = i18n ("No error");
- connect (this, SIGNAL (hasError (const QString &)),
- SLOT (setLastError (const QString &)));
+ connect (this, TQT_SIGNAL (hasError (const TQString &)),
+ TQT_SLOT (setLastError (const TQString &)));
IAmReady = true; // I don't know if it is a good idea, no DB loaded!!!
@@ -104,7 +104,7 @@ KDBSearchEngine::~KDBSearchEngine ()
bool
-KDBSearchEngine::loadDatabase (QString database, bool noask = false)
+KDBSearchEngine::loadDatabase (TQString database, bool noask = false)
{
bool ret = true;
bool asked = false;
@@ -116,7 +116,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
dm = 0;
}
- QDir dir (database);
+ TQDir dir (database);
if (!dir.exists ())
{
if (asked
@@ -124,19 +124,19 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
i18n
("Database folder does not exist:\n%1\n"
"Do you want to create it now?").
- arg (database), QString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
+ arg (database), TQString::null, i18n("Create Folder"), i18n("Do Not Create")) ==
KMessageBox::Yes)
{
asked = true;
- QStringList dirList;
+ TQStringList dirList;
while (!dir.exists () && !dir.dirName ().isEmpty ())
{
dirList.prepend (dir.dirName ());
dir.setPath (dir.path () + "/..");
}
- for (QStringList::Iterator it = dirList.begin ();
+ for (TQStringList::Iterator it = dirList.begin ();
it != dirList.end (); ++it)
{
if (!dir.mkdir (*it))
@@ -161,10 +161,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (ret)
{
// test, if there are both of ,old and standard databases
- QString transFile = database + "/translations." + lang + ".db";
+ TQString transFile = database + "/translations." + lang + ".db";
- bool oldstuff = QFile::exists (transFile + ",old");
- bool newstuff = QFile::exists (transFile);
+ bool oldstuff = TQFile::exists (transFile + ",old");
+ bool newstuff = TQFile::exists (transFile);
if (oldstuff && newstuff)
{
@@ -188,11 +188,11 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KMessageBox::Yes)
{
// remove the new files
- QFile::remove (transFile);
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile);
+ TQFile::remove (database + "/wordsindex." + lang +
".db");
- QFile::remove (database + "/keysindex." + lang + ".db");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/keysindex." + lang + ".db");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db");
// rename the old files
@@ -216,12 +216,12 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
KURL (database + "/catalogsinfo." + lang +
".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang +
".db,old");
- QFile::remove (database + "/keysindex." + lang +
+ TQFile::remove (database + "/keysindex." + lang +
".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
}
@@ -241,10 +241,10 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
(database + "/catalogsinfo." + lang + ".db,old"),
KURL (database + "/catalogsinfo." + lang + ".db"), 0);
- QFile::remove (transFile + ",old");
- QFile::remove (database + "/wordsindex." + lang + ".db,old");
- QFile::remove (database + "/keysindex." + lang + ".db,old");
- QFile::remove (database + "/catalogsinfo." + lang +
+ TQFile::remove (transFile + ",old");
+ TQFile::remove (database + "/wordsindex." + lang + ".db,old");
+ TQFile::remove (database + "/keysindex." + lang + ".db,old");
+ TQFile::remove (database + "/catalogsinfo." + lang +
".db,old");
}
@@ -255,7 +255,7 @@ KDBSearchEngine::loadDatabase (QString database, bool noask = false)
if (asked
|| KMessageBox::questionYesNo (0,
i18n
- ("Database files not found.\nDo you want to create them now?"), QString::null, i18n("Create"), i18n("Do Not Create"))
+ ("Database files not found.\nDo you want to create them now?"), TQString::null, i18n("Create"), i18n("Do Not Create"))
== KMessageBox::Yes)
{
//fprintf(stderr,"SI\n");
@@ -312,7 +312,7 @@ KDBSearchEngine::setCaseSensitive (bool sensitive)
*/
void
-KDBSearchEngine::setRemoveCharString (QString chartoremove)
+KDBSearchEngine::setRemoveCharString (TQString chartoremove)
{
remchar = chartoremove;
}
@@ -336,12 +336,12 @@ KDBSearchEngine::isSearching () const
*/
int
-KDBSearchEngine::addSearchString (QString searchString, int rule)
+KDBSearchEngine::addSearchString (TQString searchString, int rule)
{
if (searching || scanInProgress)
return -1;
SearchEntry e;
- e.string = QString (searchString);
+ e.string = TQString (searchString);
e.rules = rule;
searchStringList.append (e);
return searchStringList.count ();
@@ -354,7 +354,7 @@ KDBSearchEngine::addSearchString (QString searchString, int rule)
*/
bool
-KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
+KDBSearchEngine::startSearch (const TQString & str, uint pluralForm,
const SearchFilter * filter)
{
@@ -376,7 +376,7 @@ KDBSearchEngine::startSearch (const QString & str, uint pluralForm,
}
bool
-KDBSearchEngine::startSearchInTranslation (QString s)
+KDBSearchEngine::startSearchInTranslation (TQString s)
{
if (autoUpdate)
@@ -418,8 +418,8 @@ KDBSearchEngine::openDb (bool noask = false)
bool
KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
- QValueList < SearchResult > &resultList,
- QString & error)
+ TQValueList < SearchResult > &resultList,
+ TQString & error)
{
int count = 0;
@@ -452,7 +452,7 @@ KDBSearchEngine::messagesForFilter (const SearchFilter * filter,
return false;
}
- QString package = filter->location ();
+ TQString package = filter->location ();
int step = (totalRecord / 30) + 1;
int ntra, nref;
@@ -544,17 +544,17 @@ KDBSearchEngine::repeat ()
kdDebug (0) << "No kdelibs.po found!" << endl;
- QProgressDialog *pd =
- new QProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
+ TQProgressDialog *pd =
+ new TQProgressDialog (i18n ("Looking for repetitions"), i18n ("Stop"),
100);
- connect (this, SIGNAL (progress (int)), pd, SLOT (setProgress (int)));
- connect (this, SIGNAL (finished ()), pd, SLOT (close ()));
- connect (pd, SIGNAL (cancelled ()), this, SLOT (stopSearch ()));
+ connect (this, TQT_SIGNAL (progress (int)), pd, TQT_SLOT (setProgress (int)));
+ connect (this, TQT_SIGNAL (finished ()), pd, TQT_SLOT (close ()));
+ connect (pd, TQT_SIGNAL (cancelled ()), this, TQT_SLOT (stopSearch ()));
- QString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
- QString id;
+ TQString txt = "// %1 repetitions, %2 translation(s)\ni18n(\"%3\");\n";
+ TQString id;
int min;
bool ok = false;
@@ -571,7 +571,7 @@ KDBSearchEngine::repeat ()
progressStarts (i18n ("Searching repeated string"));
- static QTextEdit *mle = new QTextEdit ();
+ static TQTextEdit *mle = new TQTextEdit ();
mle->clear ();
bool inlibs;
@@ -671,10 +671,10 @@ KDBSearchEngine::startSearchNow (int searchmode)
intra = searchmode & MD_IN_TRANSLATION;
- QString msgIdFound;
- QString msgId;
- QString msgStr;
- //QString msgIdRequested;
+ TQString msgIdFound;
+ TQString msgId;
+ TQString msgStr;
+ //TQString msgIdRequested;
SearchResult *aresult;
TranslationInfo *adescription;
SearchList searchList;
@@ -682,13 +682,13 @@ KDBSearchEngine::startSearchNow (int searchmode)
len = remchar.length ();
int n, m; //,word;
- QString *id;
+ TQString *id;
- QString mainRequest = searchStringList[0].string;
+ TQString mainRequest = searchStringList[0].string;
SearchList::Iterator it, it1;
- QString *idMod;
+ TQString *idMod;
bool foundSomething = false;
searchList = searchStringList; //Create a copy and modify it
@@ -705,7 +705,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
}
if (comm)
- idMod->replace (QRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
+ idMod->replace (TQRegExp ("\\_\\:.*\\\\n"), ""); //Read it from catalog !!! (NOT ONLY HERE)
if (norm)
@@ -728,7 +728,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Now we can browse the whole db or the "good keys"
- QValueList < KeyAndScore > goodkeys;
+ TQValueList < KeyAndScore > goodkeys;
int totalprogress;
bool gk = (searchmode == MD_GOOD_KEYS) || allkey;
@@ -807,7 +807,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
- msgId.replace (QRegExp ("\\_\\:.*\\\\n"), "");
+ msgId.replace (TQRegExp ("\\_\\:.*\\\\n"), "");
if (norm)
@@ -845,7 +845,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
//Remove context information from id found
if (comm)
msgId.
- replace (QRegExp ("\\_\\:.*\\\\n"),
+ replace (TQRegExp ("\\_\\:.*\\\\n"),
"");
@@ -878,7 +878,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
if (!foundExact && (rules & RegExp))
{
- QRegExp reg (*idMod);
+ TQRegExp reg (*idMod);
regexp = (reg.search (msgId) != -1);
}
else
@@ -996,7 +996,7 @@ KDBSearchEngine::startSearchNow (int searchmode)
*/
bool
-KDBSearchEngine::startSingleSearch (QString searchString,
+KDBSearchEngine::startSingleSearch (TQString searchString,
unsigned int pattern1Limit,
unsigned int /*pattern2Limit */ ,
bool inTranslation)
@@ -1013,7 +1013,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
- QRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
+ TQRegExp reg ("[a-zA-Z0-9_%" /*+remchar */ + regaddchar + "]+");
while ((in = reg.search (searchString, in + len)) != -1)
{
nw++;
@@ -1033,7 +1033,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
{
in = reg.search (searchString, in + len);
len = reg.matchedLength ();
- QString regToAdd = searchString;
+ TQString regToAdd = searchString;
regToAdd.replace (in, len, "[a-zA-Z0-9_%" + regaddchar + "]*");
regToAdd.append ("$");
regToAdd.prepend ("^");
@@ -1055,7 +1055,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
Start a search for a list of string
*/
-//bool KDBSearchEngine::startListSearch(QPtrList<QString> searchStrList)
+//bool KDBSearchEngine::startListSearch(TQPtrList<TQString> searchStrList)
//{
// searchStringList=searchStrList;
// return startSearchNow();
@@ -1067,7 +1067,7 @@ KDBSearchEngine::startSingleSearch (QString searchString,
void
-KDBSearchEngine::setLanguageCode (const QString & ll)
+KDBSearchEngine::setLanguageCode (const TQString & ll)
{
if (ll == lang)
return;
@@ -1079,8 +1079,8 @@ KDBSearchEngine::setLanguageCode (const QString & ll)
}
void
-KDBSearchEngine::setLanguage (const QString & languageCode,
- const QString & /*languageName */ )
+KDBSearchEngine::setLanguage (const TQString & languageCode,
+ const TQString & /*languageName */ )
{
setLanguageCode (languageCode);
}
@@ -1147,17 +1147,17 @@ KDBSearchEngine::saveSettings (KConfigBase * config)
void
KDBSearchEngine::readSettings (KConfigBase * config)
{
- QString newName;
+ TQString newName;
KConfigGroupSaver cgs (config, "KDBSearchEngine");
- QString defaultLang;
- QString oldLang = lang;
+ TQString defaultLang;
+ TQString oldLang = lang;
Defaults::Identity def;
defaultLang = def.languageCode ();
lang = config->readEntry ("Language", defaultLang);
- QString defaultDir;
+ TQString defaultDir;
KStandardDirs *dirs = KGlobal::dirs ();
if (dirs)
{
@@ -1203,20 +1203,20 @@ KDBSearchEngine::readSettings (KConfigBase * config)
}
PrefWidget *
-KDBSearchEngine::preferencesWidget (QWidget * parent)
+KDBSearchEngine::preferencesWidget (TQWidget * parent)
{
pw = new PreferencesWidget (parent);
setSettings ();
- connect (pw, SIGNAL (restoreNow ()), this, SLOT (setSettings ()));
- connect (pw, SIGNAL (applyNow ()), this, SLOT (updateSettings ()));
- connect (pw, SIGNAL (destroyed ()), this, SLOT (prefDestr ()));
- connect (pw->dbpw->scanPB_2, SIGNAL (clicked ()), this, SLOT (scan ()));
- connect (pw->dbpw->scanrecPB, SIGNAL (clicked ()), this,
- SLOT (scanRecur ()));
- connect (pw->dbpw->scanFilePB, SIGNAL (clicked ()), this,
- SLOT (scanFile ()));
- connect (pw->dbpw->repeatPB, SIGNAL (clicked ()), this, SLOT (repeat ()));
+ connect (pw, TQT_SIGNAL (restoreNow ()), this, TQT_SLOT (setSettings ()));
+ connect (pw, TQT_SIGNAL (applyNow ()), this, TQT_SLOT (updateSettings ()));
+ connect (pw, TQT_SIGNAL (destroyed ()), this, TQT_SLOT (prefDestr ()));
+ connect (pw->dbpw->scanPB_2, TQT_SIGNAL (clicked ()), this, TQT_SLOT (scan ()));
+ connect (pw->dbpw->scanrecPB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanRecur ()));
+ connect (pw->dbpw->scanFilePB, TQT_SIGNAL (clicked ()), this,
+ TQT_SLOT (scanFile ()));
+ connect (pw->dbpw->repeatPB, TQT_SIGNAL (clicked ()), this, TQT_SLOT (repeat ()));
return pw;
@@ -1233,7 +1233,7 @@ KDBSearchEngine::scanRecur ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
i18n
@@ -1246,32 +1246,32 @@ KDBSearchEngine::scanRecur ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int))); //Kbabel progress bar
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int))); //Kbabel progress bar
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
sca->scanPattern (cvsdir, "*.po", true);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1292,7 +1292,7 @@ KDBSearchEngine::scan ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
cvsdir =
KFileDialog::getExistingDirectory ("", 0,
@@ -1304,32 +1304,32 @@ KDBSearchEngine::scan ()
}
if (pw)
{
- connect (sca, SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), pw->dbpw->totalPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (patternProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (patternProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning folder %1").arg (cvsdir));
- connect (sca, SIGNAL (patternFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (patternFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanPattern (cvsdir, "*.po", false);
- disconnect (this, SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- disconnect (this, SIGNAL (progressEnds ()));
+ disconnect (this, TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ disconnect (this, TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->totalPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->totalPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1350,7 +1350,7 @@ KDBSearchEngine::scanFile ()
return;
scanInProgress = true;
PoScanner *sca = new PoScanner (dm, this, "Po Scanner");
- QString cvsdir;
+ TQString cvsdir;
pw->dbpw->totalPB->setProgress (0);
cvsdir =
@@ -1363,31 +1363,31 @@ KDBSearchEngine::scanFile ()
}
if (pw)
{
- connect (sca, SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
- SLOT (setProgress (int)));
- connect (sca, SIGNAL (fileProgress (int)), pw->dbpw->processPB,
- SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileLoading (int)), pw->dbpw->loadingPB,
+ TQT_SLOT (setProgress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), pw->dbpw->processPB,
+ TQT_SLOT (setProgress (int)));
}
- connect (sca, SIGNAL (fileProgress (int)), SIGNAL (progress (int)));
+ connect (sca, TQT_SIGNAL (fileProgress (int)), TQT_SIGNAL (progress (int)));
progressStarts (i18n ("Scanning file %1").arg (directory (cvsdir, 0)));
- connect (sca, SIGNAL (fileFinished ()), SIGNAL (progressEnds ()));
+ connect (sca, TQT_SIGNAL (fileFinished ()), TQT_SIGNAL (progressEnds ()));
- connect (sca, SIGNAL (added (int)), pw, SLOT (setEntries (int)));
- connect (sca, SIGNAL (filename (QString)), pw, SLOT (setName (QString)));
+ connect (sca, TQT_SIGNAL (added (int)), pw, TQT_SLOT (setEntries (int)));
+ connect (sca, TQT_SIGNAL (filename (TQString)), pw, TQT_SLOT (setName (TQString)));
sca->scanFile (cvsdir);
- sca->disconnect (SIGNAL (fileProgress (int)), this,
- SIGNAL (progress (int)));
-//disconnect(SIGNAL(patternStarted()),this,SIGNAL(started()) );
- sca->disconnect (SIGNAL (fileFinished ()), this,
- SIGNAL (progressEnds ()));
+ sca->disconnect (TQT_SIGNAL (fileProgress (int)), this,
+ TQT_SIGNAL (progress (int)));
+//disconnect(TQT_SIGNAL(patternStarted()),this,TQT_SIGNAL(started()) );
+ sca->disconnect (TQT_SIGNAL (fileFinished ()), this,
+ TQT_SIGNAL (progressEnds ()));
if (pw)
{
- disconnect (pw->dbpw->loadingPB, SLOT (setProgress (int)));
- disconnect (pw->dbpw->processPB, SLOT (setProgress (int)));
+ disconnect (pw->dbpw->loadingPB, TQT_SLOT (setProgress (int)));
+ disconnect (pw->dbpw->processPB, TQT_SLOT (setProgress (int)));
}
totalRecord = dm->count ();
@@ -1415,7 +1415,7 @@ KDBSearchEngine::name () const
QString
KDBSearchEngine::id () const
{
- return QString ("KDBSearchEngine");
+ return TQString ("KDBSearchEngine");
}
QString
@@ -1488,7 +1488,7 @@ KDBSearchEngine::updateSettings ()
if (pw == 0)
return;
- QString newName = pw->dbpw->dirInput->url ();
+ TQString newName = pw->dbpw->dirInput->url ();
if (newName != dbname)
{
@@ -1547,16 +1547,16 @@ KDBSearchEngine::updateSettings ()
}
void
-KDBSearchEngine::setLastError (const QString & er)
+KDBSearchEngine::setLastError (const TQString & er)
{
lasterror = er;
}
QString
-KDBSearchEngine::translate (const QString & text, const uint pluralForm)
+KDBSearchEngine::translate (const TQString & text, const uint pluralForm)
{
if (!openDb ())
- return QString::null;
+ return TQString::null;
/*
if(!dbOpened)
@@ -1566,7 +1566,7 @@ if(!dbOpened)
{
//emit anerror
hasError(i18n("Database not opened"));
- return QString::null;
+ return TQString::null;
}
}
*/
@@ -1574,7 +1574,7 @@ if(!dbOpened)
DataBaseItem dbit = dm->getItem (text);
if (dbit.isNull ())
- return QString::null;
+ return TQString::null;
if (dbit.numTra == 1)
return dbit.translations[0].translation;
@@ -1592,34 +1592,34 @@ if(!dbOpened)
}
-QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
+TQValueList < KeyAndScore > KDBSearchEngine::searchWords (TQString phrase,
int threshold,
int thresholdorig,
uint32 max)
{
- QValueList < QString > wordlist;
+ TQValueList < TQString > wordlist;
if (!openDb ())
{
- QValueList < KeyAndScore > a;
+ TQValueList < KeyAndScore > a;
return a;
}
progressStarts (i18n ("Searching words"));
- QValueList < QString >::Iterator wlit;
+ TQValueList < TQString >::Iterator wlit;
wordlist = dm->wordsIn (phrase);
int
nw = wordlist.count ();
-//QMemArray<WordItem> wi(nw);
- QMemArray < uint32 > numofloc (nw), currentloc (nw);
- QMemArray < int >
+//TQMemArray<WordItem> wi(nw);
+ TQMemArray < uint32 > numofloc (nw), currentloc (nw);
+ TQMemArray < int >
score (nw);
- QMemArray < uint32 * >loc (nw), locorig (nw);
- QValueList < uint32 > resloc;
- QValueList < int >
+ TQMemArray < uint32 * >loc (nw), locorig (nw);
+ TQValueList < uint32 > resloc;
+ TQValueList < int >
resfound;
- QValueList < KeyAndScore > keylist;
+ TQValueList < KeyAndScore > keylist;
//wi.resize(wordlist.count());
int
totalprogress = 0;
@@ -1837,7 +1837,7 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
KeyAndScore
key (strkey, sc);
-// kdDebug(0) << (QString) key << " [" << key.score << "]" << endl;
+// kdDebug(0) << (TQString) key << " [" << key.score << "]" << endl;
keylist.append (key);
}
@@ -1852,12 +1852,12 @@ QValueList < KeyAndScore > KDBSearchEngine::searchWords (QString phrase,
}
void
-KDBSearchEngine::stringChanged (const QStringList & o,
- const QString & translated, const uint,
- const QString &)
+KDBSearchEngine::stringChanged (const TQStringList & o,
+ const TQString & translated, const uint,
+ const TQString &)
{
- QString orig = o.first (); // FIXME: plural forms
+ TQString orig = o.first (); // FIXME: plural forms
// skip empty originals or translated texts
if (orig.isEmpty () || translated.isEmpty ())
@@ -1879,19 +1879,19 @@ KDBSearchEngine::stringChanged (const QStringList & o,
}
void
-KDBSearchEngine::setEditedFile (const QString & file)
+KDBSearchEngine::setEditedFile (const TQString & file)
{
edited = file; //kdDebug(0) << edited << endl;
}
-KeyAndScore::KeyAndScore (const QString & a, int sc):
-QString (a)
+KeyAndScore::KeyAndScore (const TQString & a, int sc):
+TQString (a)
{
score = sc;
}
-KeyAndScore::KeyAndScore ():QString ()
+KeyAndScore::KeyAndScore ():TQString ()
{
score = 0;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
index 058444db..d948bbd4 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/KDBSearchEngine.h
@@ -42,11 +42,11 @@
#ifndef _KDBSEARCH_ENGINE_
#define _KDBSEARCH_ENGINE_
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qmemarray.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqmemarray.h>
+#include <tqvaluelist.h>
#include "database.h"
@@ -63,7 +63,7 @@
class SearchEntry
{
public:
- QString string;
+ TQString string;
int rules;
};
@@ -71,22 +71,22 @@ class KeyAndScore : public QString
{
public:
KeyAndScore();
- KeyAndScore(const QString &a,int sc);
+ KeyAndScore(const TQString &a,int sc);
int score;
};
-typedef QValueList<SearchEntry> SearchList;
+typedef TQValueList<SearchEntry> SearchList;
/* USE searchengine.h structure
class CatalogDescription
{
public:
char language[6]; // How many character chinese language needs?
- // QString is better ?
- QString filename;
- QString dateOfScan; //When you add this to database (last time)
- QString authorOfScan;
- QString fileHeader; //msgid ""
+ // TQString is better ?
+ TQString filename;
+ TQString dateOfScan; //When you add this to database (last time)
+ TQString authorOfScan;
+ TQString fileHeader; //msgid ""
};
*/
@@ -98,7 +98,7 @@ class KDBSearchEngine : public SearchEngine
public:
- KDBSearchEngine(QObject *parent=0,const char *name=0);
+ KDBSearchEngine(TQObject *parent=0,const char *name=0);
~KDBSearchEngine();
enum Rules {Equal = 1, Contains = 2, Contained = 4, RegExp = 8};
enum FormatRules { Dots = 1, Ampersand = 2, FirstWordUpper = 4, //Not yet used
@@ -108,7 +108,7 @@ public:
Set the directory where db file are located
*/
- void setDBName(QString filename);
+ void setDBName(TQString filename);
/*
Set if the research have to consider multiple spaces as a single one.
@@ -136,7 +136,7 @@ public:
*/
- void setRemoveCharString(QString chartoremove);
+ void setRemoveCharString(TQString chartoremove);
/*
Enable an output filter that format Uppercase/lowercase
@@ -179,13 +179,13 @@ public:
virtual bool messagesForFilter(const SearchFilter* filter
- , QValueList<SearchResult>& resultList, QString& error);
+ , TQValueList<SearchResult>& resultList, TQString& error);
- virtual void setLanguageCode(const QString& lang);
- virtual void setLanguage(const QString& languageCode, const QString& languageName);
+ virtual void setLanguageCode(const TQString& lang);
+ virtual void setLanguage(const TQString& languageCode, const TQString& languageName);
- virtual void setEditedFile(const QString& file);
+ virtual void setEditedFile(const TQString& file);
virtual bool isReady() const ;
virtual bool isSearching() const;
@@ -193,20 +193,20 @@ public:
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
- virtual QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
- virtual void stringChanged( const QStringList& orig, const QString& translated
- , const uint translationPluralForm, const QString& description);
+ virtual void stringChanged( const TQStringList& orig, const TQString& translated
+ , const uint translationPluralForm, const TQString& description);
public slots:
@@ -221,7 +221,7 @@ public slots:
progress)
*/
- int addSearchString(QString searchString, int rule=Equal);
+ int addSearchString(TQString searchString, int rule=Equal);
/*
Start the research in the database of all the string in the list
@@ -244,14 +244,14 @@ public slots:
*/
- bool startSingleSearch(QString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
+ bool startSingleSearch(TQString searchString,unsigned int pattern1Limit,unsigned int pattern2Limit,
bool inTranslation=false);
/*
Start a search for a list of string
*/
-// bool startListSearch(QPtrList<QString> searchStrList);
+// bool startListSearch(TQPtrList<TQString> searchStrList);
/*
* Return a list of key in database that contains some
@@ -263,7 +263,7 @@ public slots:
* max is the maximum number of results
*/
-QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
+TQValueList<KeyAndScore> searchWords(TQString phrase,int threshold,
int thresholdorig ,uint32 max);
@@ -272,8 +272,8 @@ QValueList<KeyAndScore> searchWords(QString phrase,int threshold,
*/
virtual void stopSearch();
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
- virtual bool startSearchInTranslation(QString s);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearchInTranslation(TQString s);
void clearList();
signals:
@@ -282,13 +282,13 @@ private slots:
void updateSettings(); //Use widget settings
void setSettings(); //Fill widget with actual settings
void prefDestr();
- void setLastError(const QString&);
+ void setLastError(const TQString&);
void repeat();
private:
/*
Reload database info (and keep the dbase opened).
*/
- bool loadDatabase(QString database,bool);
+ bool loadDatabase(TQString database,bool);
bool openDb(bool);
@@ -312,22 +312,22 @@ private:
bool norm,sens,comm;
int numofresult;
char * filename;
- QString remchar;
- QString regaddchar;
- QString dbname;
+ TQString remchar;
+ TQString regaddchar;
+ TQString dbname;
bool dbOpened;
// GDBM_FILE db;
DataBaseManager * dm;
// datum key, value;
-// QMemArray<CatalogDescription *> catinfo;
+// TQMemArray<CatalogDescription *> catinfo;
SearchList searchStringList;
int totalRecord;
- QString lasterror;
- QString lang;
+ TQString lasterror;
+ TQString lang;
bool scanInProgress;
- QString edited;
+ TQString edited;
bool autoup;
- QString autoauthor;
+ TQString autoauthor;
};
#endif
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
index 003a3a95..0847d594 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.cpp
@@ -36,12 +36,12 @@
#include "database.h"
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ktempfile.h>
#include <kio/netaccess.h>
-WordItem::WordItem (char *data, QString w)
+WordItem::WordItem (char *data, TQString w)
{
word = w;
@@ -58,7 +58,7 @@ WordItem::WordItem (char *data, QString w)
}
-WordItem::WordItem (QString w)
+WordItem::WordItem (TQString w)
{
locations = NULL;
count = 0;
@@ -100,7 +100,7 @@ InfoItem::InfoItem ()
language = "No language";
}
-InfoItem::InfoItem (const char *rawData, QString lang)
+InfoItem::InfoItem (const char *rawData, TQString lang)
{
const char *rd;
rd = rawData;
@@ -110,16 +110,16 @@ InfoItem::InfoItem (const char *rawData, QString lang)
charset = "Utf8";
- catalogName = QString::fromUtf8 (rd);
+ catalogName = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
- lastTranslator = QString::fromUtf8 (rd);
+ lastTranslator = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
secs = *(unsigned int *) rd;
revisionDate.setTime_t (secs);
rd += 4;
- lastFullPath = QString::fromUtf8 (rd);
+ lastFullPath = TQString::fromUtf8 (rd);
len = strlen (rd) + 1;
rd += len;
@@ -139,8 +139,8 @@ InfoItem::rawData (char *rawData)
rd += strlen (rd) + 1;
- //QDate Time problem!!!!!!!!!!!
- QDateTime zeroDate;
+ //TQDate Time problem!!!!!!!!!!!
+ TQDateTime zeroDate;
zeroDate.setTime_t (0);
*(unsigned int *) rd = -revisionDate.secsTo (zeroDate);
rd += 4;
@@ -168,7 +168,7 @@ InfoItem::size ()
// this is a quick hack to copy a local file
int
-copy_hack (QFile & input, QFile & output)
+copy_hack (TQFile & input, TQFile & output)
{
if (!input.isOpen ())
{
@@ -204,7 +204,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
{
char *data = _data;
- key = QString::fromUtf8 (_key);
+ key = TQString::fromUtf8 (_key);
unsigned int i, r;
numTra = *(uint32 *) data;
@@ -228,7 +228,7 @@ DataBaseItem::DataBaseItem (char *_key, char *_data)
tr.infoRef.append (ref);
}
- tr.translation = QString::fromUtf8 ((const char *) data);
+ tr.translation = TQString::fromUtf8 ((const char *) data);
translations.append (tr);
data += strlen (data) + 1;
@@ -293,11 +293,11 @@ DataBaseItem::toRawData (char *_data)
}
-DataBaseManager::DataBaseManager (QString directory, QString lang,
- QObject * parent, const char *name):
-QObject (parent, name)
+DataBaseManager::DataBaseManager (TQString directory, TQString lang,
+ TQObject * parent, const char *name):
+TQObject (parent, name)
{
- QString filename;
+ TQString filename;
language = lang;
iAmOk = true;
@@ -312,22 +312,22 @@ void
DataBaseManager::openDataBase ()
{
kdDebug () << "Opendatabase" << endl;
- QString directory;
+ TQString directory;
directory = basedir;
- QString ll = "." + language;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
- QString transfilename = "%1/translations%2.db";
+ TQString transfilename = "%1/translations%2.db";
transfilename = transfilename.arg (directory).arg (ll);
- QString infofilename = "%1/catalogsinfo%2.db";
+ TQString infofilename = "%1/catalogsinfo%2.db";
infofilename = infofilename.arg (directory).arg (ll);
- QString wordsfilename = "%1/wordsindex%2.db";
+ TQString wordsfilename = "%1/wordsindex%2.db";
wordsfilename = wordsfilename.arg (directory).arg (ll);
- QString keysfilename = "%1/keysindex%2.db";
+ TQString keysfilename = "%1/keysindex%2.db";
keysfilename = keysfilename.arg (directory).arg (ll);
cursor = 0;
@@ -354,7 +354,7 @@ DataBaseManager::openDataBase ()
KTempFile transFile, infoFile, keysFile, wordsFile;
// do the upgrade on the translation file
- QFile transfilenameFile (transfilename);
+ TQFile transfilenameFile (transfilename);
if ((ret = copy_hack (transfilenameFile, *transFile.file ())) == 0)
{
@@ -373,7 +373,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the info file
- QFile infofilenameFile (infofilename);
+ TQFile infofilenameFile (infofilename);
if ((ret = copy_hack (infofilenameFile, *infoFile.file ())) == 0)
{
ret =
@@ -394,7 +394,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the words file
- QFile wordfilenameFile (wordsfilename);
+ TQFile wordfilenameFile (wordsfilename);
if ((ret = copy_hack (wordfilenameFile, *wordsFile.file ())) == 0)
{
ret =
@@ -415,7 +415,7 @@ DataBaseManager::openDataBase ()
}
// do the upgrade on the keys file
- QFile keysfilenameFile (keysfilename);
+ TQFile keysfilenameFile (keysfilename);
if ((ret = copy_hack (keysfilenameFile, *keysFile.file ())) == 0)
{
ret =
@@ -620,11 +620,11 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
{
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
@@ -641,7 +641,7 @@ DataBaseManager::putItem (DataBaseItem * item, bool ow)
}
DataBaseItem
-DataBaseManager::getItem (QString key)
+DataBaseManager::getItem (TQString key)
{
if (!iAmOk)
return DataBaseItem ();
@@ -702,7 +702,7 @@ DataBaseManager::cursorGet (uint32 flags)
}
else
{
- kdDebug (KBABEL_SEARCH) << QString ("...cursor getting...%1").
+ kdDebug (KBABEL_SEARCH) << TQString ("...cursor getting...%1").
arg (ret) << endl;
return DataBaseItem ();
@@ -770,11 +770,11 @@ DataBaseManager::current ()
}
int
-DataBaseManager::createDataBase (QString directory,
- QString language, int mode)
+DataBaseManager::createDataBase (TQString directory,
+ TQString language, int mode)
{
- QString filename;
- QString ll = "." + language;
+ TQString filename;
+ TQString ll = "." + language;
if (ll == ".")
ll = ".NOLANG";
filename = "%1/translations%2.db";
@@ -782,7 +782,7 @@ DataBaseManager::createDataBase (QString directory,
rename (filename.local8Bit (), filename.local8Bit () + ",old");
-//kdDebug(0) << QString("Creating %1").arg(filename) << endl;
+//kdDebug(0) << TQString("Creating %1").arg(filename) << endl;
iAmOk = true;
@@ -860,7 +860,7 @@ DataBaseManager::createDataBase (QString directory,
if (iAmOk)
loadInfo ();
else
- kdDebug (KBABEL_SEARCH) << QString ("I am NOT ok : %1").
+ kdDebug (KBABEL_SEARCH) << TQString ("I am NOT ok : %1").
arg (ret) << endl;
//THIS IS WRONG, rewrite the error handling.
@@ -889,7 +889,7 @@ DataBaseManager::getCatalogInfo (int n)
return InfoItem ();
}
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
InfoItem it ((char *) data.data, language);
//free(data.data); // Read docu for this!!!!
@@ -936,10 +936,10 @@ DataBaseManager::addCatalogInfo (InfoItem * catInfo, int cat = -1)
}
int
-DataBaseManager::searchCatalogInfo (QString location)
+DataBaseManager::searchCatalogInfo (TQString location)
{
int n = 0;
- QValueList < InfoItem >::Iterator it;
+ TQValueList < InfoItem >::Iterator it;
for (it = info.begin (); it != info.end (); ++it)
{
n++;
@@ -998,11 +998,11 @@ DataBaseManager::loadInfo ()
}
-QValueList < QString > DataBaseManager::wordsIn (QString string)
+TQValueList < TQString > DataBaseManager::wordsIn (TQString string)
{
QString
a;
- QValueList < QString > words;
+ TQValueList < TQString > words;
int
i,
l;
@@ -1036,10 +1036,10 @@ QValueList < QString > DataBaseManager::wordsIn (QString string)
WordItem
-DataBaseManager::getWordLocations (QString word)
+DataBaseManager::getWordLocations (TQString word)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
DBT data;
@@ -1080,10 +1080,10 @@ DataBaseManager::getWordLocations (QString word)
bool
-DataBaseManager::addLocation (QString word, unsigned int location)
+DataBaseManager::addLocation (TQString word, unsigned int location)
{
- QString keystring = word.lower ();
+ TQString keystring = word.lower ();
DBT key;
@@ -1289,7 +1289,7 @@ DataBaseManager::addLocation (QString word, unsigned int location)
bool
-DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
+DataBaseManager::removeLocation (TQString /*word */ , int /*location */ )
{
//#warning TODO: REMOVE LOCATION
@@ -1298,7 +1298,7 @@ DataBaseManager::removeLocation (QString /*word */ , int /*location */ )
}
uint32
-DataBaseManager::appendKey (QString _key)
+DataBaseManager::appendKey (TQString _key)
{
DBT key;
@@ -1324,7 +1324,7 @@ DataBaseManager::appendKey (QString _key)
else
ret = *(uint32 *) key.data;
-//kdDebug(0) << QString("Append result %1,err = %1").arg(ret).arg(err) << endl;
+//kdDebug(0) << TQString("Append result %1,err = %1").arg(ret).arg(err) << endl;
free (data.data);
@@ -1349,16 +1349,16 @@ DataBaseManager::getKey (uint32 n)
//Check for errors
int ret = indexDb->get (indexDb, 0, &key, &data, 0); //DB_SET_RECNO);
if (ret)
- return QString::null;
+ return TQString::null;
- return QString::fromUtf8 ((char *) data.data);
+ return TQString::fromUtf8 ((char *) data.data);
-// kdDebug(0) << QString("Trad %1").arg(ret) << endl;
+// kdDebug(0) << TQString("Trad %1").arg(ret) << endl;
}
int
-DataBaseManager::catalogRef (QString location, QString author, QString path)
+DataBaseManager::catalogRef (TQString location, TQString author, TQString path)
{
InfoItem cinfo;
int cat, catnum;
@@ -1397,19 +1397,19 @@ DataBaseManager::catalogRef (QString location, QString author, QString path)
}
int
-DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
+DataBaseManager::putNewTranslation (TQString key, TQString tran, int catalog,
bool ow)
{
int catnum = catalog;
int count = 0;
- QString msgid = key;
+ TQString msgid = key;
DataBaseItem dbit = getItem (msgid);
if (dbit.numTra == 0) //Not found
{
dbit.numTra += 1;
- // use local variable, dbit.translations is QValueList and
+ // use local variable, dbit.translations is TQValueList and
// will create own copy
TranslationItem tra;
tra.numRef = 1;
@@ -1423,16 +1423,16 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
int aa = putItem (&dbit);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
else
{
// key exists
- QString msgstr = tran;
+ TQString msgstr = tran;
bool found_catalog_info = false, foundTr = false, isThisOne = false;
- QValueList < TranslationItem >::Iterator ittr;
+ TQValueList < TranslationItem >::Iterator ittr;
bool rem = false;
// check all translations in the list
@@ -1493,7 +1493,7 @@ DataBaseManager::putNewTranslation (QString key, QString tran, int catalog,
//Check ret value
int aa = putItem (&dbit, true);
if (aa)
- kdDebug (0) << QString ("-----------put code ") << aa << endl;
+ kdDebug (0) << TQString ("-----------put code ") << aa << endl;
}
return count;
@@ -1513,11 +1513,11 @@ DataBaseManager::rebuildIndexes ()
uint32 location = loc;
- QValueList < QString > wlist;
+ TQValueList < TQString > wlist;
wlist = wordsIn (item->key);
- QValueList < QString >::Iterator wlistit;
+ TQValueList < TQString >::Iterator wlistit;
for (wlistit = wlist.begin (); wlistit != wlist.end (); ++wlistit)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/database.h b/kbabel/kbabeldict/modules/dbsearchengine/database.h
index bf4767df..3e68e01d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/database.h
@@ -52,29 +52,29 @@
#define uint32 u_int32_t
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qcstring.h> //bytearray
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqcstring.h> //bytearray
class WordItem // Returned by getWordLocations
{
public:
- WordItem(char *data,QString w);
- WordItem(QString w);
+ WordItem(char *data,TQString w);
+ WordItem(TQString w);
//WordItem(const WordItem &wi);
//WordItem& operator=(const WordItem & wi );
//The word (key in database)
- QString word;
+ TQString word;
//Sorted locations
- //QByteArray locations; //too many problems with this..
+ //TQByteArray locations; //too many problems with this..
//NOTE:
- //This is allocated only if you call WordItem(char *data,QString w);
+ //This is allocated only if you call WordItem(char *data,TQString w);
//YOU MUST FREE IT when you do not need it anymore
//No destructor will do it !!!
@@ -97,15 +97,15 @@ class InfoItem
InfoItem();
// Create an info item from raw data
- InfoItem(const char *rawData,QString lang);
+ InfoItem(const char *rawData,TQString lang);
- QString catalogName;
- QString lastFullPath;
+ TQString catalogName;
+ TQString lastFullPath;
- QString lastTranslator;
- QDateTime revisionDate;
- QString charset;
- QString language;
+ TQString lastTranslator;
+ TQDateTime revisionDate;
+ TQString charset;
+ TQString language;
int size();
@@ -116,8 +116,8 @@ class InfoItem
class TranslationItem
{
public:
- QString translation;
- QValueList<int> infoRef;
+ TQString translation;
+ TQValueList<int> infoRef;
uint32 numRef;
};
@@ -149,8 +149,8 @@ class DataBaseItem
void toRawData(char *_data);
void toRawKey(char *_key);
- QString key;
- QValueList<TranslationItem> translations;
+ TQString key;
+ TQValueList<TranslationItem> translations;
uint32 numTra;
uint32 location;
};
@@ -175,13 +175,13 @@ class DataBaseManager : public QObject
*/
- DataBaseManager(QString directory,QString lang,QObject *parent=0,const char *name=0);
+ DataBaseManager(TQString directory,TQString lang,TQObject *parent=0,const char *name=0);
~DataBaseManager();
/*
Create a new databse structure.
*/
- int createDataBase(QString directory,QString language,int mode=0664);
+ int createDataBase(TQString directory,TQString language,int mode=0664);
@@ -198,7 +198,7 @@ class DataBaseManager : public QObject
int putItem(DataBaseItem *item,bool ow=false);
- DataBaseItem getItem(QString key);
+ DataBaseItem getItem(TQString key);
/*
@return the first entry in the database.
@@ -226,7 +226,7 @@ class DataBaseManager : public QObject
* overwritten if you provide a new translation
*/
- int putNewTranslation(QString key,QString tran,int catalog,bool ow=true);
+ int putNewTranslation(TQString key,TQString tran,int catalog,bool ow=true);
/*
@return info about catalog n
@@ -246,14 +246,14 @@ class DataBaseManager : public QObject
@return its refnum.
*/
- int searchCatalogInfo(QString location);
+ int searchCatalogInfo(TQString location);
/* Get a catalog info for location,
* if it doesn't exist it will create one.
* @return the refnum
*/
- int catalogRef(QString location,QString author,QString path);
+ int catalogRef(TQString location,TQString author,TQString path);
/*
Put at refnum the catInfo
@@ -265,17 +265,17 @@ class DataBaseManager : public QObject
/*
Get word info
*/
- WordItem getWordLocations(QString word);
+ WordItem getWordLocations(TQString word);
/*
Add a location for word
*/
- bool addLocation(QString word, unsigned int location);
+ bool addLocation(TQString word, unsigned int location);
/*
Remove location for word
*/
- bool removeLocation(QString word, int location);
+ bool removeLocation(TQString word, int location);
/*
@@ -283,9 +283,9 @@ class DataBaseManager : public QObject
*/
void rebuildIndexes();
- uint32 appendKey(class QString);
+ uint32 appendKey(class TQString);
- QString getKey(uint32 n);
+ TQString getKey(uint32 n);
/*
Load the catalogs info.
@@ -302,7 +302,7 @@ class DataBaseManager : public QObject
void openDataBase();
void closeDataBase();
- static QValueList<QString> wordsIn(QString string);
+ static TQValueList<TQString> wordsIn(TQString string);
signals:
@@ -312,9 +312,9 @@ class DataBaseManager : public QObject
protected:
DataBaseItem cursorGet(uint32 flags);
- QString language;
- QString basedir;
- QValueList<InfoItem> info;
+ TQString language;
+ TQString basedir;
+ TQValueList<InfoItem> info;
DB *db,*infoDb,*wordDb,*indexDb;
DBC *cursor;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
index 87b39e61..0ee1ba4b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.cpp
@@ -30,8 +30,8 @@
*/
#include "dbscan.h"
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -39,14 +39,14 @@
using namespace KBabel;
PoScanner::PoScanner(DataBaseManager *dbm,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
dm=dbm;
removeOldCatalogTranslation=false; //Check if this flag do something.
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
@@ -57,17 +57,17 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("cat: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -110,7 +110,7 @@ return true;
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
@@ -120,8 +120,8 @@ InfoItem cinfo;
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+TQString location=fileName.right(fileName.length()-fileName.findRev("/")-1);
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -136,10 +136,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("unknown");
+else author=TQString("unknown");
int catnum=dm->catalogRef(location,author,fileName);
@@ -149,7 +149,7 @@ tot=catalog->numberOfEntries();
bool fuzzy;
bool untra;
-//kdDebug(0) << QString("Tot: %1").arg(tot) << endl;
+//kdDebug(0) << TQString("Tot: %1").arg(tot) << endl;
for (i=0;i<tot;i++) //Skip header = ????
{
@@ -169,7 +169,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
kdWarning() << "Translation database does not support plural forms" << endl;
msgstr=catalog->msgstr(i).first();
@@ -181,7 +181,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
index c151509e..2390c3d1 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbscan.h
@@ -47,17 +47,17 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseManager *dbm,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseManager *dbm,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -71,7 +71,7 @@ signals:
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
index 37332167..86975874 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.cpp
@@ -21,7 +21,7 @@ KInstance *DbSeFactory::s_instance = 0;
KAboutData *DbSeFactory::s_about = 0;
-DbSeFactory::DbSeFactory( QObject *parent, const char *name)
+DbSeFactory::DbSeFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -42,10 +42,10 @@ DbSeFactory::~DbSeFactory()
}
-QObject *DbSeFactory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSeFactory::createObject( TQObject *parent, const char *name,
+ const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
index 6a9f9f3d..7ae4f20b 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/dbse_factory.h
@@ -9,12 +9,12 @@ class DbSeFactory : public KLibFactory
{
Q_OBJECT
public:
- DbSeFactory( QObject *parent=0, const char *name=0);
+ DbSeFactory( TQObject *parent=0, const char *name=0);
~DbSeFactory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0,
- const char *classname="QObject",
- const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0,
+ const char *classname="TQObject",
+ const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
index 3bb65934..562f0835 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.cpp
@@ -1,33 +1,33 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include "dbseprefwidget.h"
#include "preferenceswidget.h"
-PreferencesWidget::PreferencesWidget(QWidget *parent, const char* name)
+PreferencesWidget::PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE database search engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE database search engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePref(this);
dbpw->dirInput->setMode(KFile::Directory | KFile::LocalOnly);
layout->addWidget(dbpw);
- resize(QSize(200,200).expandedTo(minimumSizeHint()));
+ resize(TQSize(200,200).expandedTo(minimumSizeHint()));
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -84,7 +84,7 @@ dbpw->ignoreLE->setText("&.:");
dbpw->autoAddCB_2->setChecked(true);
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -97,7 +97,7 @@ QString defaultDir;
dbpw->dirInput->setURL(defaultDir);
}
-void PreferencesWidget::setName(QString n)
+void PreferencesWidget::setName(TQString n)
{
dbpw->filenameLB->setText(i18n("Scanning file: %1").arg(n));
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
index 599408cd..5cd1fed8 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine/preferenceswidget.h
@@ -9,7 +9,7 @@ class PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- PreferencesWidget(QWidget *parent=0, const char* name=0);
+ PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~PreferencesWidget();
virtual void apply();
@@ -17,7 +17,7 @@ public:
virtual void standard();
DBSearchEnginePref *dbpw;
public slots:
- void setName(QString);
+ void setName(TQString);
void setEntries(int);
signals:
void applyNow();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
index 5bf088b8..41f4319d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.cpp
@@ -35,19 +35,19 @@
#include "dbscan.h"
#include <klineedit.h>
#include <kapplication.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <knuminput.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kdebug.h>
#define i18n (const char *)
-KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
+KDBSearchEngine2::KDBSearchEngine2(TQObject *parent,const char*name)
: SearchEngine(parent,name)
{
pw=0;
@@ -55,7 +55,7 @@ KDBSearchEngine2::KDBSearchEngine2(QObject *parent,const char*name)
di=0; //Database Interface is not yet initialized
- connect(this,SIGNAL(hasError(QString)),SLOT(setLastError(QString)));
+ connect(this,TQT_SIGNAL(hasError(TQString)),TQT_SLOT(setLastError(TQString)));
searching=false; // i'm not searching
iAmReady=true; //there are no reason to say I'm not ready.
@@ -69,11 +69,11 @@ KDBSearchEngine2::~KDBSearchEngine2()
delete di; //delete database interface
}
-bool KDBSearchEngine2::startSearch(QString str)
+bool KDBSearchEngine2::startSearch(TQString str)
{
kdDebug(0) << "Start a new search. Looking for: " << str << endl;
- static QString queryString;
+ static TQString queryString;
queryString=str; //set the latest query string (note: it is static)
@@ -92,7 +92,7 @@ bool KDBSearchEngine2::startSearch(QString str)
searching=true; //really start searching
- QString searchingString;
+ TQString searchingString;
do //Search loop, it stops only when finished and latest searched string is the actual query string.
{
@@ -134,8 +134,8 @@ bool KDBSearchEngine2::startSearch(QString str)
strategy.addAlgorithm(&wbyw);
- connect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
- strategy.exec(searchingString); disconnect(&strategy,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
+ strategy.exec(searchingString); disconnect(&strategy,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
kdDebug(0) << "End of search for " << searchingString << endl;
@@ -158,7 +158,7 @@ bool KDBSearchEngine2::startSearch(QString str)
-bool KDBSearchEngine2::startSearchInTranslation(QString str)
+bool KDBSearchEngine2::startSearchInTranslation(TQString str)
{
if(autoupdate)
{
@@ -172,20 +172,20 @@ bool KDBSearchEngine2::startSearchInTranslation(QString str)
-bool KDBSearchEngine2::messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error)
+bool KDBSearchEngine2::messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error)
{
//FIXME implement this (needs filters)
return true;
}
-void KDBSearchEngine2::setLastError(QString er)
+void KDBSearchEngine2::setLastError(TQString er)
{
lasterror=er;
}
-QString KDBSearchEngine2::translate(const QString text)
+TQString KDBSearchEngine2::translate(const TQString text)
{
ExactSearchAlgorithm exact(di,&settings);
@@ -212,14 +212,14 @@ void KDBSearchEngine2::receiveResult(QueryResult r)
/* A SEARCH RESULT CONTAINS (see searchengine.h)
- QString requested;
- QString found;
- QString translation;
- QString plainTranslation;
- QString plainFound;
- QString plainRequested;
+ TQString requested;
+ TQString found;
+ TQString translation;
+ TQString plainTranslation;
+ TQString plainFound;
+ TQString plainRequested;
int score;
- QPtrList<TranslationInfo> descriptions;
+ TQPtrList<TranslationInfo> descriptions;
*/
@@ -230,7 +230,7 @@ bool KDBSearchEngine2::init()
else
{
di = new DataBaseInterface(dbDirectory,&settings);
- connect(di,SIGNAL(newResult(QueryResult)),this,SLOT(receiveResult(QueryResult)));
+ connect(di,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SLOT(receiveResult(QueryResult)));
//FIXME: what wbout ready()
if(!di->mainOk()) return false; //check if the main DB is OK.
@@ -243,8 +243,8 @@ const KAboutData *KDBSearchEngine2::about() const
return DbSe2Factory::instance()->aboutData();
}
-void KDBSearchEngine2::stringChanged( QString orig, QString translated
- , QString description)
+void KDBSearchEngine2::stringChanged( TQString orig, TQString translated
+ , TQString description)
{
if(!init()) return;
@@ -255,22 +255,22 @@ void KDBSearchEngine2::stringChanged( QString orig, QString translated
}
-PrefWidget * KDBSearchEngine2::preferencesWidget(QWidget *parent)
+PrefWidget * KDBSearchEngine2::preferencesWidget(TQWidget *parent)
{
pw = new KDB2PreferencesWidget(parent);
kdDebug(0) << "new KDB2 preferences widget" << endl;
setSettings();
- connect(pw,SIGNAL(restoreNow()),this,SLOT(setSettings()));
- connect(pw,SIGNAL(applyNow()),this,SLOT(updateSettings()));
- connect(pw,SIGNAL(destroyed()),this,SLOT(prefDestr()));
+ connect(pw,TQT_SIGNAL(restoreNow()),this,TQT_SLOT(setSettings()));
+ connect(pw,TQT_SIGNAL(applyNow()),this,TQT_SLOT(updateSettings()));
+ connect(pw,TQT_SIGNAL(destroyed()),this,TQT_SLOT(prefDestr()));
- connect(pw->dbpw->scanAll,SIGNAL(clicked()),this,SLOT(scanAllPressed()));
- connect(pw->dbpw->scanSource,SIGNAL(clicked()),this,SLOT(scanNowPressed()));
- connect(pw->dbpw->addSource,SIGNAL(clicked()),this,SLOT(addSource()));
- connect(pw->dbpw->editSource,SIGNAL(clicked()),this,SLOT(editSource()));
- connect(pw->dbpw->removeSource,SIGNAL(clicked()),this,SLOT(removeSource()));
+ connect(pw->dbpw->scanAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanAllPressed()));
+ connect(pw->dbpw->scanSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(scanNowPressed()));
+ connect(pw->dbpw->addSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(addSource()));
+ connect(pw->dbpw->editSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(editSource()));
+ connect(pw->dbpw->removeSource,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeSource()));
return pw;
@@ -309,10 +309,10 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
uint sourceNumber=0;
config->writeEntry("NumberOfDBImportSources",sources.count());
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
sourceNumber++;
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
config->writeEntry("Name",sourceIt.key());
sourceIt.data().writeConfig(config);
}
@@ -321,7 +321,7 @@ void KDBSearchEngine2::saveSettings(KConfigBase *config)
void KDBSearchEngine2::readSettings(KConfigBase *config)
{
- /*QString defaultDir;
+ /*TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
@@ -361,8 +361,8 @@ void KDBSearchEngine2::readSettings(KConfigBase *config)
kdDebug(0) << "Found "<< numberOfSources << " sources" << endl;
for(uint sourceNumber=1;sourceNumber<=numberOfSources;sourceNumber++)
{
- config->setGroup("DBImportSource-"+QString::number(sourceNumber));
- QString name=config->readEntry("Name");
+ config->setGroup("DBImportSource-"+TQString::number(sourceNumber));
+ TQString name=config->readEntry("Name");
sources[name].readConfig(config);
}
if(pw)
@@ -401,7 +401,7 @@ void KDBSearchEngine2::setSettings()
//pw->dbpw->useFilters->setChecked(false);
//pw->dbpw->dateToday->setChecked(false);
pw->dbpw->sourceList->clear();
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
pw->dbpw->sourceList->insertItem(sourceIt.key());
}
@@ -413,7 +413,7 @@ void KDBSearchEngine2::updateSettings()
{
if(!pw) return;
- QString newdb = pw->dbpw->dbDirectory->url();
+ TQString newdb = pw->dbpw->dbDirectory->url();
if(newdb !=dbDirectory)
{
kdDebug(0) << "Recreate DB-Interface cause dbdir is changed" << endl;
@@ -469,19 +469,19 @@ pw->dbpw->sourceList->
}
-/*void KDBSearchEngine2::scanSource(QString sourceName)
+/*void KDBSearchEngine2::scanSource(TQString sourceName)
{
//FIXME: an error here would be nice
if(!init()) return;
- for(QValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
+ for(TQValueList<MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); sourceIt++)
{
if((*sourceIt).getName()==sourceName)
{
- QValueList<KURL> urls=(*sourceIt).urls();
+ TQValueList<KURL> urls=(*sourceIt).urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();urlIt++)
ps.scanFile(*urlIt);
//We suppose name are unique so no need for further scrolling
@@ -496,14 +496,14 @@ void KDBSearchEngine2::scanNowPressed()
kdDebug(0) << "We should not be here, scanNow called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(!init()) return;
if(sources.contains(sourceName))
{
- QValueList<KURL> urls=sources[sourceName].urls();
+ TQValueList<KURL> urls=sources[sourceName].urls();
PoScanner ps(di);
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
@@ -520,10 +520,10 @@ void KDBSearchEngine2::scanAllPressed()
PoScanner ps(di);
- for(QMap<QString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
+ for(TQMap<TQString,MessagesSource>::iterator sourceIt=sources.begin() ; sourceIt!=sources.end(); ++sourceIt)
{
- QValueList<KURL> urls=(*sourceIt).urls();
- for(QValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
+ TQValueList<KURL> urls=(*sourceIt).urls();
+ for(TQValueList<KURL>::iterator urlIt=urls.begin();urlIt!=urls.end();++urlIt)
ps.scanURL(*urlIt);
}
}
@@ -535,18 +535,18 @@ void KDBSearchEngine2::editSource()
kdDebug(0) << "We should not be here, editSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
if(sources.contains(sourceName))
{
bool nameIsNew;
- QString newName;
+ TQString newName;
SourceDialog sd;
do{
sources[sourceName].setDialogValues(&sd);
sd.sourceName->setText(sourceName);
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
sources[sourceName].getDialogValues(&sd);
newName= sd.sourceName->text();
@@ -586,7 +586,7 @@ void KDBSearchEngine2::removeSource()
kdDebug(0) << "We should not be here, delteSource called without a pw!" << endl;
return;
}
- QString sourceName;
+ TQString sourceName;
sourceName=pw->dbpw->sourceList->currentText();
sources.remove(sourceName);
pw->dbpw->sourceList->removeItem(pw->dbpw->sourceList->currentItem());
@@ -595,11 +595,11 @@ void KDBSearchEngine2::removeSource()
void KDBSearchEngine2::addSource()
{
- QString newName;
+ TQString newName;
SourceDialog sd;
bool nameIsNew;
do{
- if(sd.exec()==QDialog::Accepted)
+ if(sd.exec()==TQDialog::Accepted)
{
newName= sd.sourceName->text();
nameIsNew=!sources.contains(newName);
@@ -625,7 +625,7 @@ void KDBSearchEngine2::addSource()
}
-QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::searchTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
@@ -644,7 +644,7 @@ QString KDBSearchEngine2::searchTranslation( const QString text, int & score )
}
-QString KDBSearchEngine2::fuzzyTranslation( const QString text, int & score )
+TQString KDBSearchEngine2::fuzzyTranslation( const TQString text, int & score )
{
GenericSearchAlgorithm strategy(di,&settings);
strategy.setMaxResultNumber(1);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
index 0db19c6c..fb9cff70 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/KDBSearchEngine2.h
@@ -9,7 +9,7 @@ Andrea Rizzi
#define DBSEARCH_ENGINE2_H
#include <searchengine.h>
-#include <qdialog.h>
+#include <tqdialog.h>
#include "database.h"
#include "dbse2_factory.h"
@@ -25,7 +25,7 @@ class KDBSearchEngine2 : public SearchEngine
public:
- KDBSearchEngine2(QObject *parent=0, const char *name=0);
+ KDBSearchEngine2(TQObject *parent=0, const char *name=0);
virtual ~KDBSearchEngine2();
//init if needed.
@@ -46,10 +46,10 @@ class KDBSearchEngine2 : public SearchEngine
void readSettings(KConfigBase *config);
- QString translate(const QString text);
+ TQString translate(const TQString text);
- QString fuzzyTranslation(const QString text, int &score);
- QString searchTranslation(const QString, int &score );
+ TQString fuzzyTranslation(const TQString text, int &score);
+ TQString searchTranslation(const TQString, int &score );
/**
* Finds all messages belonging to package package. If nothing is found,
@@ -60,8 +60,8 @@ class KDBSearchEngine2 : public SearchEngine
*
* @return true, if successfull
*/
- bool messagesForPackage(const QString& package
- , QValueList<Message>& resultList, QString& error);
+ bool messagesForPackage(const TQString& package
+ , TQValueList<Message>& resultList, TQString& error);
/**
* @returns true, if the searchresults are given as rich text
@@ -79,19 +79,19 @@ class KDBSearchEngine2 : public SearchEngine
* a tabbed widget.
* @param parent the parent of the returned widget
*/
- virtual PrefWidget* preferencesWidget(QWidget *parent);
+ virtual PrefWidget* preferencesWidget(TQWidget *parent);
/** @returns information about this SearchEngine */
virtual const KAboutData *about() const;
/** @returns the i18n name of this search engine */
- QString name() const {return i18n("DB SearchEngine II");}
+ TQString name() const {return i18n("DB SearchEngine II");}
/** @returns a untranslated name of this engine */
- QString id() const {return "dbse2";}
+ TQString id() const {return "dbse2";}
/** @returns the last error message */
- QString lastError() {return lasterror;}
+ TQString lastError() {return lasterror;}
/**
@@ -114,14 +114,14 @@ class KDBSearchEngine2 : public SearchEngine
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearch(QString s);
+ bool startSearch(TQString s);
/**
* starts a search for string s in the translated text
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- bool startSearchInTranslation(QString s);
+ bool startSearchInTranslation(TQString s);
/** stops a search */
@@ -133,22 +133,22 @@ class KDBSearchEngine2 : public SearchEngine
* on the edited file. The default implementation does nothing.
* @param file The edited file with path
*/
- // virtual void setEditedFile(QString file);
+ // virtual void setEditedFile(TQString file);
/**
* This method allows a search engine to use different settings depending
* on the edited package. The default implementation does nothing.
* @param package The name of the package, that is currently translated.
*/
- // virtual void setEditedPackage(QString package);
+ // virtual void setEditedPackage(TQString package);
/**
* This method allows a search engine to use different settings depending
* on the language code. The default implementation does nothing.
* @param lang The current language code (e.g. de).
*/
- // virtual void setLanguageCode(QString lang);
- // virtual void setLanguage(QString languageCode, QString languageName);
+ // virtual void setLanguageCode(TQString lang);
+ // virtual void setLanguage(TQString languageCode, TQString languageName);
@@ -160,15 +160,15 @@ class KDBSearchEngine2 : public SearchEngine
* @param translation the translated string
*/
- void stringChanged( QString orig, QString translated
- , QString description);
+ void stringChanged( TQString orig, TQString translated
+ , TQString description);
//void scan();
- void setLastError(QString er);
+ void setLastError(TQString er);
//Slots for preference dialog
- // void scanSource(QString sourceName);
+ // void scanSource(TQString sourceName);
void scanNowPressed();
void scanAllPressed();
void editSource();
@@ -181,7 +181,7 @@ class KDBSearchEngine2 : public SearchEngine
bool searching;
bool iAmReady;
bool autoupdate;
- QString lasterror;
+ TQString lasterror;
KDB2PreferencesWidget *pw;
//PrefWidg -> DBSE
@@ -190,11 +190,11 @@ class KDBSearchEngine2 : public SearchEngine
void setSettings();
DBSESettings settings;
- QString dbDirectory;
+ TQString dbDirectory;
bool autoAdd,useSentence,useGlossary,useExact;
bool useDivide,useAlpha,useWordByWord,useDynamic;
uint numberOfResult;
- QMap<QString,MessagesSource> sources;
+ TQMap<TQString,MessagesSource> sources;
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
index 0ca040e8..466b68e5 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.cpp
@@ -10,20 +10,20 @@
//
//
#include "algorithms.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
//FIXME: remove
#define i18n (const char*)
-DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e=di->get(query,0);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
emit newResult(QueryResult(*it,e.first.getString(),settings->scoreExact));
@@ -35,19 +35,19 @@ DataBaseInterface::ResultList ExactSearchAlgorithm::exec(const QString& query )
}
-DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const QString& query )
+DataBaseInterface::ResultList GenericSearchAlgorithm::exec(const TQString& query )
{
DataBaseInterface::ResultList res;
// ExactSearchAlgorithm exact(query,settings);
uint countResults=0;
- for(QValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
+ for(TQValueList<AbstractSearchAlgorithm *>::iterator algoit = algoChain.begin(); algoit!=algoChain.end() && countResults < maxResults; algoit++)
{
- connect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ connect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
kdDebug(0) << "Algo pointer" << (*algoit) << endl;
res+=(*algoit)->exec(query);
countResults=res.count();
kdDebug(0) << "Count = " << countResults << endl;
- disconnect(*algoit,SIGNAL(newResult(QueryResult)),this,SIGNAL(newResult(QueryResult)));
+ disconnect(*algoit,TQT_SIGNAL(newResult(QueryResult)),this,TQT_SIGNAL(newResult(QueryResult)));
}
return res;
}
@@ -57,7 +57,7 @@ void GenericSearchAlgorithm::addAlgorithm( AbstractSearchAlgorithm * algo )
algoChain.append(algo);
}
-DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DBItemMultiIndex::IndexList il=di->getAlpha(query);
@@ -65,8 +65,8 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
for(DBItemMultiIndex::IndexList::iterator it=il.begin();it!=il.end()&&!di->stopNow();++it)
{
DataBaseInterface::MainEntry e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end() && !di->stopNow();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreAlpha);
emit newResult(r);
@@ -78,17 +78,17 @@ DataBaseInterface::ResultList AlphaSearchAlgorithm::exec( const QString & query
return res;
}
-DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const TQString & query )
{
DataBaseInterface::ResultList res;
DataBaseInterface::MainEntry e = di->getSentence(query);
- QStringList trs=e.second.getTranslations();
+ TQStringList trs=e.second.getTranslations();
kdDebug(0) << "Count in sentence archive " << trs.count()<< endl;
- for(QStringList::iterator it=trs.begin();it!=trs.end();++it)
+ for(TQStringList::iterator it=trs.begin();it!=trs.end();++it)
{
QueryResult r(di->format(di->simple(*it,true),query),e.first.getString(),settings->scoreSentence);
emit newResult(r);
@@ -100,31 +100,31 @@ DataBaseInterface::ResultList SentenceArchiveSearchAlgorithm::exec( const QStrin
return res;
}
-DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const TQString & query )
{
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> chunks=factory->chunks();
+ TQPtrList<AbstractChunk> chunks=factory->chunks();
kdDebug(0) << "Number of chunks " << chunks.count() << endl;
chunks.setAutoDelete(true); //I should delete the chunks myself
- QStringList querySeparators=factory->separators();
+ TQStringList querySeparators=factory->separators();
//This prevents recursive loop.
if (chunks.count()<=1) return res;
- QStringList translations,tmpTranslations;
+ TQStringList translations,tmpTranslations;
translations.push_back(""); //FIXME this is needed to start , but is not good
int finalscore=0;
int i=0;
- QMap<QString,bool> translationUsed;
+ TQMap<TQString,bool> translationUsed;
//Loop on all chunk
for(AbstractChunk *it=chunks.first();it && !di->stopNow(); it=chunks.next())
{
kdDebug(0) << "Process next chunk" << endl;
int chunkscore=0;
- QValueList<QueryResult> r=it->translations();
+ TQValueList<QueryResult> r=it->translations();
kdDebug(0) << "Number of results for this chunk " << r.count() << endl;
if(r.count()<1) {
@@ -144,14 +144,14 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
translationUsed.clear();
for(ResultList::iterator it1=r.begin();it1!=r.end() &&!di->stopNow(); ++it1)
{
- QString chunkTranslation= (*it1).result();
+ TQString chunkTranslation= (*it1).result();
if(!translationUsed.contains(chunkTranslation))
{
translationUsed[chunkTranslation]=true;
kdDebug(0) << "a translation is: " << chunkTranslation << endl;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString prevTranslation=*it2;
+ TQString prevTranslation=*it2;
tmpTranslations.push_back(prevTranslation+chunkTranslation+querySeparators[i]);
kdDebug(0) << "..appending it to " << prevTranslation << endl;
}
@@ -176,9 +176,9 @@ DataBaseInterface::ResultList ChunkByChunkSearchAlgorithm::exec( const QString &
if (finalscore<50) return res;
- for(QStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
+ for(TQStringList::iterator it2=translations.begin();it2!=translations.end() && !di->stopNow() ; it2++)
{
- QString theTranslation=*it2;
+ TQString theTranslation=*it2;
QueryResult qr(di->format(theTranslation,query),i18n("CHUNK BY CHUNK"),finalscore);
qr.setRichOriginal(i18n("<h3>Chunk by chunk</h3>CHANGE THIS TEXT!!!!This translation is"
"obtained translating the sentences and using a"
@@ -211,22 +211,22 @@ FuzzyChunkSearchAlgorithm::FuzzyChunkSearchAlgorithm( DataBaseInterface * dbi, D
}
-DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const TQString & query )
{
//FIXME: this code is shit too
ResultList res;
factory->setQuery(query);
- QPtrList<AbstractChunk> querychunks = factory->chunks();
+ TQPtrList<AbstractChunk> querychunks = factory->chunks();
querychunks.setAutoDelete(true);
- typedef QMap<QString,QValueList<unsigned int> > ResultMap;
+ typedef TQMap<TQString,TQValueList<unsigned int> > ResultMap;
ResultMap rmap; //result of words index query
unsigned int notfound=0,frequent=0,nchunks = querychunks.count();
//Get index list for each word
for(AbstractChunk *it=querychunks.first(); it &&!di->stopNow() ; it=querychunks.next() )
{
- QValueList<uint> locations = (*it).locationReferences();
+ TQValueList<uint> locations = (*it).locationReferences();
if(locations.count()>0)
{
@@ -246,10 +246,10 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
//Now we have a map (rmap) "word in query->list of occurency"
- QValueList<unsigned int>::iterator countpos[nchunks+1];
+ TQValueList<unsigned int>::iterator countpos[nchunks+1];
- QValueList<unsigned int> il;
+ TQValueList<unsigned int> il;
for(int i = 0;i<=nchunks&&!di->stopNow();i++)
countpos[i]=il.end();
@@ -310,12 +310,12 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
int bestscore=0;
for(unsigned int wf=nchunks;wf>0;wf-- ){
- for(QValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
+ for(TQValueList<unsigned int>::iterator it=countpos[wf];it!=countpos[wf-1] ;++it)
{ //loop on entries with same number of word found
DataBaseInterface::MainEntry e;
e=di->getFromIndex(*it);
- QStringList trs=e.second.getTranslations();
- for(QStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
+ TQStringList trs=e.second.getTranslations();
+ for(TQStringList::iterator it=trs.begin();it!=trs.end()&&!di->stopNow();++it)
{
unsigned int cinr=factory->chunks(*it).count(); //chunk in result
//compute a score, lets kbabel sort now, it should be fast...
@@ -326,11 +326,11 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
// kdDebug(0) << "s: "<<score << " wf: "<<wf<<" nwords: "<<nwords<<" winr: "<<winr
// <<" 90*wf/nwords: "<<90*wf/nwords << " -:" << 90*(((nwords-winr)>0)?(nwords-winr):(winr-nwords))/(nwords*10)<< endl;
// FIXME: format better the richtext
- QString ori=e.first.getString();
- QString re=di->format(di->simple(*it,true),query);
+ TQString ori=e.first.getString();
+ TQString re=di->format(di->simple(*it,true),query);
QueryResult r(re,ori,score);
- for(QPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
- ori=ori.replace(QRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
+ for(TQPtrListIterator<AbstractChunk> it(querychunks); it.current() && di->stopNow() ; ++it){
+ ori=ori.replace(TQRegExp((*it)->chunkString(),false),"<font color=#000080><u><b>"+(*it)->chunkString()+"</b></u></font>");
}
r.setRichOriginal(ori);
if(!di->stopNow())
@@ -344,16 +344,16 @@ DataBaseInterface::ResultList FuzzyChunkSearchAlgorithm::exec( const QString & q
}
-DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList CorrelationSearchAlgorithm::exec( const TQString & query )
{
//FIXME, this code is shit.
DataBaseInterface::ResultList res;
if(di->words(query).count()>1) return res;
- QMap<QString,float> corRes = di->correlation(query,0,false);
+ TQMap<TQString,float> corRes = di->correlation(query,0,false);
float max=0,max1=0,max2=0;
- QString best,best1,best2;
+ TQString best,best1,best2;
- for(QMap<QString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
+ for(TQMap<TQString,float>::iterator it = corRes.begin(); it !=corRes.end(); ++it)
{
if(it.data()>max)
{
@@ -414,7 +414,7 @@ SingleWordSearchAlgorithm::SingleWordSearchAlgorithm( DataBaseInterface * dbi, D
addAlgorithm(&corr);
}
-DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const QString & query )
+DataBaseInterface::ResultList SingleWordSearchAlgorithm::exec( const TQString & query )
{
if(di->words(query).count()>1)
return ResultList();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
index 5f9ee682..aa049f85 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/algorithms.h
@@ -14,14 +14,14 @@
#include "database.h"
#include "chunk.h"
-#include <qobject.h>
+#include <tqobject.h>
class AbstractSearchAlgorithm : public QObject
{
Q_OBJECT
public:
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
AbstractSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets)
{
@@ -31,7 +31,7 @@ class AbstractSearchAlgorithm : public QObject
/**
* this contains the algo and return some results.
*/
- virtual DataBaseInterface::ResultList exec(const QString& query)=0;
+ virtual DataBaseInterface::ResultList exec(const TQString& query)=0;
signals:
void newResult(QueryResult);
@@ -50,7 +50,7 @@ class ExactSearchAlgorithm : public AbstractSearchAlgorithm
public:
ExactSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
@@ -59,7 +59,7 @@ class AlphaSearchAlgorithm : public AbstractSearchAlgorithm
public:
AlphaSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
@@ -68,7 +68,7 @@ class SentenceArchiveSearchAlgorithm : public AbstractSearchAlgorithm
public:
SentenceArchiveSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
};
class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
@@ -77,7 +77,7 @@ class ChunkByChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
ChunkByChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
@@ -93,7 +93,7 @@ class FuzzyChunkSearchAlgorithm : public AbstractSearchAlgorithm
public:
FuzzyChunkSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
void setChunkFactory(AbstractChunkFactory *_factory)
{
factory=_factory;
@@ -108,14 +108,14 @@ class GenericSearchAlgorithm : public AbstractSearchAlgorithm
public:
GenericSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) ;
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
void addAlgorithm(AbstractSearchAlgorithm *algo);
void setMaxResultNumber(uint num){maxResults=num;}
protected:
- QValueList<AbstractSearchAlgorithm *> algoChain;
+ TQValueList<AbstractSearchAlgorithm *> algoChain;
uint maxResults;
};
@@ -125,7 +125,7 @@ class CorrelationSearchAlgorithm : public AbstractSearchAlgorithm
Q_OBJECT
public:
CorrelationSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets) : AbstractSearchAlgorithm(dbi,sets) {}
- virtual ResultList exec(const QString& query);
+ virtual ResultList exec(const TQString& query);
};
@@ -135,7 +135,7 @@ class SingleWordSearchAlgorithm : public GenericSearchAlgorithm
Q_OBJECT
public:
SingleWordSearchAlgorithm(DataBaseInterface *dbi,DBSESettings *sets);
- virtual DataBaseInterface::ResultList exec(const QString& query);
+ virtual DataBaseInterface::ResultList exec(const TQString& query);
private:
ExactSearchAlgorithm exact;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
index 7c62748a..ef426d53 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.cpp
@@ -19,12 +19,12 @@ AbstractChunk::~AbstractChunk( )
{
}
-WordChunk::WordChunk( DataBaseInterface * di, QString _word ) : AbstractChunk(di)
+WordChunk::WordChunk( DataBaseInterface * di, TQString _word ) : AbstractChunk(di)
{
word=_word;
}
-QValueList<QueryResult> WordChunk::translations( )
+TQValueList<QueryResult> WordChunk::translations( )
{
DataBaseInterface::ResultList r;
SingleWordSearchAlgorithm sa(di,di->getSettings());
@@ -32,13 +32,13 @@ QValueList<QueryResult> WordChunk::translations( )
return r;
}
-//QValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> WordChunk::translationsFromReference( uint reference )
//{
//}
-QValueList< uint > WordChunk::locationReferences( )
+TQValueList< uint > WordChunk::locationReferences( )
{
- QValueList<uint> res=di->getWordIndex(word);
+ TQValueList<uint> res=di->getWordIndex(word);
kdDebug(0) << "Number of locations " << res.count() <<endl ;
return res;
/* DBItemMainKey *k = new DBItemMainKey(word);
@@ -46,20 +46,20 @@ QValueList< uint > WordChunk::locationReferences( )
if(wordsindex->get(k,d)!=DB_NOTFOUND)
return d->getList();
else
- return QValueList<uint> tmpList;
+ return TQValueList<uint> tmpList;
*/
}
-void WordChunk::setLocationReferences( QValueList< uint > )
+void WordChunk::setLocationReferences( TQValueList< uint > )
{
}
-SentenceChunk::SentenceChunk( DataBaseInterface * di, QString _sentence ): AbstractChunk(di)
+SentenceChunk::SentenceChunk( DataBaseInterface * di, TQString _sentence ): AbstractChunk(di)
{
sentence=_sentence;
}
-QValueList<QueryResult> SentenceChunk::translations( )
+TQValueList<QueryResult> SentenceChunk::translations( )
{
GenericSearchAlgorithm g(di,di->getSettings());
@@ -75,29 +75,29 @@ QValueList<QueryResult> SentenceChunk::translations( )
}
-//QValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
+//TQValueList<QueryResult> SentenceChunk::translationsFromReference( uint reference )
//{
//
//}
-QValueList< uint > SentenceChunk::locationReferences( )
+TQValueList< uint > SentenceChunk::locationReferences( )
{
}
-void SentenceChunk::setLocationReferences( QValueList< uint > )
+void SentenceChunk::setLocationReferences( TQValueList< uint > )
{
}
-QPtrList< AbstractChunk> WordChunkFactory::chunks()
+TQPtrList< AbstractChunk> WordChunkFactory::chunks()
{
- QString str=di->simple(string);
- QPtrList<AbstractChunk> list;
+ TQString str=di->simple(string);
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
_separators.clear();
kdDebug(0) << "Word chunks of:" <<str << endl;
int pos;
- QString sep;
- QRegExp r("(\\s)");
+ TQString sep;
+ TQRegExp r("(\\s)");
do {
pos=r.search(str);
@@ -120,10 +120,10 @@ QPtrList< AbstractChunk> WordChunkFactory::chunks()
-QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
+TQPtrList<AbstractChunk> SentenceChunkFactory::chunks()
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
// kdDebug(0) << s << endl;
@@ -132,9 +132,9 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
- QString sep=re.cap(1);
+ TQString sep=re.cap(1);
if(!str.left(pos).isEmpty())
{
@@ -154,14 +154,14 @@ QPtrList<AbstractChunk> SentenceChunkFactory::chunks()
return list;
}
-QPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
+TQPtrList< AbstractChunk > CaseBasedWordChunkFactory::chunks( )
{
- QString str=string;
- QPtrList<AbstractChunk> list;
+ TQString str=string;
+ TQPtrList<AbstractChunk> list;
if(str.isEmpty()) return list;
uint slen=str.length();
kdDebug(0) << "CaseWordChunk string:" << str << endl;
- QString tmpWord;
+ TQString tmpWord;
bool upcase;
for(uint i=0;i<=slen;i++)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
index 5c5fcb93..2578e59e 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/chunk.h
@@ -11,8 +11,8 @@
//
#ifndef DBSE2_CHUNK_H
#define DBSE2_CHUNK_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "database.h"
/**
@@ -29,13 +29,13 @@ class AbstractChunk
/**
* This function should return a list of translation for the current chunk.
*/
- virtual QValueList<QueryResult> translations()=0;
+ virtual TQValueList<QueryResult> translations()=0;
//FIXME: is this in the right place, better in factory? check that stuff
- //virtual QValueList<QueryResult> translationsFromReference(uint reference)=0;
- virtual QValueList<uint> locationReferences()=0;
- virtual void setLocationReferences(QValueList<uint>)=0;
- virtual QString chunkString()=0;
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference)=0;
+ virtual TQValueList<uint> locationReferences()=0;
+ virtual void setLocationReferences(TQValueList<uint>)=0;
+ virtual TQString chunkString()=0;
protected:
DataBaseInterface *di;
@@ -47,16 +47,16 @@ class AbstractChunk
class WordChunk : public AbstractChunk
{
public:
- WordChunk(DataBaseInterface *di,QString _word);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return word;}
+ WordChunk(DataBaseInterface *di,TQString _word);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return word;}
- //static QValueList<WordChunk> divide(QString);
+ //static TQValueList<WordChunk> divide(TQString);
private:
- QString word;
+ TQString word;
};
/**
@@ -65,17 +65,17 @@ class WordChunk : public AbstractChunk
class SentenceChunk : public AbstractChunk
{
public:
- SentenceChunk(DataBaseInterface *di,QString _sentence);
- virtual QValueList<QueryResult> translations();
- //virtual QValueList<QueryResult> translationsFromReference(uint reference);
- virtual QValueList<uint> locationReferences();
- virtual void setLocationReferences(QValueList<uint>);
- virtual QString chunkString(){return sentence;}
+ SentenceChunk(DataBaseInterface *di,TQString _sentence);
+ virtual TQValueList<QueryResult> translations();
+ //virtual TQValueList<QueryResult> translationsFromReference(uint reference);
+ virtual TQValueList<uint> locationReferences();
+ virtual void setLocationReferences(TQValueList<uint>);
+ virtual TQString chunkString(){return sentence;}
- // static QValueList<SentenceChunk> divide(QString);
+ // static TQValueList<SentenceChunk> divide(TQString);
private:
- QString sentence;
+ TQString sentence;
};
@@ -92,11 +92,11 @@ class AbstractChunkFactory
di=_di;
}
virtual ~AbstractChunkFactory(){}
- virtual QPtrList<AbstractChunk> chunks()=0;
+ virtual TQPtrList<AbstractChunk> chunks()=0;
/**
Change th string and return the chunks
*/
- virtual QPtrList<AbstractChunk> chunks(const QString& s)
+ virtual TQPtrList<AbstractChunk> chunks(const TQString& s)
{
string=s;
return chunks();
@@ -105,14 +105,14 @@ class AbstractChunkFactory
* Returns the list of separators of last @ref chunks() call
*/
- virtual QStringList separators(){ return _separators;}
- void setQuery(const QString& s)
+ virtual TQStringList separators(){ return _separators;}
+ void setQuery(const TQString& s)
{
string=s;
}
protected:
- QString string;
- QStringList _separators;
+ TQString string;
+ TQStringList _separators;
DataBaseInterface *di;
};
@@ -123,7 +123,7 @@ class WordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class CaseBasedWordChunkFactory : public AbstractChunkFactory
@@ -133,7 +133,7 @@ class CaseBasedWordChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
class SentenceChunkFactory : public AbstractChunkFactory
@@ -144,7 +144,7 @@ class SentenceChunkFactory : public AbstractChunkFactory
/**
YOU SHOULD DELETE THE CHUNKS!!
*/
- virtual QPtrList<AbstractChunk> chunks();
+ virtual TQPtrList<AbstractChunk> chunks();
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
index ea0e8379..0631f7ad 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.cpp
@@ -8,8 +8,8 @@ License: GPLv2
#include <math.h>
#include "database.h"
-#include <qregexp.h>
-#include <qdict.h>
+#include <tqregexp.h>
+#include <tqdict.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
@@ -21,7 +21,7 @@ License: GPLv2
-DataBase::DataBase(QString dbpath,QString dbname, QString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
+DataBase::DataBase(TQString dbpath,TQString dbname, TQString dblang) : Db(0,DB_CXX_NO_EXCEPTIONS)
{
filename=dbpath+"."+dblang+".db";
@@ -59,11 +59,11 @@ unsigned int DataBase::getLast()
-QueryResult::QueryResult(QString r)
+QueryResult::QueryResult(TQString r)
{
res=r;
}
-QueryResult::QueryResult(QString r,QString o,int s)
+QueryResult::QueryResult(TQString r,TQString o,int s)
{
res=r;
richr=r;
@@ -80,7 +80,7 @@ QueryResult::QueryResult()
-DataBaseInterface::DataBaseInterface(QString dir, DBSESettings *sets)
+DataBaseInterface::DataBaseInterface(TQString dir, DBSESettings *sets)
{
//FIXME Better db names!!
@@ -125,7 +125,7 @@ DataBaseInterface::~DataBaseInterface()
}
-DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt)
+DataBase *DataBaseInterface::openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt)
{
DataBase *aDb = new DataBase(prefix,name,l);
@@ -163,7 +163,7 @@ DataBase *DataBaseInterface::openMyDataBase(const QString& prefix,const QString&
*/
-DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchFilter *filter)
+DataBaseInterface::MainEntry DataBaseInterface::get(const TQString& query,SearchFilter *filter)
{
static int counter=1;
counter++;
@@ -184,11 +184,11 @@ DataBaseInterface::MainEntry DataBaseInterface::get(const QString& query,SearchF
*/
-bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *info)
+bool DataBaseInterface::addEntry(TQString original,TQString translated,InputInfo *info)
{
DBItemMainKey mk(original);
DBItemMainData md;
- QMap<QString, int> correlationDiff;
+ TQMap<TQString, int> correlationDiff;
bool newentry=false;
//try to get
kdDebug(0) << "Inserting the pair:" << endl;
@@ -220,8 +220,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
alpha->put(&ka,&in);
kdDebug(0) << "Updating the word index " << endl;
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); ++it)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -240,8 +240,8 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
kdDebug(0) << "inside sentence loop" << endl;
@@ -276,11 +276,11 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
if(!translated.isEmpty())
{
//loop on all translations to update correlation
- QStringList tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ TQStringList tmpTranslations=md.getTranslations();
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]--;
@@ -294,10 +294,10 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
md.addTranslation(translated,info->ref());
tmpTranslations=md.getTranslations();
- for(QStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
+ for(TQStringList::iterator otIt=tmpTranslations.begin(); otIt!=tmpTranslations.end();++otIt)
{
- QStringList wt=words(*otIt);
- for(QStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
+ TQStringList wt=words(*otIt);
+ for(TQStringList::iterator it = wt.begin(); it!=wt.end(); ++it)
{
if(correlationDiff.contains(*it))
correlationDiff[*it]++;
@@ -316,7 +316,7 @@ bool DataBaseInterface::addEntry(QString original,QString translated,InputInfo *
}
-bool DataBaseInterface::removeEntry(QString original)
+bool DataBaseInterface::removeEntry(TQString original)
{
DBItemMainKey mk(original);
DBItemMainData md;
@@ -346,8 +346,8 @@ bool DataBaseInterface::removeEntry(QString original)
alpha->put(&ka,&in);
//Update words index
- QStringList ws=words(original);
- for(QStringList::iterator it = ws.begin(); it!=ws.end(); it++)
+ TQStringList ws=words(original);
+ for(TQStringList::iterator it = ws.begin(); it!=ws.end(); it++)
{
DBItemMainKey word(*it);
DBItemMultiIndex win;
@@ -357,8 +357,8 @@ bool DataBaseInterface::removeEntry(QString original)
}
//Update sentence index
- QStringList so=sentences(original);
- QStringList st=sentences(translated);
+ TQStringList so=sentences(original);
+ TQStringList st=sentences(translated);
if(so.count()==st.count() && st.count() >1 ) //we already hav a database for single string.
{
for(int i=0; i< so.count() ; i++)
@@ -380,16 +380,16 @@ bool DataBaseInterface::removeEntry(QString original)
-QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *filter,bool notify, float minSign)
+TQMap<TQString,float> DataBaseInterface::correlation(TQString word,SearchFilter *filter,bool notify, float minSign)
{
- QDict<unsigned int> res;
+ TQDict<unsigned int> res;
// res.setAutoDelete(true);
- QMap<QString, float>final;
+ TQMap<TQString, float>final;
DBItemMultiIndex::IndexList il;
unsigned int tot=0;
unsigned int background=0;
unsigned int nocck;
- QString sword=simple(word);
+ TQString sword=simple(word);
DBItemMainKey *k = new DBItemMainKey(sword);
DBItemMultiIndex *d = new DBItemMultiIndex();
if(wordsindex->get(k,d)!=DB_NOTFOUND)
@@ -398,29 +398,29 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
il=d->getList();
kdDebug(0) << il.count()<<endl;
tot=0;
- for(QValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
+ for(TQValueList<unsigned int>::iterator it=il.begin();it!=il.end();++it)
{
numindex->get(*it,k);
- // QValueList<QueryResult> trad=exactMatch(k->getString(),filter);
+ // TQValueList<QueryResult> trad=exactMatch(k->getString(),filter);
MainEntry e=get(k->getString(),filter);
- QStringList trad=e.second.getTranslations();
+ TQStringList trad=e.second.getTranslations();
nocck=words(k->getString()).contains(sword);
- for( QStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
+ for( TQStringList::iterator it2=trad.begin();it2!=trad.end();++it2)
{
- QStringList w=words(*it2);
+ TQStringList w=words(*it2);
unsigned int numWords = w.count()*10+1;
unsigned int wei=100000/sqrt(numWords); //weight (is the best one?)
background+=(numWords-nocck)*wei;
- QDict<uint> count;
+ TQDict<uint> count;
//count.setAutoDelete(true);
//FIXME:SET AUTODELETE FOR ALL DICTS
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(!(ip=count[*it1])) count.insert(*it1,new uint(1));
@@ -428,7 +428,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
(*ip)++;
}
- for(QStringList::iterator it1=w.begin();it1!=w.end();it1++)
+ for(TQStringList::iterator it1=w.begin();it1!=w.end();it1++)
{
uint *ip;
if(*(count[*it1])==nocck) //add only if same number of entry (it cuts articles)
@@ -442,7 +442,7 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
unsigned int sqrBG=sqrt((1.0*background+1)/10000);
- for(QDictIterator<uint> it(res) ; it.current(); ++it)
+ for(TQDictIterator<uint> it(res) ; it.current(); ++it)
{
float sign=1.0*(*(it.current()))/(10000.0*sqrBG);
if(sign >minSign){
@@ -457,15 +457,15 @@ QMap<QString,float> DataBaseInterface::correlation(QString word,SearchFilter *fi
return final;
}
-QStringList DataBaseInterface::words(QString s)
+TQStringList DataBaseInterface::words(TQString s)
{
- QString str=simple(s);
- QStringList list;
+ TQString str=simple(s);
+ TQStringList list;
int pos;
do {
- pos=str.find(QRegExp("\\s"));
+ pos=str.find(TQRegExp("\\s"));
// if(!simple(str.left(pos)).isEmpty())
// list.append(simple(str.left(pos)));
if(!str.left(pos).isEmpty())
@@ -476,24 +476,24 @@ QStringList DataBaseInterface::words(QString s)
return list;
}
-QString DataBaseInterface::simple(QString str,bool ck)
+TQString DataBaseInterface::simple(TQString str,bool ck)
{
- QString res;
+ TQString res;
if(ck)
res=str; //case keep
else
res=str.lower(); //lowercase
//FIXME: uncoment the foll. line (check speed)
- res=res.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
+ res=res.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3"); //remove enclosing tags
//Try to get rid of regexps.
- // res=res.replace(QRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
- // res=res.replace(QRegExp("(('|-|_)+)")," "); //strip non-word char
- // res=res.replace(QRegExp("[^\\w\\s%]"),""); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_|\\s|[^\\w%])+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("(('|-|_)+)")," "); //strip non-word char
+ // res=res.replace(TQRegExp("[^\\w\\s%]"),""); //strip non-word char
- QString r;
- QChar c;
+ TQString r;
+ TQChar c;
bool wasSpace=true;
uint len=res.length();
for(uint i=0; i<len;i++)
@@ -540,10 +540,10 @@ QString DataBaseInterface::simple(QString str,bool ck)
return res;
}
-QStringList DataBaseInterface::sentences(QString s)
+TQStringList DataBaseInterface::sentences(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
@@ -551,7 +551,7 @@ QStringList DataBaseInterface::sentences(QString s)
do {
- QRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
+ TQRegExp re("((\\.|;|\\?|\\!|:)( |$|\\\\n\\n))");
pos=re.search(str);
if(!str.left(pos).isEmpty())
list.append(str.left(pos).stripWhiteSpace());
@@ -565,20 +565,20 @@ QStringList DataBaseInterface::sentences(QString s)
return list;
}
-QStringList DataBaseInterface::sentencesSeparator(QString s)
+TQStringList DataBaseInterface::sentencesSeparator(TQString s)
{
- QString str=s;
- QStringList list;
+ TQString str=s;
+ TQStringList list;
// kdDebug(0) << s << endl;
int pos;
do {
- QRegExp re;
+ TQRegExp re;
re.setPattern("([.:?!;]( |$|\\\\n\\n))");
pos = re.search(str);
- QString separator=re.cap(1);
+ TQString separator=re.cap(1);
if(pos!=-1){
list.append(separator);
}
@@ -589,26 +589,26 @@ QStringList DataBaseInterface::sentencesSeparator(QString s)
return list;
}
-bool DataBaseInterface::isUpper(QChar s)
+bool DataBaseInterface::isUpper(TQChar s)
{
return s==s.upper();
}
-bool DataBaseInterface::isLower(QChar s)
+bool DataBaseInterface::isLower(TQChar s)
{
return s==s.lower();
}
-QString DataBaseInterface::format(QString _s,QString t)
+TQString DataBaseInterface::format(TQString _s,TQString t)
{
//FIXME use settings
//FIXME use regexp
- QString s=_s;
- QString noTagT=t.replace(QRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
- QChar first=noTagT[noTagT.find(QRegExp("\\w"))];
+ TQString s=_s;
+ TQString noTagT=t.replace(TQRegExp("(<(.*)>)(.*)(</\\2>)"),"\\3");
+ TQChar first=noTagT[noTagT.find(TQRegExp("\\w"))];
bool firstCapital=isUpper(first);
/*
@@ -643,9 +643,9 @@ if(columnAtEnd)
if(allupper)
s=s.upper();
- int pos=t.find(QRegExp("&"));
+ int pos=t.find(TQRegExp("&"));
if(pos>=0) {
- QChar accel=t[t.find(QRegExp("&"))+1];
+ TQChar accel=t[t.find(TQRegExp("&"))+1];
if(accel!='&')
{
@@ -667,32 +667,32 @@ if(columnAtEnd)
}
-QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace)
+TQString DataBaseInterface::formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace)
{
- QString s=_s;
- QRegExp templateRegExp(tre);
- //QString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
- //QString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
+ TQString s=_s;
+ TQRegExp templateRegExp(tre);
+ //TQString stringSearch = "(.*)!@CAP1@$"; // use @CAP1.. fot caps in templates
+ //TQString stringReplace = "\\1@CAP1@"; // use \1, \2 for caps in str and @CAP1 fot caps in template
if(templateRegExp.exactMatch(t))
{
- QStringList caps=templateRegExp.capturedTexts();
+ TQStringList caps=templateRegExp.capturedTexts();
int i=0;
- for(QStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
+ for(TQStringList::iterator capit=caps.begin();capit!=caps.end();++capit)
{
- QString phRegExp="(?!\\\\)@CAP"+QString::number(i)+"@";
+ TQString phRegExp="(?!\\\\)@CAP"+TQString::number(i)+"@";
//kdDebug(0) << "phRegExp: " << phRegExp << endl;
//kdDebug(0) << "cap[" << i << "]: "<< *capit<< endl;
- stringReplace = stringReplace.replace(QRegExp(phRegExp),*capit);
- stringSearch = stringSearch.replace(QRegExp(phRegExp),*capit);
+ stringReplace = stringReplace.replace(TQRegExp(phRegExp),*capit);
+ stringSearch = stringSearch.replace(TQRegExp(phRegExp),*capit);
i++;
}
// kdDebug(0) << "stringSearch " << stringSearch << endl;
// kdDebug(0) << "stringReplace " << stringReplace << endl;
- QRegExp stringSearchRegExp = QRegExp(stringSearch);
+ TQRegExp stringSearchRegExp = TQRegExp(stringSearch);
// kdDebug(0) << "before: "<<s<<endl;
s = s.replace(stringSearchRegExp,stringReplace);
// kdDebug(0) << "after: "<<s<<endl;
@@ -702,7 +702,7 @@ QString DataBaseInterface::formatRegExp(QString _s, QString t, QString tre,QStri
return s;
}
-DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getAlpha( const TQString & query )
{
DBItemMainKey *k = new DBItemMainKey(simple(query));
DBItemMultiIndex *d = new DBItemMultiIndex();
@@ -718,7 +718,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getFromIndex( uint i )
return get(k.getString(),0); //FIXME: this is a BUG right now but the filter should be removed
}
-DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & query )
+DataBaseInterface::MainEntry DataBaseInterface::getSentence( const TQString & query )
{
static int counter=1;
@@ -731,7 +731,7 @@ DataBaseInterface::MainEntry DataBaseInterface::getSentence( const QString & que
}
-DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & query )
+DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const TQString & query )
{
DBItemMainKey k = DBItemMainKey(query);
DBItemMultiIndex d = DBItemMultiIndex();
@@ -740,7 +740,7 @@ DBItemMultiIndex::IndexList DataBaseInterface::getWordIndex( const QString & que
}
else
{
- QValueList<unsigned int> tmpList;
+ TQValueList<unsigned int> tmpList;
return tmpList;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/database.h b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
index c447fa59..d6ed3482 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/database.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/database.h
@@ -8,11 +8,11 @@
#ifndef DATABASE_2_H
#define DATABASE_2_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <db4/db_cxx.h>
-#include <qobject.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqregexp.h>
#include "dbentries.h"
@@ -43,7 +43,7 @@ public:
class DataBase : Db
{
public:
- DataBase(QString dbpath, QString dbname, QString dblang);
+ DataBase(TQString dbpath, TQString dbname, TQString dblang);
int open(DBTYPE type,unsigned int flags=0);
@@ -105,12 +105,12 @@ int get(DBItem * key,DBItem *data){
int close(unsigned int i) {return Db::close( i); }
//For scrolling
- // int getFirst(DBItem *key,DBItem *data,QString table);
- // int getNext(DBItem *key,DBItem *data,QString table);
- // bool isEnd(QString table);
+ // int getFirst(DBItem *key,DBItem *data,TQString table);
+ // int getNext(DBItem *key,DBItem *data,TQString table);
+ // bool isEnd(TQString table);
private:
- QString filename;
- QString database;
+ TQString filename;
+ TQString database;
DBTYPE mytype;
};
@@ -122,26 +122,26 @@ class QueryResult //from DBInterface to KDBSearchEngine
{
public:
QueryResult();
- QueryResult(QString r);
- QueryResult(QString r,QString o,int s);
- void setRichResult(QString r) { richr=r; }
- void setRichOriginal(QString r) { richo=r; }
+ QueryResult(TQString r);
+ QueryResult(TQString r,TQString o,int s);
+ void setRichResult(TQString r) { richr=r; }
+ void setRichOriginal(TQString r) { richo=r; }
- QString richResult() {return richr;}
- QString richOriginal() {return richo;}
+ TQString richResult() {return richr;}
+ TQString richOriginal() {return richo;}
- QString result(){ return res; }
- QString original() {return orig; }
+ TQString result(){ return res; }
+ TQString original() {return orig; }
int score() {return sco;}
//info contains originalkey,catalog,date,author etc...
ResultInfo info(){ResultInfo i; i.info="no info"; return i;}
private:
- QString res;
- QString orig;
- QString richr;
- QString richo;
+ TQString res;
+ TQString orig;
+ TQString richr;
+ TQString richo;
int sco;
};
@@ -158,34 +158,34 @@ class DataBaseInterface : public QObject
public:
//move result list typedef to AbstractAlgorthm or somewhere else
- typedef QValueList<QueryResult> ResultList;
+ typedef TQValueList<QueryResult> ResultList;
typedef QPair<DBItemMainKey,DBItemMainData> MainEntry;
- DataBaseInterface( QString dir, DBSESettings *sets);
+ DataBaseInterface( TQString dir, DBSESettings *sets);
~DataBaseInterface();
//Ask the Database to stop now.
void stop(bool b=true) {_stopNow=b;}
//Search words
- ResultList wordsMatch(QString query,SearchFilter *filter=0,bool notify=true);
+ ResultList wordsMatch(TQString query,SearchFilter *filter=0,bool notify=true);
//Edit database functions.
//addEntry and sync all the tables
- bool addEntry(QString original,QString translated,InputInfo *info);
+ bool addEntry(TQString original,TQString translated,InputInfo *info);
//FIXME:implement me!
- bool removeEntry(QString original);
+ bool removeEntry(TQString original);
//FIXME: go persistent!
- QMap<QString,float> correlation(QString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
+ TQMap<TQString,float> correlation(TQString word,SearchFilter *filter=0,bool notify=true,float minSign=0.2);
// Read the database
- MainEntry get(const QString& query,SearchFilter *filter=0);
+ MainEntry get(const TQString& query,SearchFilter *filter=0);
MainEntry getFromIndex(uint i);
- DBItemMultiIndex::IndexList getAlpha(const QString& query);
- DBItemMultiIndex::IndexList getWordIndex(const QString& query);
- MainEntry getSentence(const QString& query);
+ DBItemMultiIndex::IndexList getAlpha(const TQString& query);
+ DBItemMultiIndex::IndexList getWordIndex(const TQString& query);
+ MainEntry getSentence(const TQString& query);
//Database status check functions
bool mainOk() {return main!=0;}
@@ -206,7 +206,7 @@ class DataBaseInterface : public QObject
DBSESettings *getSettings() {return settings;}
private:
- DataBase * openMyDataBase(const QString& prefix,const QString& name,const QString& l,DBTYPE tt);
+ DataBase * openMyDataBase(const TQString& prefix,const TQString& name,const TQString& l,DBTYPE tt);
DataBase *main;
DataBase *numindex;
DataBase *wordsindex;
@@ -222,14 +222,14 @@ class DataBaseInterface : public QObject
//FIXME:Move to KBabel common library.
public:
- QString format( QString _s,QString t);
- QString formatRegExp(QString _s, QString t, QString tre,QString stringSearch,QString stringReplace);
- static QStringList words(QString s);
- static QStringList sentences(QString s);
- static QStringList sentencesSeparator(QString s);
- static QString simple(QString str,bool ck=false);
- static bool isUpper(QChar s);
- static bool isLower(QChar s);
+ TQString format( TQString _s,TQString t);
+ TQString formatRegExp(TQString _s, TQString t, TQString tre,TQString stringSearch,TQString stringReplace);
+ static TQStringList words(TQString s);
+ static TQStringList sentences(TQString s);
+ static TQStringList sentencesSeparator(TQString s);
+ static TQString simple(TQString str,bool ck=false);
+ static bool isUpper(TQChar s);
+ static bool isLower(TQChar s);
};
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
index 4f048f9c..efa7e44d 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.cpp
@@ -1,12 +1,12 @@
#include "dbentries.h"
-#include <qdatastream.h>
+#include <tqdatastream.h>
void DBItem::set()
{
- QBuffer b(mydata);
+ TQBuffer b(mydata);
b.open( IO_WriteOnly );
- QDataStream s(&b);
+ TQDataStream s(&b);
write(&s);
b.close();
set_data(mydata.data());
@@ -18,7 +18,7 @@ void DBItem::set()
mydata.resize(get_size());
mydata.duplicate((const char *)get_data(),(unsigned int)get_size());
- QDataStream *s = new QDataStream(mydata,IO_ReadOnly);
+ TQDataStream *s = new TQDataStream(mydata,IO_ReadOnly);
read(s);
delete s;
}
@@ -31,18 +31,18 @@ DBItemMainKey::DBItemMainKey()
//set();
}
-DBItemMainKey::DBItemMainKey(QString searchstring)
+DBItemMainKey::DBItemMainKey(TQString searchstring)
{
sstr=searchstring;
//set();
}
-void DBItemMainKey::read(QDataStream *s)
+void DBItemMainKey::read(TQDataStream *s)
{
*s >> sstr;
}
-void DBItemMainKey::write(QDataStream *s)
+void DBItemMainKey::write(TQDataStream *s)
{
*s << sstr;
}
@@ -64,17 +64,17 @@ void DBItemMainData::clear()
//set();
}
-void DBItemMainData::read(QDataStream *s)
+void DBItemMainData::read(TQDataStream *s)
{
*s >> indexnumber >> translations;
}
-void DBItemMainData::write(QDataStream *s)
+void DBItemMainData::write(TQDataStream *s)
{
*s << (Q_UINT32)indexnumber << translations;
}
-void DBItemMainData::addTranslation(QString str, unsigned int ref)
+void DBItemMainData::addTranslation(TQString str, unsigned int ref)
{
//get();
if(translations[str].find(ref)==translations[str].end()) // If it do not exists
@@ -87,7 +87,7 @@ void DBItemMainData::addTranslation(QString str, unsigned int ref)
}
-void DBItemMainData::removeTranslation(QString str, unsigned int ref)
+void DBItemMainData::removeTranslation(TQString str, unsigned int ref)
{
//get();
translations[str].remove(ref);
@@ -100,8 +100,8 @@ void DBItemMainData::removeTranslation(QString str, unsigned int ref)
void DBItemMainData::removeRef( unsigned int ref)
{
//get();
-QMapIterator<QString,QValueList<unsigned int> > it2;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQMapIterator<TQString,TQValueList<unsigned int> > it2;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); /* it++*/)
{ //Dirty hack
it2=it;
@@ -113,11 +113,11 @@ QMapIterator<QString,QValueList<unsigned int> > it2;
//set();
}
-QStringList DBItemMainData::getTranslations()
+TQStringList DBItemMainData::getTranslations()
{
//get();
-QStringList result;
- for(QMapIterator<QString,QValueList<unsigned int> > it = translations.begin();
+TQStringList result;
+ for(TQMapIterator<TQString,TQValueList<unsigned int> > it = translations.begin();
it!= translations.end(); it++)
result.append(it.key());
@@ -125,7 +125,7 @@ return result;
}
-QValueList<unsigned int> DBItemMainData::getReferences(QString str)
+TQValueList<unsigned int> DBItemMainData::getReferences(TQString str)
{
//get();
return translations[str]; //this also add a "str" entry but we do not call set()!
@@ -160,12 +160,12 @@ void DBItemMultiIndex::removeEntry(unsigned int index)
}
-void DBItemMultiIndex::read(QDataStream *s)
+void DBItemMultiIndex::read(TQDataStream *s)
{
*s >> list;
}
-void DBItemMultiIndex::write(QDataStream *s)
+void DBItemMultiIndex::write(TQDataStream *s)
{
*s << list;
}
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
index 0a40878c..c4410ade 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbentries.h
@@ -2,19 +2,19 @@
#define DBENTRIES_H
#include <db4/db_cxx.h>
-#include <qstring.h>
-#include <qbuffer.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqbuffer.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
class CatalogInfo
{
- QString author;
- QDateTime datetime;
- QString filename;
- QString filepath;
+ TQString author;
+ TQDateTime datetime;
+ TQString filename;
+ TQString filepath;
};
@@ -23,13 +23,13 @@ class ResultInfo
{
public:
//Common info
- QString original; //placeholder
+ TQString original; //placeholder
//
//Multi reference info
- QValueList<CatalogInfo> catalogs;
+ TQValueList<CatalogInfo> catalogs;
- QString info;
+ TQString info;
};
@@ -54,9 +54,9 @@ public:
protected:
- virtual void read(QDataStream *s) = 0;
- virtual void write(QDataStream *s) = 0;
- QByteArray mydata;
+ virtual void read(TQDataStream *s) = 0;
+ virtual void write(TQDataStream *s) = 0;
+ TQByteArray mydata;
bool empty;
};
@@ -65,17 +65,17 @@ class DBItemMainKey : public DBItem
{
public:
DBItemMainKey();
- DBItemMainKey(QString searchstring);
+ DBItemMainKey(TQString searchstring);
- QString getString(){ return sstr;}
+ TQString getString(){ return sstr;}
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
- QString sstr;
+ TQString sstr;
};
@@ -84,21 +84,21 @@ class DBItemMainData : public DBItem
{
public:
- typedef QMapIterator<QString,QValueList<unsigned int> > TranslationIterator;
- typedef QMap<QString,QValueList<unsigned int> > TranslationMap;
+ typedef TQMapIterator<TQString,TQValueList<unsigned int> > TranslationIterator;
+ typedef TQMap<TQString,TQValueList<unsigned int> > TranslationMap;
DBItemMainData();
- QStringList getTranslations();
- QValueList<unsigned int> getReferences(QString str);
+ TQStringList getTranslations();
+ TQValueList<unsigned int> getReferences(TQString str);
void clear();
//Add a translation with reference ref, if translation exists append
// ref to the list of references
- void addTranslation(QString str,unsigned int ref);
- void removeTranslation(QString str,unsigned int ref);
+ void addTranslation(TQString str,unsigned int ref);
+ void removeTranslation(TQString str,unsigned int ref);
//remove any reference to ref, if ref is the only reference of a translation
// the translation is removed
@@ -109,8 +109,8 @@ class DBItemMainData : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
unsigned int indexnumber;
TranslationMap translations;
@@ -121,7 +121,7 @@ private:
class DBItemMultiIndex : public DBItem
{
public:
- typedef QValueList<unsigned int> IndexList;
+ typedef TQValueList<unsigned int> IndexList;
DBItemMultiIndex();
// DBItemMultiIndex(IndexList l);
@@ -134,8 +134,8 @@ class DBItemMultiIndex : public DBItem
private:
- virtual void read(QDataStream *s);
- virtual void write(QDataStream *s);
+ virtual void read(TQDataStream *s);
+ virtual void write(TQDataStream *s);
IndexList list;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
index b19b2db2..7c2d8564 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.cpp
@@ -18,8 +18,8 @@
*/
#include "dbscan.h"
#include <kconfig.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kurl.h>
#include <kdebug.h>
@@ -69,9 +69,9 @@ void MessagesSource::getDialogValues(SourceDialog *sd)
type=sd->type->currentItem();
}
-QValueList<KURL> MessagesSource::urls()
+TQValueList<KURL> MessagesSource::urls()
{
- QValueList<KURL> urlList;
+ TQValueList<KURL> urlList;
if(type==0)
urlList.append(location);
if(type==1|| type==2)
@@ -81,18 +81,18 @@ QValueList<KURL> MessagesSource::urls()
}
-QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
+TQValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
{
- QValueList<KURL> result;
- QDir d(url.path());
+ TQValueList<KURL> result;
+ TQDir d(url.path());
d.setMatchAllDirs(true);
kdDebug(0) << d.count() << " files in dir "<< url.path()<<endl;
const QFileInfoList* files = d.entryInfoList();
kdDebug(0) << files << endl;
- // QPtrListIterator<QFileInfo> it(*files);
+ // TQPtrListIterator<TQFileInfo> it(*files);
if(files){
- for (QPtrListIterator<QFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
+ for (TQPtrListIterator<TQFileInfo> fileit(*files); !fileit.atLast(); ++fileit )
{
if ((*fileit)->isDir())
{
@@ -120,14 +120,14 @@ QValueList<KURL> MessagesSource::filesInDir(KURL url,bool recursive)
//FIXME: clean this class
PoScanner::PoScanner(DataBaseInterface *dbi,
- QObject *parent,const char *name):QObject(parent,name)
+ TQObject *parent,const char *name):TQObject(parent,name)
{
di=dbi;
removeOldCatalogTranslation=true;
count=0;
}
-bool PoScanner::scanPattern(QString pathName,QString pattern,bool rec)
+bool PoScanner::scanPattern(TQString pathName,TQString pattern,bool rec)
{
int tot;
//Only one progress bar!!
@@ -138,18 +138,18 @@ if (!called)
{ pb=true; count=0;}
called=true;
-kdDebug(0) << QString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
+kdDebug(0) << TQString("Scanning: %1, %2").arg(pathName).arg(pattern) << endl;
if(pb)
{
emit patternStarted();
emit patternProgress(0);
}
- QDir d(pathName,pattern);
+ TQDir d(pathName,pattern);
d.setMatchAllDirs(true);
const QFileInfoList* files = d.entryInfoList();
tot=files->count();
- QPtrListIterator<QFileInfo> it(*files);
+ TQPtrListIterator<TQFileInfo> it(*files);
kdDebug(0) << tot << endl;
for ( int i=0; i<tot; i++ )
{
@@ -188,7 +188,7 @@ if(pb){called=false;count=0;}
return true;
}
-bool PoScanner::scanFile(QString fileName)
+bool PoScanner::scanFile(TQString fileName)
{
KURL u(fileName);
return scanURL(u);
@@ -202,10 +202,10 @@ emit fileStarted();
Catalog * catalog=new Catalog(this,"ScanPoCatalog");
-QString pretty=u.prettyURL();
-QString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
+TQString pretty=u.prettyURL();
+TQString location=pretty.right(pretty.length()-pretty.findRev("/")-1);
-connect(catalog,SIGNAL(signalProgress(int)),this,SIGNAL(fileLoading(int)));
+connect(catalog,TQT_SIGNAL(signalProgress(int)),this,TQT_SIGNAL(fileLoading(int)));
emit filename(location);
emit fileProgress(0);
emit fileLoading(0);
@@ -220,10 +220,10 @@ if(rr != OK && rr !=RECOVERED_PARSE_ERROR )
}
emit fileLoading(100);
-QString author;
+TQString author;
if(rr != HEADER_ERROR)
author=catalog->lastTranslator();
-else author=QString("");
+else author=TQString("");
//int catnum=dm->catalogRef(location,author,fileName);
InputInfo ii;
@@ -253,7 +253,7 @@ for (i=0;i<tot;i++) //Skip header = ????
if(!fuzzy && !untra)
{
int res;
- QString msgid,msgstr;
+ TQString msgid,msgstr;
msgid=catalog->msgid(i,true).first();
msgstr=catalog->msgstr(i).first();
res=di->addEntry(msgid,msgstr,&ii);
@@ -264,7 +264,7 @@ for (i=0;i<tot;i++) //Skip header = ????
}
-// kdDebug(0) << QString("File finished") << endl;
+// kdDebug(0) << TQString("File finished") << endl;
emit fileProgress(0);
emit fileLoading(0);
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
index 990d556c..e4cdf7da 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbscan.h
@@ -48,10 +48,10 @@ class MessagesSource
* It returns a list of urls to scan, the list contains single file if type is "SingleFile"
* or a list of files if type is "SingleDir" or "RecDir"
*/
- QValueList<KURL> urls();
+ TQValueList<KURL> urls();
private:
- QValueList<KURL> filesInDir(KURL url,bool recursive);
+ TQValueList<KURL> filesInDir(KURL url,bool recursive);
KURL location;
// The source type "SingleFile" =0, "SingleDirectory"=1, "RecursiveDirectory"=2
@@ -63,9 +63,9 @@ class MessagesSource
SearchFilter filter;
- QString projectName;
- QString projectKeywords;
- QString status;
+ TQString projectName;
+ TQString projectKeywords;
+ TQString status;
};
@@ -75,12 +75,12 @@ class PoScanner : public QObject
public:
- PoScanner(DataBaseInterface *dbi,QObject *parent=0,const char *name=0);
+ PoScanner(DataBaseInterface *dbi,TQObject *parent=0,const char *name=0);
/*
Scan a single PO file.
*/
- bool scanFile(QString fileName);
+ bool scanFile(TQString fileName);
/*
Scan a single URL file.
@@ -91,7 +91,7 @@ class PoScanner : public QObject
/*
Scan a list of space separated files with possible MetaCharacters
*/
- bool scanPattern(QString pathName,QString pattern="*.po",bool rec=false);
+ bool scanPattern(TQString pathName,TQString pattern="*.po",bool rec=false);
@@ -105,7 +105,7 @@ class PoScanner : public QObject
void patternProgress(int);
void patternFinished();
void added(int);
- void filename(QString);
+ void filename(TQString);
private:
// If true when a translation is found in a CATALOG the old translation for this CATALOG
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
index 9c286052..55f6a16f 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.cpp
@@ -22,7 +22,7 @@ KInstance *DbSe2Factory::s_instance = 0;
KAboutData *DbSe2Factory::s_about = 0;
-DbSe2Factory::DbSe2Factory( QObject *parent, const char *name)
+DbSe2Factory::DbSe2Factory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -43,10 +43,10 @@ DbSe2Factory::~DbSe2Factory()
}
-QObject *DbSe2Factory::createObject( QObject *parent, const char *name,
- const char *classname, const QStringList &)
+TQObject *DbSe2Factory::createObject( TQObject *parent, const char *name,
+ const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
index 4285d53c..2b70184a 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/dbse2_factory.h
@@ -9,12 +9,12 @@ class DbSe2Factory : public KLibFactory
{
Q_OBJECT
public:
- DbSe2Factory( QObject *parent=0, const char *name=0);
+ DbSe2Factory( TQObject *parent=0, const char *name=0);
~DbSe2Factory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0,
- const char *classname="QObject",
- const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0,
+ const char *classname="TQObject",
+ const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
index 7634a799..76aef878 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.cpp
@@ -1,13 +1,13 @@
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kurlrequester.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kstandarddirs.h>
#include <knuminput.h>
@@ -15,11 +15,11 @@
#include "dbse2.h"
#include "preferenceswidget.h"
-KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
+KDB2PreferencesWidget::KDB2PreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
-// QLabel *label = new QLabel(i18n("Settings for KDE Database Search Engine"),this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+// TQLabel *label = new TQLabel(i18n("Settings for KDE Database Search Engine"),this);
// layout->addWidget(label);
dbpw = new DBSearchEnginePrefWidget(this);
@@ -30,7 +30,7 @@ KDB2PreferencesWidget::KDB2PreferencesWidget(QWidget *parent, const char* name)
standard();
-// connect(dbpw->browseTB_3,SIGNAL(clicked()),SLOT(browse1()));
+// connect(dbpw->browseTB_3,TQT_SIGNAL(clicked()),TQT_SLOT(browse1()));
emit restoreNow(); //Fill with actual params.
@@ -52,7 +52,7 @@ emit restoreNow();
void KDB2PreferencesWidget::standard()
{
-QString defaultDir;
+TQString defaultDir;
KStandardDirs * dirs = KGlobal::dirs();
if(dirs)
{
diff --git a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
index 4714fd13..1f706902 100644
--- a/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/dbsearchengine2/preferenceswidget.h
@@ -9,7 +9,7 @@ class KDB2PreferencesWidget : public PrefWidget
Q_OBJECT
public:
- KDB2PreferencesWidget(QWidget *parent=0, const char* name=0);
+ KDB2PreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~KDB2PreferencesWidget();
virtual void apply();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
index 1448e2b0..c8d8c1db 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PaFactory::s_instance = 0;
KAboutData *PaFactory::s_about = 0;
-PaFactory::PaFactory( QObject *parent, const char *name)
+PaFactory::PaFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PaFactory::~PaFactory()
}
-QObject *PaFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PaFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
index 8871a538..901351c7 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/pa_factory.h
@@ -43,12 +43,12 @@ class PaFactory : public KLibFactory
{
Q_OBJECT
public:
- PaFactory( QObject *parent=0, const char *name=0);
+ PaFactory( TQObject *parent=0, const char *name=0);
~PaFactory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0
- , const char *classname="QObject"
- , const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0
+ , const char *classname="TQObject"
+ , const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
index 373f123d..eae86d65 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.cpp
@@ -37,9 +37,9 @@
#include <kglobal.h>
#include <kinstance.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqstylesheet.h>
#include "poauxiliary.h"
#include "preferenceswidget.h"
@@ -50,7 +50,7 @@
using namespace KBabel;
-PoAuxiliary::PoAuxiliary(QObject *parent, const char *name)
+PoAuxiliary::PoAuxiliary(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
catalog = new Catalog(this, "PoAuxiliary::catalog");
@@ -63,8 +63,8 @@ PoAuxiliary::PoAuxiliary(QObject *parent, const char *name)
ignoreFuzzy=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(loadAuxiliary()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(loadAuxiliary()));
msgidDict.setAutoDelete(true);
}
@@ -101,7 +101,7 @@ void PoAuxiliary::readSettings(KConfigBase *config)
{
bool needLoading=false;
- QString newPath = config->readEntry("Auxiliary"
+ TQString newPath = config->readEntry("Auxiliary"
,"../../../de/messages/@DIR1@/@PACKAGE@.po");
if(!initialized)
{
@@ -124,12 +124,12 @@ void PoAuxiliary::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *PoAuxiliary::preferencesWidget(QWidget *parent)
+PrefWidget *PoAuxiliary::preferencesWidget(TQWidget *parent)
{
prefWidget = new AuxiliaryPreferencesWidget(parent,"pocompendium_prefwidget");
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -142,24 +142,24 @@ const KAboutData *PoAuxiliary::about() const
}
-QString PoAuxiliary::name() const
+TQString PoAuxiliary::name() const
{
return i18n("PO Auxiliary");
}
-QString PoAuxiliary::id() const
+TQString PoAuxiliary::id() const
{
return "poauxiliary";
}
-QString PoAuxiliary::lastError()
+TQString PoAuxiliary::lastError()
{
return errorMsg;
}
-bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFilter*filter)
+bool PoAuxiliary::startSearch(const TQString& t, uint pluralForm, const SearchFilter*filter)
{
- QString text(t);
+ TQString text(t);
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
applySettings();
@@ -192,10 +192,10 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil
if( !(entry->fuzzy && ignoreFuzzy) )
{
SearchResult *result = new SearchResult;
- result->requested =QStyleSheet::convertFromPlainText(text);
- result->found = QStyleSheet::convertFromPlainText(text);
+ result->requested =TQStyleSheet::convertFromPlainText(text);
+ result->found = TQStyleSheet::convertFromPlainText(text);
result->translation =
- QStyleSheet::convertFromPlainText(entry->translation);
+ TQStyleSheet::convertFromPlainText(entry->translation);
result->plainRequested = text;
result->plainFound=text;
@@ -231,7 +231,7 @@ bool PoAuxiliary::startSearch(const QString& t, uint pluralForm, const SearchFil
}
-bool PoAuxiliary::startSearchInTranslation(const QString& text)
+bool PoAuxiliary::startSearchInTranslation(const TQString& text)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -263,10 +263,10 @@ bool PoAuxiliary::startSearchInTranslation(const QString& text)
if( !(entry->fuzzy && ignoreFuzzy) )
{
SearchResult *result = new SearchResult;
- result->requested =QStyleSheet::convertFromPlainText(entry->orig);
- result->found = QStyleSheet::convertFromPlainText(entry->orig);
+ result->requested =TQStyleSheet::convertFromPlainText(entry->orig);
+ result->found = TQStyleSheet::convertFromPlainText(entry->orig);
result->translation =
- QStyleSheet::convertFromPlainText(text);
+ TQStyleSheet::convertFromPlainText(text);
result->plainRequested = entry->orig;
result->plainFound=entry->orig;
@@ -317,7 +317,7 @@ void PoAuxiliary::applySettings()
if(isSearching())
stopSearch();
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -356,7 +356,7 @@ void PoAuxiliary::loadAuxiliary()
loading=true;
error=false;
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -370,14 +370,14 @@ void PoAuxiliary::loadAuxiliary()
}
if(path.contains("@PACKAGEDIR@"))
{
- QString packagedir;
+ TQString packagedir;
int pos=package.findRev("/");
if( pos > 0 ) packagedir=package.left(pos);
else packagedir="";
path.replace("@PACKAGEDIR@",packagedir);
kdDebug(KBABEL_SEARCH) << "Packagedir found " << packagedir << endl;
}
- QRegExp reg("@DIR[0-9]+@");
+ TQRegExp reg("@DIR[0-9]+@");
if(path.contains(reg))
{
int pos=reg.search(path);
@@ -385,14 +385,14 @@ void PoAuxiliary::loadAuxiliary()
while(pos>=0)
{
- QString num=path.mid(pos+4,len-5);
+ TQString num=path.mid(pos+4,len-5);
bool ok;
int number=num.toInt(&ok);
if(ok)
{
- QString dir=directory(editedFile,number);
- QString s("@DIR%1@");
+ TQString dir=directory(editedFile,number);
+ TQString s("@DIR%1@");
path.replace(s.arg(number),dir);
pos+=dir.length();
@@ -404,7 +404,7 @@ void PoAuxiliary::loadAuxiliary()
}
KURL u;
- QRegExp rel("^[a-zA-Z]+:");
+ TQRegExp rel("^[a-zA-Z]+:");
if(rel.search(path) >= 0)
{
u=path;
@@ -412,7 +412,7 @@ void PoAuxiliary::loadAuxiliary()
else if(path[0] != '/') // relative path
{
KURL temp(editedFile);
- QString dir = temp.directory();
+ TQString dir = temp.directory();
kdDebug(KBABEL_SEARCH) << dir << endl;
u.setPath(dir+"/"+path);
u.cleanPath();
@@ -424,8 +424,8 @@ void PoAuxiliary::loadAuxiliary()
}
emit progressStarts(i18n("Loading PO auxiliary"));
- connect(catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ connect(catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
ConversionStatus stat = catalog->openURL(u);
if( stat != OK && stat != RECOVERED_PARSE_ERROR)
@@ -476,8 +476,8 @@ void PoAuxiliary::loadAuxiliary()
auxTranslator = catalog->lastTranslator();
}
- disconnect(catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ disconnect(catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
emit progressEnds();
@@ -489,7 +489,7 @@ void PoAuxiliary::loadAuxiliary()
}
-void PoAuxiliary::setEditedFile(const QString& file)
+void PoAuxiliary::setEditedFile(const TQString& file)
{
if(initialized && (url.contains("@DIR") || KURL::isRelativeURL(url))
&& file!=editedFile && !loadTimer->isActive() )
@@ -501,7 +501,7 @@ void PoAuxiliary::setEditedFile(const QString& file)
}
-void PoAuxiliary::setEditedPackage(const QString& pack)
+void PoAuxiliary::setEditedPackage(const TQString& pack)
{
if(initialized && url.contains("@PACKAGE@") && pack!=package
&& !loadTimer->isActive() )
@@ -513,7 +513,7 @@ void PoAuxiliary::setEditedPackage(const QString& pack)
}
-void PoAuxiliary::setLanguageCode(const QString& lang)
+void PoAuxiliary::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -529,7 +529,7 @@ bool PoAuxiliary::usesRichTextResults()
return true;
}
-QString PoAuxiliary::translate(const QString& text, uint pluralForm)
+TQString PoAuxiliary::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -538,7 +538,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm)
if(error)
{
- return QString::null;
+ return TQString::null;
}
Entry *entry = msgidDict[text];
@@ -547,7 +547,7 @@ QString PoAuxiliary::translate(const QString& text, uint pluralForm)
return entry->translation;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
index 27fecba6..e0f4fe5d 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/poauxiliary.h
@@ -36,8 +36,8 @@
#include "searchengine.h"
-#include <qguardedptr.h>
-#include <qdict.h>
+#include <tqguardedptr.h>
+#include <tqdict.h>
class QTimer;
namespace KBabel
@@ -52,40 +52,40 @@ class PoAuxiliary : public SearchEngine
Q_OBJECT
public:
- PoAuxiliary(QObject *parent=0, const char *name=0);
+ PoAuxiliary(TQObject *parent=0, const char *name=0);
virtual ~PoAuxiliary();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
virtual bool usesRichTextResults();
public slots:
- virtual bool startSearch(const QString& text, unsigned int pluralForm
+ virtual bool startSearch(const TQString& text, unsigned int pluralForm
, const SearchFilter*filter);
- virtual bool startSearchInTranslation(const QString& text);
+ virtual bool startSearchInTranslation(const TQString& text);
virtual void stopSearch();
- virtual void setEditedFile(const QString&);
- virtual void setEditedPackage(const QString&);
- virtual void setLanguageCode(const QString&);
+ virtual void setEditedFile(const TQString&);
+ virtual void setEditedPackage(const TQString&);
+ virtual void setLanguageCode(const TQString&);
protected slots:
@@ -98,39 +98,39 @@ protected slots:
void loadAuxiliary();
private:
- QGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
+ TQGuardedPtr<AuxiliaryPreferencesWidget> prefWidget;
KBabel::Catalog *catalog;
- QString auxPackage;
- QString auxTranslator;
- QString auxURL;
+ TQString auxPackage;
+ TQString auxTranslator;
+ TQString auxURL;
- QString url;
+ TQString url;
bool ignoreFuzzy;
- QString editedFile;
- QString package;
- QString langCode;
+ TQString editedFile;
+ TQString package;
+ TQString langCode;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool loading;
bool initialized;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
struct Entry
{
- QString orig;
- QString translation;
- QString comment;
+ TQString orig;
+ TQString translation;
+ TQString comment;
bool fuzzy;
};
- QDict<Entry> msgidDict;
- QDict<Entry> msgstrDict;
+ TQDict<Entry> msgidDict;
+ TQDict<Entry> msgstrDict;
};
#endif
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
index e8d48032..5a534ecf 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.cpp
@@ -30,12 +30,12 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -43,18 +43,18 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(QWidget *parent, const char* name)
+AuxiliaryPreferencesWidget::AuxiliaryPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new PWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
}
AuxiliaryPreferencesWidget::~AuxiliaryPreferencesWidget()
@@ -78,13 +78,13 @@ void AuxiliaryPreferencesWidget::standard()
changed=true;
}
-void AuxiliaryPreferencesWidget::setURL(const QString url)
+void AuxiliaryPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
}
-QString AuxiliaryPreferencesWidget::url()
+TQString AuxiliaryPreferencesWidget::url()
{
changed = false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
index 45488158..3f0862b2 100644
--- a/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/poauxiliary/preferenceswidget.h
@@ -44,15 +44,15 @@ class AuxiliaryPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- AuxiliaryPreferencesWidget(QWidget *parent=0, const char* name=0);
+ AuxiliaryPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~AuxiliaryPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
- QString url();
+ void setURL(const TQString url);
+ TQString url();
void setIgnoreFuzzy(bool);
bool ignoreFuzzy();
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
index d862b236..9eb816bd 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.cpp
@@ -42,8 +42,8 @@
using namespace KBabel;
-CompendiumData::CompendiumData(QObject *parent)
- : QObject(parent)
+CompendiumData::CompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -53,7 +53,7 @@ CompendiumData::CompendiumData(QObject *parent)
, _wordDict(9887)
, _textonlyDict(9887)
{
- _catalog = new Catalog(this, "CompendiumData::catalog", QString::null);
+ _catalog = new Catalog(this, "CompendiumData::catalog", TQString::null);
_exactDict.setAutoDelete(true);
_allDict.setAutoDelete(true);
_wordDict.setAutoDelete(true);
@@ -77,12 +77,12 @@ bool CompendiumData::load(KURL url)
emit progressStarts(i18n("Loading PO compendium"));
- connect(_catalog, SIGNAL(signalProgress(int)), this, SIGNAL(progress(int)));
+ connect(_catalog, TQT_SIGNAL(signalProgress(int)), this, TQT_SIGNAL(progress(int)));
ConversionStatus stat=_catalog->openURL(url);
- disconnect(_catalog, SIGNAL(signalProgress(int))
- , this, SIGNAL(progress(int)));
+ disconnect(_catalog, TQT_SIGNAL(signalProgress(int))
+ , this, TQT_SIGNAL(progress(int)));
if( stat!= OK && stat != RECOVERED_PARSE_ERROR)
@@ -113,7 +113,7 @@ bool CompendiumData::load(KURL url)
}
// FIXME: shoudl care about plural forms
- QString temp = _catalog->msgid(i,true).first();
+ TQString temp = _catalog->msgid(i,true).first();
int *index = new int(i);
_exactDict.insert(temp,index);
@@ -125,25 +125,25 @@ bool CompendiumData::load(KURL url)
if(!temp.isEmpty() && temp.length() > 1)
{
// add to allDict
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(i);
// add to textonlyDict
- QString temp1 = temp;
+ TQString temp1 = temp;
temp1.remove( ' ' );
indexList=_textonlyDict[temp1];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_textonlyDict.insert(temp1,indexList);
kdDebug() << "Adding " << temp1 << endl;
}
@@ -151,8 +151,8 @@ bool CompendiumData::load(KURL url)
indexList->append(i);
// add to wordDict
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -161,7 +161,7 @@ bool CompendiumData::load(KURL url)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -173,7 +173,7 @@ bool CompendiumData::load(KURL url)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -198,34 +198,34 @@ bool CompendiumData::load(KURL url)
return true;
}
-const int* CompendiumData::exactDict(const QString text) const
+const int* CompendiumData::exactDict(const TQString text) const
{
return _exactDict[text];
}
-const QValueList<int>* CompendiumData::allDict(const QString text) const
+const TQValueList<int>* CompendiumData::allDict(const TQString text) const
{
return _allDict[text];
}
-const QValueList<int>* CompendiumData::wordDict(const QString text) const
+const TQValueList<int>* CompendiumData::wordDict(const TQString text) const
{
return _wordDict[text];
}
-const QValueList<int>* CompendiumData::textonlyDict(const QString text) const
+const TQValueList<int>* CompendiumData::textonlyDict(const TQString text) const
{
return _textonlyDict[text];
}
-void CompendiumData::registerObject(QObject *obj)
+void CompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool CompendiumData::unregisterObject(QObject *obj)
+bool CompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -237,9 +237,9 @@ bool CompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString CompendiumData::simplify(const QString string)
+TQString CompendiumData::simplify(const TQString string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -251,11 +251,11 @@ QString CompendiumData::simplify(const QString string)
return result;
}
-QStringList CompendiumData::wordList(const QString string)
+TQStringList CompendiumData::wordList(const TQString string)
{
- QString result=CompendiumData::simplify(string);
+ TQString result=CompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "compendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
index 2fec45cb..d5668b4a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
+++ b/kbabel/kbabeldict/modules/pocompendium/compendiumdata.h
@@ -35,11 +35,11 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
namespace KBabel
{
@@ -51,38 +51,38 @@ class CompendiumData : public QObject
Q_OBJECT
public:
- CompendiumData(QObject *parent=0);
+ CompendiumData(TQObject *parent=0);
bool load(KURL url);
const KBabel::Catalog *catalog() const { return _catalog; }
- const int *exactDict(const QString text) const;
- const QValueList<int> *allDict(const QString text) const;
- const QValueList<int> *wordDict(const QString text) const;
- const QValueList<int> *textonlyDict(const QString text) const;
+ const int *exactDict(const TQString text) const;
+ const TQValueList<int> *allDict(const TQString text) const;
+ const TQValueList<int> *wordDict(const TQString text) const;
+ const TQValueList<int> *textonlyDict(const TQString text) const;
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString text);
- static QStringList wordList(const QString text);
+ static TQString simplify(const TQString text);
+ static TQStringList wordList(const TQString text);
signals:
- void progressStarts(const QString);
+ void progressStarts(const TQString);
void progressEnds();
void progress(int);
@@ -91,15 +91,15 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
KBabel::Catalog *_catalog;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
- QDict< QValueList<int> > _textonlyDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
+ TQDict< TQValueList<int> > _textonlyDict;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
index 882cc064..37ae63a4 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
index d52fadfe..1b0b8820 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pc_factory.h
@@ -43,12 +43,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0
- , const char *classname="QObject"
- , const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0
+ , const char *classname="TQObject"
+ , const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
index 0cd79fb3..5220f88a 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp
@@ -41,9 +41,9 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "resources.h"
#include "compendiumdata.h"
@@ -60,10 +60,10 @@
using namespace KBabel;
-static KStaticDeleter< QDict<CompendiumData> > compDataDeleter;
-QDict<CompendiumData> *PoCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<CompendiumData> > compDataDeleter;
+TQDict<CompendiumData> *PoCompendium::_compDict = 0;
-PoCompendium::PoCompendium(QObject *parent, const char *name)
+PoCompendium::PoCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -87,8 +87,8 @@ PoCompendium::PoCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
PoCompendium::~PoCompendium()
@@ -145,7 +145,7 @@ void PoCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -160,13 +160,13 @@ void PoCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *PoCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *PoCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new CompendiumPreferencesWidget(parent,"pocompendium_prefwidget");
kdDebug(KBABEL_SEARCH) << "PreferencesWidget is " << prefWidget << endl;
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -179,22 +179,22 @@ const KAboutData *PoCompendium::about() const
}
-QString PoCompendium::name() const
+TQString PoCompendium::name() const
{
return i18n("PO Compendium");
}
-QString PoCompendium::id() const
+TQString PoCompendium::id() const
{
return "pocompendium";
}
-QString PoCompendium::lastError()
+TQString PoCompendium::lastError()
{
return errorMsg;
}
-bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchExact(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
const int *index = data->exactDict(text);
if(index)
@@ -222,14 +222,14 @@ bool PoCompendium::searchExact(const QString& text, uint pluralForm, QPtrList<Se
}
-bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
+ TQString searchStr = text.lower();
- const QValueList<int> *indexList = data->allDict(text.lower());
+ const TQValueList<int> *indexList = data->allDict(text.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -243,7 +243,7 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -276,16 +276,16 @@ bool PoCompendium::searchCaseInsensitive(const QString& text, uint pluralForm, Q
return false;
}
-bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& )
+bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& )
{
- QString searchStr = text.lower();
- QString t = text;
+ TQString searchStr = text.lower();
+ TQString t = text;
t.remove( " " );
- const QValueList<int> *indexList = data->textonlyDict(t.lower());
+ const TQValueList<int> *indexList = data->textonlyDict(t.lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -299,7 +299,7 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
}
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -325,22 +325,22 @@ bool PoCompendium::searchTextOnly(const QString& text, uint pluralForm, QPtrList
return false;
}
-bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QStringList wList = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = CompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
break;
- const QValueList<int> *indexList = data->wordDict((*wit).lower());
+ const TQValueList<int> *indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -371,7 +371,7 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(*it).first();
+ TQString origStr = data->catalog()->msgid(*it).first();
origStr = CompendiumData::simplify(origStr);
@@ -389,8 +389,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -421,8 +421,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -430,8 +430,8 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -440,13 +440,13 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -483,15 +483,15 @@ bool PoCompendium::searchWords(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices )
+bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices )
{
uint checkCounter = 0;
bool foundResults = false;
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -539,7 +539,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
kapp->processEvents(100);
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -564,8 +564,8 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -575,19 +575,19 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
if(!found && matchWords)
{
- QStringList list = CompendiumData::wordList(searchStr);
+ TQStringList list = CompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -632,7 +632,7 @@ bool PoCompendium::searchNGram(const QString& searchStr, uint pluralForm, QPtrLi
return foundResults;
}
-bool PoCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter* filter)
+bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -669,13 +669,13 @@ bool PoCompendium::startSearch(const QString& text, uint pluralForm, const Searc
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
searchExact(text, pluralForm, results, foundIndices, checkedIndices);
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -738,7 +738,7 @@ void PoCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -795,7 +795,7 @@ void PoCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -828,7 +828,7 @@ void PoCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -847,7 +847,7 @@ void PoCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -864,7 +864,7 @@ void PoCompendium::recheckData()
loading=false;
}
-QString PoCompendium::maskString(QString s)
+TQString PoCompendium::maskString(TQString s)
{
s.replace("\\","\\\\");
s.replace("\?","\\?");
@@ -883,7 +883,7 @@ QString PoCompendium::maskString(QString s)
return s;
}
-void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
+void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res)
{
if(res.last() && res.last()->score >= result->score)
{
@@ -915,7 +915,7 @@ void PoCompendium::addResult(SearchResult *result, QPtrList<SearchResult>& res)
}
-void PoCompendium::setLanguageCode(const QString& lang)
+void PoCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -926,7 +926,7 @@ void PoCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString PoCompendium::translate(const QString& text, uint pluralForm)
+TQString PoCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -938,7 +938,7 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -950,10 +950,10 @@ QString PoCompendium::translate(const QString& text, uint pluralForm)
return data->catalog()->msgstr(*index).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const uint pluralForm)
+TQString PoCompendium::fuzzyTranslation(const TQString& text, int &score, const uint pluralForm)
{
if(!initialized)
{
@@ -965,7 +965,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -976,7 +976,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
int best_match = 0;
int total = data->catalog()->numberOfEntries();
- QString searchStr = CompendiumData::simplify(text);
+ TQString searchStr = CompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -1004,7 +1004,7 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
}
// get a message from the catalog FIXME: plurals
- QString origStr = data->catalog()->msgid(i).first();
+ TQString origStr = data->catalog()->msgid(i).first();
origStr = CompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -1029,11 +1029,11 @@ QString PoCompendium::fuzzyTranslation(const QString& text, int &score, const ui
return data->catalog()->msgstr(best_matching).first();
}
- return QString::null;
+ return TQString::null;
}
-QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint pluralForm)
+TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const uint pluralForm)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -1041,7 +1041,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
if(isSearching())
- return QString::null;
+ return TQString::null;
clearResults();
stop = false;
@@ -1058,21 +1058,21 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
if(error || !data)
{
active = false;
- return QString::null;
+ return TQString::null;
}
if(data->active())
{
active = false;
- return QString::null;
+ return TQString::null;
}
emit started();
- QPtrList<SearchResult> res;
+ TQPtrList<SearchResult> res;
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
// first, exact search
if( searchExact(text, pluralForm, res, foundIndices, checkedIndices) )
@@ -1086,7 +1086,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
return res.first()->translation;
}
- QString searchStr=CompendiumData::simplify(text);
+ TQString searchStr=CompendiumData::simplify(text);
if(!caseSensitive)
@@ -1107,7 +1107,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
}
// search without whitespace
- QString s = searchStr;
+ TQString s = searchStr;
s.remove( ' ' );
if( searchTextOnly(s, pluralForm, res, foundIndices, checkedIndices) )
{
@@ -1145,7 +1145,7 @@ QString PoCompendium::searchTranslation(const QString& text, int &sc, const uint
sc = 0;
- return QString::null;
+ return TQString::null;
}
@@ -1153,14 +1153,14 @@ void PoCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -1171,7 +1171,7 @@ void PoCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -1195,22 +1195,22 @@ void PoCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(
- progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(
+ progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void PoCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("CompendiumData"))
{
const CompendiumData *d=static_cast<const CompendiumData*>(s);
if(d)
{
- QDictIterator<CompendiumData> it(*compendiumDict());
+ TQDictIterator<CompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -1230,11 +1230,11 @@ void PoCompendium::removeData()
}
}
-QDict<CompendiumData> *PoCompendium::compendiumDict()
+TQDict<CompendiumData> *PoCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<CompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<CompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
index 6d92fb58..d96774e9 100644
--- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
+++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.h
@@ -39,10 +39,10 @@
#include "compendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
class CompendiumPreferencesWidget;
class KConfigBase;
@@ -53,35 +53,35 @@ class PoCompendium : public SearchEngine
Q_OBJECT
public:
- PoCompendium(QObject *parent=0, const char *name=0);
+ PoCompendium(TQObject *parent=0, const char *name=0);
virtual ~PoCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString&text, uint pluralForm);
- virtual QString searchTranslation(const QString&, int &score, const uint pluralForm);
- virtual QString fuzzyTranslation(const QString&, int &score, const uint pluralForm);
+ virtual TQString translate(const TQString&text, uint pluralForm);
+ virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString&, int &score, const uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
public slots:
- virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
+ virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -97,27 +97,27 @@ protected slots:
protected:
void loadCompendium();
- void addResult(SearchResult *, QPtrList<SearchResult>& allResults);
- QString maskString(QString string);
+ void addResult(SearchResult *, TQPtrList<SearchResult>& allResults);
+ TQString maskString(TQString string);
void registerData();
void unregisterData();
- bool searchExact(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchTextOnly(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchCaseInsensitive(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchWords(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
- bool searchNGram(const QString& searchString, uint pluralForm, QPtrList<SearchResult>& results, QValueList<int>& foundIndices, QValueList<int>& checkedIndices );
+ bool searchExact(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchTextOnly(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchCaseInsensitive(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchWords(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
+ bool searchNGram(const TQString& searchString, uint pluralForm, TQPtrList<SearchResult>& results, TQValueList<int>& foundIndices, TQValueList<int>& checkedIndices );
private:
- QGuardedPtr<CompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<CompendiumPreferencesWidget> prefWidget;
CompendiumData *data;
KBabel::PoInfo catalogInfo;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool ignoreFuzzy;
@@ -133,15 +133,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<CompendiumData> *_compDict;
- static QDict<CompendiumData> *compendiumDict();
+ static TQDict<CompendiumData> *_compDict;
+ static TQDict<CompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
index c3ce730d..1f3a8b37 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.cpp
@@ -30,13 +30,13 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -44,72 +44,72 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-CompendiumPreferencesWidget::CompendiumPreferencesWidget(QWidget *parent, const char* name)
+CompendiumPreferencesWidget::CompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new CompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->fuzzyBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->fuzzyBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example if you want to perform a case sensitive search, or if "
"you want fuzzy messages to be ignored.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->fuzzyBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
CompendiumPreferencesWidget::~CompendiumPreferencesWidget()
@@ -143,7 +143,7 @@ void CompendiumPreferencesWidget::standard()
changed=true;
}
-void CompendiumPreferencesWidget::setURL(const QString url)
+void CompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -200,7 +200,7 @@ void CompendiumPreferencesWidget::setMatchWords(bool on)
-QString CompendiumPreferencesWidget::url()
+TQString CompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
index db70df4d..3a22bc31 100644
--- a/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/pocompendium/preferenceswidget.h
@@ -44,14 +44,14 @@ class CompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- CompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ CompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~CompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -61,7 +61,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
index a3dcfdf9..eaea5194 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.cpp
@@ -54,7 +54,7 @@ KInstance *PcFactory::s_instance = 0;
KAboutData *PcFactory::s_about = 0;
-PcFactory::PcFactory( QObject *parent, const char *name)
+PcFactory::PcFactory( TQObject *parent, const char *name)
: KLibFactory(parent,name)
{
}
@@ -75,10 +75,10 @@ PcFactory::~PcFactory()
}
-QObject *PcFactory::createObject( QObject *parent, const char *name
- , const char *classname, const QStringList &)
+TQObject *PcFactory::createObject( TQObject *parent, const char *name
+ , const char *classname, const TQStringList &)
{
- if(QCString(classname) != "SearchEngine")
+ if(TQCString(classname) != "SearchEngine")
{
kdError() << "not a SearchEngine requested" << endl;
return 0;
diff --git a/kbabel/kbabeldict/modules/tmx/pc_factory.h b/kbabel/kbabeldict/modules/tmx/pc_factory.h
index 5ef08277..74739e0a 100644
--- a/kbabel/kbabeldict/modules/tmx/pc_factory.h
+++ b/kbabel/kbabeldict/modules/tmx/pc_factory.h
@@ -45,12 +45,12 @@ class PcFactory : public KLibFactory
{
Q_OBJECT
public:
- PcFactory( QObject *parent=0, const char *name=0);
+ PcFactory( TQObject *parent=0, const char *name=0);
~PcFactory();
- virtual QObject *createObject( QObject *parent=0, const char *name=0
- , const char *classname="QObject"
- , const QStringList &args = QStringList());
+ virtual TQObject *createObject( TQObject *parent=0, const char *name=0
+ , const char *classname="TQObject"
+ , const TQStringList &args = TQStringList());
static KInstance *instance();
diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
index 1202496d..85d38294 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.cpp
@@ -32,13 +32,13 @@
your version.
**************************************************************************** */
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include <klineedit.h>
#include <klocale.h>
#include <kurlrequester.h>
@@ -46,68 +46,68 @@
#include "preferenceswidget.h"
#include "pwidget.h"
-TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(QWidget *parent, const char* name)
+TmxCompendiumPreferencesWidget::TmxCompendiumPreferencesWidget(TQWidget *parent, const char* name)
: PrefWidget(parent,name)
, changed(false)
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
prefWidget = new TmxCompendiumPWidget(this);
layout->addWidget(prefWidget);
- connect(prefWidget->caseBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
- connect(prefWidget->wholeBtn, SIGNAL(toggled(bool))
- , this, SLOT(setChanged()));
+ connect(prefWidget->caseBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
+ connect(prefWidget->wholeBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(setChanged()));
- connect(prefWidget->urlInput->lineEdit(),SIGNAL(textChanged(const QString&))
- , this, SLOT(setChanged()));
-
- connect(prefWidget->equalBtn, SIGNAL(toggled(bool))
- , this, SLOT(equalBtnToggled(bool)));
- connect(prefWidget->ngramBtn, SIGNAL(toggled(bool))
- , this, SLOT(ngramBtnToggled(bool)));
- connect(prefWidget->isContainedBtn, SIGNAL(toggled(bool))
- , this, SLOT(isContainedBtnToggled(bool)));
- connect(prefWidget->containsBtn, SIGNAL(toggled(bool))
- , this, SLOT(containsBtnToggled(bool)));
- connect(prefWidget->hasWordBtn, SIGNAL(toggled(bool))
- , this, SLOT(hasWordBtnToggled(bool)));
-
-
- QString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
+ connect(prefWidget->urlInput->lineEdit(),TQT_SIGNAL(textChanged(const TQString&))
+ , this, TQT_SLOT(setChanged()));
+
+ connect(prefWidget->equalBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(equalBtnToggled(bool)));
+ connect(prefWidget->ngramBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(ngramBtnToggled(bool)));
+ connect(prefWidget->isContainedBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(isContainedBtnToggled(bool)));
+ connect(prefWidget->containsBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(containsBtnToggled(bool)));
+ connect(prefWidget->hasWordBtn, TQT_SIGNAL(toggled(bool))
+ , this, TQT_SLOT(hasWordBtnToggled(bool)));
+
+
+ TQString whatsthis=i18n("<qt><p><b>Parameters</b></p>"
"<p>Here you can fine-tune searching within the PO file. "
"For example, if you want to perform a case sensitive search.</p></qt>" );
- QWhatsThis::add(prefWidget->caseBtn,whatsthis);
- QWhatsThis::add(prefWidget->wholeBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->caseBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->wholeBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Comparison Options</b></p>"
"<p>Choose here which messages you want to have treated as a matching "
"message.</p></qt>");
- QWhatsThis::add(prefWidget->equalBtn,whatsthis);
- QWhatsThis::add(prefWidget->containsBtn,whatsthis);
- QWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
- QWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->equalBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->containsBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->isContainedBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->hasWordBtn,whatsthis);
whatsthis = i18n("<qt><p><b>3-Gram-matching</b></p>"
"<p>A message matches another if most of its 3-letter groups are "
"contained in the other message. e.g. 'abc123' matches 'abcx123c12'.</p></qt>");
- QWhatsThis::add(prefWidget->ngramBtn,whatsthis);
+ TQWhatsThis::add(prefWidget->ngramBtn,whatsthis);
whatsthis = i18n("<qt><p><b>Location</b></p>"
"<p>Configure here which file is to be used for searching."
"</p></qt>");
- QWhatsThis::add(prefWidget->urlInput,whatsthis);
+ TQWhatsThis::add(prefWidget->urlInput,whatsthis);
}
TmxCompendiumPreferencesWidget::~TmxCompendiumPreferencesWidget()
@@ -139,7 +139,7 @@ void TmxCompendiumPreferencesWidget::standard()
changed=true;
}
-void TmxCompendiumPreferencesWidget::setURL(const QString url)
+void TmxCompendiumPreferencesWidget::setURL(const TQString url)
{
prefWidget->urlInput->setURL(url);
changed=false;
@@ -190,7 +190,7 @@ void TmxCompendiumPreferencesWidget::setMatchWords(bool on)
-QString TmxCompendiumPreferencesWidget::url()
+TQString TmxCompendiumPreferencesWidget::url()
{
changed=false;
return prefWidget->urlInput->url();
diff --git a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
index c8356c3d..e2a4b900 100644
--- a/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
+++ b/kbabel/kbabeldict/modules/tmx/preferenceswidget.h
@@ -46,14 +46,14 @@ class TmxCompendiumPreferencesWidget : public PrefWidget
Q_OBJECT
public:
- TmxCompendiumPreferencesWidget(QWidget *parent=0, const char* name=0);
+ TmxCompendiumPreferencesWidget(TQWidget *parent=0, const char* name=0);
virtual ~TmxCompendiumPreferencesWidget();
virtual void apply();
virtual void cancel();
virtual void standard();
- void setURL(const QString url);
+ void setURL(const TQString url);
void setMatchEqual(bool);
void setMatchNGram(bool);
void setMatchIsContained(bool);
@@ -62,7 +62,7 @@ public:
void setWholeWords(bool);
void setCaseSensitive(bool);
- QString url();
+ TQString url();
bool matchEqual();
bool matchNGram();
bool matchIsContained();
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
index 152bc536..415992bf 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.cpp
@@ -41,8 +41,8 @@
#include <kinstance.h>
#include <kio/netaccess.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include "tmxcompendiumdata.h"
#include "tmxcompendium.h"
@@ -55,10 +55,10 @@
#define NGRAM_LEN 3
#define LIM_NGRAM 50
-static KStaticDeleter< QDict<TmxCompendiumData> > compDataDeleter;
-QDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
+static KStaticDeleter< TQDict<TmxCompendiumData> > compDataDeleter;
+TQDict<TmxCompendiumData> *TmxCompendium::_compDict = 0;
-TmxCompendium::TmxCompendium(QObject *parent, const char *name)
+TmxCompendium::TmxCompendium(TQObject *parent, const char *name)
: SearchEngine(parent, name)
{
prefWidget=0;
@@ -81,8 +81,8 @@ TmxCompendium::TmxCompendium(QObject *parent, const char *name)
matchWords=true;
- loadTimer = new QTimer(this);
- connect(loadTimer,SIGNAL(timeout()),this,SLOT(slotLoadCompendium()));
+ loadTimer = new TQTimer(this);
+ connect(loadTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotLoadCompendium()));
}
TmxCompendium::~TmxCompendium()
@@ -137,7 +137,7 @@ void TmxCompendium::readSettings(KConfigBase *config)
matchWords = config->readBoolEntry("MatchWords",true);
matchNGram = config->readBoolEntry("MatchNGram",true);
- QString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
+ TQString newPath = config->readEntry("Compendium","http://i18n.kde.org/po_overview/@LANG@.messages");
if(!initialized)
{
url = newPath;
@@ -152,12 +152,12 @@ void TmxCompendium::readSettings(KConfigBase *config)
restoreSettings();
}
-PrefWidget *TmxCompendium::preferencesWidget(QWidget *parent)
+PrefWidget *TmxCompendium::preferencesWidget(TQWidget *parent)
{
prefWidget = new TmxCompendiumPreferencesWidget(parent,"tmxcompendium_prefwidget");
- connect(prefWidget, SIGNAL(applySettings()), this, SLOT(applySettings()));
- connect(prefWidget, SIGNAL(restoreSettings())
- , this, SLOT(restoreSettings()));
+ connect(prefWidget, TQT_SIGNAL(applySettings()), this, TQT_SLOT(applySettings()));
+ connect(prefWidget, TQT_SIGNAL(restoreSettings())
+ , this, TQT_SLOT(restoreSettings()));
restoreSettings();
@@ -170,23 +170,23 @@ const KAboutData *TmxCompendium::about() const
}
-QString TmxCompendium::name() const
+TQString TmxCompendium::name() const
{
return i18n("TMX Compendium");
}
-QString TmxCompendium::id() const
+TQString TmxCompendium::id() const
{
return "tmxcompendium";
}
-QString TmxCompendium::lastError()
+TQString TmxCompendium::lastError()
{
return errorMsg;
}
-bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const SearchFilter*)
+bool TmxCompendium::startSearch(const TQString& text, uint pluralForm, const SearchFilter*)
{
if(autoUpdate && prefWidget && prefWidget->settingsChanged())
{
@@ -223,8 +223,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit started();
- QValueList<int> foundIndices;
- QValueList<int> checkedIndices;
+ TQValueList<int> foundIndices;
+ TQValueList<int> checkedIndices;
uint checkCounter=0;
const int *index = data->exactDict(text);
@@ -240,8 +240,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
results.append(result);
@@ -250,7 +250,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit resultFound(result);
}
- QString searchStr=TmxCompendiumData::simplify(text);
+ TQString searchStr=TmxCompendiumData::simplify(text);
if(!caseSensitive)
@@ -258,13 +258,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
searchStr = searchStr.lower();
}
- QString temp = searchStr;
+ TQString temp = searchStr;
temp = temp.lower();
- const QValueList<int> *indexList = data->allDict(temp);
+ const TQValueList<int> *indexList = data->allDict(temp);
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(foundIndices.contains(*it))
@@ -272,7 +272,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
continue;
}
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -294,8 +294,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -303,8 +303,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
}
- QStringList wList = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit = wList.begin()
+ TQStringList wList = TmxCompendiumData::wordList(searchStr);
+ for ( TQStringList::Iterator wit = wList.begin()
; wit != wList.end(); ++wit )
{
if(stop)
@@ -313,7 +313,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
indexList = data->wordDict((*wit).lower());
if(indexList)
{
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
for( it = indexList->begin(); it != indexList->end(); ++it )
{
if(stop)
@@ -339,7 +339,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
kapp->processEvents(100);
- QString origStr = data->msgid(*it);
+ TQString origStr = data->msgid(*it);
origStr = TmxCompendiumData::simplify(origStr);
@@ -357,8 +357,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
else
{
- QString s=*wit;
- QString o=origStr;
+ TQString s=*wit;
+ TQString o=origStr;
if(wholeWords)
{
@@ -389,8 +389,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchContains && !wholeWords)
{
- QString s=maskString(searchStr);
- QRegExp searchReg(s);
+ TQString s=maskString(searchStr);
+ TQRegExp searchReg(s);
if(searchReg.search(origStr) >= 0)
found=true;
@@ -398,8 +398,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained && !wholeWords)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -408,13 +408,13 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords && !wholeWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
- QRegExp reg(s);
+ TQString s=maskString(*wit2);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -436,8 +436,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -451,10 +451,10 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
(!wholeWords && (matchContains || matchIsContained || matchWords))
)
{
- QRegExp searchReg;
+ TQRegExp searchReg;
if(matchContains)
{
- QString s=maskString(searchStr);
+ TQString s=maskString(searchStr);
searchReg.setPattern(s);
}
@@ -497,7 +497,7 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
emit progress( (100*(checkCounter+1))/data->numberOfEntries());
}
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
if(!caseSensitive)
@@ -523,8 +523,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
if(!found && matchIsContained)
{
- QString s=maskString(origStr);
- QRegExp reg(s);
+ TQString s=maskString(origStr);
+ TQRegExp reg(s);
if(reg.search(searchStr) >= 0)
{
@@ -533,19 +533,19 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
}
if(!found && matchWords)
{
- QStringList list = TmxCompendiumData::wordList(searchStr);
+ TQStringList list = TmxCompendiumData::wordList(searchStr);
- for ( QStringList::Iterator wit2 = list.begin()
+ for ( TQStringList::Iterator wit2 = list.begin()
; wit2 != list.end(); ++wit2 )
{
- QString s=maskString(*wit2);
+ TQString s=maskString(*wit2);
if(wholeWords)
{
origStr = " "+origStr+" ";
s=" "+s+" ";
}
- QRegExp reg(s);
+ TQRegExp reg(s);
if(reg.search(origStr) >= 0)
{
@@ -577,8 +577,8 @@ bool TmxCompendium::startSearch(const QString& text, uint pluralForm, const Sear
TranslationInfo *info = new TranslationInfo;
info->location = directory(realURL,0);
- info->translator = QString::null;
- info->description = QString::null;
+ info->translator = TQString::null;
+ info->description = TQString::null;
result->descriptions.append(info);
addResult(result);
@@ -629,7 +629,7 @@ void TmxCompendium::applySettings()
bool needLoading=false;
- QString newPath = prefWidget->url();
+ TQString newPath = prefWidget->url();
if(!initialized)
{
url = newPath;
@@ -685,7 +685,7 @@ void TmxCompendium::slotLoadCompendium()
}
- QString path=url;
+ TQString path=url;
if(path.contains("@LANG@"))
{
@@ -718,7 +718,7 @@ void TmxCompendium::slotLoadCompendium()
}
else
{
- connect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ connect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
}
}
else
@@ -737,7 +737,7 @@ void TmxCompendium::recheckData()
{
if(data)
{
- disconnect(data, SIGNAL(progressEnds()), this, SLOT(recheckData()));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this, TQT_SLOT(recheckData()));
error = data->hasErrors();
errorMsg = data->errorMsg();
@@ -746,7 +746,7 @@ void TmxCompendium::recheckData()
loading=false;
}
-QString TmxCompendium::maskString(QString s) const
+TQString TmxCompendium::maskString(TQString s) const
{
s.replace('\\',"\\\\");
s.replace('?',"\\?");
@@ -795,7 +795,7 @@ void TmxCompendium::addResult(SearchResult *result)
}
-void TmxCompendium::setLanguageCode(const QString& lang)
+void TmxCompendium::setLanguageCode(const TQString& lang)
{
if(initialized && url.contains("@LANG@") && lang!=langCode
&& !loadTimer->isActive() )
@@ -806,7 +806,7 @@ void TmxCompendium::setLanguageCode(const QString& lang)
langCode=lang;
}
-QString TmxCompendium::translate(const QString& text, uint pluralForm)
+TQString TmxCompendium::translate(const TQString& text, uint pluralForm)
{
if(!initialized)
{
@@ -818,7 +818,7 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
@@ -829,10 +829,10 @@ QString TmxCompendium::translate(const QString& text, uint pluralForm)
return data->msgstr(*index);
}
- return QString::null;
+ return TQString::null;
}
-QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pluralForm)
+TQString TmxCompendium::fuzzyTranslation(const TQString& text, int &score, uint pluralForm)
{
if(!initialized)
{
@@ -844,7 +844,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
if(error || !data || data->active())
{
- return QString::null;
+ return TQString::null;
}
// try to find fuzzy string
@@ -855,7 +855,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
int best_match = 0;
int total = data->numberOfEntries();
- QString searchStr = TmxCompendiumData::simplify(text);
+ TQString searchStr = TmxCompendiumData::simplify(text);
//kdDebug(750) << "find best match for " << searchStr << endl;
@@ -883,7 +883,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
}
// get a message from the catalog
- QString origStr = data->msgid(i);
+ TQString origStr = data->msgid(i);
origStr = TmxCompendiumData::simplify(origStr);
// don't match too long strings for short search string
@@ -907,7 +907,7 @@ QString TmxCompendium::fuzzyTranslation(const QString& text, int &score, uint pl
return data->msgstr(best_matching);
}
- return QString::null;
+ return TQString::null;
}
@@ -915,14 +915,14 @@ void TmxCompendium::unregisterData()
{
if(data)
{
- disconnect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- disconnect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- disconnect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ disconnect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ disconnect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ disconnect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
if(data->active())
{
- disconnect(data,SIGNAL(progressEnds()),this,SLOT(recheckData()));
+ disconnect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(recheckData()));
}
if(data->unregisterObject(this))
@@ -933,7 +933,7 @@ void TmxCompendium::unregisterData()
}
else
{
- connect(data,SIGNAL(progressEnds()),this,SLOT(removeData()));
+ connect(data,TQT_SIGNAL(progressEnds()),this,TQT_SLOT(removeData()));
}
}
@@ -957,21 +957,21 @@ void TmxCompendium::registerData()
emit progressStarts(i18n("Loading PO compendium"));
}
- connect(data, SIGNAL(progressStarts(const QString&)), this
- , SIGNAL(progressStarts(const QString&)));
- connect(data, SIGNAL(progressEnds()), this , SIGNAL(progressEnds()));
- connect(data, SIGNAL(progress(int)), this , SIGNAL(progress(int)));
+ connect(data, TQT_SIGNAL(progressStarts(const TQString&)), this
+ , TQT_SIGNAL(progressStarts(const TQString&)));
+ connect(data, TQT_SIGNAL(progressEnds()), this , TQT_SIGNAL(progressEnds()));
+ connect(data, TQT_SIGNAL(progress(int)), this , TQT_SIGNAL(progress(int)));
}
void TmxCompendium::removeData()
{
- const QObject *s=sender();
+ const TQObject *s=sender();
if(s && s->inherits("TmxCompendiumData"))
{
const TmxCompendiumData *d=static_cast<const TmxCompendiumData*>(s);
if(d)
{
- QDictIterator<TmxCompendiumData> it(*compendiumDict());
+ TQDictIterator<TmxCompendiumData> it(*compendiumDict());
while(it.current())
{
if(it.current() == d)
@@ -991,11 +991,11 @@ void TmxCompendium::removeData()
}
}
-QDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
+TQDict<TmxCompendiumData> *TmxCompendium::compendiumDict()
{
if(!_compDict)
{
- _compDict=compDataDeleter.setObject( new QDict<TmxCompendiumData> );
+ _compDict=compDataDeleter.setObject( new TQDict<TmxCompendiumData> );
_compDict->setAutoDelete(true);
}
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
index 9a2f8fba..21270799 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendium.h
@@ -39,9 +39,9 @@
#include "tmxcompendiumdata.h"
#include "searchengine.h"
-#include <qdict.h>
-#include <qfile.h>
-#include <qguardedptr.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
class TmxCompendiumPreferencesWidget;
class KConfigBase;
@@ -52,34 +52,34 @@ class TmxCompendium : public SearchEngine
Q_OBJECT
public:
- TmxCompendium(QObject *parent=0, const char *name=0);
+ TmxCompendium(TQObject *parent=0, const char *name=0);
virtual ~TmxCompendium();
virtual bool isReady() const;
- virtual QString translate(const QString& text, uint pluralForm);
- virtual QString fuzzyTranslation(const QString& text, int &score, uint pluralForm);
+ virtual TQString translate(const TQString& text, uint pluralForm);
+ virtual TQString fuzzyTranslation(const TQString& text, int &score, uint pluralForm);
virtual bool isSearching() const;
virtual void saveSettings(KConfigBase *config);
virtual void readSettings(KConfigBase *config);
- virtual PrefWidget *preferencesWidget(QWidget *parent);
+ virtual PrefWidget *preferencesWidget(TQWidget *parent);
virtual const KAboutData *about() const;
- virtual QString name() const;
+ virtual TQString name() const;
- virtual QString id() const;
+ virtual TQString id() const;
- virtual QString lastError();
+ virtual TQString lastError();
public slots:
- virtual bool startSearch(const QString& text, uint pluralForm, const SearchFilter* filter);
+ virtual bool startSearch(const TQString& text, uint pluralForm, const SearchFilter* filter);
virtual void stopSearch();
- virtual void setLanguageCode(const QString& lang);
+ virtual void setLanguageCode(const TQString& lang);
protected slots:
/** reads the current settings from the preferences dialog */
@@ -96,19 +96,19 @@ protected slots:
protected:
void loadCompendium();
void addResult(SearchResult *);
- QString maskString(QString string) const;
+ TQString maskString(TQString string) const;
void registerData();
void unregisterData();
private:
- QGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
+ TQGuardedPtr<TmxCompendiumPreferencesWidget> prefWidget;
TmxCompendiumData *data;
- QTimer *loadTimer;
+ TQTimer *loadTimer;
- QString url;
- QString realURL;
- QString langCode;
+ TQString url;
+ TQString realURL;
+ TQString langCode;
bool caseSensitive;
bool wholeWords;
@@ -123,15 +123,15 @@ private:
uint freeMemDelay;
bool error;
- QString errorMsg;
+ TQString errorMsg;
bool stop;
bool active;
bool initialized;
bool loading;
- static QDict<TmxCompendiumData> *_compDict;
- static QDict<TmxCompendiumData> *compendiumDict();
+ static TQDict<TmxCompendiumData> *_compDict;
+ static TQDict<TmxCompendiumData> *compendiumDict();
};
#endif
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
index 3fa84aa4..7893e837 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.cpp
@@ -34,8 +34,8 @@
**************************************************************************** */
#include "tmxcompendiumdata.h"
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <tagextractor.h>
#include <resources.h>
@@ -47,8 +47,8 @@
using namespace KBabel;
-TmxCompendiumData::TmxCompendiumData(QObject *parent)
- : QObject(parent)
+TmxCompendiumData::TmxCompendiumData(TQObject *parent)
+ : TQObject(parent)
, _active(false)
, _error(false)
, _initialized(false)
@@ -62,7 +62,7 @@ TmxCompendiumData::TmxCompendiumData(QObject *parent)
}
-bool TmxCompendiumData::load(const KURL& url, const QString& language)
+bool TmxCompendiumData::load(const KURL& url, const TQString& language)
{
kdDebug(KBABEL_SEARCH) << "Load " << url.url() << " in " << language << endl;
if(_active)
@@ -79,13 +79,13 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Loading TMX compendium"));
- QDomDocument doc( "mydocument" );
+ TQDomDocument doc( "mydocument" );
- QString target;
+ TQString target;
if( KIO::NetAccess::download( url, target ) )
{
- QFile f( target );
+ TQFile f( target );
if ( !f.open( IO_ReadOnly ) )
{
_error = true;
@@ -102,7 +102,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_errorMsg = i18n( "Cannot open the file." );
}
- QDomElement docElem = doc.documentElement();
+ TQDomElement docElem = doc.documentElement();
if( docElem.tagName() != "tmx" || !(docElem.hasAttribute("version")
&& docElem.attribute("version") == "1.4" ) )
@@ -131,7 +131,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
emit progressStarts(i18n("Building indices"));
- QDomNodeList tuTags = docElem.elementsByTagName("tu");
+ TQDomNodeList tuTags = docElem.elementsByTagName("tu");
uint total = tuTags.count();
_originals.clear();
@@ -149,11 +149,11 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
kapp->processEvents(100);
}
- QDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
- QString english, other;
+ TQDomNodeList tuvTags = tuTags.item(i).toElement().elementsByTagName("tuv");
+ TQString english, other;
for( uint j = 0 ; j < tuvTags.count() ; j++ )
{
- QDomElement el = tuvTags.item(j).toElement();
+ TQDomElement el = tuvTags.item(j).toElement();
if( el.attribute("xml:lang").upper() == "EN" ) english = el.text();
if( el.attribute("xml:lang").upper().startsWith(language.upper()) )
other = el.text();
@@ -165,7 +165,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
_originals[lastindex] = english;
_translations[lastindex] = other;
- QString temp = english;
+ TQString temp = english;
int *index = new int(lastindex);
_exactDict.insert(temp,index);
@@ -175,18 +175,18 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!temp.isEmpty() && temp.length() > 1)
{
- QValueList<int> *indexList=_allDict[temp];
+ TQValueList<int> *indexList=_allDict[temp];
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_allDict.insert(temp,indexList);
}
indexList->append(lastindex);
- QStringList wList = wordList(temp);
- for ( QStringList::Iterator it = wList.begin()
+ TQStringList wList = wordList(temp);
+ for ( TQStringList::Iterator it = wList.begin()
; it != wList.end(); ++it )
{
if( (*it).length() > 1)
@@ -195,7 +195,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
if(!indexList)
{
- indexList = new QValueList<int>;
+ indexList = new TQValueList<int>;
_wordDict.insert(*it,indexList);
}
@@ -210,7 +210,7 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
// remove words, that are too frequent
uint max=_allDict.count()/10;
- QDictIterator< QValueList<int> > it(_wordDict);
+ TQDictIterator< TQValueList<int> > it(_wordDict);
while ( it.current() )
{
if(it.current()->count() > max)
@@ -240,39 +240,39 @@ bool TmxCompendiumData::load(const KURL& url, const QString& language)
return true;
}
-const int* TmxCompendiumData::exactDict(const QString& text) const
+const int* TmxCompendiumData::exactDict(const TQString& text) const
{
return _exactDict[text];
}
-const QValueList<int>* TmxCompendiumData::allDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::allDict(const TQString& text) const
{
return _allDict[text];
}
-const QValueList<int>* TmxCompendiumData::wordDict(const QString& text) const
+const TQValueList<int>* TmxCompendiumData::wordDict(const TQString& text) const
{
return _wordDict[text];
}
-const QString TmxCompendiumData::msgid(const int index) const
+const TQString TmxCompendiumData::msgid(const int index) const
{
return _originals[index];
}
-const QString TmxCompendiumData::msgstr(const int index) const
+const TQString TmxCompendiumData::msgstr(const int index) const
{
return _translations[index];
}
-void TmxCompendiumData::registerObject(QObject *obj)
+void TmxCompendiumData::registerObject(TQObject *obj)
{
if(!_registered.containsRef(obj))
_registered.append(obj);
}
-bool TmxCompendiumData::unregisterObject(QObject *obj)
+bool TmxCompendiumData::unregisterObject(TQObject *obj)
{
_registered.removeRef(obj);
@@ -284,9 +284,9 @@ bool TmxCompendiumData::hasObjects() const
return _registered.count()==0;
}
-QString TmxCompendiumData::simplify(const QString& string)
+TQString TmxCompendiumData::simplify(const TQString& string)
{
- QString result;
+ TQString result;
TagExtractor te;
te.setString(string);
@@ -298,11 +298,11 @@ QString TmxCompendiumData::simplify(const QString& string)
return result;
}
-QStringList TmxCompendiumData::wordList(const QString& string)
+TQStringList TmxCompendiumData::wordList(const TQString& string)
{
- QString result=TmxCompendiumData::simplify(string);
+ TQString result=TmxCompendiumData::simplify(string);
- return QStringList::split(' ',result);
+ return TQStringList::split(' ',result);
}
#include "tmxcompendiumdata.moc"
diff --git a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
index bc88a92e..ce2692a1 100644
--- a/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
+++ b/kbabel/kbabeldict/modules/tmx/tmxcompendiumdata.h
@@ -37,52 +37,52 @@
#include <kurl.h>
-#include <qdict.h>
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qptrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqptrlist.h>
class TmxCompendiumData : public QObject
{
Q_OBJECT
public:
- TmxCompendiumData(QObject *parent=0);
+ TmxCompendiumData(TQObject *parent=0);
- bool load(const KURL& url, const QString& language);
+ bool load(const KURL& url, const TQString& language);
- const int *exactDict(const QString& text) const;
- const QValueList<int> *allDict(const QString& text) const;
- const QValueList<int> *wordDict(const QString& text) const;
+ const int *exactDict(const TQString& text) const;
+ const TQValueList<int> *allDict(const TQString& text) const;
+ const TQValueList<int> *wordDict(const TQString& text) const;
- const QString msgid(const int index) const;
- const QString msgstr(const int index) const;
+ const TQString msgid(const int index) const;
+ const TQString msgstr(const int index) const;
const int numberOfEntries() const { return _exactDict.count(); }
bool active() const { return _active; }
bool initialized() const { return _initialized; }
bool hasErrors() const { return _error; }
- QString errorMsg() const { return _errorMsg; }
+ TQString errorMsg() const { return _errorMsg; }
/** registers an object, that uses this data */
- void registerObject(QObject *);
+ void registerObject(TQObject *);
/**
* unregisters an object, that uses this data
*
* @return true, if this was the last object
*/
- bool unregisterObject(QObject *);
+ bool unregisterObject(TQObject *);
bool hasObjects() const;
- static QString simplify(const QString& text);
- static QStringList wordList(const QString& text);
+ static TQString simplify(const TQString& text);
+ static TQStringList wordList(const TQString& text);
signals:
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
void progress(int);
@@ -91,16 +91,16 @@ private:
bool _active;
bool _error;
bool _initialized;
- QString _errorMsg;
+ TQString _errorMsg;
- QDict<int> _exactDict;
- QDict< QValueList<int> > _allDict;
- QDict< QValueList<int> > _wordDict;
+ TQDict<int> _exactDict;
+ TQDict< TQValueList<int> > _allDict;
+ TQDict< TQValueList<int> > _wordDict;
- QValueVector<QString> _originals;
- QValueVector<QString> _translations;
+ TQValueVector<TQString> _originals;
+ TQValueVector<TQString> _translations;
- QPtrList<QObject> _registered;
+ TQPtrList<TQObject> _registered;
};
#endif
diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp
index 95ab5694..19112fe7 100644
--- a/kbabel/kbabeldict/searchengine.cpp
+++ b/kbabel/kbabeldict/searchengine.cpp
@@ -53,7 +53,7 @@ SearchResult::SearchResult(const SearchResult& r)
descriptions.setAutoDelete(true);
score=r.score;
- QPtrListIterator<TranslationInfo> it(r.descriptions);
+ TQPtrListIterator<TranslationInfo> it(r.descriptions);
for ( ; it.current(); ++it )
{
TranslationInfo *ti=new TranslationInfo(*(*it));
@@ -62,8 +62,8 @@ SearchResult::SearchResult(const SearchResult& r)
}
-PrefWidget::PrefWidget(QWidget *parent, const char *name)
- : QWidget(parent,name)
+PrefWidget::PrefWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
}
@@ -72,8 +72,8 @@ PrefWidget::~PrefWidget()
}
-SearchEngine::SearchEngine(QObject *parent, const char *name)
- : QObject(parent, name)
+SearchEngine::SearchEngine(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
autoUpdate=false;
results.setAutoDelete(true);
@@ -83,7 +83,7 @@ SearchEngine::~SearchEngine()
{
}
-bool SearchEngine::startSearchInTranslation(const QString&, unsigned int, const SearchFilter*)
+bool SearchEngine::startSearchInTranslation(const TQString&, unsigned int, const SearchFilter*)
{
return true;
}
@@ -175,34 +175,34 @@ void SearchEngine::clearResults()
-void SearchEngine::setEditedFile(const QString&)
+void SearchEngine::setEditedFile(const TQString&)
{
}
-void SearchEngine::setEditedPackage(const QString&)
+void SearchEngine::setEditedPackage(const TQString&)
{
}
-void SearchEngine::setLanguageCode(const QString&)
+void SearchEngine::setLanguageCode(const TQString&)
{
}
-void SearchEngine::setLanguage(const QString&,const QString&)
+void SearchEngine::setLanguage(const TQString&,const TQString&)
{
}
-void SearchEngine::stringChanged(const QStringList&,const QString&,unsigned int, const QString&)
+void SearchEngine::stringChanged(const TQStringList&,const TQString&,unsigned int, const TQString&)
{
}
-QString SearchEngine::directory(const QString& path, int n)
+TQString SearchEngine::directory(const TQString& path, int n)
{
if(n<0)
- return QString::null;
+ return TQString::null;
int begin=path.findRev('/');
int end=path.length();
@@ -213,14 +213,14 @@ QString SearchEngine::directory(const QString& path, int n)
if(n==0)
return path;
else
- return QString::null;
+ return TQString::null;
}
for(int i=0; i < n; i++)
{
if(begin==0)
{
- return QString::null;
+ return TQString::null;
}
end = begin;
@@ -228,7 +228,7 @@ QString SearchEngine::directory(const QString& path, int n)
if(begin < 0)
{
- return QString::null;
+ return TQString::null;
}
}
@@ -237,7 +237,7 @@ QString SearchEngine::directory(const QString& path, int n)
}
-uint SearchEngine::score(const QString& orig, const QString& found)
+uint SearchEngine::score(const TQString& orig, const TQString& found)
{
if(orig == found)
return 100;
@@ -246,8 +246,8 @@ uint SearchEngine::score(const QString& orig, const QString& found)
uint scoreB = ngramMatch(orig,found);
uint score = QMIN(scoreA, scoreB);
- QString f = found.lower();
- QString o = orig.lower();
+ TQString f = found.lower();
+ TQString o = orig.lower();
scoreA = ngramMatch(f, o);
scoreB = ngramMatch(o, f);
@@ -256,7 +256,7 @@ uint SearchEngine::score(const QString& orig, const QString& found)
return score;
}
-uint SearchEngine::ngramMatch (const QString& text1, const QString& text2,
+uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_len)
{
if (text1.length() < ngram_len || text2.length() < ngram_len)
diff --git a/kbabel/kbabeldict/searchengine.h b/kbabel/kbabeldict/searchengine.h
index db722362..a10e6193 100644
--- a/kbabel/kbabeldict/searchengine.h
+++ b/kbabel/kbabeldict/searchengine.h
@@ -34,11 +34,11 @@
#ifndef SEARCH_ENGINE_H
#define SEARCH_ENGINE_H
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kaboutdata.h>
#include <kconfigbase.h>
@@ -55,50 +55,50 @@ public:
* Information about the location, where this entry was found.
* For example the PO-file it was found in, etc.
* */
- QString location;
+ TQString location;
/**
* The complete path of the file, where this entry was found
*/
- QString filePath;
+ TQString filePath;
/** The date of the last change */
- QDateTime lastChange;
+ TQDateTime lastChange;
/** The language, the translation belongs to */
- QString languageCode;
+ TQString languageCode;
/**
* The translator of this string
* For example the translator found in the header of the PO-file.
*/
- QString translator;
+ TQString translator;
/**
* The name of a project this translation is a part of.
*/
- QString projectName;
+ TQString projectName;
/**
* Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch)
*/
- QStringList projectKeywords;
+ TQStringList projectKeywords;
/**
* Part/context in a project, for example "multimedia", "admin", etc.
*/
- QString projectContext;
+ TQString projectContext;
/**
* Status of the translation, for example "approved", "spellchecked", "unknown"
*/
- QString status;
+ TQString status;
/**
* Additional information to be presented to the user, for example a comment
*/
- QString description;
+ TQString description;
};
@@ -114,16 +114,16 @@ public:
SearchResult(const SearchResult&);
/** The requested string to search for */
- QString requested;
+ TQString requested;
/** The string that, was found (a list if it is a plural form) */
- QStringList found;
+ TQStringList found;
/** The number of a plural form to search for */
uint requestedPluralForm;
/** The translation of the found string */
- QString translation;
+ TQString translation;
/** The number of a plural form of the translated string found */
uint translationPluralForm;
@@ -133,21 +133,21 @@ public:
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainTranslation;
+ TQString plainTranslation;
/**
* This string contains the plain string, that was found, if you are
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainFound;
+ TQString plainFound;
/**
* This string contains the plain requested string if you are
* using rich text. If you don't use rich text, you can leave
* it empty
*/
- QString plainRequested;
+ TQString plainRequested;
/**
* Constains a score for the found translation. 0 means exact matching.
@@ -156,7 +156,7 @@ public:
*/
int score;
- QPtrList<TranslationInfo> descriptions;
+ TQPtrList<TranslationInfo> descriptions;
};
/**
@@ -167,9 +167,9 @@ class KDE_EXPORT SearchFilter
public:
SearchFilter() :
_projects()
- , _location( QString::null )
- , _languageCode( QString::null )
- , _origLanguageCode( QString::null )
+ , _location( TQString::null )
+ , _languageCode( TQString::null )
+ , _origLanguageCode( TQString::null )
, _translators()
, _projectKeywords()
, _projectContexts()
@@ -178,45 +178,45 @@ public:
virtual ~SearchFilter() {}
- void setProjectName( const QString& project ) { _projects = project; }
- void setProjectName( const QStringList& projects ) { _projects = projects; }
+ void setProjectName( const TQString& project ) { _projects = project; }
+ void setProjectName( const TQStringList& projects ) { _projects = projects; }
/**
* Information about the location, where this entry was found.
* For example the PO-file it was found in, etc.
* */
- void setLocation( const QString& location) { _location = location; }
- QString location() const { return _location; }
+ void setLocation( const TQString& location) { _location = location; }
+ TQString location() const { return _location; }
/** The original language, the translation was made from */
- void setOriginalLanguage( const QString& languageCode) { _origLanguageCode = languageCode; }
+ void setOriginalLanguage( const TQString& languageCode) { _origLanguageCode = languageCode; }
/** The language, the translation belongs to */
- void setTranslationLanguage( const QString& languageCode) { _languageCode = languageCode; }
+ void setTranslationLanguage( const TQString& languageCode) { _languageCode = languageCode; }
/**
* The translator of this string
* For example the translator found in the header of the PO-file.
*/
- void setTranslator( const QString& translator) { _translators = translator ; }
- void setTranslator( const QStringList& translators) { _translators = translators ; }
+ void setTranslator( const TQString& translator) { _translators = translator ; }
+ void setTranslator( const TQStringList& translators) { _translators = translators ; }
/**
* Keywords defined for @ref projectName. For example KDE_3_1_BRANCH (project branch)
*/
- void setProjectKeywords( const QStringList& projectKeywords ) { _projectKeywords = projectKeywords; }
+ void setProjectKeywords( const TQStringList& projectKeywords ) { _projectKeywords = projectKeywords; }
/**
* Part/context in a project, for example "multimedia", "admin", etc.
*/
- void setProjectContext( const QString& projectContext) { _projectContexts = projectContext; }
- void setProjectContext( const QStringList& projectContexts) { _projectContexts = projectContexts; }
+ void setProjectContext( const TQString& projectContext) { _projectContexts = projectContext; }
+ void setProjectContext( const TQStringList& projectContexts) { _projectContexts = projectContexts; }
/**
* Status of the translation, for example "approved", "spellchecked", "unknown"
*/
- void setStatus( const QString& translationStatus) { _translationStatus = translationStatus; }
- void setStatus( const QStringList& translationStati) { _translationStatus = translationStati; }
+ void setStatus( const TQString& translationStatus) { _translationStatus = translationStatus; }
+ void setStatus( const TQStringList& translationStati) { _translationStatus = translationStati; }
/**
* The key method of the class - check, if the argument
@@ -225,14 +225,14 @@ public:
virtual bool match( const TranslationInfo& toCheck );
private:
- QStringList _projects;
- QString _location;
- QString _languageCode;
- QString _origLanguageCode;
- QStringList _translators;
- QStringList _projectKeywords ;
- QStringList _projectContexts;
- QStringList _translationStatus;
+ TQStringList _projects;
+ TQString _location;
+ TQString _languageCode;
+ TQString _origLanguageCode;
+ TQStringList _translators;
+ TQStringList _projectKeywords ;
+ TQStringList _projectContexts;
+ TQStringList _translationStatus;
};
/**
@@ -246,7 +246,7 @@ class KDE_EXPORT PrefWidget : public QWidget
Q_OBJECT
public:
- PrefWidget(QWidget *parent, const char* name=0);
+ PrefWidget(TQWidget *parent, const char* name=0);
virtual ~PrefWidget();
public slots:
@@ -270,7 +270,7 @@ class KDE_EXPORT SearchEngine : public QObject
Q_OBJECT
public:
- SearchEngine(QObject *parent=0, const char *name=0);
+ SearchEngine(TQObject *parent=0, const char *name=0);
virtual ~SearchEngine();
@@ -297,26 +297,26 @@ public:
* @returns the exact translation of text or a empty string
* if no exact match was found.
*/
- virtual QString translate(const QString& text, const uint pluralForm = 0)=0;
+ virtual TQString translate(const TQString& text, const uint pluralForm = 0)=0;
/**
* @returns the translation of text according to the plugin settings or a empty string
* if no match was found.
*/
- virtual QString searchTranslation(const QString&, int &score, const uint pluralForm = 0) {
+ virtual TQString searchTranslation(const TQString&, int &score, const uint pluralForm = 0) {
Q_UNUSED(pluralForm);
- score = 0; return QString::null;
+ score = 0; return TQString::null;
}
/**
* @returns a fuzzy translation of text or a empty string
* if no good match was found.
*/
- virtual QString fuzzyTranslation(const QString& /*text*/, int &score, const uint pluralForm = 0) {
+ virtual TQString fuzzyTranslation(const TQString& /*text*/, int &score, const uint pluralForm = 0) {
Q_UNUSED(pluralForm);
- score = 0; return QString::null; };
+ score = 0; return TQString::null; };
/**
@@ -329,7 +329,7 @@ public:
* @return true, if successfull
*/
virtual bool messagesForFilter(const SearchFilter* filter
- , QValueList<SearchResult>& resultList, QString& error)
+ , TQValueList<SearchResult>& resultList, TQString& error)
{
Q_UNUSED(filter);
Q_UNUSED(resultList);
@@ -354,19 +354,19 @@ public:
* a tabbed widget.
* @param parent the parent of the returned widget
*/
- virtual PrefWidget* preferencesWidget(QWidget *parent)=0;
+ virtual PrefWidget* preferencesWidget(TQWidget *parent)=0;
/** @returns information about this SearchEngine */
virtual const KAboutData *about() const= 0;
/** @returns the i18n name of this search engine */
- virtual QString name() const= 0;
+ virtual TQString name() const= 0;
/** @returns a untranslated name of this engine */
- virtual QString id() const= 0;
+ virtual TQString id() const= 0;
/** @returns the last error message */
- virtual QString lastError() = 0;
+ virtual TQString lastError() = 0;
/**
@@ -382,7 +382,7 @@ public:
* a number between 0 and 100. @param ngram_len should be
* a value between 3 and 5.
*/
- static uint ngramMatch (const QString& text1, const QString& text2,
+ static uint ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_len=3);
public slots:
@@ -391,14 +391,14 @@ public slots:
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- virtual bool startSearch(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0;
+ virtual bool startSearch(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0) = 0;
/**
* starts a search for string s in the translated text
* @returns false, if an error occured. Use @ref lastError
* to get the last error message
*/
- virtual bool startSearchInTranslation(const QString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
+ virtual bool startSearchInTranslation(const TQString& s, uint pluralForm = 0, const SearchFilter* filter = 0);
/** stops a search */
@@ -425,22 +425,22 @@ public slots:
* on the edited file. The default implementation does nothing.
* @param file The edited file with path
*/
- virtual void setEditedFile(const QString& file);
+ virtual void setEditedFile(const TQString& file);
/**
* This method allows a search engine to use different settings depending
* on the edited package. The default implementation does nothing.
* @param package The name of the package, that is currently translated.
*/
- virtual void setEditedPackage(const QString& package);
+ virtual void setEditedPackage(const TQString& package);
/**
* This method allows a search engine to use different settings depending
* on the language code. The default implementation does nothing.
* @param lang The current language code (e.g. de).
*/
- virtual void setLanguageCode(const QString& lang);
- virtual void setLanguage(const QString& languageCode, const QString& languageName);
+ virtual void setLanguageCode(const TQString& lang);
+ virtual void setLanguage(const TQString& languageCode, const TQString& languageName);
@@ -453,8 +453,8 @@ public slots:
* @param pluralForm the number of the plural form of the translation
* @param description the additional description, e.g., a PO comment
*/
- virtual void stringChanged( const QStringList& orig, const QString& translated
- , const uint translationPluralForm, const QString& description);
+ virtual void stringChanged( const TQStringList& orig, const TQString& translated
+ , const uint translationPluralForm, const TQString& description);
/**
* If the database is editable this slot should open an dialog to let
@@ -470,13 +470,13 @@ public slots:
* returns "foobar", while n=1 would return "src"
* FIXME: isn't it a code duplication?
*/
- static QString directory(const QString& path, int n);
+ static TQString directory(const TQString& path, int n);
/**
* computes a score to assess the match of the two strings:
* 0 means exact match, bigger means worse
*/
- static uint score(const QString& orig, const QString& found);
+ static uint score(const TQString& orig, const TQString& found);
signals:
/** signals, that a new search started */
@@ -493,7 +493,7 @@ signals:
* progressbar or if you do something else then searching,
* maybe loading a big file
*/
- void progressStarts(const QString&);
+ void progressStarts(const TQString&);
void progressEnds();
@@ -523,10 +523,10 @@ signals:
* signals, that an error occured, for example, that you wasn't
* able to open a database.
*/
- void hasError(const QString& error);
+ void hasError(const TQString& error);
protected:
- QPtrList<SearchResult> results;
+ TQPtrList<SearchResult> results;
bool autoUpdate;
};
diff --git a/kbugbuster/backend/bug.cpp b/kbugbuster/backend/bug.cpp
index 4523652e..aaa61273 100644
--- a/kbugbuster/backend/bug.cpp
+++ b/kbugbuster/backend/bug.cpp
@@ -21,9 +21,9 @@ Bug::Bug( const Bug &other )
(*this) = other;
}
-Bug Bug::fromNumber( const QString &bugNumber )
+Bug Bug::fromNumber( const TQString &bugNumber )
{
- return new BugImpl( QString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(),
+ return new BugImpl( TQString::null, Person(), bugNumber, 0xFFFFFFFF, Normal, Person(),
Unconfirmed, Bug::BugMergeList() );
}
@@ -37,7 +37,7 @@ Bug::~Bug()
{
}
-QString Bug::severityLabel( Bug::Severity s )
+TQString Bug::severityLabel( Bug::Severity s )
{
switch ( s )
{
@@ -53,23 +53,23 @@ QString Bug::severityLabel( Bug::Severity s )
}
}
-QString Bug::severityToString( Bug::Severity s )
+TQString Bug::severityToString( Bug::Severity s )
{
switch ( s ) {
- case Critical: return QString::fromLatin1( "critical" );
- case Grave: return QString::fromLatin1( "grave" );
- case Major: return QString::fromLatin1( "major" );
- case Crash: return QString::fromLatin1( "crash" );
- case Normal: return QString::fromLatin1( "normal" );
- case Minor: return QString::fromLatin1( "minor" );
- case Wishlist: return QString::fromLatin1( "wishlist" );
+ case Critical: return TQString::fromLatin1( "critical" );
+ case Grave: return TQString::fromLatin1( "grave" );
+ case Major: return TQString::fromLatin1( "major" );
+ case Crash: return TQString::fromLatin1( "crash" );
+ case Normal: return TQString::fromLatin1( "normal" );
+ case Minor: return TQString::fromLatin1( "minor" );
+ case Wishlist: return TQString::fromLatin1( "wishlist" );
default:
kdWarning() << "Bug::severityToString invalid severity " << s << endl;
- return QString::fromLatin1( "<invalid>" );
+ return TQString::fromLatin1( "<invalid>" );
}
}
-Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok )
+Bug::Severity Bug::stringToSeverity( const TQString &s, bool *ok )
{
if ( ok )
*ok = true;
@@ -88,14 +88,14 @@ Bug::Severity Bug::stringToSeverity( const QString &s, bool *ok )
return SeverityUndefined;
}
-QValueList<Bug::Severity> Bug::severities()
+TQValueList<Bug::Severity> Bug::severities()
{
- QValueList<Severity> s;
+ TQValueList<Severity> s;
s << Critical << Grave << Major << Crash << Normal << Minor << Wishlist;
return s;
}
-QString Bug::statusLabel( Bug::Status s )
+TQString Bug::statusLabel( Bug::Status s )
{
switch ( s )
{
@@ -109,21 +109,21 @@ QString Bug::statusLabel( Bug::Status s )
}
}
-QString Bug::statusToString( Bug::Status s )
+TQString Bug::statusToString( Bug::Status s )
{
switch ( s ) {
- case Unconfirmed: return QString::fromLatin1( "unconfirmed" );
- case New: return QString::fromLatin1( "new" );
- case Assigned: return QString::fromLatin1( "assigned" );
- case Reopened: return QString::fromLatin1( "reopened" );
- case Closed: return QString::fromLatin1( "closed" );
+ case Unconfirmed: return TQString::fromLatin1( "unconfirmed" );
+ case New: return TQString::fromLatin1( "new" );
+ case Assigned: return TQString::fromLatin1( "assigned" );
+ case Reopened: return TQString::fromLatin1( "reopened" );
+ case Closed: return TQString::fromLatin1( "closed" );
default:
kdWarning() << "Bug::statusToString invalid status " << s << endl;
- return QString::fromLatin1( "<invalid>" );
+ return TQString::fromLatin1( "<invalid>" );
}
}
-Bug::Status Bug::stringToStatus( const QString &s, bool *ok )
+Bug::Status Bug::stringToStatus( const TQString &s, bool *ok )
{
if ( ok )
*ok = true;
@@ -140,15 +140,15 @@ Bug::Status Bug::stringToStatus( const QString &s, bool *ok )
return StatusUndefined;
}
-QString Bug::title() const
+TQString Bug::title() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->title;
}
-void Bug::setTitle( QString title)
+void Bug::setTitle( TQString title)
{
if ( m_impl )
m_impl->title = title;
@@ -171,15 +171,15 @@ void Bug::setAge( uint age )
struct Person Bug::submitter() const
{
if ( !m_impl )
- return Person( QString::null, QString::null );
+ return Person( TQString::null, TQString::null );
return m_impl->submitter;
}
-QString Bug::number() const
+TQString Bug::number() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->number;
}
@@ -215,14 +215,14 @@ Bug::Status Bug::status() const
return m_impl->status;
}
-QString Bug::severityAsString() const
+TQString Bug::severityAsString() const
{
return severityToString( severity() );
}
Person Bug::developerTODO() const
{
- return (m_impl == NULL) ? Person( QString::null, QString::null ) :
+ return (m_impl == NULL) ? Person( TQString::null, TQString::null ) :
m_impl->developerTODO;
}
diff --git a/kbugbuster/backend/bug.h b/kbugbuster/backend/bug.h
index 9a5ae8b6..406179c8 100644
--- a/kbugbuster/backend/bug.h
+++ b/kbugbuster/backend/bug.h
@@ -3,7 +3,7 @@
#include "person.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
@@ -12,8 +12,8 @@ class BugImpl;
class Bug
{
public:
- typedef QValueList<Bug> List;
- typedef QValueList<int> BugMergeList;
+ typedef TQValueList<Bug> List;
+ typedef TQValueList<int> BugMergeList;
enum Severity { SeverityUndefined, Critical, Grave, Major, Crash, Normal,
Minor, Wishlist };
@@ -26,30 +26,30 @@ public:
Bug &operator=( const Bug &rhs );
~Bug();
- static QString severityLabel( Severity s );
+ static TQString severityLabel( Severity s );
/**
Return string representation of severity. This function is symmetric to
stringToSeverity().
*/
- static QString severityToString( Severity s );
+ static TQString severityToString( Severity s );
/**
Return severity code of string representation. This function is symmetric
to severityToString().
*/
- static Severity stringToSeverity( const QString &, bool *ok = 0 );
+ static Severity stringToSeverity( const TQString &, bool *ok = 0 );
- static QValueList<Severity> severities();
+ static TQValueList<Severity> severities();
uint age() const;
void setAge( uint days );
- QString title() const;
- void setTitle( QString title );
+ TQString title() const;
+ void setTitle( TQString title );
Person submitter() const;
- QString number() const;
+ TQString number() const;
Severity severity() const;
void setSeverity( Severity severity );
- QString severityAsString() const;
+ TQString severityAsString() const;
Person developerTODO() const;
BugMergeList mergedWith() const;
@@ -61,24 +61,24 @@ public:
Status status() const;
void setStatus( Status newStatus );
- static QString statusLabel( Status s );
+ static TQString statusLabel( Status s );
/**
Return string representation of status. This function is symmetric to
stringToStatus().
*/
- static QString statusToString( Status s );
+ static TQString statusToString( Status s );
/**
Return status code of string representation. This function is symmetric
to statusToString().
*/
- static Status stringToStatus( const QString &, bool *ok = 0 );
+ static Status stringToStatus( const TQString &, bool *ok = 0 );
bool operator==( const Bug &rhs );
bool operator<( const Bug &rhs ) const;
bool isNull() const { return m_impl == 0; }
- static Bug fromNumber( const QString &bugNumber );
+ static Bug fromNumber( const TQString &bugNumber );
private:
BugImpl *impl() const { return m_impl; }
diff --git a/kbugbuster/backend/bugcache.cpp b/kbugbuster/backend/bugcache.cpp
index 0eb44c8c..a6ef25df 100644
--- a/kbugbuster/backend/bugcache.cpp
+++ b/kbugbuster/backend/bugcache.cpp
@@ -1,7 +1,7 @@
// (C) 2001, Cornelius Schumacher
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
@@ -14,7 +14,7 @@
#include "bugcache.h"
-BugCache::BugCache( const QString &id )
+BugCache::BugCache( const TQString &id )
{
mId = id;
@@ -55,18 +55,18 @@ Package::List BugCache::loadPackageList()
{
Package::List pkgs;
- QStringList packages = m_cachePackages->groupList();
- QStringList::ConstIterator it;
+ TQStringList packages = m_cachePackages->groupList();
+ TQStringList::ConstIterator it;
for( it = packages.begin(); it != packages.end(); ++it ) {
if ((*it) == "<default>") continue;
if ((*it).contains("/")) continue;
m_cachePackages->setGroup(*it);
- QString description = m_cachePackages->readEntry("description");
+ TQString description = m_cachePackages->readEntry("description");
int numberOfBugs = m_cachePackages->readNumEntry("numberOfBugs");
Person maintainer = readPerson( m_cachePackages, "Maintainer");
- QStringList components = m_cachePackages->readListEntry("components");
+ TQStringList components = m_cachePackages->readListEntry("components");
pkgs.append( Package( new PackageImpl( (*it), description, numberOfBugs,
maintainer, components ) ) );
@@ -78,21 +78,21 @@ Package::List BugCache::loadPackageList()
void BugCache::invalidatePackageList()
{
// Completely wipe out packages.cache
- QStringList packages = m_cachePackages->groupList();
- QStringList::ConstIterator it;
+ TQStringList packages = m_cachePackages->groupList();
+ TQStringList::ConstIterator it;
for( it = packages.begin(); it != packages.end(); ++it ) {
if ((*it) == "<default>") continue;
m_cachePackages->deleteGroup(*it, true);
}
}
-void BugCache::saveBugList( const Package &pkg, const QString &component, const Bug::List &bugs )
+void BugCache::saveBugList( const Package &pkg, const TQString &component, const Bug::List &bugs )
{
- QStringList bugList;
+ TQStringList bugList;
Bug::List::ConstIterator it;
for( it = bugs.begin(); it != bugs.end(); ++it ) {
- QString number = (*it).number();
+ TQString number = (*it).number();
bugList.append( number );
m_cacheBugs->setGroup( number );
m_cacheBugs->writeEntry( "Title", (*it).title() );
@@ -113,7 +113,7 @@ void BugCache::saveBugList( const Package &pkg, const QString &component, const
m_cachePackages->writeEntry( "bugList", bugList );
}
-Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, bool disconnected )
+Bug::List BugCache::loadBugList( const Package &pkg, const TQString &component, bool disconnected )
{
// kdDebug() << "Loading bug list for " << pkg.name() << endl;
@@ -124,16 +124,16 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b
else
m_cachePackages->setGroup( pkg.name() + "/" + component );
- QStringList bugs = m_cachePackages->readListEntry( "bugList" );
+ TQStringList bugs = m_cachePackages->readListEntry( "bugList" );
// kdDebug() << " Bugs: " << (bugs.join(",")) << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = bugs.begin(); it != bugs.end(); ++it ) {
if ( m_cacheBugs->hasGroup(*it) )
{
m_cacheBugs->setGroup(*it);
- QString title = m_cacheBugs->readEntry("Title");
+ TQString title = m_cacheBugs->readEntry("Title");
if ( !title.isEmpty() ) // dunno how I ended up with an all empty bug in the cache
{
Person submitter = readPerson( m_cacheBugs, "Submitter" );
@@ -158,7 +158,7 @@ Bug::List BugCache::loadBugList( const Package &pkg, const QString &component, b
return bugList;
}
-void BugCache::invalidateBugList( const Package& pkg, const QString &component )
+void BugCache::invalidateBugList( const Package& pkg, const TQString &component )
{
kdDebug() << "BugCache::invalidateBugList " << pkg.name()
<< " (" << component << ")" << endl;
@@ -167,12 +167,12 @@ void BugCache::invalidateBugList( const Package& pkg, const QString &component )
if ( component.isEmpty() ) {
m_cachePackages->setGroup( pkg.name() );
} else {
- QString key = pkg.name() + "/" + component;
+ TQString key = pkg.name() + "/" + component;
m_cachePackages->setGroup( key );
m_cachePackages->setGroup( pkg.name() + "/" + component );
}
- m_cachePackages->writeEntry("bugList",QString::null);
+ m_cachePackages->writeEntry("bugList",TQString::null);
}
void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details )
@@ -184,9 +184,9 @@ void BugCache::saveBugDetails( const Bug &bug, const BugDetails &details )
m_cacheBugs->writeEntry( "Compiler", details.compiler() );
m_cacheBugs->writeEntry( "OS", details.os() );
- QStringList senders;
- QStringList texts;
- QStringList dates;
+ TQStringList senders;
+ TQStringList texts;
+ TQStringList dates;
BugDetailsPart::List parts = details.parts();
BugDetailsPart::List::ConstIterator it;
@@ -220,15 +220,15 @@ BugDetails BugCache::loadBugDetails( const Bug &bug )
BugDetailsPart::List parts;
- QStringList texts = m_cacheBugs->readListEntry( "Details" );
- QStringList senders = m_cacheBugs->readListEntry( "Senders" );
- QStringList dates = m_cacheBugs->readListEntry( "Dates" );
+ TQStringList texts = m_cacheBugs->readListEntry( "Details" );
+ TQStringList senders = m_cacheBugs->readListEntry( "Senders" );
+ TQStringList dates = m_cacheBugs->readListEntry( "Dates" );
- QStringList::ConstIterator itTexts = texts.begin();
- QStringList::ConstIterator itSenders = senders.begin();
- QStringList::ConstIterator itDates = dates.begin();
+ TQStringList::ConstIterator itTexts = texts.begin();
+ TQStringList::ConstIterator itSenders = senders.begin();
+ TQStringList::ConstIterator itDates = dates.begin();
while( itTexts != texts.end() ) {
- QDateTime date = QDateTime::fromString( *itDates, Qt::ISODate );
+ TQDateTime date = TQDateTime::fromString( *itDates, Qt::ISODate );
parts.append( BugDetailsPart( Person(*itSenders), date, *itTexts ) );
++itTexts;
@@ -240,10 +240,10 @@ BugDetails BugCache::loadBugDetails( const Bug &bug )
return BugDetails();
}
- QString version = m_cacheBugs->readEntry( "Version" );
- QString source = m_cacheBugs->readEntry( "Source" );
- QString compiler = m_cacheBugs->readEntry( "Compiler" );
- QString os = m_cacheBugs->readEntry( "OS" );
+ TQString version = m_cacheBugs->readEntry( "Version" );
+ TQString source = m_cacheBugs->readEntry( "Source" );
+ TQString compiler = m_cacheBugs->readEntry( "Compiler" );
+ TQString os = m_cacheBugs->readEntry( "OS" );
return BugDetails( new BugDetailsImpl( version, source, compiler, os,
parts ) );
@@ -259,28 +259,28 @@ void BugCache::clear()
delete m_cachePackages;
delete m_cacheBugs;
- QFile f1( mCachePackagesFileName );
+ TQFile f1( mCachePackagesFileName );
f1.remove();
- QFile f2( mCacheBugsFileName );
+ TQFile f2( mCacheBugsFileName );
f2.remove();
init();
}
-void BugCache::writePerson( KSimpleConfig *file, const QString &key,
+void BugCache::writePerson( KSimpleConfig *file, const TQString &key,
const Person &p )
{
- QStringList values;
+ TQStringList values;
values.append(p.name);
values.append(p.email);
file->writeEntry( key, values );
}
-struct Person BugCache::readPerson( KSimpleConfig *file, const QString &key )
+struct Person BugCache::readPerson( KSimpleConfig *file, const TQString &key )
{
struct Person p;
- QStringList values = file->readListEntry(key);
+ TQStringList values = file->readListEntry(key);
if ( values.count() > 0 )
p.name = values[0];
if ( values.count() > 1 )
diff --git a/kbugbuster/backend/bugcache.h b/kbugbuster/backend/bugcache.h
index af1aed11..bef22493 100644
--- a/kbugbuster/backend/bugcache.h
+++ b/kbugbuster/backend/bugcache.h
@@ -10,16 +10,16 @@ class KSimpleConfig;
class BugCache
{
public:
- BugCache( const QString &id );
+ BugCache( const TQString &id );
~BugCache();
void savePackageList( const Package::List &pkgs );
Package::List loadPackageList();
void invalidatePackageList();
- void saveBugList( const Package &pkg, const QString &component, const Bug::List & );
- Bug::List loadBugList( const Package &pkg, const QString &component, bool disconnected );
- void invalidateBugList( const Package &pkg, const QString &component );
+ void saveBugList( const Package &pkg, const TQString &component, const Bug::List & );
+ Bug::List loadBugList( const Package &pkg, const TQString &component, bool disconnected );
+ void invalidateBugList( const Package &pkg, const TQString &component );
void saveBugDetails( const Bug &bug, const BugDetails & );
BugDetails loadBugDetails( const Bug &bug );
@@ -31,17 +31,17 @@ class BugCache
private:
void init();
- void writePerson( KSimpleConfig *file, const QString &key,
+ void writePerson( KSimpleConfig *file, const TQString &key,
const Person &p );
- struct Person readPerson (KSimpleConfig *file, const QString &key );
+ struct Person readPerson (KSimpleConfig *file, const TQString &key );
- QString mId;
+ TQString mId;
KSimpleConfig *m_cachePackages;
KSimpleConfig *m_cacheBugs;
- QString mCachePackagesFileName;
- QString mCacheBugsFileName;
+ TQString mCachePackagesFileName;
+ TQString mCacheBugsFileName;
};
#endif
diff --git a/kbugbuster/backend/bugcommand.cpp b/kbugbuster/backend/bugcommand.cpp
index 332c937d..ab61afae 100644
--- a/kbugbuster/backend/bugcommand.cpp
+++ b/kbugbuster/backend/bugcommand.cpp
@@ -4,19 +4,19 @@
#include "bugcommand.h"
-QString BugCommand::name()
+TQString BugCommand::name()
{
return i18n("Unknown");
}
-QString BugCommand::details()
+TQString BugCommand::details()
{
- return QString::null;
+ return TQString::null;
}
-BugCommand *BugCommand::load( KConfig *config, const QString &type )
+BugCommand *BugCommand::load( KConfig *config, const TQString &type )
{
- QString bugNumber = config->group();
+ TQString bugNumber = config->group();
// ### this sucks. we better let Bug implement proper persistance,
// because this way of instantiating a bug object doesn't bring back
// properties like title, package, etc. (Simon)
@@ -40,7 +40,7 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type )
} else if ( type == "Reply" ) {
return new BugCommandReply( bug, config->readEntry( type ), config->readNumEntry("Recipient",Normal) );
} else if ( type == "ReplyPrivate" ) {
- QStringList args = config->readListEntry( type );
+ TQStringList args = config->readListEntry( type );
if ( args.count() != 2 ) return 0;
return new BugCommandReplyPrivate( bug, *(args.at(0)), *(args.at(1)) );
} else {
@@ -51,41 +51,41 @@ BugCommand *BugCommand::load( KConfig *config, const QString &type )
///////////////////// Close /////////////////////
-QString BugCommandClose::controlString() const
+TQString BugCommandClose::controlString() const
{
if (m_message.isEmpty()) {
return "close " + m_bug.number();
} else {
- return QString::null;
+ return TQString::null;
}
}
-QString BugCommandClose::mailAddress() const
+TQString BugCommandClose::mailAddress() const
{
kdDebug() << "BugCommandClose::mailAddress(): number: " << m_bug.number() << endl;
if (m_message.isEmpty()) {
- return QString::null;
+ return TQString::null;
} else {
return m_bug.number() + "-done@bugs.kde.org";
}
}
-QString BugCommandClose::mailText() const
+TQString BugCommandClose::mailText() const
{
if (m_message.isEmpty()) {
- return QString::null;
+ return TQString::null;
} else {
return m_message;
}
}
-QString BugCommandClose::name()
+TQString BugCommandClose::name()
{
return i18n("Close");
}
-QString BugCommandClose::details() const
+TQString BugCommandClose::details() const
{
return m_message;
}
@@ -97,12 +97,12 @@ void BugCommandClose::save( KConfig *config )
///////////////////// Close Silently /////////////////////
-QString BugCommandCloseSilently::controlString() const
+TQString BugCommandCloseSilently::controlString() const
{
return "done " + m_bug.number();
}
-QString BugCommandCloseSilently::name()
+TQString BugCommandCloseSilently::name()
{
return i18n("Close Silently");
}
@@ -114,12 +114,12 @@ void BugCommandCloseSilently::save( KConfig *config )
///////////////////// Reopen /////////////////////
-QString BugCommandReopen::controlString() const
+TQString BugCommandReopen::controlString() const
{
return "reopen " + m_bug.number();
}
-QString BugCommandReopen::name()
+TQString BugCommandReopen::name()
{
return i18n("Reopen");
}
@@ -131,17 +131,17 @@ void BugCommandReopen::save( KConfig *config )
///////////////////// Retitle /////////////////////
-QString BugCommandRetitle::controlString() const
+TQString BugCommandRetitle::controlString() const
{
return "retitle " + m_bug.number() + " " + m_title;
}
-QString BugCommandRetitle::name()
+TQString BugCommandRetitle::name()
{
return i18n("Retitle");
}
-QString BugCommandRetitle::details() const
+TQString BugCommandRetitle::details() const
{
return m_title;
}
@@ -153,17 +153,17 @@ void BugCommandRetitle::save( KConfig *config )
///////////////////// Merge /////////////////////
-QString BugCommandMerge::controlString() const
+TQString BugCommandMerge::controlString() const
{
return "merge " + m_bugNumbers.join(" ");
}
-QString BugCommandMerge::name()
+TQString BugCommandMerge::name()
{
return i18n("Merge");
}
-QString BugCommandMerge::details() const
+TQString BugCommandMerge::details() const
{
return m_bugNumbers.join(", ");
}
@@ -175,12 +175,12 @@ void BugCommandMerge::save( KConfig *config )
///////////////////// Unmerge /////////////////////
-QString BugCommandUnmerge::controlString() const
+TQString BugCommandUnmerge::controlString() const
{
return "unmerge " + m_bug.number();
}
-QString BugCommandUnmerge::name()
+TQString BugCommandUnmerge::name()
{
return i18n("Unmerge");
}
@@ -192,7 +192,7 @@ void BugCommandUnmerge::save( KConfig *config )
///////////////////// Reply /////////////////////
-QString BugCommandReply::mailAddress() const
+TQString BugCommandReply::mailAddress() const
{
return m_bug.number() + "@bugs.kde.org";
#if 0
@@ -204,16 +204,16 @@ QString BugCommandReply::mailAddress() const
case Quiet:
return m_bug.number() + "-quiet@bugs.kde.org";
}
- return QString::null;
+ return TQString::null;
#endif
}
-QString BugCommandReply::mailText() const
+TQString BugCommandReply::mailText() const
{
return m_message;
}
-QString BugCommandReply::name()
+TQString BugCommandReply::name()
{
return i18n("Reply");
#if 0
@@ -225,11 +225,11 @@ QString BugCommandReply::name()
case Quiet:
return i18n("Reply (Quiet)");
}
- return QString::null;
+ return TQString::null;
#endif
}
-QString BugCommandReply::details() const
+TQString BugCommandReply::details() const
{
return m_message;
}
@@ -244,29 +244,29 @@ void BugCommandReply::save( KConfig *config )
///////////////////// Reply Private /////////////////////
-QString BugCommandReplyPrivate::mailAddress() const
+TQString BugCommandReplyPrivate::mailAddress() const
{
return m_address;
}
-QString BugCommandReplyPrivate::mailText() const
+TQString BugCommandReplyPrivate::mailText() const
{
return m_message;
}
-QString BugCommandReplyPrivate::name()
+TQString BugCommandReplyPrivate::name()
{
return i18n("Private Reply");
}
-QString BugCommandReplyPrivate::details() const
+TQString BugCommandReplyPrivate::details() const
{
return m_message;
}
void BugCommandReplyPrivate::save( KConfig *config )
{
- QStringList args;
+ TQStringList args;
args << m_address;
args << m_message;
config->writeEntry( "ReplyPrivate", args );
@@ -274,17 +274,17 @@ void BugCommandReplyPrivate::save( KConfig *config )
///////////////////// Severity /////////////////////
-QString BugCommandSeverity::controlString() const
+TQString BugCommandSeverity::controlString() const
{
return "severity " + m_bug.number() + " " + m_severity.lower();
}
-QString BugCommandSeverity::name()
+TQString BugCommandSeverity::name()
{
return i18n("Severity");
}
-QString BugCommandSeverity::details() const
+TQString BugCommandSeverity::details() const
{
return m_severity;
}
@@ -296,17 +296,17 @@ void BugCommandSeverity::save( KConfig *config )
///////////////////// Reassign /////////////////////
-QString BugCommandReassign::controlString() const
+TQString BugCommandReassign::controlString() const
{
return "reassign " + m_bug.number() + " " + m_package;
}
-QString BugCommandReassign::name()
+TQString BugCommandReassign::name()
{
return i18n("Reassign");
}
-QString BugCommandReassign::details() const
+TQString BugCommandReassign::details() const
{
return m_package;
}
diff --git a/kbugbuster/backend/bugcommand.h b/kbugbuster/backend/bugcommand.h
index 96b9c85c..38b2513f 100644
--- a/kbugbuster/backend/bugcommand.h
+++ b/kbugbuster/backend/bugcommand.h
@@ -1,8 +1,8 @@
#ifndef BUGCOMMAND_H
#define BUGCOMMAND_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "bug.h"
#include "package.h"
@@ -18,21 +18,21 @@ class BugCommand {
BugCommand( const Bug &bug, const Package &pkg ) : m_bug( bug ), m_package( pkg ) {}
virtual ~BugCommand() {}
- virtual QString controlString() const { return QString::null; }
+ virtual TQString controlString() const { return TQString::null; }
- virtual QString mailAddress() const { return QString::null; }
- virtual QString mailText() const { return QString::null; }
+ virtual TQString mailAddress() const { return TQString::null; }
+ virtual TQString mailText() const { return TQString::null; }
Bug bug() const { return m_bug; }
Package package() const { return m_package; }
- virtual QString name();
- virtual QString details();
+ virtual TQString name();
+ virtual TQString details();
- virtual QString type() const { return QString::null; }
+ virtual TQString type() const { return TQString::null; }
virtual void save( KConfig * ) = 0;
- static BugCommand *load( KConfig *, const QString &type );
+ static BugCommand *load( KConfig *, const TQString &type );
protected:
Bug m_bug;
@@ -41,22 +41,22 @@ class BugCommand {
class BugCommandClose : public BugCommand {
public:
- BugCommandClose( const Bug &bug, const QString &message, const Package &pkg ) :
+ BugCommandClose( const Bug &bug, const TQString &message, const Package &pkg ) :
BugCommand( bug, pkg ), m_message( message ) {}
- QString controlString() const;
- QString mailAddress() const;
- QString mailText() const;
+ TQString controlString() const;
+ TQString mailAddress() const;
+ TQString mailText() const;
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Close"); }
+ TQString type() const { return TQString::fromLatin1("Close"); }
void save( KConfig * );
private:
- QString m_message;
+ TQString m_message;
};
class BugCommandCloseSilently : public BugCommand {
@@ -64,11 +64,11 @@ class BugCommandCloseSilently : public BugCommand {
BugCommandCloseSilently( const Bug &bug, const Package &pkg ) :
BugCommand( bug, pkg ) {}
- QString controlString() const;
+ TQString controlString() const;
- QString name();
+ TQString name();
- QString type() const { return QString::fromLatin1("CloseSilently"); }
+ TQString type() const { return TQString::fromLatin1("CloseSilently"); }
void save( KConfig * );
};
@@ -78,49 +78,49 @@ class BugCommandReopen : public BugCommand {
BugCommandReopen( const Bug &bug, const Package &pkg ) :
BugCommand( bug, pkg ) {}
- QString controlString() const;
+ TQString controlString() const;
- QString name();
+ TQString name();
- QString type() const { return QString::fromLatin1("Reopen"); }
+ TQString type() const { return TQString::fromLatin1("Reopen"); }
void save( KConfig * );
};
class BugCommandRetitle : public BugCommand {
public:
- BugCommandRetitle( const Bug &bug, const QString &title, const Package &pkg ) :
+ BugCommandRetitle( const Bug &bug, const TQString &title, const Package &pkg ) :
BugCommand( bug, pkg ), m_title( title ) {}
- QString controlString() const;
+ TQString controlString() const;
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Retitle"); }
+ TQString type() const { return TQString::fromLatin1("Retitle"); }
void save( KConfig * );
private:
- QString m_title;
+ TQString m_title;
};
class BugCommandMerge : public BugCommand {
public:
- BugCommandMerge( const QStringList &bugNumbers, const Package &pkg ) :
+ BugCommandMerge( const TQStringList &bugNumbers, const Package &pkg ) :
BugCommand( Bug(), pkg ), m_bugNumbers( bugNumbers ) {}
- QString controlString() const;
+ TQString controlString() const;
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Merge"); }
+ TQString type() const { return TQString::fromLatin1("Merge"); }
void save( KConfig * );
private:
- QStringList m_bugNumbers;
+ TQStringList m_bugNumbers;
};
class BugCommandUnmerge : public BugCommand {
@@ -128,90 +128,90 @@ class BugCommandUnmerge : public BugCommand {
BugCommandUnmerge( const Bug &bug, const Package &pkg ) :
BugCommand( bug, pkg ) {}
- QString name();
+ TQString name();
- QString type() const { return QString::fromLatin1("Unmerge"); }
+ TQString type() const { return TQString::fromLatin1("Unmerge"); }
void save( KConfig * );
- QString controlString() const;
+ TQString controlString() const;
};
class BugCommandReply : public BugCommand {
public:
- BugCommandReply( const Bug &bug, const QString &message, const int &recipient) :
+ BugCommandReply( const Bug &bug, const TQString &message, const int &recipient) :
BugCommand( bug ), m_message( message ), m_recipient( recipient ) {}
- QString mailAddress() const;
- QString mailText() const;
+ TQString mailAddress() const;
+ TQString mailText() const;
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Reply"); }
+ TQString type() const { return TQString::fromLatin1("Reply"); }
void save( KConfig * );
private:
- QString m_message;
+ TQString m_message;
int m_recipient;
};
class BugCommandReplyPrivate : public BugCommand {
public:
- BugCommandReplyPrivate( const Bug &bug, const QString &address,
- const QString &message ) :
+ BugCommandReplyPrivate( const Bug &bug, const TQString &address,
+ const TQString &message ) :
BugCommand( bug ), m_address( address ), m_message( message ) {}
- QString mailAddress() const;
- QString mailText() const;
+ TQString mailAddress() const;
+ TQString mailText() const;
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("ReplyPrivate"); }
+ TQString type() const { return TQString::fromLatin1("ReplyPrivate"); }
void save( KConfig * );
private:
- QString m_address;
- QString m_message;
+ TQString m_address;
+ TQString m_message;
};
class BugCommandSeverity : public BugCommand {
public:
- BugCommandSeverity( const Bug &bug, const QString &severity, const Package &pkg ) :
+ BugCommandSeverity( const Bug &bug, const TQString &severity, const Package &pkg ) :
BugCommand( bug, pkg ), m_severity( severity ) {}
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Severity"); }
+ TQString type() const { return TQString::fromLatin1("Severity"); }
- QString controlString() const;
+ TQString controlString() const;
void save( KConfig * );
private:
- QString m_severity;
+ TQString m_severity;
};
class BugCommandReassign : public BugCommand {
public:
- BugCommandReassign( const Bug &bug, const QString &package, const Package &pkg ) :
+ BugCommandReassign( const Bug &bug, const TQString &package, const Package &pkg ) :
BugCommand( bug, pkg ), m_package( package ) {}
- QString name();
- QString details() const;
+ TQString name();
+ TQString details() const;
- QString type() const { return QString::fromLatin1("Reassign"); }
+ TQString type() const { return TQString::fromLatin1("Reassign"); }
- QString controlString() const;
+ TQString controlString() const;
void save( KConfig * );
private:
- QString m_package;
+ TQString m_package;
};
#endif
diff --git a/kbugbuster/backend/bugdetails.cpp b/kbugbuster/backend/bugdetails.cpp
index ec512d79..d1ce4666 100644
--- a/kbugbuster/backend/bugdetails.cpp
+++ b/kbugbuster/backend/bugdetails.cpp
@@ -2,11 +2,11 @@
#include "bugdetails.h"
#include "bugdetailsimpl.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kmdcodec.h>
#include <kmessagebox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
BugDetails::BugDetails()
{
@@ -32,46 +32,46 @@ BugDetails::~BugDetails()
{
}
-QString BugDetails::version() const
+TQString BugDetails::version() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->version;
}
-QString BugDetails::source() const
+TQString BugDetails::source() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->source;
}
-QString BugDetails::compiler() const
+TQString BugDetails::compiler() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->compiler;
}
-QString BugDetails::os() const
+TQString BugDetails::os() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->os;
}
-QDateTime BugDetails::submissionDate() const
+TQDateTime BugDetails::submissionDate() const
{
- if ( !m_impl ) return QDateTime();
+ if ( !m_impl ) return TQDateTime();
if ( m_impl->parts.count() > 0 ) {
return m_impl->parts.last().date;
}
- return QDateTime();
+ return TQDateTime();
}
int BugDetails::age() const
@@ -79,7 +79,7 @@ int BugDetails::age() const
if ( !m_impl )
return 0;
- return submissionDate().daysTo( QDateTime::currentDateTime() );
+ return submissionDate().daysTo( TQDateTime::currentDateTime() );
}
BugDetailsPart::List BugDetails::parts() const
@@ -90,23 +90,23 @@ BugDetailsPart::List BugDetails::parts() const
return m_impl->parts;
}
-QValueList<BugDetailsImpl::AttachmentDetails> BugDetails::attachmentDetails() const
+TQValueList<BugDetailsImpl::AttachmentDetails> BugDetails::attachmentDetails() const
{
if ( m_impl )
return m_impl->attachments;
else
- return QValueList<BugDetailsImpl::AttachmentDetails>();
+ return TQValueList<BugDetailsImpl::AttachmentDetails>();
}
-void BugDetails::addAttachmentDetails( const QValueList<BugDetailsImpl::AttachmentDetails>& attch )
+void BugDetails::addAttachmentDetails( const TQValueList<BugDetailsImpl::AttachmentDetails>& attch )
{
if ( m_impl )
m_impl->attachments = attch;
}
-QValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
+TQValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
{
- QValueList<BugDetails::Attachment> lst;
+ TQValueList<BugDetails::Attachment> lst;
if ( !m_impl )
return lst;
BugDetailsPart::List parts = m_impl->parts;
@@ -118,15 +118,15 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments() const
//#define DEBUG_EXTRACT
-QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString& text )
+TQValueList<BugDetails::Attachment> BugDetails::extractAttachments( const TQString& text )
{
- QValueList<BugDetails::Attachment> lst;
- QStringList lines = QStringList::split( '\n', text );
+ TQValueList<BugDetails::Attachment> lst;
+ TQStringList lines = TQStringList::split( '\n', text );
#ifdef DEBUG_EXTRACT
kdDebug() << k_funcinfo << lines.count() << " lines." << endl;
#endif
- QString boundary;
- for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it )
+ TQString boundary;
+ for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it )
{
#ifdef DEBUG_EXTRACT
kdDebug() << "Line: " << *it << endl;
@@ -137,9 +137,9 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
//kdDebug() << "BugDetails::extractAttachments going back, looking for empty or boundary=" << boundary << endl;
#endif
// Rewind until last empty line
- QStringList::Iterator rit = it;
+ TQStringList::Iterator rit = it;
for ( ; rit != lines.begin() ; --rit ) {
- QString line = *rit;
+ TQString line = *rit;
if ( line.endsWith( "<br />" ) )
line = line.left( line.length() - 6 );
while ( !line.isEmpty() && line[0] == ' ' )
@@ -161,11 +161,11 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
break;
}
// Forward until next empty line (end of headers) - and parse filename
- QString filename;
- QString encoding;
+ TQString filename;
+ TQString encoding;
rit = it;
for ( ; rit != lines.end() ; ++rit ) {
- QString header = *rit;
+ TQString header = *rit;
if ( header.endsWith( "<br />" ) )
header = header.left( header.length() - 6 );
if ( header[0] == ' ' )
@@ -182,7 +182,7 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
#endif
// Taken from libkdenetwork/kmime_headers.cpp
int pos=header.find("filename=", 0, false);
- QString fn;
+ TQString fn;
if(pos>-1) {
pos+=9;
fn=header.mid(pos, header.length()-pos);
@@ -212,10 +212,10 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
if ( it == lines.end() )
break;
// Read encoded contents
- QString contents;
+ TQString contents;
for ( ; it != lines.end() ; ++it )
{
- QString line = *it;
+ TQString line = *it;
if ( line.endsWith( "</tt>" ) )
line = line.left( line.length() - 5 );
if ( line.endsWith( "<br />" ) ) // necessary for the boundary check
@@ -226,12 +226,12 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
break;
if ( line == boundary+"--" ) // end of last attachment
{
- boundary = QString::null;
+ boundary = TQString::null;
break;
}
contents += line; // no newline, because of linebreaking between <br and />
}
- contents = contents.replace( QRegExp("<br */>"), QString::null );
+ contents = contents.replace( TQRegExp("<br */>"), TQString::null );
#ifdef DEBUG_EXTRACT
kdDebug() << "BugDetails::extractAttachments contents=***\n" << contents << "\n***" << endl;
#endif
@@ -243,7 +243,7 @@ QValueList<BugDetails::Attachment> BugDetails::extractAttachments( const QString
//KCodecs::uudecode( contents.local8Bit(), a.contents /*out*/ );
KMessageBox::information( 0, i18n("Attachment %1 could not be decoded.\nEncoding: %2").arg(filename).arg(encoding) );
#ifdef DEBUG_EXTRACT
- kdDebug() << "Result: ***\n" << QCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl;
+ kdDebug() << "Result: ***\n" << TQCString( a.contents.data(), a.contents.size()+1 ) << "\n*+*" << endl;
#endif
a.filename = filename;
lst.append(a);
diff --git a/kbugbuster/backend/bugdetails.h b/kbugbuster/backend/bugdetails.h
index 08d20777..171847a7 100644
--- a/kbugbuster/backend/bugdetails.h
+++ b/kbugbuster/backend/bugdetails.h
@@ -5,7 +5,7 @@
#include "bugdetailspart.h"
#include "bugdetailsimpl.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
@@ -14,10 +14,10 @@ class BugDetailsImpl;
class BugDetails
{
public:
- typedef QValueList<BugDetails> List;
+ typedef TQValueList<BugDetails> List;
struct Attachment {
- QByteArray contents;
- QString filename;
+ TQByteArray contents;
+ TQString filename;
};
BugDetails();
@@ -26,17 +26,17 @@ public:
BugDetails &operator=( const BugDetails &rhs );
~BugDetails();
- QString version() const;
- QString source() const;
- QString compiler() const;
- QString os() const;
+ TQString version() const;
+ TQString source() const;
+ TQString compiler() const;
+ TQString os() const;
BugDetailsPart::List parts() const;
- void addAttachmentDetails( const QValueList<BugDetailsImpl::AttachmentDetails>& attch );
- QValueList<BugDetailsImpl::AttachmentDetails> attachmentDetails() const;
- QValueList<BugDetails::Attachment> extractAttachments() const;
- static QValueList<BugDetails::Attachment> extractAttachments( const QString& text );
+ void addAttachmentDetails( const TQValueList<BugDetailsImpl::AttachmentDetails>& attch );
+ TQValueList<BugDetailsImpl::AttachmentDetails> attachmentDetails() const;
+ TQValueList<BugDetails::Attachment> extractAttachments() const;
+ static TQValueList<BugDetails::Attachment> extractAttachments( const TQString& text );
- QDateTime submissionDate() const;
+ TQDateTime submissionDate() const;
int age() const;
bool operator==( const BugDetails &rhs );
diff --git a/kbugbuster/backend/bugdetailsimpl.h b/kbugbuster/backend/bugdetailsimpl.h
index df3e5d6d..5d6dc459 100644
--- a/kbugbuster/backend/bugdetailsimpl.h
+++ b/kbugbuster/backend/bugdetailsimpl.h
@@ -8,29 +8,29 @@
struct BugDetailsImpl : public KShared
{
public:
- BugDetailsImpl( const QString &_version, const QString &_source,
- const QString &_compiler, const QString &_os,
+ BugDetailsImpl( const TQString &_version, const TQString &_source,
+ const TQString &_compiler, const TQString &_os,
const BugDetailsPart::List &_parts )
: version( _version ), source( _source ), compiler( _compiler ),
os( _os ), parts( _parts ) {}
struct AttachmentDetails {
AttachmentDetails() { }
- AttachmentDetails( const QString& descr, const QString& dt,
- const QString& idf ) : description( descr ),
+ AttachmentDetails( const TQString& descr, const TQString& dt,
+ const TQString& idf ) : description( descr ),
date( dt ),
id( idf ) { }
- QString description;
- QString date;
- QString id;
+ TQString description;
+ TQString date;
+ TQString id;
};
- QString version;
- QString source;
- QString compiler;
- QString os;
+ TQString version;
+ TQString source;
+ TQString compiler;
+ TQString os;
BugDetailsPart::List parts;
- QValueList<BugDetailsImpl::AttachmentDetails> attachments;
+ TQValueList<BugDetailsImpl::AttachmentDetails> attachments;
};
#endif
diff --git a/kbugbuster/backend/bugdetailsjob.cpp b/kbugbuster/backend/bugdetailsjob.cpp
index 83599c1d..1218023d 100644
--- a/kbugbuster/backend/bugdetailsjob.cpp
+++ b/kbugbuster/backend/bugdetailsjob.cpp
@@ -29,7 +29,7 @@ void BugDetailsJob::start( const Bug &bug )
BugJob::start( bugUrl );
}
-void BugDetailsJob::process( const QByteArray &data )
+void BugDetailsJob::process( const TQByteArray &data )
{
BugDetails bugDetails;
diff --git a/kbugbuster/backend/bugdetailsjob.h b/kbugbuster/backend/bugdetailsjob.h
index e07ad3a2..5b6a8887 100644
--- a/kbugbuster/backend/bugdetailsjob.h
+++ b/kbugbuster/backend/bugdetailsjob.h
@@ -19,7 +19,7 @@ class BugDetailsJob : public BugJob
void bugDetailsAvailable( const Bug &bug, const BugDetails &details );
protected:
- virtual void process( const QByteArray &data );
+ virtual void process( const TQByteArray &data );
private:
Bug m_bug;
diff --git a/kbugbuster/backend/bugdetailspart.h b/kbugbuster/backend/bugdetailspart.h
index 483057c8..7e1cfe7b 100644
--- a/kbugbuster/backend/bugdetailspart.h
+++ b/kbugbuster/backend/bugdetailspart.h
@@ -1,21 +1,21 @@
#ifndef BUGDETAILSPART_H
#define BUGDETAILSPART_H
-#include <qvaluelist.h>
-#include <qdatetime.h>
+#include <tqvaluelist.h>
+#include <tqdatetime.h>
struct BugDetailsPart
{
- typedef QValueList<BugDetailsPart> List;
+ typedef TQValueList<BugDetailsPart> List;
BugDetailsPart () {}
- BugDetailsPart( const Person &_sender, const QDateTime &_date,
- const QString &_text )
+ BugDetailsPart( const Person &_sender, const TQDateTime &_date,
+ const TQString &_text )
: sender( _sender ), date( _date ), text( _text ) {}
Person sender;
- QDateTime date;
- QString text;
+ TQDateTime date;
+ TQString text;
};
#endif
diff --git a/kbugbuster/backend/bugimpl.h b/kbugbuster/backend/bugimpl.h
index 630105a1..7fefc53d 100644
--- a/kbugbuster/backend/bugimpl.h
+++ b/kbugbuster/backend/bugimpl.h
@@ -10,7 +10,7 @@
struct BugImpl : public KShared
{
public:
- BugImpl( const QString &_title, const Person &_submitter, QString _number,
+ BugImpl( const TQString &_title, const Person &_submitter, TQString _number,
uint _age, Bug::Severity _severity, Person _developerTODO,
Bug::Status _status, const Bug::BugMergeList& _mergedWith )
: age( _age ), title( _title ), submitter( _submitter ), number( _number ),
@@ -20,9 +20,9 @@ public:
}
uint age;
- QString title;
+ TQString title;
Person submitter;
- QString number;
+ TQString number;
Bug::Severity severity;
Person developerTODO;
Bug::Status status;
diff --git a/kbugbuster/backend/bugjob.cpp b/kbugbuster/backend/bugjob.cpp
index 6f32fb97..1d13913b 100644
--- a/kbugbuster/backend/bugjob.cpp
+++ b/kbugbuster/backend/bugjob.cpp
@@ -30,14 +30,14 @@ void BugJob::start( const KURL &url )
KIO::Job *job = KIO::get( url, true /*always 'reload=true', we have our own cache*/, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( ioResult( KIO::Job * ) ) );
- connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ),
- this, SLOT( ioData( KIO::Job *, const QByteArray & ) ) );
- connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ),
- this, SLOT( ioInfoMessage( KIO::Job *, const QString & ) ) );
- connect( job, SIGNAL( percent( KIO::Job *, unsigned long ) ),
- this, SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( ioResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ),
+ this, TQT_SLOT( ioData( KIO::Job *, const TQByteArray & ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( ioInfoMessage( KIO::Job *, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ),
+ this, TQT_SLOT( ioInfoPercent( KIO::Job *, unsigned long ) ) );
}
void BugJob::ioResult( KIO::Job *job )
@@ -71,7 +71,7 @@ void BugJob::ioResult( KIO::Job *job )
delete this;
}
-void BugJob::ioData( KIO::Job *, const QByteArray &data )
+void BugJob::ioData( KIO::Job *, const TQByteArray &data )
{
unsigned int start = m_data.size();
@@ -79,9 +79,9 @@ void BugJob::ioData( KIO::Job *, const QByteArray &data )
memcpy( m_data.data() + start, data.data(), data.size() );
}
-void BugJob::ioInfoMessage( KIO::Job *, const QString &_text )
+void BugJob::ioInfoMessage( KIO::Job *, const TQString &_text )
{
- QString text = _text;
+ TQString text = _text;
emit infoMessage( text );
}
diff --git a/kbugbuster/backend/bugjob.h b/kbugbuster/backend/bugjob.h
index 2c439810..00ab7f8f 100644
--- a/kbugbuster/backend/bugjob.h
+++ b/kbugbuster/backend/bugjob.h
@@ -15,27 +15,27 @@ class BugJob : public KIO::Job
BugServer *server() const { return mServer; }
signals:
- void infoMessage( const QString &text );
+ void infoMessage( const TQString &text );
void infoPercent( unsigned long percent );
- void error( const QString &text );
+ void error( const TQString &text );
void jobEnded( BugJob * );
protected:
void start( const KURL &url /*, const KParts::URLArgs &args = KParts::URLArgs()*/ );
- virtual void process( const QByteArray &data ) = 0;
+ virtual void process( const TQByteArray &data ) = 0;
private slots:
void ioResult( KIO::Job *job );
- void ioData( KIO::Job *job, const QByteArray &data );
+ void ioData( KIO::Job *job, const TQByteArray &data );
- void ioInfoMessage( KIO::Job *job, const QString &text );
+ void ioInfoMessage( KIO::Job *job, const TQString &text );
void ioInfoPercent( KIO::Job *job, unsigned long percent );
private:
- QByteArray m_data;
+ TQByteArray m_data;
BugServer *mServer;
};
diff --git a/kbugbuster/backend/buglistjob.cpp b/kbugbuster/backend/buglistjob.cpp
index e1dea2f4..74fe5427 100644
--- a/kbugbuster/backend/buglistjob.cpp
+++ b/kbugbuster/backend/buglistjob.cpp
@@ -32,8 +32,8 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
BugListJob::BugListJob( BugServer *server )
: BugJob( server )
@@ -44,7 +44,7 @@ BugListJob::~BugListJob()
{
}
-void BugListJob::start( const Package &pkg, const QString &component )
+void BugListJob::start( const Package &pkg, const TQString &component )
{
m_package = pkg;
m_component = component;
@@ -53,7 +53,7 @@ void BugListJob::start( const Package &pkg, const QString &component )
}
-void BugListJob::process( const QByteArray &data )
+void BugListJob::process( const TQByteArray &data )
{
Bug::List bugs;
diff --git a/kbugbuster/backend/buglistjob.h b/kbugbuster/backend/buglistjob.h
index 0260d3a0..4272325d 100644
--- a/kbugbuster/backend/buglistjob.h
+++ b/kbugbuster/backend/buglistjob.h
@@ -28,7 +28,7 @@
#include "package.h"
#include "bug.h"
-#include <qdom.h>
+#include <tqdom.h>
class BugListJob : public BugJob
{
@@ -37,17 +37,17 @@ class BugListJob : public BugJob
BugListJob( BugServer * );
virtual ~BugListJob();
- void start( const Package &pkg, const QString &component );
+ void start( const Package &pkg, const TQString &component );
protected:
- void process( const QByteArray &data );
+ void process( const TQByteArray &data );
signals:
- void bugListAvailable( const Package &pkg, const QString &component, const Bug::List &bugs );
+ void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List &bugs );
protected:
Package m_package;
- QString m_component;
+ TQString m_component;
};
diff --git a/kbugbuster/backend/bugmybugsjob.cpp b/kbugbuster/backend/bugmybugsjob.cpp
index 92aa4448..87767a5b 100644
--- a/kbugbuster/backend/bugmybugsjob.cpp
+++ b/kbugbuster/backend/bugmybugsjob.cpp
@@ -33,8 +33,8 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
BugMyBugsJob::BugMyBugsJob( BugServer *server )
: BugJob( server )
@@ -58,7 +58,7 @@ void BugMyBugsJob::start()
BugJob::start( url );
}
-void BugMyBugsJob::process( const QByteArray &data )
+void BugMyBugsJob::process( const TQByteArray &data )
{
Bug::List bugs;
diff --git a/kbugbuster/backend/bugmybugsjob.h b/kbugbuster/backend/bugmybugsjob.h
index f51ee229..92685593 100644
--- a/kbugbuster/backend/bugmybugsjob.h
+++ b/kbugbuster/backend/bugmybugsjob.h
@@ -40,10 +40,10 @@ public:
void start();
protected:
- void process( const QByteArray &data );
+ void process( const TQByteArray &data );
signals:
- void bugListAvailable( const QString &label, const Bug::List &bugs );
+ void bugListAvailable( const TQString &label, const Bug::List &bugs );
};
#endif
diff --git a/kbugbuster/backend/bugserver.cpp b/kbugbuster/backend/bugserver.cpp
index 0e6a70e6..768b76cd 100644
--- a/kbugbuster/backend/bugserver.cpp
+++ b/kbugbuster/backend/bugserver.cpp
@@ -49,10 +49,10 @@ void BugServer::init()
{
mCache = new BugCache( identifier() );
- QString commandsFile = locateLocal( "appdata", identifier() + "commands" );
+ TQString commandsFile = locateLocal( "appdata", identifier() + "commands" );
mCommandsFile = new KSimpleConfig( commandsFile );
- QString bugzilla = mServerConfig.bugzillaVersion();
+ TQString bugzilla = mServerConfig.bugzillaVersion();
if ( bugzilla == "KDE" ) mProcessor = new DomProcessor( this );
else if ( bugzilla == "2.10" ) mProcessor = new HtmlParser_2_10( this );
@@ -82,9 +82,9 @@ BugServerConfig &BugServer::serverConfig()
return mServerConfig;
}
-QString BugServer::identifier()
+TQString BugServer::identifier()
{
- QString id = mServerConfig.baseUrl().host();
+ TQString id = mServerConfig.baseUrl().host();
return id;
}
@@ -102,7 +102,7 @@ KURL BugServer::packageListUrl()
return url;
}
-KURL BugServer::bugListUrl( const Package &product, const QString &component )
+KURL BugServer::bugListUrl( const Package &product, const TQString &component )
{
KURL url = mServerConfig.baseUrl();
@@ -132,7 +132,7 @@ KURL BugServer::bugLink( const Bug &bug )
return url;
}
-KURL BugServer::attachmentViewLink( const QString &id )
+KURL BugServer::attachmentViewLink( const TQString &id )
{
KURL url = mServerConfig.baseUrl();
@@ -142,7 +142,7 @@ KURL BugServer::attachmentViewLink( const QString &id )
return url;
}
-KURL BugServer::attachmentEditLink( const QString &id )
+KURL BugServer::attachmentEditLink( const TQString &id )
{
KURL url = mServerConfig.baseUrl();
@@ -152,7 +152,7 @@ KURL BugServer::attachmentEditLink( const QString &id )
return url;
}
-Bug::Status BugServer::bugStatus( const QString &str )
+Bug::Status BugServer::bugStatus( const TQString &str )
{
if ( str == "UNCONFIRMED" ) {
return Bug::Unconfirmed;
@@ -173,7 +173,7 @@ Bug::Status BugServer::bugStatus( const QString &str )
}
}
-Bug::Severity BugServer::bugSeverity( const QString &str )
+Bug::Severity BugServer::bugSeverity( const TQString &str )
{
if ( str == "critical" ) {
return Bug::Critical;
@@ -204,9 +204,9 @@ void BugServer::writeConfig( KConfig * /*config*/ )
bool BugServer::queueCommand( BugCommand *cmd )
{
- // mCommands[bug] is a QPtrList. Get or create, set to autodelete, then append command.
+ // mCommands[bug] is a TQPtrList. Get or create, set to autodelete, then append command.
mCommands[cmd->bug().number()].setAutoDelete( true );
- QPtrListIterator<BugCommand> cmdIt( mCommands[cmd->bug().number()] );
+ TQPtrListIterator<BugCommand> cmdIt( mCommands[cmd->bug().number()] );
for ( ; cmdIt.current(); ++cmdIt )
if ( cmdIt.current()->type() == cmd->type() )
return false;
@@ -214,10 +214,10 @@ bool BugServer::queueCommand( BugCommand *cmd )
return true;
}
-QPtrList<BugCommand> BugServer::queryCommands( const Bug &bug ) const
+TQPtrList<BugCommand> BugServer::queryCommands( const Bug &bug ) const
{
CommandsMap::ConstIterator it = mCommands.find( bug.number() );
- if (it == mCommands.end()) return QPtrList<BugCommand>();
+ if (it == mCommands.end()) return TQPtrList<BugCommand>();
else return *it;
}
@@ -227,14 +227,14 @@ bool BugServer::hasCommandsFor( const Bug &bug ) const
return it != mCommands.end();
}
-void BugServer::sendCommands( MailSender *mailer, const QString &senderName,
- const QString &senderEmail, bool sendBCC,
- const QString &recipient )
+void BugServer::sendCommands( MailSender *mailer, const TQString &senderName,
+ const TQString &senderEmail, bool sendBCC,
+ const TQString &recipient )
{
// Disable mail commands for non-KDE servers
if ( mServerConfig.baseUrl() != KURL( "http://bugs.kde.org" ) ) return;
- QString controlText;
+ TQString controlText;
// For each bug that has commands.....
CommandsMap::ConstIterator it;
@@ -242,7 +242,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName,
Bug bug;
Package pkg;
// And for each command....
- QPtrListIterator<BugCommand> cmdIt( *it );
+ TQPtrListIterator<BugCommand> cmdIt( *it );
for ( ; cmdIt.current() ; ++cmdIt ) {
BugCommand* cmd = cmdIt.current();
bug = cmd->bug();
@@ -257,8 +257,8 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName,
// implement message queueing for smtp
MailSender *directMailer = mailer->clone();
#if 0
- connect( directMailer, SIGNAL( status( const QString & ) ),
- this, SIGNAL( infoMessage( const QString & ) ) );
+ connect( directMailer, TQT_SIGNAL( status( const TQString & ) ),
+ this, TQT_SIGNAL( infoMessage( const TQString & ) ) );
#endif
if (!directMailer->send( senderName, senderEmail, cmd->mailAddress(),
cmd->bug().title().prepend( "Re: " ),
@@ -272,9 +272,9 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName,
mCommandsFile->deleteGroup( bug.number(), true ); // done, remove command
mCache->invalidateBugDetails( bug );
if ( !pkg.isNull() ) {
- mCache->invalidateBugList( pkg, QString::null ); // the status of the bug comes from the buglist...
+ mCache->invalidateBugList( pkg, TQString::null ); // the status of the bug comes from the buglist...
- QStringList::ConstIterator it2;
+ TQStringList::ConstIterator it2;
for (it2 = pkg.components().begin();it2 != pkg.components().end();++it2) {
mCache->invalidateBugList( pkg, (*it2) ); // the status of the bug comes from the buglist...
}
@@ -297,7 +297,7 @@ void BugServer::sendCommands( MailSender *mailer, const QString &senderName,
mCommands.clear();
}
-void BugServer::clearCommands( const QString &bug )
+void BugServer::clearCommands( const TQString &bug )
{
mCommands.remove( bug );
mCommandsFile->deleteGroup( bug, true );
@@ -309,12 +309,12 @@ bool BugServer::commandsPending() const
else return false;
}
-QStringList BugServer::listCommands() const
+TQStringList BugServer::listCommands() const
{
- QStringList result;
+ TQStringList result;
CommandsMap::ConstIterator it;
for(it = mCommands.begin(); it != mCommands.end(); ++it ) {
- QPtrListIterator<BugCommand> cmdIt( *it );
+ TQPtrListIterator<BugCommand> cmdIt( *it );
for ( ; cmdIt.current() ; ++cmdIt ) {
BugCommand* cmd = cmdIt.current();
if (!cmd->controlString().isNull())
@@ -326,9 +326,9 @@ QStringList BugServer::listCommands() const
return result;
}
-QStringList BugServer::bugsWithCommands() const
+TQStringList BugServer::bugsWithCommands() const
{
- QStringList bugs;
+ TQStringList bugs;
CommandsMap::ConstIterator it;
for(it = mCommands.begin(); it != mCommands.end(); ++it ) {
@@ -343,7 +343,7 @@ void BugServer::saveCommands() const
CommandsMap::ConstIterator it;
for(it = mCommands.begin(); it != mCommands.end(); ++it ) {
mCommandsFile->setGroup( it.key() );
- QPtrListIterator<BugCommand> cmdIt( *it );
+ TQPtrListIterator<BugCommand> cmdIt( *it );
for ( ; cmdIt.current() ; ++cmdIt ) {
BugCommand* cmd = cmdIt.current();
cmd->save( mCommandsFile );
@@ -357,14 +357,14 @@ void BugServer::loadCommands()
{
mCommands.clear();
- QStringList bugs = mCommandsFile->groupList();
- QStringList::ConstIterator it;
+ TQStringList bugs = mCommandsFile->groupList();
+ TQStringList::ConstIterator it;
for( it = bugs.begin(); it != bugs.end(); ++it ) {
mCommandsFile->setGroup( *it );
- QMap<QString, QString> entries = mCommandsFile->entryMap ( *it );
- QMap<QString, QString>::ConstIterator it;
+ TQMap<TQString, TQString> entries = mCommandsFile->entryMap ( *it );
+ TQMap<TQString, TQString>::ConstIterator it;
for( it = entries.begin(); it != entries.end(); ++it ) {
- QString type = it.key();
+ TQString type = it.key();
BugCommand *cmd = BugCommand::load( mCommandsFile, type );
if ( cmd ) {
mCommands[cmd->bug().number()].setAutoDelete(true);
@@ -384,16 +384,16 @@ const Package::List &BugServer::packages() const
return mPackages;
}
-void BugServer::setBugs( const Package &pkg, const QString &component,
+void BugServer::setBugs( const Package &pkg, const TQString &component,
const Bug::List &bugs )
{
- QPair<Package, QString> pkg_key = QPair<Package, QString>(pkg, component);
+ QPair<Package, TQString> pkg_key = QPair<Package, TQString>(pkg, component);
mBugs[ pkg_key ] = bugs;
}
-const Bug::List &BugServer::bugs( const Package &pkg, const QString &component )
+const Bug::List &BugServer::bugs( const Package &pkg, const TQString &component )
{
- QPair<Package, QString> pkg_key = QPair<Package, QString>(pkg, component);
+ QPair<Package, TQString> pkg_key = QPair<Package, TQString>(pkg, component);
return mBugs[ pkg_key ];
}
diff --git a/kbugbuster/backend/bugserver.h b/kbugbuster/backend/bugserver.h
index 3b534fa0..b2095569 100644
--- a/kbugbuster/backend/bugserver.h
+++ b/kbugbuster/backend/bugserver.h
@@ -23,7 +23,7 @@
#ifndef BUGSERVER_H
#define BUGSERVER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -50,23 +50,23 @@ class BugServer
void setServerConfig( const BugServerConfig & );
BugServerConfig &serverConfig();
- QString identifier();
+ TQString identifier();
BugCache *cache() const { return mCache; }
KURL packageListUrl();
- KURL bugListUrl( const Package &, const QString &component );
+ KURL bugListUrl( const Package &, const TQString &component );
KURL bugDetailsUrl( const Bug & );
KURL bugLink( const Bug & );
- KURL attachmentViewLink( const QString &id );
- KURL attachmentEditLink( const QString &id );
+ KURL attachmentViewLink( const TQString &id );
+ KURL attachmentEditLink( const TQString &id );
- Bug::Status bugStatus( const QString & );
+ Bug::Status bugStatus( const TQString & );
- Bug::Severity bugSeverity( const QString & );
+ Bug::Severity bugSeverity( const TQString & );
Processor *processor() const;
@@ -81,7 +81,7 @@ class BugServer
/**
Return all the commands for a given bug.
*/
- QPtrList<BugCommand> queryCommands( const Bug & ) const;
+ TQPtrList<BugCommand> queryCommands( const Bug & ) const;
/**
Return true if we have a least one command for this bug.
*/
@@ -89,13 +89,13 @@ class BugServer
/**
Send all commands (generate the mails).
*/
- void sendCommands( MailSender *, const QString &senderName,
- const QString &senderEmail, bool sendBCC,
- const QString &recipient );
+ void sendCommands( MailSender *, const TQString &senderName,
+ const TQString &senderEmail, bool sendBCC,
+ const TQString &recipient );
/**
Forget all commands for a given bug.
*/
- void clearCommands( const QString &bug );
+ void clearCommands( const TQString &bug );
/**
Return true if any command has been created.
*/
@@ -103,11 +103,11 @@ class BugServer
/**
List all pending commands.
*/
- QStringList listCommands() const;
+ TQStringList listCommands() const;
/**
Return numbers of all bugs having at least one command queued.
*/
- QStringList bugsWithCommands() const;
+ TQStringList bugsWithCommands() const;
void saveCommands() const;
void loadCommands();
@@ -115,9 +115,9 @@ class BugServer
void setPackages( const Package::List & );
const Package::List &packages() const;
- void setBugs( const Package &, const QString &component,
+ void setBugs( const Package &, const TQString &component,
const Bug::List & );
- const Bug::List &bugs( const Package &, const QString &component );
+ const Bug::List &bugs( const Package &, const TQString &component );
void setBugDetails( const Bug &, const BugDetails & );
const BugDetails &bugDetails( const Bug & );
@@ -133,13 +133,13 @@ class BugServer
Package::List mPackages;
// Map package -> list of bugs
- typedef QMap< QPair<Package, QString>, Bug::List > BugListMap;
+ typedef TQMap< QPair<Package, TQString>, Bug::List > BugListMap;
BugListMap mBugs;
// Map bug -> bug details (i.e. contents of the report)
- typedef QMap< Bug, BugDetails > BugDetailsMap;
+ typedef TQMap< Bug, BugDetails > BugDetailsMap;
BugDetailsMap mBugDetails;
// Map bug-number -> list of commands
- typedef QMap< QString, QPtrList<BugCommand> > CommandsMap;
+ typedef TQMap< TQString, TQPtrList<BugCommand> > CommandsMap;
CommandsMap mCommands;
KSimpleConfig *mCommandsFile;
diff --git a/kbugbuster/backend/bugserverconfig.cpp b/kbugbuster/backend/bugserverconfig.cpp
index 0669c0ab..91be1f0c 100644
--- a/kbugbuster/backend/bugserverconfig.cpp
+++ b/kbugbuster/backend/bugserverconfig.cpp
@@ -37,7 +37,7 @@ BugServerConfig::BugServerConfig()
mBugzillaVersion = "KDE";
}
-BugServerConfig::BugServerConfig( const QString &name, const KURL &baseUrl )
+BugServerConfig::BugServerConfig( const TQString &name, const KURL &baseUrl )
: mName( name ), mBaseUrl( baseUrl ), mBugzillaVersion( "KDE" )
{
}
@@ -46,12 +46,12 @@ BugServerConfig::~BugServerConfig()
{
}
-void BugServerConfig::setName( const QString &name )
+void BugServerConfig::setName( const TQString &name )
{
mName = name;
}
-QString BugServerConfig::name() const
+TQString BugServerConfig::name() const
{
return mName;
}
@@ -66,39 +66,39 @@ KURL BugServerConfig::baseUrl() const
return mBaseUrl;
}
-void BugServerConfig::setUser( const QString &user )
+void BugServerConfig::setUser( const TQString &user )
{
mUser = user;
}
-QString BugServerConfig::user() const
+TQString BugServerConfig::user() const
{
return mUser;
}
-void BugServerConfig::setPassword( const QString &password )
+void BugServerConfig::setPassword( const TQString &password )
{
mPassword = password;
}
-QString BugServerConfig::password() const
+TQString BugServerConfig::password() const
{
return mPassword;
}
-void BugServerConfig::setBugzillaVersion( const QString &s )
+void BugServerConfig::setBugzillaVersion( const TQString &s )
{
mBugzillaVersion = s;
}
-QString BugServerConfig::bugzillaVersion() const
+TQString BugServerConfig::bugzillaVersion() const
{
return mBugzillaVersion;
}
-QStringList BugServerConfig::bugzillaVersions()
+TQStringList BugServerConfig::bugzillaVersions()
{
- QStringList v;
+ TQStringList v;
v << "2.10";
v << "2.14.2";
@@ -110,7 +110,7 @@ QStringList BugServerConfig::bugzillaVersions()
return v;
}
-void BugServerConfig::readConfig( KConfig *cfg, const QString &name )
+void BugServerConfig::readConfig( KConfig *cfg, const TQString &name )
{
mName = name;
diff --git a/kbugbuster/backend/bugserverconfig.h b/kbugbuster/backend/bugserverconfig.h
index 2c9be828..2868a791 100644
--- a/kbugbuster/backend/bugserverconfig.h
+++ b/kbugbuster/backend/bugserverconfig.h
@@ -24,8 +24,8 @@
#ifndef BUGSERVERCONFIG_H
#define BUGSERVERCONFIG_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
@@ -35,53 +35,53 @@ class BugServerConfig
{
public:
BugServerConfig();
- BugServerConfig( const QString &name, const KURL &baseUrl );
+ BugServerConfig( const TQString &name, const KURL &baseUrl );
~BugServerConfig();
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
void setBaseUrl( const KURL &url );
KURL baseUrl() const;
- void setUser( const QString &user );
- QString user() const;
+ void setUser( const TQString &user );
+ TQString user() const;
- void setPassword( const QString &password );
- QString password() const;
+ void setPassword( const TQString &password );
+ TQString password() const;
- void readConfig( KConfig *, const QString &name );
+ void readConfig( KConfig *, const TQString &name );
void writeConfig( KConfig * );
- static QStringList bugzillaVersions();
+ static TQStringList bugzillaVersions();
- void setBugzillaVersion( const QString & );
- QString bugzillaVersion() const;
+ void setBugzillaVersion( const TQString & );
+ TQString bugzillaVersion() const;
- void setRecentPackages( const QStringList &v ) { mRecentPackages = v; }
- QStringList recentPackages() const { return mRecentPackages; }
+ void setRecentPackages( const TQStringList &v ) { mRecentPackages = v; }
+ TQStringList recentPackages() const { return mRecentPackages; }
- void setCurrentPackage( const QString &v ) { mCurrentPackage = v; }
- QString currentPackage() const { return mCurrentPackage; }
+ void setCurrentPackage( const TQString &v ) { mCurrentPackage = v; }
+ TQString currentPackage() const { return mCurrentPackage; }
- void setCurrentComponent( const QString &v ) { mCurrentComponent = v; }
- QString currentComponent() const { return mCurrentComponent; }
+ void setCurrentComponent( const TQString &v ) { mCurrentComponent = v; }
+ TQString currentComponent() const { return mCurrentComponent; }
- void setCurrentBug( const QString &v ) { mCurrentBug = v; }
- QString currentBug() const { return mCurrentBug; }
+ void setCurrentBug( const TQString &v ) { mCurrentBug = v; }
+ TQString currentBug() const { return mCurrentBug; }
private:
- QString mName;
+ TQString mName;
KURL mBaseUrl;
- QString mUser;
- QString mPassword;
+ TQString mUser;
+ TQString mPassword;
- QString mBugzillaVersion;
+ TQString mBugzillaVersion;
- QStringList mRecentPackages;
- QString mCurrentPackage;
- QString mCurrentComponent;
- QString mCurrentBug;
+ TQStringList mRecentPackages;
+ TQString mCurrentPackage;
+ TQString mCurrentComponent;
+ TQString mCurrentBug;
};
#endif
diff --git a/kbugbuster/backend/bugsystem.cpp b/kbugbuster/backend/bugsystem.cpp
index 26432e08..c3dc0cdd 100644
--- a/kbugbuster/backend/bugsystem.cpp
+++ b/kbugbuster/backend/bugsystem.cpp
@@ -27,7 +27,7 @@ KStaticDeleter<BugSystem> bssd;
BugSystem *BugSystem::s_self = 0;
-QString BugSystem::mLastResponse;
+TQString BugSystem::mLastResponse;
BugSystem *BugSystem::self()
{
@@ -45,7 +45,7 @@ BugSystem::BugSystem()
BugSystem::~BugSystem()
{
- QValueList<BugServer *>::ConstIterator it;
+ TQValueList<BugServer *>::ConstIterator it;
for( it = mServerList.begin(); it != mServerList.end(); ++it ) {
delete *it;
}
@@ -80,12 +80,12 @@ void BugSystem::retrievePackageList()
emit packageListLoading();
PackageListJob *job = new PackageListJob( mServer );
- connect( job, SIGNAL( packageListAvailable( const Package::List & ) ),
- this, SIGNAL( packageListAvailable( const Package::List & ) ) );
- connect( job, SIGNAL( packageListAvailable( const Package::List & ) ),
- this, SLOT( setPackageList( const Package::List & ) ) );
- connect( job, SIGNAL( error( const QString & ) ),
- this, SIGNAL( loadingError( const QString & ) ) );
+ connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ),
+ this, TQT_SIGNAL( packageListAvailable( const Package::List & ) ) );
+ connect( job, TQT_SIGNAL( packageListAvailable( const Package::List & ) ),
+ this, TQT_SLOT( setPackageList( const Package::List & ) ) );
+ connect( job, TQT_SIGNAL( error( const TQString & ) ),
+ this, TQT_SIGNAL( loadingError( const TQString & ) ) );
connectJob( job );
registerJob( job );
@@ -95,7 +95,7 @@ void BugSystem::retrievePackageList()
}
}
-void BugSystem::retrieveBugList( const Package &pkg, const QString &component )
+void BugSystem::retrieveBugList( const Package &pkg, const TQString &component )
{
kdDebug() << "BugSystem::retrieveBugList(): " << pkg.name() << endl;
@@ -120,12 +120,12 @@ void BugSystem::retrieveBugList( const Package &pkg, const QString &component )
emit bugListLoading( pkg, component );
BugListJob *job = new BugListJob( mServer );
- connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ),
- this, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ) );
- connect( job, SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ),
- this, SLOT( setBugList( const Package &, const QString &, const Bug::List & ) ) );
- connect( job, SIGNAL( error( const QString & ) ),
- this, SIGNAL( loadingError( const QString & ) ) );
+ connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ),
+ this, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ) );
+ connect( job, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ),
+ this, TQT_SLOT( setBugList( const Package &, const TQString &, const Bug::List & ) ) );
+ connect( job, TQT_SIGNAL( error( const TQString & ) ),
+ this, TQT_SIGNAL( loadingError( const TQString & ) ) );
connectJob( job );
registerJob( job );
@@ -152,10 +152,10 @@ void BugSystem::retrieveMyBugsList()
BugMyBugsJob *job = new BugMyBugsJob( mServer );
- connect( job, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ),
- this, SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ) );
- connect( job, SIGNAL( error( const QString & ) ),
- this, SIGNAL( loadingError( const QString & ) ) );
+ connect( job, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ),
+ this, TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ) );
+ connect( job, TQT_SIGNAL( error( const TQString & ) ),
+ this, TQT_SIGNAL( loadingError( const TQString & ) ) );
connectJob( job );
registerJob( job );
@@ -184,12 +184,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug )
emit bugDetailsLoading( bug );
BugDetailsJob *job = new BugDetailsJob( mServer );
- connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
- this, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) );
- connect( job, SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
- this, SLOT( setBugDetails( const Bug &, const BugDetails & ) ) );
- connect( job, SIGNAL( error( const QString & ) ),
- this, SIGNAL( bugDetailsLoadingError() ) );
+ connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
+ this, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ) );
+ connect( job, TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
+ this, TQT_SLOT( setBugDetails( const Bug &, const BugDetails & ) ) );
+ connect( job, TQT_SIGNAL( error( const TQString & ) ),
+ this, TQT_SIGNAL( bugDetailsLoadingError() ) );
connectJob( job );
registerJob( job );
@@ -201,12 +201,12 @@ void BugSystem::retrieveBugDetails( const Bug &bug )
void BugSystem::connectJob( BugJob *job )
{
- connect( job, SIGNAL( infoMessage( const QString & ) ),
- this, SIGNAL( infoMessage( const QString & ) ) );
- connect( job, SIGNAL( infoPercent( unsigned long ) ),
- this, SIGNAL( infoPercent( unsigned long ) ) );
- connect( job, SIGNAL( jobEnded( BugJob * ) ),
- SLOT( unregisterJob( BugJob * ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( const TQString & ) ),
+ this, TQT_SIGNAL( infoMessage( const TQString & ) ) );
+ connect( job, TQT_SIGNAL( infoPercent( unsigned long ) ),
+ this, TQT_SIGNAL( infoPercent( unsigned long ) ) );
+ connect( job, TQT_SIGNAL( jobEnded( BugJob * ) ),
+ TQT_SLOT( unregisterJob( BugJob * ) ) );
}
void BugSystem::setPackageList( const Package::List &pkgs )
@@ -216,7 +216,7 @@ void BugSystem::setPackageList( const Package::List &pkgs )
mServer->cache()->savePackageList( pkgs );
}
-void BugSystem::setBugList( const Package &pkg, const QString &component, const Bug::List &bugs )
+void BugSystem::setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs )
{
mServer->setBugs( pkg, component, bugs );
mServer->cache()->saveBugList( pkg, component, bugs );
@@ -234,7 +234,7 @@ Package::List BugSystem::packageList() const
return mServer->packages();
}
-Package BugSystem::package( const QString &pkgname ) const
+Package BugSystem::package( const TQString &pkgname ) const
{
Package::List::ConstIterator it;
for( it = mServer->packages().begin(); it != mServer->packages().end(); ++it ) {
@@ -243,7 +243,7 @@ Package BugSystem::package( const QString &pkgname ) const
return Package();
}
-Bug BugSystem::bug( const Package &pkg, const QString &component, const QString &number ) const
+Bug BugSystem::bug( const Package &pkg, const TQString &component, const TQString &number ) const
{
Bug::List bugs = mServer->bugs( pkg, component );
@@ -259,7 +259,7 @@ void BugSystem::queueCommand( BugCommand *cmd )
if ( mServer->queueCommand( cmd ) ) emit commandQueued( cmd );
}
-void BugSystem::clearCommands( const QString &bug )
+void BugSystem::clearCommands( const TQString &bug )
{
mServer->clearCommands( bug );
@@ -268,9 +268,9 @@ void BugSystem::clearCommands( const QString &bug )
void BugSystem::clearCommands()
{
- QStringList bugs = mServer->bugsWithCommands();
+ TQStringList bugs = mServer->bugsWithCommands();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = bugs.begin(); it != bugs.end(); ++it ) {
clearCommands( *it );
}
@@ -278,42 +278,42 @@ void BugSystem::clearCommands()
void BugSystem::sendCommands()
{
- QString recipient = KBBPrefs::instance()->mOverrideRecipient;
+ TQString recipient = KBBPrefs::instance()->mOverrideRecipient;
bool sendBCC = KBBPrefs::instance()->mSendBCC;
KEMailSettings emailSettings;
- QString senderName = emailSettings.getSetting( KEMailSettings::RealName );
- QString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress );
- QString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer );
+ TQString senderName = emailSettings.getSetting( KEMailSettings::RealName );
+ TQString senderEmail = emailSettings.getSetting( KEMailSettings::EmailAddress );
+ TQString smtpServer = emailSettings.getSetting( KEMailSettings::OutServer );
MailSender::MailClient client = (MailSender::MailClient)KBBPrefs::instance()->mMailClient;
// ### connect to signals
MailSender *mailer = new MailSender( client, smtpServer );
- connect( mailer, SIGNAL( status( const QString & ) ),
- SIGNAL( infoMessage( const QString & ) ) );
+ connect( mailer, TQT_SIGNAL( status( const TQString & ) ),
+ TQT_SIGNAL( infoMessage( const TQString & ) ) );
mServer->sendCommands( mailer, senderName, senderEmail, sendBCC, recipient );
}
-void BugSystem::setServerList( const QValueList<BugServerConfig> &servers )
+void BugSystem::setServerList( const TQValueList<BugServerConfig> &servers )
{
if ( servers.isEmpty() ) return;
- QString currentServer;
+ TQString currentServer;
if ( mServer ) currentServer = mServer->serverConfig().name();
else currentServer = KBBPrefs::instance()->mCurrentServer;
killAllJobs();
- QValueList<BugServer *>::ConstIterator serverIt;
+ TQValueList<BugServer *>::ConstIterator serverIt;
for( serverIt = mServerList.begin(); serverIt != mServerList.end();
++serverIt ) {
delete *serverIt;
}
mServerList.clear();
- QValueList<BugServerConfig>::ConstIterator cfgIt;
+ TQValueList<BugServerConfig>::ConstIterator cfgIt;
for( cfgIt = servers.begin(); cfgIt != servers.end(); ++cfgIt ) {
mServerList.append( new BugServer( *cfgIt ) );
}
@@ -321,12 +321,12 @@ void BugSystem::setServerList( const QValueList<BugServerConfig> &servers )
setCurrentServer( currentServer );
}
-QValueList<BugServer *> BugSystem::serverList()
+TQValueList<BugServer *> BugSystem::serverList()
{
return mServerList;
}
-void BugSystem::setCurrentServer( const QString &name )
+void BugSystem::setCurrentServer( const TQString &name )
{
killAllJobs();
@@ -347,9 +347,9 @@ void BugSystem::setCurrentServer( const QString &name )
}
}
-BugServer *BugSystem::findServer( const QString &name )
+BugServer *BugSystem::findServer( const TQString &name )
{
- QValueList<BugServer *>::ConstIterator serverIt;
+ TQValueList<BugServer *>::ConstIterator serverIt;
for( serverIt = mServerList.begin(); serverIt != mServerList.end();
++serverIt ) {
if ( (*serverIt)->serverConfig().name() == name ) return *serverIt;
@@ -363,12 +363,12 @@ void BugSystem::saveQuery( const KURL &url )
mLastResponse += "\n\n";
}
-void BugSystem::saveResponse( const QByteArray &response )
+void BugSystem::saveResponse( const TQByteArray &response )
{
mLastResponse += response;
}
-QString BugSystem::lastResponse()
+TQString BugSystem::lastResponse()
{
return mLastResponse;
}
@@ -376,14 +376,14 @@ QString BugSystem::lastResponse()
void BugSystem::readConfig( KConfig *config )
{
config->setGroup("Servers");
- QStringList servers = config->readListEntry( "Servers" );
+ TQStringList servers = config->readListEntry( "Servers" );
- QValueList<BugServerConfig> serverList;
+ TQValueList<BugServerConfig> serverList;
if ( servers.isEmpty() ) {
serverList.append( BugServerConfig() );
} else {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = servers.begin(); it != servers.end(); ++it ) {
BugServerConfig cfg;
cfg.readConfig( config, *it );
@@ -396,9 +396,9 @@ void BugSystem::readConfig( KConfig *config )
void BugSystem::writeConfig( KConfig *config )
{
- QValueList<BugServer *>::ConstIterator itServer;
- QStringList servers;
- QValueList<BugServer *> serverList = BugSystem::self()->serverList();
+ TQValueList<BugServer *>::ConstIterator itServer;
+ TQStringList servers;
+ TQValueList<BugServer *> serverList = BugSystem::self()->serverList();
for( itServer = serverList.begin(); itServer != serverList.end();
++itServer ) {
BugServerConfig serverConfig = (*itServer)->serverConfig();
diff --git a/kbugbuster/backend/bugsystem.h b/kbugbuster/backend/bugsystem.h
index c573698b..c5c37d18 100644
--- a/kbugbuster/backend/bugsystem.h
+++ b/kbugbuster/backend/bugsystem.h
@@ -8,10 +8,10 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpair.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpair.h>
class KConfig;
@@ -36,13 +36,13 @@ class BugSystem : public QObject
/**
BugSystem takes ownership of the BugServerConfig objects.
*/
- void setServerList( const QValueList<BugServerConfig> &servers );
- QValueList<BugServer *> serverList();
+ void setServerList( const TQValueList<BugServerConfig> &servers );
+ TQValueList<BugServer *> serverList();
- void setCurrentServer( const QString & );
+ void setCurrentServer( const TQString & );
void retrievePackageList();
- void retrieveBugList( const Package &, const QString &component );
+ void retrieveBugList( const Package &, const TQString &component );
void retrieveBugDetails( const Bug & );
/**
@@ -57,7 +57,7 @@ class BugSystem : public QObject
/**
Forget all commands for a given bug.
*/
- void clearCommands( const QString &bug );
+ void clearCommands( const TQString &bug );
/**
Forget all commands for all bugs.
*/
@@ -72,44 +72,44 @@ class BugSystem : public QObject
Package::List packageList() const;
- Package package( const QString &pkgname ) const;
- Bug bug( const Package &pkg, const QString &component, const QString &number ) const;
+ Package package( const TQString &pkgname ) const;
+ Bug bug( const Package &pkg, const TQString &component, const TQString &number ) const;
static void saveQuery( const KURL &url );
- static void saveResponse( const QByteArray &d );
- static QString lastResponse();
+ static void saveResponse( const TQByteArray &d );
+ static TQString lastResponse();
void readConfig( KConfig * );
void writeConfig( KConfig * );
signals:
void packageListAvailable( const Package::List &pkgs );
- void bugListAvailable( const Package &pkg, const QString &component, const Bug::List & );
- void bugListAvailable( const QString &label, const Bug::List & );
+ void bugListAvailable( const Package &pkg, const TQString &component, const Bug::List & );
+ void bugListAvailable( const TQString &label, const Bug::List & );
void bugDetailsAvailable( const Bug &, const BugDetails & );
void packageListLoading();
- void bugListLoading( const Package &, const QString &component );
- void bugListLoading( const QString &label );
+ void bugListLoading( const Package &, const TQString &component );
+ void bugListLoading( const TQString &label );
void bugDetailsLoading( const Bug & );
void packageListCacheMiss();
void bugListCacheMiss( const Package &package );
- void bugListCacheMiss( const QString &label );
+ void bugListCacheMiss( const TQString &label );
void bugDetailsCacheMiss( const Bug & );
void bugDetailsLoadingError();
- void infoMessage( const QString &message );
+ void infoMessage( const TQString &message );
void infoPercent( unsigned long percent );
void commandQueued( BugCommand * );
- void commandCanceled( const QString & );
+ void commandCanceled( const TQString & );
- void loadingError( const QString &text );
+ void loadingError( const TQString &text );
protected:
- BugServer *findServer( const QString &name );
+ BugServer *findServer( const TQString &name );
void registerJob( BugJob * );
@@ -122,7 +122,7 @@ class BugSystem : public QObject
private slots:
void setPackageList( const Package::List &pkgs );
- void setBugList( const Package &pkg, const QString &component, const Bug::List &bugs );
+ void setBugList( const Package &pkg, const TQString &component, const Bug::List &bugs );
void setBugDetails( const Bug &bug, const BugDetails &details );
private:
@@ -130,13 +130,13 @@ class BugSystem : public QObject
BugServer *mServer;
- QValueList<BugServer *> mServerList;
+ TQValueList<BugServer *> mServerList;
- QPtrList<BugJob> mJobs;
+ TQPtrList<BugJob> mJobs;
static BugSystem *s_self;
- static QString mLastResponse;
+ static TQString mLastResponse;
};
#endif
diff --git a/kbugbuster/backend/domprocessor.cpp b/kbugbuster/backend/domprocessor.cpp
index 7643ca11..bfef2ca6 100644
--- a/kbugbuster/backend/domprocessor.cpp
+++ b/kbugbuster/backend/domprocessor.cpp
@@ -23,8 +23,8 @@
#include "domprocessor.h"
-#include <qregexp.h>
-#include <qstylesheet.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -44,15 +44,15 @@ DomProcessor::~DomProcessor()
{
}
-KBB::Error DomProcessor::parsePackageList( const QByteArray &data,
+KBB::Error DomProcessor::parsePackageList( const TQByteArray &data,
Package::List &packages )
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( data ) ) {
return KBB::Error( "Error parsing xml response for package list request." );
}
- QDomElement bugzilla = doc.documentElement();
+ TQDomElement bugzilla = doc.documentElement();
if ( bugzilla.isNull() ) {
return KBB::Error( "No document in xml response." );
@@ -63,14 +63,14 @@ KBB::Error DomProcessor::parsePackageList( const QByteArray &data,
return err;
}
-KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs )
+KBB::Error DomProcessor::parseBugList( const TQByteArray &data, Bug::List &bugs )
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( data ) ) {
return KBB::Error( "Error parsing xml response for bug list request" );
}
- QDomElement bugzilla = doc.documentElement();
+ TQDomElement bugzilla = doc.documentElement();
if ( bugzilla.isNull() ) {
return KBB::Error( "No document in xml response." );
@@ -81,23 +81,23 @@ KBB::Error DomProcessor::parseBugList( const QByteArray &data, Bug::List &bugs )
return err;
}
-KBB::Error DomProcessor::parseBugDetails( const QByteArray &data,
+KBB::Error DomProcessor::parseBugDetails( const TQByteArray &data,
BugDetails &bugDetails )
{
- QDomDocument doc;
+ TQDomDocument doc;
if ( !doc.setContent( data ) ) {
return KBB::Error( "Error parsing xml response for bug details request." );
}
- QDomElement bugzilla = doc.documentElement();
+ TQDomElement bugzilla = doc.documentElement();
if ( bugzilla.isNull() ) {
return KBB::Error( "No document in xml response." );
}
- QDomNode p;
+ TQDomNode p;
for ( p = bugzilla.firstChild(); !p.isNull(); p = p.nextSibling() ) {
- QDomElement bug = p.toElement();
+ TQDomElement bug = p.toElement();
if ( bug.tagName() != "bug" ) continue;
KBB::Error err = parseDomBugDetails( bug, bugDetails );
@@ -109,24 +109,24 @@ KBB::Error DomProcessor::parseBugDetails( const QByteArray &data,
}
-KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element,
+KBB::Error DomProcessor::parseDomPackageList( const TQDomElement &element,
Package::List &packages )
{
- QDomNode p;
+ TQDomNode p;
for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) {
- QDomElement bug = p.toElement();
+ TQDomElement bug = p.toElement();
if ( bug.tagName() != "product" ) continue;
- QString pkgName = bug.attribute( "name" );
+ TQString pkgName = bug.attribute( "name" );
uint bugCount = 999;
Person maintainer;
- QString description;
- QStringList components;
+ TQString description;
+ TQStringList components;
- QDomNode n;
+ TQDomNode n;
for( n = bug.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "descr" ) description= e.text().stripWhiteSpace();
if ( e.tagName() == "component" ) components += e.text().stripWhiteSpace();
}
@@ -141,13 +141,13 @@ KBB::Error DomProcessor::parseDomPackageList( const QDomElement &element,
return KBB::Error();
}
-KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement,
+KBB::Error DomProcessor::parseDomBugList( const TQDomElement &topElement,
Bug::List &bugs )
{
- QDomElement element;
+ TQDomElement element;
if ( topElement.tagName() != "querybugids" ) {
- QDomNode buglist = topElement.namedItem( "querybugids" );
+ TQDomNode buglist = topElement.namedItem( "querybugids" );
element = buglist.toElement();
if ( element.isNull() ) {
return KBB::Error( "No querybugids element found." );
@@ -156,9 +156,9 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement,
element = topElement;
}
- QDomNode p;
+ TQDomNode p;
for ( p = element.firstChild(); !p.isNull(); p = p.nextSibling() ) {
- QDomElement hit = p.toElement();
+ TQDomElement hit = p.toElement();
kdDebug() << "DomProcessor::parseDomBugList(): tag: " << hit.tagName() << endl;
@@ -166,20 +166,20 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement,
return KBB::Error( "Error: " + hit.text() );
} else if ( hit.tagName() != "hit" ) continue;
- QString title;
- QString submitterName;
- QString submitterEmail;
- QString bugNr;
+ TQString title;
+ TQString submitterName;
+ TQString submitterEmail;
+ TQString bugNr;
Bug::Status status = Bug::StatusUndefined;
Bug::Severity severity = Bug::SeverityUndefined;
Person developerTodo;
Bug::BugMergeList mergedList;
uint age = 0xFFFFFFFF;
- QDomNode n;
+ TQDomNode n;
for ( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "bugid" )
bugNr = e.text();
@@ -194,7 +194,7 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement,
else if ( e.tagName() == "severity" )
severity = Bug::stringToSeverity( e.text() );
else if ( e.tagName() == "creationdate" )
- age = ( QDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( QDateTime::currentDateTime() );
+ age = ( TQDateTime::fromString( e.text(), Qt::ISODate ) ).daysTo( TQDateTime::currentDateTime() );
}
Person submitter( submitterName, submitterEmail );
@@ -210,57 +210,57 @@ KBB::Error DomProcessor::parseDomBugList( const QDomElement &topElement,
return KBB::Error();
}
-KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element,
+KBB::Error DomProcessor::parseDomBugDetails( const TQDomElement &element,
BugDetails &bugDetails )
{
if ( element.tagName() != "bug" ) return KBB::Error( "No <bug> tag found" );
BugDetailsPart::List parts;
- QValueList<BugDetailsImpl::AttachmentDetails> attachments;
+ TQValueList<BugDetailsImpl::AttachmentDetails> attachments;
- QString versionXml;
- QString osXml;
+ TQString versionXml;
+ TQString osXml;
- QString version;
- QString source;
- QString compiler;
- QString os;
+ TQString version;
+ TQString source;
+ TQString compiler;
+ TQString os;
- QDomNode n;
+ TQDomNode n;
for( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "version" ) versionXml = e.text().stripWhiteSpace();
if ( e.tagName() == "op_sys" ) osXml = e.text().stripWhiteSpace();
if ( e.tagName() == "long_desc" ) {
- QString encoding = e.attribute( "encoding" );
+ TQString encoding = e.attribute( "encoding" );
Person sender;
- QDateTime date;
- QString text;
+ TQDateTime date;
+ TQString text;
- QDomNode n2;
+ TQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "who" ) {
sender = Person::parseFromString( e2.text() );
} else if ( e2.tagName() == "bug_when" ) {
date = parseDate( e2.text().stripWhiteSpace() );
} else if ( e2.tagName() == "thetext" ) {
- QString in;
+ TQString in;
if ( encoding == "base64" ) {
in = KCodecs::base64Decode( e2.text().latin1() );
} else {
in = e2.text();
}
- QString raw = QStyleSheet::escape( in );
+ TQString raw = TQStyleSheet::escape( in );
if ( parts.isEmpty() )
{
- QTextStream ts( &raw, IO_ReadOnly );
- QString line;
+ TQTextStream ts( &raw, IO_ReadOnly );
+ TQString line;
while( !( line = ts.readLine() ).isNull() ) {
if ( parseAttributeLine( line, "Version", version ) ) continue;
if ( parseAttributeLine( line, "Installed from", source ) ) continue;
@@ -272,8 +272,8 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element,
} else {
text += raw;
}
- QString bugBaseURL = server()->serverConfig().baseUrl().htmlURL();
- text = "<pre>" + wrapLines( text ).replace( QRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
+ TQString bugBaseURL = server()->serverConfig().baseUrl().htmlURL();
+ text = "<pre>" + wrapLines( text ).replace( TQRegExp( "(Created an attachment \\(id=([0-9]+)\\))" ),
"<a href=\"" + bugBaseURL + "/attachment.cgi?id=\\2&action=view\">\\1</a>" ) + "\n</pre>";
}
}
@@ -282,15 +282,15 @@ KBB::Error DomProcessor::parseDomBugDetails( const QDomElement &element,
}
if ( e.tagName() == "attachment" ) {
- QString attachid, date, desc;
- for( QDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement e2 = node.toElement();
+ TQString attachid, date, desc;
+ for( TQDomNode node = e.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ TQDomElement e2 = node.toElement();
if ( e2.tagName() == "attachid" ) {
attachid = e2.text();
} else if ( e2.tagName() == "date" ) {
date = e2.text().stripWhiteSpace();
} else if ( e2.tagName() == "desc" ) {
- desc = "<pre>" + wrapLines( QStyleSheet::escape(e2.text()) ) + "\n</pre>";
+ desc = "<pre>" + wrapLines( TQStyleSheet::escape(e2.text()) ) + "\n</pre>";
}
}
attachments.append( BugDetailsImpl::AttachmentDetails( desc, date, attachid ) );
@@ -313,7 +313,7 @@ void DomProcessor::setPackageListQuery( KURL &url )
url.setQuery( "?data=versiontable" );
}
-void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component )
+void DomProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component )
{
if ( server()->serverConfig().bugzillaVersion() == "Bugworld" ) {
url.setFileName( "bugworld.cgi" );
@@ -321,7 +321,7 @@ void DomProcessor::setBugListQuery( KURL &url, const Package &product, const QSt
url.setFileName( "xmlquery.cgi" );
}
- QString user = server()->serverConfig().user();
+ TQString user = server()->serverConfig().user();
if ( component.isEmpty() )
url.setQuery( "?user=" + user + "&product=" + product.name() );
@@ -338,18 +338,18 @@ void DomProcessor::setBugDetailsQuery( KURL &url, const Bug &bug )
url.setQuery( "?id=" + bug.number() );
}
-QString DomProcessor::wrapLines( const QString &text )
+TQString DomProcessor::wrapLines( const TQString &text )
{
int wrap = KBBPrefs::instance()->mWrapColumn;
- QStringList lines = QStringList::split( '\n', text, true );
+ TQStringList lines = TQStringList::split( '\n', text, true );
//kdDebug() << lines.count() << " lines." << endl;
- QString out;
+ TQString out;
bool removeBlankLines = true;
- for ( QStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it )
+ for ( TQStringList::Iterator it = lines.begin() ; it != lines.end() ; ++it )
{
- QString line = *it;
+ TQString line = *it;
if ( removeBlankLines ) {
if ( line.isEmpty() ) continue;
@@ -358,7 +358,7 @@ QString DomProcessor::wrapLines( const QString &text )
//kdDebug() << "BugDetailsJob::processNode IN line='" << line << "'" << endl;
- QString wrappedLine;
+ TQString wrappedLine;
while ( line.length() > uint( wrap ) )
{
int breakPoint = line.findRev( ' ', wrap );
@@ -380,14 +380,14 @@ QString DomProcessor::wrapLines( const QString &text )
return out;
}
-bool DomProcessor::parseAttributeLine( const QString &line, const QString &key,
- QString &result )
+bool DomProcessor::parseAttributeLine( const TQString &line, const TQString &key,
+ TQString &result )
{
if ( !result.isEmpty() ) return false;
if ( !line.startsWith( key + ":" ) ) return false;
- QString value = line.mid( key.length() + 1 );
+ TQString value = line.mid( key.length() + 1 );
value = value.stripWhiteSpace();
result = value;
@@ -395,9 +395,9 @@ bool DomProcessor::parseAttributeLine( const QString &line, const QString &key,
return true;
}
-QDateTime DomProcessor::parseDate( const QString &dateStr )
+TQDateTime DomProcessor::parseDate( const TQString &dateStr )
{
- QDateTime date = QDateTime::fromString( dateStr, Qt::ISODate );
+ TQDateTime date = TQDateTime::fromString( dateStr, Qt::ISODate );
return date;
}
diff --git a/kbugbuster/backend/domprocessor.h b/kbugbuster/backend/domprocessor.h
index 1553ae4a..a561cbea 100644
--- a/kbugbuster/backend/domprocessor.h
+++ b/kbugbuster/backend/domprocessor.h
@@ -31,7 +31,7 @@
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
class BugServer;
@@ -41,25 +41,25 @@ class DomProcessor : public Processor
DomProcessor( BugServer * );
virtual ~DomProcessor();
- KBB::Error parsePackageList( const QByteArray &data,
+ KBB::Error parsePackageList( const TQByteArray &data,
Package::List &packages );
- KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs );
- KBB::Error parseBugDetails( const QByteArray &, BugDetails & );
+ KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs );
+ KBB::Error parseBugDetails( const TQByteArray &, BugDetails & );
void setPackageListQuery( KURL & );
- void setBugListQuery( KURL &, const Package &, const QString &component );
+ void setBugListQuery( KURL &, const Package &, const TQString &component );
void setBugDetailsQuery( KURL &, const Bug & );
protected:
- virtual KBB::Error parseDomPackageList( const QDomElement &,
+ virtual KBB::Error parseDomPackageList( const TQDomElement &,
Package::List & );
- virtual KBB::Error parseDomBugList( const QDomElement &, Bug::List & );
- virtual KBB::Error parseDomBugDetails( const QDomElement &, BugDetails & );
+ virtual KBB::Error parseDomBugList( const TQDomElement &, Bug::List & );
+ virtual KBB::Error parseDomBugDetails( const TQDomElement &, BugDetails & );
- QString wrapLines( const QString & );
- bool parseAttributeLine( const QString &line, const QString &key,
- QString &result );
- QDateTime parseDate( const QString & );
+ TQString wrapLines( const TQString & );
+ bool parseAttributeLine( const TQString &line, const TQString &key,
+ TQString &result );
+ TQDateTime parseDate( const TQString & );
};
#endif
diff --git a/kbugbuster/backend/error.h b/kbugbuster/backend/error.h
index e12bcf61..595c070c 100644
--- a/kbugbuster/backend/error.h
+++ b/kbugbuster/backend/error.h
@@ -28,14 +28,14 @@ namespace KBB {
class Error
{
public:
- Error( const QString &msg = QString::null ) : mMsg( msg ) {}
+ Error( const TQString &msg = TQString::null ) : mMsg( msg ) {}
operator bool() { return !mMsg.isEmpty(); }
- QString message() const { return mMsg; }
+ TQString message() const { return mMsg; }
private:
- QString mMsg;
+ TQString mMsg;
};
}
diff --git a/kbugbuster/backend/htmlparser.cpp b/kbugbuster/backend/htmlparser.cpp
index 7e53c1bd..055b8d11 100644
--- a/kbugbuster/backend/htmlparser.cpp
+++ b/kbugbuster/backend/htmlparser.cpp
@@ -28,22 +28,22 @@
#include <kdebug.h>
-#include <qbuffer.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
-KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs )
+KBB::Error HtmlParser::parseBugList( const TQByteArray &data, Bug::List &bugs )
{
- QBuffer buffer( data );
+ TQBuffer buffer( data );
if ( !buffer.open( IO_ReadOnly ) ) {
return KBB::Error( "Can't open buffer" );
}
- QTextStream ts( &buffer );
+ TQTextStream ts( &buffer );
mState = Idle;
- QString line;
+ TQString line;
while ( !( line = ts.readLine() ).isNull() ) {
KBB::Error err = parseLine( line, bugs );
if ( err ) return err;
@@ -52,19 +52,19 @@ KBB::Error HtmlParser::parseBugList( const QByteArray &data, Bug::List &bugs )
return KBB::Error();
}
-KBB::Error HtmlParser::parsePackageList( const QByteArray &data,
+KBB::Error HtmlParser::parsePackageList( const TQByteArray &data,
Package::List &packages )
{
init();
- QBuffer buffer( data );
+ TQBuffer buffer( data );
if ( !buffer.open( IO_ReadOnly ) ) {
return KBB::Error( "Can't open buffer" );
}
- QTextStream ts( &buffer );
+ TQTextStream ts( &buffer );
- QString line;
+ TQString line;
while ( !( line = ts.readLine() ).isNull() ) {
KBB::Error err = parseLine( line, packages );
if ( err ) return err;
@@ -84,12 +84,12 @@ void HtmlParser::setPackageListQuery( KURL &url )
url.setFileName( "query.cgi" );
}
-KBB::Error HtmlParser::parseLine( const QString &, Bug::List & )
+KBB::Error HtmlParser::parseLine( const TQString &, Bug::List & )
{
return KBB::Error();
}
-KBB::Error HtmlParser::parseLine( const QString &, Package::List & )
+KBB::Error HtmlParser::parseLine( const TQString &, Package::List & )
{
return KBB::Error();
}
@@ -98,20 +98,20 @@ void HtmlParser::processResult( Package::List & )
{
}
-QString HtmlParser::getAttribute( const QString &line, const QString &name )
+TQString HtmlParser::getAttribute( const TQString &line, const TQString &name )
{
int pos1 = line.find( name + "=\"" );
- if ( pos1 < 1 ) return QString::null;
+ if ( pos1 < 1 ) return TQString::null;
pos1 += name.length() + 2;
int pos2 = line.find( "\"", pos1 );
- if ( pos2 < 1 ) return QString::null;
+ if ( pos2 < 1 ) return TQString::null;
return line.mid( pos1, pos2 - pos1 );
}
-bool HtmlParser::getCpts( const QString &line, QString &key,
- QStringList &values )
+bool HtmlParser::getCpts( const TQString &line, TQString &key,
+ TQStringList &values )
{
- if ( !line.contains( QRegExp( "\\s*cpts" ) ) ) return false;
+ if ( !line.contains( TQRegExp( "\\s*cpts" ) ) ) return false;
// kdDebug() << "LINE: " << line << endl;
int pos1 = line.find( "[" );
@@ -131,7 +131,7 @@ bool HtmlParser::getCpts( const QString &line, QString &key,
if ( pos1 >= 0 ) pos2 = line.find( "'", ++pos1 );
while ( pos1 >= 0 && pos2 >= 0 ) {
- QString value = line.mid( pos1, pos2 - pos1 );
+ TQString value = line.mid( pos1, pos2 - pos1 );
// kdDebug() << " VALUE: " << value << endl;
values.append( value );
@@ -143,16 +143,16 @@ bool HtmlParser::getCpts( const QString &line, QString &key,
return true;
}
-KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs )
+KBB::Error HtmlParser_2_10::parseLine( const TQString &line, Bug::List &bugs )
{
if ( line.startsWith( "<TR VALIGN" ) ) {
// kdDebug() << "LINE: " << line << endl;
- QRegExp re( "show_bug\\.cgi\\?id=(\\d+)" );
+ TQRegExp re( "show_bug\\.cgi\\?id=(\\d+)" );
re.search( line );
- QString number = re.cap( 1 );
+ TQString number = re.cap( 1 );
// kdDebug() << " NUMBER: " << number << endl;
- QString summary;
+ TQString summary;
int pos = line.findRev( "summary>" );
if ( pos >= 0 ) summary = line.mid( pos + 8 );
@@ -168,11 +168,11 @@ KBB::Error HtmlParser_2_10::parseLine( const QString &line, Bug::List &bugs )
return KBB::Error();
}
-KBB::Error HtmlParser_2_10::parseLine( const QString &line,
+KBB::Error HtmlParser_2_10::parseLine( const TQString &line,
Package::List &packages )
{
- QString package;
- QStringList components;
+ TQString package;
+ TQStringList components;
if ( getCpts( line, package, components ) ) {
packages.append( Package( new PackageImpl( package, "", 0, Person(),
@@ -190,7 +190,7 @@ void HtmlParser_2_14_2::init()
mState = Idle;
}
-KBB::Error HtmlParser_2_14_2::parseLine( const QString &line,
+KBB::Error HtmlParser_2_14_2::parseLine( const TQString &line,
Package::List & )
{
switch ( mState ) {
@@ -199,8 +199,8 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line,
break;
case Components: {
if ( line.startsWith( "function" ) ) mState = Finished;
- QString key;
- QStringList values;
+ TQString key;
+ TQStringList values;
if ( getCpts( line, key, values ) ) {
// kdDebug() << "KEY: " << key << " VALUES: " << values.join(",") << endl;
if ( values.count() == 2 ) {
@@ -217,7 +217,7 @@ KBB::Error HtmlParser_2_14_2::parseLine( const QString &line,
void HtmlParser_2_14_2::processResult( Package::List &packages )
{
- QMap<QString,QStringList>::ConstIterator it;
+ TQMap<TQString,TQStringList>::ConstIterator it;
for ( it = mComponentsMap.begin(); it != mComponentsMap.end(); ++it ) {
packages.append( Package( new PackageImpl( it.key(), "", 0, Person(),
it.data() ) ) );
@@ -233,17 +233,17 @@ void HtmlParser_2_17_1::init()
mState = Idle;
}
-KBB::Error HtmlParser_2_17_1::parseBugList( const QByteArray &data, Bug::List &bugs )
+KBB::Error HtmlParser_2_17_1::parseBugList( const TQByteArray &data, Bug::List &bugs )
{
return RdfProcessor::parseBugList( data, bugs );
}
-KBB::Error HtmlParser_2_17_1::parseLine( const QString & /*line*/, Bug::List &/*bugs*/ )
+KBB::Error HtmlParser_2_17_1::parseLine( const TQString & /*line*/, Bug::List &/*bugs*/ )
{
return KBB::Error( "Not implemented" );
}
-KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & )
+KBB::Error HtmlParser_2_17_1::parseLine( const TQString &line, Package::List & )
{
switch ( mState ) {
case Idle:
@@ -254,18 +254,18 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & )
if ( line.contains( "onchange=\"selectProduct" ) ) mState = Products;
break;
case Components: {
- if ( line.contains( QRegExp( "\\s*function" ) ) ) {
+ if ( line.contains( TQRegExp( "\\s*function" ) ) ) {
mState = SearchProducts;
}
- QString key;
- QStringList components;
+ TQString key;
+ TQStringList components;
if ( getCpts( line, key, components ) ) {
mComponents.append( components );
}
}
case Products: {
if ( line.contains( "</select>" ) ) mState = Finished;
- QString product = getAttribute( line, "value" );
+ TQString product = getAttribute( line, "value" );
if ( !product.isEmpty() ) {
kdDebug() << "PRODUCT: " << product << endl;
mProducts.append( product );
@@ -282,8 +282,8 @@ KBB::Error HtmlParser_2_17_1::parseLine( const QString &line, Package::List & )
void HtmlParser_2_17_1::processResult( Package::List &packages )
{
- QStringList::ConstIterator itProduct = mProducts.begin();
- QValueList<QStringList>::ConstIterator itComponents = mComponents.begin();
+ TQStringList::ConstIterator itProduct = mProducts.begin();
+ TQValueList<TQStringList>::ConstIterator itComponents = mComponents.begin();
while( itProduct != mProducts.end() && itComponents != mComponents.end() ) {
packages.append( Package( new PackageImpl( *itProduct, "", 0, Person(),
diff --git a/kbugbuster/backend/htmlparser.h b/kbugbuster/backend/htmlparser.h
index ffb0a22a..b8ad2c6f 100644
--- a/kbugbuster/backend/htmlparser.h
+++ b/kbugbuster/backend/htmlparser.h
@@ -29,9 +29,9 @@
#include "error.h"
#include "rdfprocessor.h"
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
class HtmlParser : public RdfProcessor
{
@@ -44,8 +44,8 @@ class HtmlParser : public RdfProcessor
HtmlParser( BugServer *s ) : RdfProcessor( s ), mState( Idle ) {}
virtual ~HtmlParser() {}
- KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs );
- KBB::Error parsePackageList( const QByteArray &data,
+ KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs );
+ KBB::Error parsePackageList( const TQByteArray &data,
Package::List &packages );
void setPackageListQuery( KURL & );
@@ -53,14 +53,14 @@ class HtmlParser : public RdfProcessor
protected:
virtual void init();
- virtual KBB::Error parseLine( const QString &line, Bug::List &bugs );
- virtual KBB::Error parseLine( const QString &line,
+ virtual KBB::Error parseLine( const TQString &line, Bug::List &bugs );
+ virtual KBB::Error parseLine( const TQString &line,
Package::List &packages );
virtual void processResult( Package::List &packages );
- QString getAttribute( const QString &line, const QString &name );
- bool getCpts( const QString &line, QString &key, QStringList &values );
+ TQString getAttribute( const TQString &line, const TQString &name );
+ bool getCpts( const TQString &line, TQString &key, TQStringList &values );
};
@@ -70,8 +70,8 @@ class HtmlParser_2_10 : public HtmlParser
HtmlParser_2_10( BugServer *s ) : HtmlParser( s ) {}
protected:
- KBB::Error parseLine( const QString &line, Bug::List &bugs );
- KBB::Error parseLine( const QString &line, Package::List &packages );
+ KBB::Error parseLine( const TQString &line, Bug::List &bugs );
+ KBB::Error parseLine( const TQString &line, Package::List &packages );
};
@@ -83,12 +83,12 @@ class HtmlParser_2_14_2 : public HtmlParser_2_10
protected:
void init();
- KBB::Error parseLine( const QString &line, Package::List &packages );
+ KBB::Error parseLine( const TQString &line, Package::List &packages );
void processResult( Package::List &packages );
private:
- QMap<QString, QStringList> mComponentsMap;
+ TQMap<TQString, TQStringList> mComponentsMap;
};
@@ -98,19 +98,19 @@ class HtmlParser_2_17_1 : public HtmlParser
public:
HtmlParser_2_17_1( BugServer *s ) : HtmlParser( s ) {}
- KBB::Error parseBugList( const QByteArray &data, Bug::List &bugs );
+ KBB::Error parseBugList( const TQByteArray &data, Bug::List &bugs );
protected:
void init();
- KBB::Error parseLine( const QString &line, Bug::List &bugs );
- KBB::Error parseLine( const QString &line, Package::List &packages );
+ KBB::Error parseLine( const TQString &line, Bug::List &bugs );
+ KBB::Error parseLine( const TQString &line, Package::List &packages );
void processResult( Package::List &packages );
private:
- QStringList mProducts;
- QValueList<QStringList> mComponents;
+ TQStringList mProducts;
+ TQValueList<TQStringList> mComponents;
};
#endif
diff --git a/kbugbuster/backend/kbbprefs.cpp b/kbugbuster/backend/kbbprefs.cpp
index 30f337ab..cfef3418 100644
--- a/kbugbuster/backend/kbbprefs.cpp
+++ b/kbugbuster/backend/kbbprefs.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@ KBBPrefs::KBBPrefs() : KConfigSkeleton()
addItemBool("ShowVotes", mShowVoted, false);
addItemInt("MinimumVotes", mMinVotes, 0);
addItemBool("SendBCC",mSendBCC,false);
- addItemString("OverrideRecipient",mOverrideRecipient,QString::null);
+ addItemString("OverrideRecipient",mOverrideRecipient,TQString::null);
addItemInt("WrapColumn",mWrapColumn,90);
@@ -103,13 +103,13 @@ void KBBPrefs::usrReadConfig()
mMessageButtons.clear();
config()->setGroup("MessageButtons");
- QStringList buttonList = config()->readListEntry("ButtonList");
+ TQStringList buttonList = config()->readListEntry("ButtonList");
if (buttonList.isEmpty()) {
setMessageButtonsDefault();
} else {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = buttonList.begin(); it != buttonList.end(); ++it) {
- QString text = config()->readEntry(*it);
+ TQString text = config()->readEntry(*it);
mMessageButtons.insert(*it,text);
}
}
@@ -120,8 +120,8 @@ void KBBPrefs::usrReadConfig()
void KBBPrefs::usrWriteConfig()
{
config()->setGroup("MessageButtons");
- QStringList buttonList;
- QMap<QString,QString>::ConstIterator it;
+ TQStringList buttonList;
+ TQMap<TQString,TQString>::ConstIterator it;
for(it = mMessageButtons.begin();it != mMessageButtons.end();++it) {
buttonList.append(it.key());
config()->writeEntry(it.key(),it.data());
diff --git a/kbugbuster/backend/kbbprefs.h b/kbugbuster/backend/kbbprefs.h
index 64d7f20d..3c883e7e 100644
--- a/kbugbuster/backend/kbbprefs.h
+++ b/kbugbuster/backend/kbbprefs.h
@@ -24,7 +24,7 @@
#ifndef KBBPREFS_H
#define KBBPREFS_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kconfigskeleton.h>
@@ -54,29 +54,29 @@ class KBBPrefs : public KConfigSkeleton
public:
int mRecentPackagesCount;
- QValueList<int> mSplitter1;
- QValueList<int> mSplitter2;
+ TQValueList<int> mSplitter1;
+ TQValueList<int> mSplitter2;
int mMailClient;
bool mShowClosedBugs;
bool mShowWishes;
bool mSendBCC;
- QString mOverrideRecipient;
+ TQString mOverrideRecipient;
bool mShowVoted;
int mMinVotes;
int mWrapColumn;
- QMap<QString,QString> mMessageButtons;
+ TQMap<TQString,TQString> mMessageButtons;
int mMsgDlgWidth;
int mMsgDlgHeight;
- QValueList<int> mMsgDlgSplitter;
+ TQValueList<int> mMsgDlgSplitter;
bool mDebugMode;
- QString mCurrentServer;
+ TQString mCurrentServer;
};
#endif
diff --git a/kbugbuster/backend/mailsender.cpp b/kbugbuster/backend/mailsender.cpp
index ec32405d..59f73db2 100644
--- a/kbugbuster/backend/mailsender.cpp
+++ b/kbugbuster/backend/mailsender.cpp
@@ -5,7 +5,7 @@
#include <unistd.h>
#include <stdio.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -19,7 +19,7 @@
#include "mailsender.h"
#include "smtp.h"
-MailSender::MailSender(MailClient client,const QString &smtpServer) :
+MailSender::MailSender(MailClient client,const TQString &smtpServer) :
m_client( client ), m_smtpServer( smtpServer )
{
}
@@ -33,13 +33,13 @@ MailSender *MailSender::clone() const
return new MailSender(m_client,m_smtpServer);
}
-bool MailSender::send(const QString &fromName,const QString &fromEmail,const QString &to,
- const QString &subject,const QString &body,bool bcc,
- const QString &recipient)
+bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const TQString &to,
+ const TQString &subject,const TQString &body,bool bcc,
+ const TQString &recipient)
{
- QString from( fromName );
+ TQString from( fromName );
if ( !fromEmail.isEmpty() )
- from += QString::fromLatin1( " <%2>" ).arg( fromEmail );
+ from += TQString::fromLatin1( " <%2>" ).arg( fromEmail );
kdDebug() << "MailSender::sendMail():\nFrom: " << from << "\nTo: " << to
<< "\nbccflag:" << bcc
<< "\nRecipient:" << recipient
@@ -53,18 +53,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt
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));
}
@@ -78,18 +78,18 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt
if (!fd)
{
kdError() << "Unable to open a pipe to " << command << endl;
- QTimer::singleShot( 0, this, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );
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: KBugBuster") + '\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: KBugBuster") + '\n';
}
textComplete += '\n'; // end of headers
textComplete += body;
@@ -103,37 +103,37 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt
if (!kapp->dcopClient()->isApplicationRegistered("kmail")) {
KMessageBox::error(0,i18n("No running instance of KMail found."));
- QTimer::singleShot( 0, this, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );
return false;
}
emit status( i18n( "Passing mail to KDE email program..." ) );
if (!kMailOpenComposer(to,"", (bcc ? from : ""), subject,body,0,KURL())) {
- QTimer::singleShot( 0, this, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );
return false;
}
} else if ( m_client == Direct ) {
kdDebug() << "Sending Direct" << endl;
- QStringList recipients;
+ TQStringList recipients;
if ( !recipient.isEmpty() )
recipients << recipient;
else
recipients << to;
- QString message = QString::fromLatin1( "From: " ) + from +
- QString::fromLatin1( "\nTo: " ) + to +
- QString::fromLatin1( "\nSubject: " ) + subject +
- QString::fromLatin1( "\nX-Mailer: KBugBuster" ) +
- QString::fromLatin1( "\n\n" ) + body;
+ TQString message = TQString::fromLatin1( "From: " ) + from +
+ TQString::fromLatin1( "\nTo: " ) + to +
+ TQString::fromLatin1( "\nSubject: " ) + subject +
+ TQString::fromLatin1( "\nX-Mailer: KBugBuster" ) +
+ TQString::fromLatin1( "\n\n" ) + body;
Smtp *smtp = new Smtp( fromEmail, recipients, message, m_smtpServer );
- connect( smtp, SIGNAL( status( const QString & ) ),
- this, SIGNAL( status( const QString & ) ) );
- connect( smtp, SIGNAL( success() ),
- this, SLOT( smtpSuccess() ) );
- connect( smtp, SIGNAL( error( const QString &, const QString & ) ),
- this, SLOT( smtpError( const QString &, const QString & ) ) );
+ connect( smtp, TQT_SIGNAL( status( const TQString & ) ),
+ this, TQT_SIGNAL( status( const TQString & ) ) );
+ connect( smtp, TQT_SIGNAL( success() ),
+ this, TQT_SLOT( smtpSuccess() ) );
+ connect( smtp, TQT_SIGNAL( error( const TQString &, const TQString & ) ),
+ this, TQT_SLOT( smtpError( const TQString &, const TQString & ) ) );
smtp->insertChild( this ); // die when smtp dies
} else {
@@ -143,7 +143,7 @@ bool MailSender::send(const QString &fromName,const QString &fromEmail,const QSt
if (m_client != Direct)
{
emit finished();
- QTimer::singleShot( 0, this, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );
}
return true;
@@ -158,13 +158,13 @@ void MailSender::smtpSuccess()
emit finished();
}
-void MailSender::smtpError(const QString &_command, const QString &_response)
+void MailSender::smtpError(const TQString &_command, const TQString &_response)
{
if ( parent() != sender() || !parent()->inherits( "Smtp" ) )
return;
- QString command = _command;
- QString response = _response;
+ TQString command = _command;
+ TQString response = _response;
Smtp *smtp = static_cast<Smtp *>( parent() );
smtp->removeChild( this );
@@ -176,18 +176,18 @@ void MailSender::smtpError(const QString &_command, const QString &_response)
"response: %2" ).arg( command ).arg( response ) );
emit finished();
- QTimer::singleShot( 0, this, SLOT( deleteLater() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );
}
-int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1,
- const QString& arg2,const QString& arg3,const QString& arg4,int arg5,
+int MailSender::kMailOpenComposer(const TQString& arg0,const TQString& arg1,
+ const TQString& arg2,const TQString& arg3,const TQString& arg4,int arg5,
const KURL& arg6)
{
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;
@@ -195,9 +195,9 @@ int MailSender::kMailOpenComposer(const QString& arg0,const QString& arg1,
arg << arg4;
arg << arg5;
arg << arg6;
- 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() << "kMailOpenComposer() call failed." << endl;
diff --git a/kbugbuster/backend/mailsender.h b/kbugbuster/backend/mailsender.h
index 06517f9c..5df42c2a 100644
--- a/kbugbuster/backend/mailsender.h
+++ b/kbugbuster/backend/mailsender.h
@@ -1,8 +1,8 @@
#ifndef MAILSENDER_H
#define MAILSENDER_H
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
class KURL;
class Smtp;
@@ -13,7 +13,7 @@ class MailSender : public QObject
public:
enum MailClient { Sendmail = 0, KMail = 1, Direct = 2 };
- MailSender(MailClient,const QString &smtpServer=QString::null);
+ MailSender(MailClient,const TQString &smtpServer=TQString::null);
virtual ~MailSender();
MailSender *clone() const;
@@ -25,26 +25,26 @@ class MailSender : public QObject
instead of 'to' . (this currently only works in for direct mail
sending through SMTP.
*/
- bool send(const QString &fromName, const QString &fromEmail,
- const QString &to,const QString &subject,
- const QString &body,bool bcc=false,
- const QString &recipient = QString::null);
+ bool send(const TQString &fromName, const TQString &fromEmail,
+ const TQString &to,const TQString &subject,
+ const TQString &body,bool bcc=false,
+ const TQString &recipient = TQString::null);
signals:
- void status( const QString &message );
+ void status( const TQString &message );
void finished();
private slots:
void smtpSuccess();
- void smtpError(const QString &command, const QString &response);
+ void smtpError(const TQString &command, const TQString &response);
private:
- 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& arg0,const TQString& arg1,
+ const TQString& arg2,const TQString& arg3,
+ const TQString& arg4,int arg5,const KURL& arg6);
MailClient m_client;
- QString m_smtpServer;
+ TQString m_smtpServer;
};
#endif
diff --git a/kbugbuster/backend/package.cpp b/kbugbuster/backend/package.cpp
index ae009397..bc9bb6fe 100644
--- a/kbugbuster/backend/package.cpp
+++ b/kbugbuster/backend/package.cpp
@@ -27,18 +27,18 @@ Package::~Package()
{
}
-QString Package::name() const
+TQString Package::name() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->name;
}
-QString Package::description() const
+TQString Package::description() const
{
if ( !m_impl )
- return QString::null;
+ return TQString::null;
return m_impl->description;
}
@@ -59,10 +59,10 @@ Person Package::maintainer() const
return m_impl->maintainer;
}
-const QStringList Package::components() const
+const TQStringList Package::components() const
{
if ( !m_impl )
- return QStringList();
+ return TQStringList();
return m_impl->components;
}
diff --git a/kbugbuster/backend/package.h b/kbugbuster/backend/package.h
index 7b5c69a1..df0a119d 100644
--- a/kbugbuster/backend/package.h
+++ b/kbugbuster/backend/package.h
@@ -3,7 +3,7 @@
#include "person.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
@@ -12,7 +12,7 @@ class PackageImpl;
class Package
{
public:
- typedef QValueList<Package> List;
+ typedef TQValueList<Package> List;
Package();
Package( PackageImpl *impl );
@@ -20,11 +20,11 @@ public:
Package &operator=( const Package &rhs );
~Package();
- QString name() const;
- QString description() const;
+ TQString name() const;
+ TQString description() const;
uint numberOfBugs() const;
Person maintainer() const;
- const QStringList components() const;
+ const TQStringList components() const;
bool isNull() const { return m_impl == 0; }
diff --git a/kbugbuster/backend/packageimpl.h b/kbugbuster/backend/packageimpl.h
index c60a1079..30fd00af 100644
--- a/kbugbuster/backend/packageimpl.h
+++ b/kbugbuster/backend/packageimpl.h
@@ -3,25 +3,25 @@
#include "person.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <ksharedptr.h>
struct PackageImpl : public KShared
{
public:
- PackageImpl( const QString &_name, const QString &_description,
+ PackageImpl( const TQString &_name, const TQString &_description,
uint _numberOfBugs, const Person &_maintainer,
- const QStringList &_components )
+ const TQStringList &_components )
: name( _name ), description( _description ),numberOfBugs( _numberOfBugs ),
maintainer( _maintainer ), components(_components)
{}
- QString name;
- QString description;
+ TQString name;
+ TQString description;
uint numberOfBugs;
Person maintainer;
- QStringList components;
+ TQStringList components;
};
#endif
diff --git a/kbugbuster/backend/packagelistjob.cpp b/kbugbuster/backend/packagelistjob.cpp
index 6b05badf..8ebf077e 100644
--- a/kbugbuster/backend/packagelistjob.cpp
+++ b/kbugbuster/backend/packagelistjob.cpp
@@ -32,8 +32,8 @@
#include <kdebug.h>
#include <assert.h>
-#include <qdom.h>
-#include <qbuffer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
PackageListJob::PackageListJob( BugServer *server )
: BugJob( server )
@@ -49,7 +49,7 @@ void PackageListJob::start()
BugJob::start( server()->packageListUrl() );
}
-void PackageListJob::process( const QByteArray &data )
+void PackageListJob::process( const TQByteArray &data )
{
Package::List packages;
KBB::Error err = server()->processor()->parsePackageList( data, packages );
diff --git a/kbugbuster/backend/packagelistjob.h b/kbugbuster/backend/packagelistjob.h
index 0e1bca99..6267158a 100644
--- a/kbugbuster/backend/packagelistjob.h
+++ b/kbugbuster/backend/packagelistjob.h
@@ -29,7 +29,7 @@
#include "package.h"
-#include <qdom.h>
+#include <tqdom.h>
class PackageListJob : public BugJob
{
@@ -41,7 +41,7 @@ class PackageListJob : public BugJob
void start();
protected:
- void process( const QByteArray &data );
+ void process( const TQByteArray &data );
signals:
void packageListAvailable( const Package::List &pkgs );
diff --git a/kbugbuster/backend/person.cpp b/kbugbuster/backend/person.cpp
index a9f63be0..40cf72b7 100644
--- a/kbugbuster/backend/person.cpp
+++ b/kbugbuster/backend/person.cpp
@@ -2,7 +2,7 @@
#include "person.h"
-Person::Person( const QString &fullName )
+Person::Person( const TQString &fullName )
{
int emailPos = fullName.find( '<' );
if ( emailPos < 0 ) {
@@ -13,7 +13,7 @@ Person::Person( const QString &fullName )
}
}
-QString Person::fullName(bool html) const
+TQString Person::fullName(bool html) const
{
if( name.isEmpty() )
{
@@ -35,11 +35,11 @@ QString Person::fullName(bool html) const
}
}
-Person Person::parseFromString( const QString &_str )
+Person Person::parseFromString( const TQString &_str )
{
Person res;
- QString str = _str;
+ TQString str = _str;
int ltPos = str.find( '<' );
if ( ltPos != -1 )
@@ -53,9 +53,9 @@ Person Person::parseFromString( const QString &_str )
}
int atPos = str.find( '@' );
- int spacedAtPos = str.find( QString::fromLatin1( " at " ) );
+ int spacedAtPos = str.find( TQString::fromLatin1( " at " ) );
if ( atPos == -1 && spacedAtPos != -1 )
- str.replace( spacedAtPos, 4, QString::fromLatin1( "@" ) );
+ str.replace( spacedAtPos, 4, TQString::fromLatin1( "@" ) );
int spacePos = str.find( ' ' );
while ( spacePos != -1 )
diff --git a/kbugbuster/backend/person.h b/kbugbuster/backend/person.h
index f29074f9..7f6da633 100644
--- a/kbugbuster/backend/person.h
+++ b/kbugbuster/backend/person.h
@@ -1,22 +1,22 @@
#ifndef __person_h__
#define __person_h__
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
struct Person
{
Person() {}
- Person( const QString &fullName );
- Person( const QString &_name, const QString &_email )
+ Person( const TQString &fullName );
+ Person( const TQString &_name, const TQString &_email )
: name( _name ), email( _email ) {}
- QString name;
- QString email;
+ TQString name;
+ TQString email;
- QString fullName( bool html = false ) const;
+ TQString fullName( bool html = false ) const;
- static Person parseFromString( const QString &str );
+ static Person parseFromString( const TQString &str );
};
#endif
diff --git a/kbugbuster/backend/processor.cpp b/kbugbuster/backend/processor.cpp
index 332b4418..c030761d 100644
--- a/kbugbuster/backend/processor.cpp
+++ b/kbugbuster/backend/processor.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -50,7 +50,7 @@ void Processor::setPackageListQuery( KURL &url )
url.setQuery( "?data=versiontable" );
}
-void Processor::setBugListQuery( KURL &url, const Package &product, const QString &component )
+void Processor::setBugListQuery( KURL &url, const Package &product, const TQString &component )
{
if ( mServer->serverConfig().bugzillaVersion() == "Bugworld" ) {
url.setFileName( "bugworld.cgi" );
@@ -58,7 +58,7 @@ void Processor::setBugListQuery( KURL &url, const Package &product, const QStrin
url.setFileName( "xmlquery.cgi" );
}
- QString user = mServer->serverConfig().user();
+ TQString user = mServer->serverConfig().user();
if ( component.isEmpty() )
url.setQuery( "?user=" + user + "&product=" + product.name() );
diff --git a/kbugbuster/backend/processor.h b/kbugbuster/backend/processor.h
index cadaa407..8eee8ebf 100644
--- a/kbugbuster/backend/processor.h
+++ b/kbugbuster/backend/processor.h
@@ -41,15 +41,15 @@ class Processor
BugServer *server() const { return mServer; }
- virtual KBB::Error parseBugList( const QByteArray &data,
+ virtual KBB::Error parseBugList( const TQByteArray &data,
Bug::List &bugs ) = 0;
- virtual KBB::Error parsePackageList( const QByteArray &data,
+ virtual KBB::Error parsePackageList( const TQByteArray &data,
Package::List &packages ) = 0;
- virtual KBB::Error parseBugDetails( const QByteArray &, BugDetails & ) = 0;
+ virtual KBB::Error parseBugDetails( const TQByteArray &, BugDetails & ) = 0;
virtual void setPackageListQuery( KURL & ) = 0;
virtual void setBugListQuery( KURL &, const Package &,
- const QString &component ) = 0;
+ const TQString &component ) = 0;
virtual void setBugDetailsQuery( KURL &, const Bug & ) = 0;
private:
diff --git a/kbugbuster/backend/rdfprocessor.cpp b/kbugbuster/backend/rdfprocessor.cpp
index 89bb3402..3832e899 100644
--- a/kbugbuster/backend/rdfprocessor.cpp
+++ b/kbugbuster/backend/rdfprocessor.cpp
@@ -40,7 +40,7 @@ RdfProcessor::~RdfProcessor()
{
}
-KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element,
+KBB::Error RdfProcessor::parseDomBugList( const TQDomElement &element,
Bug::List &bugs )
{
if ( element.tagName() != "RDF" ) {
@@ -48,22 +48,22 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element,
return KBB::Error( "No RDF element found" );
}
- QDomNodeList bugNodes = element.elementsByTagName( "bz:bug" );
+ TQDomNodeList bugNodes = element.elementsByTagName( "bz:bug" );
for( uint i = 0; i < bugNodes.count(); ++i ) {
- QString title;
+ TQString title;
Person submitter;
- QString bugNr;
+ TQString bugNr;
Bug::Status status = Bug::StatusUndefined;
Bug::Severity severity = Bug::SeverityUndefined;
Person developerTodo;
Bug::BugMergeList mergedList;
- QDomNode hit = bugNodes.item( i );
+ TQDomNode hit = bugNodes.item( i );
- QDomNode n;
+ TQDomNode n;
for( n = hit.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "bz:id" ) {
bugNr = e.text();
@@ -87,7 +87,7 @@ KBB::Error RdfProcessor::parseDomBugList( const QDomElement &element,
return KBB::Error();
}
-void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QString &component )
+void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const TQString &component )
{
url.setFileName( "buglist.cgi" );
if ( component.isEmpty() )
@@ -97,7 +97,7 @@ void RdfProcessor::setBugListQuery( KURL &url, const Package &product, const QSt
if ( KBBPrefs::instance()->mShowVoted ) {
url.addQueryItem( "field0-0-0", "votes" );
url.addQueryItem( "type0-0-0", "greaterthan" );
- QString num = QString::number( KBBPrefs::instance()->mMinVotes );;
+ TQString num = TQString::number( KBBPrefs::instance()->mMinVotes );;
url.addQueryItem( "value0-0-0", num );
}
}
diff --git a/kbugbuster/backend/rdfprocessor.h b/kbugbuster/backend/rdfprocessor.h
index 0e0bd780..18406323 100644
--- a/kbugbuster/backend/rdfprocessor.h
+++ b/kbugbuster/backend/rdfprocessor.h
@@ -31,9 +31,9 @@ class RdfProcessor : public DomProcessor
RdfProcessor( BugServer * );
virtual ~RdfProcessor();
- KBB::Error parseDomBugList( const QDomElement &, Bug::List & );
+ KBB::Error parseDomBugList( const TQDomElement &, Bug::List & );
- void setBugListQuery( KURL &, const Package &, const QString &component );
+ void setBugListQuery( KURL &, const Package &, const TQString &component );
};
#endif
diff --git a/kbugbuster/backend/smtp.cpp b/kbugbuster/backend/smtp.cpp
index d54cafab..b297af20 100644
--- a/kbugbuster/backend/smtp.cpp
+++ b/kbugbuster/backend/smtp.cpp
@@ -9,26 +9,26 @@
#include "smtp.h"
-#include <qtextstream.h>
-#include <qsocket.h>
-#include <qtimer.h>
+#include <tqtextstream.h>
+#include <tqsocket.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <klocale.h>
-Smtp::Smtp( const QString &from, const QStringList &to,
- const QString &aMessage,
- const QString &server,
+Smtp::Smtp( const TQString &from, const TQStringList &to,
+ const TQString &aMessage,
+ const TQString &server,
unsigned short int port )
{
skipReadResponse = false;
- mSocket = new QSocket( this );
- connect ( mSocket, SIGNAL( readyRead() ),
- this, SLOT( readyRead() ) );
- connect ( mSocket, SIGNAL( connected() ),
- this, SLOT( connected() ) );
- connect ( mSocket, SIGNAL( error(int) ),
- this, SLOT( socketError(int) ) );
+ mSocket = new TQSocket( this );
+ connect ( mSocket, TQT_SIGNAL( readyRead() ),
+ this, TQT_SLOT( readyRead() ) );
+ connect ( mSocket, TQT_SIGNAL( connected() ),
+ this, TQT_SLOT( connected() ) );
+ connect ( mSocket, TQT_SIGNAL( error(int) ),
+ this, TQT_SLOT( socketError(int) ) );
message = aMessage;
@@ -40,8 +40,8 @@ Smtp::Smtp( const QString &from, const QStringList &to,
emit status( i18n( "Connecting to %1" ).arg( server ) );
mSocket->connectToHost( server, port );
- t = new QTextStream( mSocket );
- t->setEncoding(QTextStream::Latin1);
+ t = new TQTextStream( mSocket );
+ t->setEncoding(TQTextStream::Latin1);
}
@@ -54,8 +54,8 @@ Smtp::~Smtp()
}
-void Smtp::send( const QString &from, const QStringList &to,
- const QString &aMessage )
+void Smtp::send( const TQString &from, const TQStringList &to,
+ const TQString &aMessage )
{
skipReadResponse = true;
message = aMessage;
@@ -86,19 +86,19 @@ void Smtp::socketError(int errorCode)
{
command = "CONNECT";
switch ( errorCode ) {
- case QSocket::ErrConnectionRefused:
+ case TQSocket::ErrConnectionRefused:
responseLine = i18n( "Connection refused." );
break;
- case QSocket::ErrHostNotFound:
+ case TQSocket::ErrHostNotFound:
responseLine = i18n( "Host Not Found." );
break;
- case QSocket::ErrSocketRead:
+ case TQSocket::ErrSocketRead:
responseLine = i18n( "Error reading socket." );
break;
default:
responseLine = i18n( "Internal error, unrecognized error." );
}
- QTimer::singleShot( 0, this, SLOT(emitError()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) );
}
void Smtp::emitError() {
@@ -141,13 +141,13 @@ void Smtp::readyRead()
state = smtpBody;
} else if ( state == smtpBody && responseLine[0] == '3' ) {
command = "DATA";
- QString seperator = "";
+ TQString seperator = "";
if (message[message.length() - 1] != '\n')
seperator = "\r\n";
*t << message << seperator << ".\r\n";
state = smtpSuccess;
} else if ( state == smtpSuccess && responseLine[0] == '2' ) {
- QTimer::singleShot( 0, this, SIGNAL(success()) );
+ TQTimer::singleShot( 0, this, TQT_SIGNAL(success()) );
} else if ( state == smtpQuit && responseLine[0] == '2' ) {
command = "QUIT";
*t << "QUIT\r\n";
@@ -157,7 +157,7 @@ void Smtp::readyRead()
} else if ( state == smtpClose ) {
// we ignore it
} else { // error occurred
- QTimer::singleShot( 0, this, SLOT(emitError()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(emitError()) );
state = smtpClose;
}
@@ -168,7 +168,7 @@ void Smtp::readyRead()
t = 0;
delete mSocket;
mSocket = 0;
- QTimer::singleShot( 0, this, SLOT(deleteMe()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(deleteMe()) );
}
}
diff --git a/kbugbuster/backend/smtp.h b/kbugbuster/backend/smtp.h
index d800cb77..b97e3b89 100644
--- a/kbugbuster/backend/smtp.h
+++ b/kbugbuster/backend/smtp.h
@@ -10,9 +10,9 @@
#ifndef SMTP_H
#define SMTP_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QSocket;
class QTextStream;
@@ -22,17 +22,17 @@ class Smtp : public QObject
Q_OBJECT
public:
- Smtp( const QString &from, const QStringList &to, const QString &message,
- const QString &server, unsigned short int port = 25 );
+ Smtp( const TQString &from, const TQStringList &to, const TQString &message,
+ const TQString &server, unsigned short int port = 25 );
~Smtp();
- void send( const QString &, const QStringList &, const QString & );
+ void send( const TQString &, const TQStringList &, const TQString & );
void quit();
signals:
void success();
- void status( const QString & );
- void error( const QString &command, const QString &response );
+ void status( const TQString & );
+ void error( const TQString &command, const TQString &response );
private slots:
void readyRead();
@@ -53,15 +53,15 @@ private:
smtpClose
};
- QString message;
- QString from;
- QStringList rcpt;
- QSocket *mSocket;
- QTextStream * t;
+ TQString message;
+ TQString from;
+ TQStringList rcpt;
+ TQSocket *mSocket;
+ TQTextStream * t;
int state;
- QString response, responseLine;
+ TQString response, responseLine;
bool skipReadResponse;
- QString command;
+ TQString command;
};
#endif
diff --git a/kbugbuster/gui/buglvi.cpp b/kbugbuster/gui/buglvi.cpp
index be629510..18d7c064 100644
--- a/kbugbuster/gui/buglvi.cpp
+++ b/kbugbuster/gui/buglvi.cpp
@@ -1,5 +1,5 @@
/*
- buglvi.cpp - Custom QListViewItem that holds a Bug object
+ buglvi.cpp - Custom TQListViewItem that holds a Bug object
copyright : (c) 2001 by Martijn Klingens
email : klingens@kde.org
@@ -14,8 +14,8 @@
*************************************************************************
*/
-#include <qfont.h>
-#include <qpainter.h>
+#include <tqfont.h>
+#include <tqpainter.h>
#include <kstringhandler.h>
#include <kdebug.h>
@@ -52,9 +52,9 @@ BugLVI::~BugLVI()
{
}
-QString BugLVI::key( int column, bool /* ascending */ ) const
+TQString BugLVI::key( int column, bool /* ascending */ ) const
{
- QString key;
+ TQString key;
if ( column == 0 )
{
@@ -65,11 +65,11 @@ QString BugLVI::key( int column, bool /* ascending */ ) const
if ( m_bug.age() == 0xFFFFFFFF )
key = "0";
else
- key = QString::number( m_bug.age() ).rightJustify( 10, '0' );
+ key = TQString::number( m_bug.age() ).rightJustify( 10, '0' );
}
else if ( column == 4 )
{
- key = QString::number( 10 - m_bug.severity() );
+ key = TQString::number( 10 - m_bug.severity() );
key += m_bug.number().rightJustify( 10, '0' );
}
else
@@ -80,21 +80,21 @@ QString BugLVI::key( int column, bool /* ascending */ ) const
return key;
}
-void BugLVI::paintCell(QPainter* p, const QColorGroup& cg,
+void BugLVI::paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align)
{
- QColorGroup newCg = cg;
+ TQColorGroup newCg = cg;
if ( mCommandState == BugCommand::Queued ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( true );
p->setFont( font );
} else if ( mCommandState == BugCommand::Sent ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setItalic( true );
p->setFont( font );
} else if ( m_bug.status() == Bug::Closed ) {
// Different color for closed bugs
- newCg.setColor( QColorGroup::Text, cg.color( QColorGroup::Dark ) );
+ newCg.setColor( TQColorGroup::Text, cg.color( TQColorGroup::Dark ) );
}
KListViewItem::paintCell( p, newCg, column, width, align );
diff --git a/kbugbuster/gui/buglvi.h b/kbugbuster/gui/buglvi.h
index ff8fa7f9..5f66f398 100644
--- a/kbugbuster/gui/buglvi.h
+++ b/kbugbuster/gui/buglvi.h
@@ -1,5 +1,5 @@
/*
- buglvi.h - Custom QListViewItem that holds a Bug object
+ buglvi.h - Custom TQListViewItem that holds a Bug object
copyright : (c) 2001 by Martijn Klingens
email : klingens@kde.org
@@ -37,11 +37,11 @@ public:
Bug& bug() { return m_bug; }
void setBug( Bug &bug ) { m_bug = bug; }
- QString key ( int column, bool ascending ) const;
+ TQString key ( int column, bool ascending ) const;
void setCommandState( BugCommand::State state );
- void paintCell(QPainter* p, const QColorGroup& cg,
+ void paintCell(TQPainter* p, const TQColorGroup& cg,
int column, int width, int align);
private:
diff --git a/kbugbuster/gui/centralwidget.cpp b/kbugbuster/gui/centralwidget.cpp
index 80bd0672..f90564f1 100644
--- a/kbugbuster/gui/centralwidget.cpp
+++ b/kbugbuster/gui/centralwidget.cpp
@@ -14,10 +14,10 @@
*************************************************************************
*/
-#include <qsplitter.h>
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
+#include <tqsplitter.h>
+#include <tqpushbutton.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kdebug.h>
@@ -46,20 +46,20 @@
using namespace KBugBusterMainWindow;
-CentralWidget::CentralWidget( const QCString &initialPackage,
- const QCString &initialComponent,
- const QCString &initialBug, QWidget *parent,
+CentralWidget::CentralWidget( const TQCString &initialPackage,
+ const TQCString &initialComponent,
+ const TQCString &initialBug, TQWidget *parent,
const char * name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
// Master layout
- ( new QVBoxLayout( this, 0,
+ ( new TQVBoxLayout( this, 0,
KDialog::spacingHint() ) )->setAutoAdd( true );
- // Create QSplitter children
- m_vertSplitter = new QSplitter( QSplitter::Vertical, this );
+ // Create TQSplitter children
+ m_vertSplitter = new TQSplitter( TQSplitter::Vertical, this );
m_listPane = new CWBugListContainer( m_vertSplitter );
- m_horSplitter = new QSplitter( QSplitter::Horizontal,m_vertSplitter );
+ m_horSplitter = new TQSplitter( TQSplitter::Horizontal,m_vertSplitter );
// The search pane isn't used. Should we remove the code?
m_searchPane = new CWSearchWidget( m_horSplitter );
m_bugPane = new CWBugDetailsContainer( m_horSplitter );
@@ -67,55 +67,55 @@ CentralWidget::CentralWidget( const QCString &initialPackage,
m_searchPane->hide();
// m_listPane->hide();
- m_searchPane->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,
- QSizePolicy::Minimum ) );
- m_horSplitter->setResizeMode( m_searchPane, QSplitter::FollowSizeHint );
+ m_searchPane->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,
+ TQSizePolicy::Minimum ) );
+ m_horSplitter->setResizeMode( m_searchPane, TQSplitter::FollowSizeHint );
- connect( m_listPane, SIGNAL( resetProgressBar() ),
- SIGNAL( resetProgressBar() ) );
- connect( m_bugPane, SIGNAL( resetProgressBar() ),
- SIGNAL( resetProgressBar() ) );
+ connect( m_listPane, TQT_SIGNAL( resetProgressBar() ),
+ TQT_SIGNAL( resetProgressBar() ) );
+ connect( m_bugPane, TQT_SIGNAL( resetProgressBar() ),
+ TQT_SIGNAL( resetProgressBar() ) );
// Start the proper jobs for loading the package lists
connect( BugSystem::self(),
- SIGNAL( packageListAvailable( const Package::List & ) ),
- SLOT( updatePackageList( const Package::List & ) ) );
+ TQT_SIGNAL( packageListAvailable( const Package::List & ) ),
+ TQT_SLOT( updatePackageList( const Package::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugListAvailable( const Package &, const QString &, const Bug::List & ) ),
- SLOT( updateBugList( const Package &, const QString &, const Bug::List & ) ) );
+ TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, const Bug::List & ) ),
+ TQT_SLOT( updateBugList( const Package &, const TQString &, const Bug::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugListAvailable( const QString &, const Bug::List & ) ),
- SLOT( updateBugList( const QString &, const Bug::List & ) ) );
+ TQT_SIGNAL( bugListAvailable( const TQString &, const Bug::List & ) ),
+ TQT_SLOT( updateBugList( const TQString &, const Bug::List & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
- SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) );
+ TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
+ TQT_SLOT( updateBugDetails( const Bug &, const BugDetails & ) ) );
- connect( BugSystem::self(), SIGNAL( loadingError( const QString & ) ),
- SLOT( showLoadingError( const QString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( loadingError( const TQString & ) ),
+ TQT_SLOT( showLoadingError( const TQString & ) ) );
- connect( m_bugPane, SIGNAL( signalCloseBug() ), SLOT( closeBug() ) );
- connect( m_bugPane, SIGNAL( signalCloseBugSilently() ), SLOT( closeBugSilently() ) );
- connect( m_bugPane, SIGNAL( signalReopenBug() ), SLOT( reopenBug() ) );
- connect( m_bugPane, SIGNAL( signalReassignBug() ), SLOT( reassignBug() ) );
- connect( m_bugPane, SIGNAL( signalTitleBug() ), SLOT( titleBug() ) );
- connect( m_bugPane, SIGNAL( signalSeverityBug() ), SLOT( severityBug() ) );
- connect( m_bugPane, SIGNAL( signalReplyBug() ), SLOT( replyBug() ) );
- connect( m_bugPane, SIGNAL( signalReplyPrivateBug() ), SLOT( replyPrivateBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalCloseBug() ), TQT_SLOT( closeBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalCloseBugSilently() ), TQT_SLOT( closeBugSilently() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReopenBug() ), TQT_SLOT( reopenBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReassignBug() ), TQT_SLOT( reassignBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalTitleBug() ), TQT_SLOT( titleBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalSeverityBug() ), TQT_SLOT( severityBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReplyBug() ), TQT_SLOT( replyBug() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalReplyPrivateBug() ), TQT_SLOT( replyPrivateBug() ) );
- connect( m_bugPane, SIGNAL( signalClearCommand() ), SLOT( clearCommand() ) );
+ connect( m_bugPane, TQT_SIGNAL( signalClearCommand() ), TQT_SLOT( clearCommand() ) );
// Add the selection slots for the listviews
connect( m_searchPane->m_searchPackages,
- SIGNAL( activated( const QString & ) ),
- SLOT( slotRetrieveBugList( const QString & ) ) );
+ TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_SLOT( slotRetrieveBugList( const TQString & ) ) );
- connect( m_listPane, SIGNAL( executed( const Bug & ) ),
- SLOT( slotRetrieveBugDetails( const Bug & ) ) );
- connect( m_listPane, SIGNAL( currentChanged( const Bug & ) ),
- SLOT( slotSetActiveBug( const Bug & ) ) );
+ connect( m_listPane, TQT_SIGNAL( executed( const Bug & ) ),
+ TQT_SLOT( slotRetrieveBugDetails( const Bug & ) ) );
+ connect( m_listPane, TQT_SIGNAL( currentChanged( const Bug & ) ),
+ TQT_SLOT( slotSetActiveBug( const Bug & ) ) );
- connect( m_listPane, SIGNAL( searchPackage() ), SIGNAL( searchPackage() ) );
- connect( m_bugPane, SIGNAL( searchBugNumber() ), SIGNAL( searchBugNumber() ) );
+ connect( m_listPane, TQT_SIGNAL( searchPackage() ), TQT_SIGNAL( searchPackage() ) );
+ connect( m_bugPane, TQT_SIGNAL( searchBugNumber() ), TQT_SIGNAL( searchBugNumber() ) );
m_bLoadingAllBugs = false;
@@ -127,15 +127,15 @@ CentralWidget::~CentralWidget()
// kdDebug() << "CentralWidget::~CentralWidget()" << endl;
}
-void CentralWidget::initialize( const QString& p, const QString &c, const QString& b )
+void CentralWidget::initialize( const TQString& p, const TQString &c, const TQString& b )
{
// kdDebug() << "CentralWidget::initialize(): package: '" << p
// << "' bug: '" << b << "'" << endl;
BugServerConfig cfg = BugSystem::self()->server()->serverConfig();
- QString package = p.isEmpty() ? cfg.currentPackage() : p;
- QString bug = b.isEmpty() ? cfg.currentBug() : b;
- QString component = c.isEmpty() ? cfg.currentComponent() : c;
+ TQString package = p.isEmpty() ? cfg.currentPackage() : p;
+ TQString bug = b.isEmpty() ? cfg.currentBug() : b;
+ TQString component = c.isEmpty() ? cfg.currentComponent() : c;
m_listPane->setNoList();
m_bugPane->setNoBug();
@@ -170,8 +170,8 @@ void CentralWidget::writeConfig()
{
#if 0
kdDebug() << "m_vertSplitter" << endl;
- QValueList<int> sizes = m_vertSplitter->sizes();
- QValueList<int>::ConstIterator it;
+ TQValueList<int> sizes = m_vertSplitter->sizes();
+ TQValueList<int>::ConstIterator it;
for( it = sizes.begin(); it != sizes.end(); ++it ) {
kdDebug() << " " << (*it) << endl;
}
@@ -186,12 +186,12 @@ void CentralWidget::writeConfig()
server->serverConfig().setCurrentBug( m_currentBug.number() );
}
-void CentralWidget::slotRetrieveBugList( const QString &package )
+void CentralWidget::slotRetrieveBugList( const TQString &package )
{
- slotRetrieveBugList( package, QString::null );
+ slotRetrieveBugList( package, TQString::null );
}
-void CentralWidget::slotRetrieveBugList( const QString &p, const QString &component )
+void CentralWidget::slotRetrieveBugList( const TQString &p, const TQString &component )
{
if ( p.isEmpty() ) return;
@@ -212,7 +212,7 @@ void CentralWidget::slotRetrieveBugList( const QString &p, const QString &compon
BugSystem::self()->retrieveBugList( m_currentPackage, m_currentComponent );
}
-QString CentralWidget::currentNumber() const
+TQString CentralWidget::currentNumber() const
{
if( m_currentBug.isNull() )
return "";
@@ -220,7 +220,7 @@ QString CentralWidget::currentNumber() const
return m_currentBug.number();
}
-QString CentralWidget::currentTitle() const
+TQString CentralWidget::currentTitle() const
{
if( m_currentBug.isNull() )
return "";
@@ -278,12 +278,12 @@ void CentralWidget::updatePackageList( const Package::List &pkgs )
*/
}
-void CentralWidget::updateBugList( const Package &pkg, const QString &component, const Bug::List &bugs )
+void CentralWidget::updateBugList( const Package &pkg, const TQString &component, const Bug::List &bugs )
{
m_listPane->setBugList( pkg, component, bugs );
}
-void CentralWidget::updateBugList( const QString &label, const Bug::List &bugs )
+void CentralWidget::updateBugList( const TQString &label, const Bug::List &bugs )
{
m_listPane->setBugList( label, bugs );
}
@@ -333,21 +333,21 @@ void CentralWidget::slotExtractAttachments()
if (!m_currentBug.isNull()) {
// Grab bug details (i.e. full-text) from cache, then extract attachments from it
BugDetails details = BugSystem::self()->cache()->loadBugDetails( m_currentBug );
- QValueList<BugDetails::Attachment> attachments = details.extractAttachments();
+ TQValueList<BugDetails::Attachment> attachments = details.extractAttachments();
if ( !attachments.isEmpty() )
{
- QStringList fileList;
- for ( QValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
+ TQStringList fileList;
+ for ( TQValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
{
// Handle duplicates
if ( fileList.contains( (*it).filename ) )
{
int n = 2; // looks stupid to have "blah" and "1-blah", start at 2
- QString fn = QString::number(n) + '-' + (*it).filename;
+ TQString fn = TQString::number(n) + '-' + (*it).filename;
while ( fileList.contains( fn ) )
{
++n;
- fn = QString::number(n) + '-' + (*it).filename;
+ fn = TQString::number(n) + '-' + (*it).filename;
}
(*it).filename = fn;
}
@@ -356,18 +356,18 @@ void CentralWidget::slotExtractAttachments()
int res = KMessageBox::questionYesNoList( this,
i18n("Found the following attachments. Save?"),
- fileList, QString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() );
+ fileList, TQString::null, KStdGuiItem::save(), KStdGuiItem::dontSave() );
if ( res == KMessageBox::No )
return;
- QString dir = KFileDialog::getExistingDirectory( QString::null, this, i18n("Select Folder Where to Save Attachments") );
+ TQString dir = KFileDialog::getExistingDirectory( TQString::null, this, i18n("Select Folder Where to Save Attachments") );
if ( !dir.isEmpty() )
{
if ( !dir.endsWith( "/" ) )
dir += '/';
- for ( QValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
+ for ( TQValueList<BugDetails::Attachment>::Iterator it = attachments.begin() ; it != attachments.end() ; ++it )
{
- QString filename = m_currentBug.number() + '-' + (*it).filename;
- QFile file( dir + filename );
+ TQString filename = m_currentBug.number() + '-' + (*it).filename;
+ TQFile file( dir + filename );
if ( file.open( IO_WriteOnly ) )
file.writeBlock( (*it).contents );
else
@@ -381,7 +381,7 @@ void CentralWidget::slotExtractAttachments()
void CentralWidget::mergeBugs()
{
- QStringList bugNumbers = m_listPane->selectedBugs();
+ TQStringList bugNumbers = m_listPane->selectedBugs();
if ( bugNumbers.count() >= 2 ) {
BugSystem::self()->queueCommand(
new BugCommandMerge( bugNumbers, m_currentPackage ) );
@@ -436,7 +436,7 @@ void CentralWidget::reassignBug()
void CentralWidget::titleBug()
{
bool ok = false;
- QString title = KInputDialog::getText( i18n("Change Bug Title"),
+ TQString title = KInputDialog::getText( i18n("Change Bug Title"),
i18n( "Please enter a new title:" ),
m_currentBug.title(), &ok, this );
if ( ok && !title.isEmpty() ) {
@@ -450,7 +450,7 @@ void CentralWidget::severityBug()
SeveritySelectDialog *dlg = new SeveritySelectDialog( this );
dlg->setSeverity( m_currentBug.severity() );
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
BugSystem::self()->queueCommand(
new BugCommandSeverity( m_currentBug,
dlg->selectedSeverityAsString(), m_currentPackage ) );
@@ -478,7 +478,7 @@ void CentralWidget::clearCommand()
BugSystem::self()->clearCommands( m_currentBug.number() );
}
-void CentralWidget::searchBugByTitle( int options, const QString& pattern )
+void CentralWidget::searchBugByTitle( int options, const TQString& pattern )
{
m_listPane->searchBugByTitle( options, pattern );
}
@@ -492,7 +492,7 @@ void CentralWidget::slotRetrieveAllBugDetails()
m_bLoadingAllBugs = false;
}
-void CentralWidget::showLoadingError( const QString &text )
+void CentralWidget::showLoadingError( const TQString &text )
{
KMessageBox::error( this, text );
}
diff --git a/kbugbuster/gui/centralwidget.h b/kbugbuster/gui/centralwidget.h
index 85b97eca..30b40f61 100644
--- a/kbugbuster/gui/centralwidget.h
+++ b/kbugbuster/gui/centralwidget.h
@@ -17,7 +17,7 @@
#ifndef KBBMAINWINDOW_CENTRALWIDGET_H
#define KBBMAINWINDOW_CENTRALWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "package.h"
#include "bug.h"
@@ -42,37 +42,37 @@ class CentralWidget : public QWidget
Q_OBJECT
public:
- CentralWidget( const QCString &initialPackage,
- const QCString &initalComponent,const QCString& initialBug,
- QWidget* parent = 0, const char* name = 0 );
+ CentralWidget( const TQCString &initialPackage,
+ const TQCString &initalComponent,const TQCString& initialBug,
+ TQWidget* parent = 0, const char* name = 0 );
~CentralWidget();
- void initialize( const QString &initialPackage = QString::null,
- const QString &initalComponent = QString::null,
- const QString &initialBug = QString::null );
+ void initialize( const TQString &initialPackage = TQString::null,
+ const TQString &initalComponent = TQString::null,
+ const TQString &initialBug = TQString::null );
void readConfig();
void writeConfig();
- void searchBugByTitle( int options, const QString& pattern );
+ void searchBugByTitle( int options, const TQString& pattern );
- virtual QString currentNumber() const;
- virtual QString currentTitle() const;
+ virtual TQString currentNumber() const;
+ virtual TQString currentTitle() const;
void updatePackage();
CWBugDetails *bugDetailsWidget();
public slots:
- void slotRetrieveBugList( const QString &package, const QString &component );
- void slotRetrieveBugList( const QString &package );
+ void slotRetrieveBugList( const TQString &package, const TQString &component );
+ void slotRetrieveBugList( const TQString &package );
void slotRetrieveBugDetails( const Bug & );
void slotSetActiveBug( const Bug & );
void slotRetrieveAllBugDetails();
void updatePackageList( const Package::List &pkgs );
- void updateBugList( const Package &pkg, const QString &component, const Bug::List &bugs );
- void updateBugList( const QString &label, const Bug::List &bugs );
+ void updateBugList( const Package &pkg, const TQString &component, const Bug::List &bugs );
+ void updateBugList( const TQString &label, const Bug::List &bugs );
void updateBugDetails( const Bug &, const BugDetails & );
void slotReloadPackageList();
@@ -105,24 +105,24 @@ signals:
void searchBugNumber(); // when clicking on the initial bug-details widget
protected slots:
- void showLoadingError( const QString & );
+ void showLoadingError( const TQString & );
private:
CWSearchWidget *m_searchPane;
CWBugListContainer *m_listPane;
CWBugDetailsContainer *m_bugPane;
- QSplitter *m_vertSplitter;
- QSplitter *m_horSplitter;
+ TQSplitter *m_vertSplitter;
+ TQSplitter *m_horSplitter;
/**
* Other status info
*/
Package m_currentPackage;
- QString m_currentComponent;
+ TQString m_currentComponent;
Bug m_currentBug;
- QMap<QString, Package> m_packageList;
+ TQMap<TQString, Package> m_packageList;
/**
* We do multi-select, but the close/reopen buttons are per-item and
diff --git a/kbugbuster/gui/cwbugdetails.cpp b/kbugbuster/gui/cwbugdetails.cpp
index 7aaf16a4..eca64758 100644
--- a/kbugbuster/gui/cwbugdetails.cpp
+++ b/kbugbuster/gui/cwbugdetails.cpp
@@ -14,10 +14,10 @@
*************************************************************************
*/
-#include <qtextview.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
+#include <tqtextview.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
#include "cwbugdetails.h"
#include "kbbprefs.h"
@@ -30,19 +30,19 @@
#include <kglobal.h>
#include <krun.h>
-#include <qlayout.h>
-#include <qpalette.h>
+#include <tqlayout.h>
+#include <tqpalette.h>
using namespace KBugBusterMainWindow;
-CWBugDetails::CWBugDetails( QWidget *parent , const char * name )
- : QWidget( parent, name )
+CWBugDetails::CWBugDetails( TQWidget *parent , const char * name )
+ : TQWidget( parent, name )
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
m_bugDesc = new KHTMLPart( this, "m_bugDesc" );
- connect( m_bugDesc->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect( m_bugDesc->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ this, TQT_SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
topLayout->addWidget( m_bugDesc->view() );
}
@@ -53,14 +53,14 @@ CWBugDetails::~CWBugDetails()
void CWBugDetails::setBug( const Bug &bug, const BugDetails &details )
{
- QColorGroup cg = m_bugDesc->view()->palette().active();
- QString text =
+ TQColorGroup cg = m_bugDesc->view()->palette().active();
+ TQString text =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n"
"<html><head><title></title></head>\n"
"<style>";
text.append(
- QString( "table.helpT { text-align: center; font-family: Verdana; font-weight: normal; font-size: 11px; color: #404040; width: 100%; background-color: #fafafa; border: 1px #6699CC solid; border-collapse: collapse; border-spacing: 0px; }\n"
+ TQString( "table.helpT { text-align: center; font-family: Verdana; font-weight: normal; font-size: 11px; color: #404040; width: 100%; background-color: #fafafa; border: 1px #6699CC solid; border-collapse: collapse; border-spacing: 0px; }\n"
"td.helpHed { border-bottom: 2px solid #000000; border-left: 1px solid #000000; background-color: %1; text-align: center; text-indent: 5px; font-family: Verdana; font-weight: bold; font-size: 11px; color: %2; }\n"
"td.helpBod { border-bottom: 1px solid #9CF; border-top: 0px; border-left: 1px solid #9CF; border-right: 0px; text-align: center; text-indent: 10px; font-family: Verdana, sans-serif, Arial; font-weight: normal; font-size: 11px; color: #404040; background-color: #000000; }\n"
"table.sofT { text-align: center; font-family: Verdana; font-weight: normal; font-size: 11px; color: #404040; width: 100%; background-color: #fafafa; border: 1px #000000 solid; border-collapse: collapse; border-spacing: 0px; }\n"
@@ -70,15 +70,15 @@ void CWBugDetails::setBug( const Bug &bug, const BugDetails &details )
text.append( "<body style=\"margin: 0px\">\n" );
- QString highlightStyle = QString( "background: %1; color: %2; " )
+ TQString highlightStyle = TQString( "background: %1; color: %2; " )
.arg( cg.highlight().name() )
.arg( cg.highlightedText().name() );
- QString borderBottomStyle = QString( "border-bottom: solid %1 1px; " )
+ TQString borderBottomStyle = TQString( "border-bottom: solid %1 1px; " )
.arg( cg.foreground().name() );
- QString borderTopStyle = QString( "border-top: solid %1 1px; " )
+ TQString borderTopStyle = TQString( "border-top: solid %1 1px; " )
.arg( cg.foreground().name() );
- QString submitter = bug.submitter().fullName( true );
+ TQString submitter = bug.submitter().fullName( true );
int age = details.age();
text.append( "<div style=\"" + highlightStyle + "padding: 8px; float: left\">" );
text.append( "<a href=\"" + BugSystem::self()->server()->bugLink( bug ).url()
@@ -92,7 +92,7 @@ void CWBugDetails::setBug( const Bug &bug, const BugDetails &details )
i18n( "1 day old", "%n days old", age ) + "</div>\n";
text.append(
- QString( "<div style=\"background: %1; color: %2; " +
+ TQString( "<div style=\"background: %1; color: %2; " +
borderBottomStyle +
"border-bottom: solid %3 1px; "
"padding: 4px\">"
@@ -115,15 +115,15 @@ void CWBugDetails::setBug( const Bug &bug, const BugDetails &details )
if ( !firstHeader ) text += borderTopStyle;
text.append( borderBottomStyle + "\">" );
- QString sender = (*it).sender.fullName( true );
- QString date = KGlobal::locale()->formatDateTime( (*it).date, false );
+ TQString sender = (*it).sender.fullName( true );
+ TQString date = KGlobal::locale()->formatDateTime( (*it).date, false );
BugDetailsPart::List::ConstIterator it2 = it;
if ( ++it2 == bdp.end() )
text.append( "<a href=\"" + BugSystem::self()->server()->bugLink( bug ).url()
+ "\">" + i18n("Bug Report</a> from <b>%1</b>")
.arg( sender ) );
else {
- text.append( "<a href=\"" + BugSystem::self()->server()->bugLink( bug ).url() + QString("#c%1").arg( replies )
+ text.append( "<a href=\"" + BugSystem::self()->server()->bugLink( bug ).url() + TQString("#c%1").arg( replies )
+ "\">" + i18n("Reply #%1</a> from <b>%2</b>")
.arg( replies ).arg( sender ) );
replies--;
@@ -144,20 +144,20 @@ void CWBugDetails::setBug( const Bug &bug, const BugDetails &details )
text.append( "</div>\n" );
}
- QValueList<BugDetailsImpl::AttachmentDetails> atts = details.attachmentDetails();
+ TQValueList<BugDetailsImpl::AttachmentDetails> atts = details.attachmentDetails();
if ( atts.count() > 0 ) {
text.append( "<table summary=\"Attachment data table\" class=\"sofT\" cellspacing=\"0\">" );
- text.append( QString( "<tr> <td colspan=\"4\" class=\"helpHed\">%1</td> </tr>")
+ text.append( TQString( "<tr> <td colspan=\"4\" class=\"helpHed\">%1</td> </tr>")
.arg( i18n( "Attachment List") ) );
- text.append( QString("<tr> <td class=\"helpHed\">%1</td> <td class=\"helpHed\">%2</td> <td class=\"helpHed\">%3</td> <td class=\"helpHed\">%4</td> </tr>")
+ text.append( TQString("<tr> <td class=\"helpHed\">%1</td> <td class=\"helpHed\">%2</td> <td class=\"helpHed\">%3</td> <td class=\"helpHed\">%4</td> </tr>")
.arg( i18n("Description") )
.arg( i18n("Date") )
.arg( i18n("View") )
.arg( i18n("Edit") ) );
- QValueList<BugDetailsImpl::AttachmentDetails>::iterator it;
+ TQValueList<BugDetailsImpl::AttachmentDetails>::iterator it;
for ( it = atts.begin() ; it != atts.end() ; ++it ) {
- text.append( QString("<tr><td>%1</td>").arg( (*it).description ) ) ;
- text.append( QString("<td>%1</td>").arg( (*it).date ) );
+ text.append( TQString("<tr><td>%1</td>").arg( (*it).description ) ) ;
+ text.append( TQString("<td>%1</td>").arg( (*it).date ) );
text.append( "<td><a href=\"" +
BugSystem::self()->server()->attachmentViewLink( (*it).id ).url() +
"\">" + i18n("View") + "</a></td>" );
@@ -185,10 +185,10 @@ void CWBugDetails::handleOpenURLRequest( const KURL &url, const KParts::URLArgs
new KRun( url );
}
-QString CWBugDetails::textBugDetailsAttribute( const QString &value,
- const QString &name )
+TQString CWBugDetails::textBugDetailsAttribute( const TQString &value,
+ const TQString &name )
{
- QString text = "";
+ TQString text = "";
if ( !value.isEmpty() ) {
text.append( "<tr><td style=\"width: 20%\"><b>" + name + "</b></td>"
"<td>" + value + "</td></tr>" );
@@ -196,12 +196,12 @@ QString CWBugDetails::textBugDetailsAttribute( const QString &value,
return text;
}
-QString CWBugDetails::source() const
+TQString CWBugDetails::source() const
{
return mSource;
}
-QString CWBugDetails::selectedText() const
+TQString CWBugDetails::selectedText() const
{
return m_bugDesc->selectedText();
}
diff --git a/kbugbuster/gui/cwbugdetails.h b/kbugbuster/gui/cwbugdetails.h
index 31a5339f..e80d340f 100644
--- a/kbugbuster/gui/cwbugdetails.h
+++ b/kbugbuster/gui/cwbugdetails.h
@@ -20,7 +20,7 @@
#include "bug.h"
#include "bugdetails.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kparts/browserextension.h>
@@ -37,24 +37,24 @@ class CWBugDetails : public QWidget
Q_OBJECT
public:
- CWBugDetails( QWidget* parent = 0, const char* name = 0 );
+ CWBugDetails( TQWidget* parent = 0, const char* name = 0 );
~CWBugDetails();
void setBug( const Bug &, const BugDetails & );
- QString source() const;
- QString selectedText() const;
+ TQString source() const;
+ TQString selectedText() const;
private slots:
void handleOpenURLRequest( const KURL &url, const KParts::URLArgs & );
private:
- QString textBugDetailsAttribute( const QString &value,
- const QString &name );
+ TQString textBugDetailsAttribute( const TQString &value,
+ const TQString &name );
KHTMLPart *m_bugDesc;
- QString mSource;
+ TQString mSource;
};
} // namespace
diff --git a/kbugbuster/gui/cwbugdetailscontainer.cpp b/kbugbuster/gui/cwbugdetailscontainer.cpp
index b33ec3b1..7b57ec1b 100644
--- a/kbugbuster/gui/cwbugdetailscontainer.cpp
+++ b/kbugbuster/gui/cwbugdetailscontainer.cpp
@@ -14,10 +14,10 @@
*************************************************************************
*/
-#include <qpushbutton.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -36,7 +36,7 @@
using namespace KBugBusterMainWindow;
-CWBugDetailsContainer::CWBugDetailsContainer( QWidget *parent , const char * name )
+CWBugDetailsContainer::CWBugDetailsContainer( TQWidget *parent , const char * name )
: CWBugDetailsContainer_Base( parent, name )
{
// Do some stuff Designer can't do:
@@ -61,14 +61,14 @@ CWBugDetailsContainer::CWBugDetailsContainer( QWidget *parent , const char * nam
// Fill WidgetStack in Bug Details pane
m_bugLoading = new CWLoadingWidget( CWLoadingWidget::BottomFrame,
m_bugStack );
- connect( m_bugLoading, SIGNAL( clicked() ), SIGNAL( searchBugNumber() ) );
+ connect( m_bugLoading, TQT_SIGNAL( clicked() ), TQT_SIGNAL( searchBugNumber() ) );
m_bugStack->addWidget( m_bugDetails, 0 );
m_bugStack->addWidget( m_bugLoading, 1 );
setNoBug();
- QFont f = m_bugLabel->font();
+ TQFont f = m_bugLabel->font();
f.setBold( true );
m_bugLabel->setFont( f );
@@ -76,25 +76,25 @@ CWBugDetailsContainer::CWBugDetailsContainer( QWidget *parent , const char * nam
CWBugDetailsContainer_BaseLayout->setSpacing( KDialog::spacingHint() );
CWBugDetailsContainer_BaseLayout->setMargin( KDialog::marginHint() );
- connect( m_bugCloseBtn, SIGNAL( clicked() ), SIGNAL( signalCloseBug() ) );
- connect( m_bugCloseSilentlyBtn, SIGNAL( clicked() ), SIGNAL( signalCloseBugSilently() ) );
- connect( m_bugReopenBtn, SIGNAL( clicked() ), SIGNAL( signalReopenBug() ) );
- connect( m_bugReassignBtn, SIGNAL( clicked() ), SIGNAL( signalReassignBug() ) );
- connect( m_bugTitleBtn, SIGNAL( clicked() ), SIGNAL( signalTitleBug() ) );
- connect( m_bugSeverityBtn, SIGNAL( clicked() ), SIGNAL( signalSeverityBug() ) );
- connect( m_bugReplyBtn, SIGNAL( clicked() ), SIGNAL( signalReplyBug() ) );
- connect( m_bugReplyPrivBtn, SIGNAL( clicked() ), SIGNAL( signalReplyPrivateBug() ) );
-
- connect( m_cmdClearBtn, SIGNAL( clicked() ), SIGNAL( signalClearCommand() ) );
-
- connect( BugSystem::self(), SIGNAL( bugDetailsLoading( const Bug & ) ),
- SLOT( setLoading( const Bug & ) ) );
- connect( BugSystem::self(), SIGNAL( bugDetailsCacheMiss( const Bug & ) ),
- SLOT( setCacheMiss( const Bug & ) ) );
- connect( BugSystem::self(), SIGNAL( commandQueued( BugCommand * ) ),
- SLOT( commandQueued( BugCommand * ) ) );
- connect( BugSystem::self(), SIGNAL( commandCanceled( const QString & ) ),
- SLOT( clearCommand( const QString & ) ) );
+ connect( m_bugCloseBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalCloseBug() ) );
+ connect( m_bugCloseSilentlyBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalCloseBugSilently() ) );
+ connect( m_bugReopenBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalReopenBug() ) );
+ connect( m_bugReassignBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalReassignBug() ) );
+ connect( m_bugTitleBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalTitleBug() ) );
+ connect( m_bugSeverityBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalSeverityBug() ) );
+ connect( m_bugReplyBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalReplyBug() ) );
+ connect( m_bugReplyPrivBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalReplyPrivateBug() ) );
+
+ connect( m_cmdClearBtn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( signalClearCommand() ) );
+
+ connect( BugSystem::self(), TQT_SIGNAL( bugDetailsLoading( const Bug & ) ),
+ TQT_SLOT( setLoading( const Bug & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( bugDetailsCacheMiss( const Bug & ) ),
+ TQT_SLOT( setCacheMiss( const Bug & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( commandQueued( BugCommand * ) ),
+ TQT_SLOT( commandQueued( BugCommand * ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( commandCanceled( const TQString & ) ),
+ TQT_SLOT( clearCommand( const TQString & ) ) );
}
CWBugDetailsContainer::~CWBugDetailsContainer()
@@ -106,16 +106,16 @@ void CWBugDetailsContainer::setBug( const Bug &bug, const BugDetails &details )
m_bug = bug;
m_bugDetails->setBug( bug, details );
- QString labelText;
+ TQString labelText;
if ( bug.mergedWith().size() )
{
//FIXME: What should the separator be for lists? Don't see anything in KLocale for that
- QString list;
+ TQString list;
Bug::BugMergeList mergedWith = bug.mergedWith();
for (Bug::BugMergeList::ConstIterator i = mergedWith.begin(); i != mergedWith.end(); ++i)
{
- list += QString::number(*i)+", ";
+ list += TQString::number(*i)+", ";
}
list.truncate( list.length()-2 ); //Strip off the last ", "
@@ -146,19 +146,19 @@ void CWBugDetailsContainer::setBug( const Bug &bug, const BugDetails &details )
void CWBugDetailsContainer::showCommands( const Bug& bug )
{
- QPtrList<BugCommand> commands = BugSystem::self()->server()->queryCommands( bug );
+ TQPtrList<BugCommand> commands = BugSystem::self()->server()->queryCommands( bug );
if ( !commands.isEmpty() ) {
- QString cmdDetails;
- QString cmdText = i18n("Pending commands:")+" ";
+ TQString cmdDetails;
+ TQString cmdText = i18n("Pending commands:")+" ";
bool first = true;
- QPtrListIterator<BugCommand> cmdIt( commands );
+ TQPtrListIterator<BugCommand> cmdIt( commands );
for( ; cmdIt.current(); ++cmdIt )
{
BugCommand *cmd = cmdIt.current();
if (!first)
cmdText += " | "; // separator in case of multiple commands
first = false;
- cmdText += QString("<b>%1</b>").arg( cmd->name() );
+ cmdText += TQString("<b>%1</b>").arg( cmd->name() );
if (!cmdDetails.isEmpty())
cmdDetails += " | "; // separator in case of multiple commands
cmdDetails += cmd->details();
@@ -166,9 +166,9 @@ void CWBugDetailsContainer::showCommands( const Bug& bug )
// Set summary as text label, details into tooltip
m_cmdLabel->setText( cmdText );
if ( !cmdDetails.isEmpty() ) {
- QToolTip::add( m_cmdLabel, cmdDetails );
+ TQToolTip::add( m_cmdLabel, cmdDetails );
} else {
- QToolTip::remove( m_cmdLabel );
+ TQToolTip::remove( m_cmdLabel );
}
m_cmdLabel->show();
} else {
@@ -181,7 +181,7 @@ void CWBugDetailsContainer::hideCommands()
m_cmdLabel->hide();
}
-void CWBugDetailsContainer::clearCommand( const QString &bug )
+void CWBugDetailsContainer::clearCommand( const TQString &bug )
{
if ( bug == m_bug.number() )
showCommands( m_bug );
@@ -221,7 +221,7 @@ void CWBugDetailsContainer::setCacheMiss( const Bug &bug )
m_bug = bug;
showCommands( bug );
- QString msg;
+ TQString msg;
if( BugSystem::self()->disconnected() )
msg = i18n( "Bug #%1 (%2) is not available offline." ).
arg( bug.number() ).arg( bug.title() );
diff --git a/kbugbuster/gui/cwbugdetailscontainer.h b/kbugbuster/gui/cwbugdetailscontainer.h
index c183a8ea..670d3593 100644
--- a/kbugbuster/gui/cwbugdetailscontainer.h
+++ b/kbugbuster/gui/cwbugdetailscontainer.h
@@ -38,7 +38,7 @@ class CWBugDetailsContainer : public CWBugDetailsContainer_Base
Q_OBJECT
public:
- CWBugDetailsContainer( QWidget* parent = 0, const char* name = 0 );
+ CWBugDetailsContainer( TQWidget* parent = 0, const char* name = 0 );
~CWBugDetailsContainer();
void setBug( const Bug &, const BugDetails & );
@@ -69,7 +69,7 @@ signals:
private slots:
void showCommands( const Bug & );
- void clearCommand( const QString & );
+ void clearCommand( const TQString & );
void commandQueued( BugCommand * );
private:
diff --git a/kbugbuster/gui/cwbuglistcontainer.cpp b/kbugbuster/gui/cwbuglistcontainer.cpp
index 0188a996..14a601be 100644
--- a/kbugbuster/gui/cwbuglistcontainer.cpp
+++ b/kbugbuster/gui/cwbuglistcontainer.cpp
@@ -14,10 +14,10 @@
*************************************************************************
*/
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -41,22 +41,22 @@
using namespace KBugBusterMainWindow;
-CWBugListContainer::CWBugListContainer( QWidget *parent , const char * name )
- : QWidget( parent, name ), m_find(0), m_findItem(0)
+CWBugListContainer::CWBugListContainer( TQWidget *parent , const char * name )
+ : TQWidget( parent, name ), m_find(0), m_findItem(0)
{
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( KDialog::marginHint() );
- m_listLabel = new QLabel( this );
+ m_listLabel = new TQLabel( this );
topLayout->addWidget( m_listLabel );
topLayout->setStretchFactor( m_listLabel, 0 );
- QFont f = m_listLabel->font();
+ TQFont f = m_listLabel->font();
f.setBold( true );
m_listLabel->setFont( f );
- m_listStack = new QWidgetStack( this );
+ m_listStack = new TQWidgetStack( this );
// Create Outstanding Bugs listview
m_listBugs = new KListView( m_listStack );
@@ -75,39 +75,39 @@ CWBugListContainer::CWBugListContainer( QWidget *parent , const char * name )
m_listBugs->setColumnAlignment( 0, AlignRight );
m_listBugs->setSorting( 0, false );
m_listBugs->setShowSortIndicator( true );
- m_listBugs->setSelectionMode( QListView::Extended ); // needed for merging bugs
+ m_listBugs->setSelectionMode( TQListView::Extended ); // needed for merging bugs
m_listBugs->restoreLayout( KBBPrefs::instance()->config(), "BugListLayout" );
- connect( m_listBugs, SIGNAL( executed( QListViewItem * ) ),
- SLOT( execute( QListViewItem * ) ) );
- connect( m_listBugs, SIGNAL( returnPressed( QListViewItem * ) ),
- SLOT( execute( QListViewItem * ) ) );
- connect( m_listBugs, SIGNAL( currentChanged( QListViewItem * ) ),
- SLOT( changeCurrent( QListViewItem * ) ) );
+ connect( m_listBugs, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ TQT_SLOT( execute( TQListViewItem * ) ) );
+ connect( m_listBugs, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
+ TQT_SLOT( execute( TQListViewItem * ) ) );
+ connect( m_listBugs, TQT_SIGNAL( currentChanged( TQListViewItem * ) ),
+ TQT_SLOT( changeCurrent( TQListViewItem * ) ) );
// Fill WidgetStack in Outstanding Bugs pane
m_listLoading = new CWLoadingWidget( CWLoadingWidget::TopFrame,
m_listStack );
- connect( m_listLoading, SIGNAL( clicked() ), SIGNAL( searchPackage() ) );
+ connect( m_listLoading, TQT_SIGNAL( clicked() ), TQT_SIGNAL( searchPackage() ) );
m_listStack->addWidget( m_listBugs, 0 );
m_listStack->addWidget( m_listLoading, 1 );
setNoList();
- connect( BugSystem::self(), SIGNAL( bugListLoading( const Package &, const QString & ) ),
- SLOT( setLoading( const Package &, const QString & ) ) );
- connect( BugSystem::self(), SIGNAL( bugListLoading( const QString & ) ),
- SLOT( setLoading( const QString & ) ) );
- connect( BugSystem::self(), SIGNAL( bugListCacheMiss( const Package & ) ),
- SLOT( setCacheMiss( const Package & ) ) );
- connect( BugSystem::self(), SIGNAL( bugListCacheMiss( const QString & ) ),
- SLOT( setCacheMiss( const QString & ) ) );
- connect( BugSystem::self(), SIGNAL( commandQueued( BugCommand * ) ),
- SLOT( markBugCommand( BugCommand * ) ) );
- connect( BugSystem::self(), SIGNAL( commandCanceled( const QString & ) ),
- SLOT( clearCommand( const QString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( bugListLoading( const Package &, const TQString & ) ),
+ TQT_SLOT( setLoading( const Package &, const TQString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( bugListLoading( const TQString & ) ),
+ TQT_SLOT( setLoading( const TQString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( bugListCacheMiss( const Package & ) ),
+ TQT_SLOT( setCacheMiss( const Package & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( bugListCacheMiss( const TQString & ) ),
+ TQT_SLOT( setCacheMiss( const TQString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( commandQueued( BugCommand * ) ),
+ TQT_SLOT( markBugCommand( BugCommand * ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( commandCanceled( const TQString & ) ),
+ TQT_SLOT( clearCommand( const TQString & ) ) );
}
CWBugListContainer::~CWBugListContainer()
@@ -117,7 +117,7 @@ CWBugListContainer::~CWBugListContainer()
delete m_find;
}
-void CWBugListContainer::setBugList( const QString &label, const Bug::List &bugs )
+void CWBugListContainer::setBugList( const TQString &label, const Bug::List &bugs )
{
// List pane is invisible by default, make visible
show();
@@ -147,9 +147,9 @@ void CWBugListContainer::setBugList( const QString &label, const Bug::List &bugs
m_listStack->raiseWidget( 0 );
}
-void CWBugListContainer::setBugList( const Package &package, const QString &component, const Bug::List &bugs )
+void CWBugListContainer::setBugList( const Package &package, const TQString &component, const Bug::List &bugs )
{
- QString listLabel;
+ TQString listLabel;
if ( component.isEmpty() )
{
if ( package.components().count() > 1 )
@@ -165,7 +165,7 @@ void CWBugListContainer::setBugList( const Package &package, const QString &comp
setBugList( listLabel, bugs );
}
-void CWBugListContainer::execute( QListViewItem *lvi )
+void CWBugListContainer::execute( TQListViewItem *lvi )
{
BugLVI *item = dynamic_cast<BugLVI *>( lvi );
if( !item )
@@ -179,7 +179,7 @@ void CWBugListContainer::execute( QListViewItem *lvi )
emit executed( item->bug() );
}
-void CWBugListContainer::changeCurrent( QListViewItem *lvi )
+void CWBugListContainer::changeCurrent( TQListViewItem *lvi )
{
if( !lvi ) {
emit currentChanged( Bug() );
@@ -205,7 +205,7 @@ void CWBugListContainer::setNoList()
m_listStack->raiseWidget( 1 );
}
-void CWBugListContainer::setLoading( const Package &package, const QString &component )
+void CWBugListContainer::setLoading( const Package &package, const TQString &component )
{
if ( component.isEmpty() )
setLoading( i18n( "Retrieving List of Outstanding Bugs for Product '%1'..." ).arg( package.name() ) );
@@ -213,7 +213,7 @@ void CWBugListContainer::setLoading( const Package &package, const QString &comp
setLoading( i18n( "Retrieving List of Outstanding Bugs for Product '%1' (Component %2)..." ).arg( package.name(), component ) );
}
-void CWBugListContainer::setLoading( const QString &label )
+void CWBugListContainer::setLoading( const TQString &label )
{
m_listLoading->setText( label );
m_listStack->raiseWidget( 1 );
@@ -224,7 +224,7 @@ void CWBugListContainer::setCacheMiss( const Package &package )
setCacheMiss( i18n( "Package '%1'" ).arg( package.name() ) );
}
-void CWBugListContainer::setCacheMiss( const QString &label )
+void CWBugListContainer::setCacheMiss( const TQString &label )
{
m_listLoading->setText( i18n( "%1 is not available offline." ).arg( label ) );
m_listStack->raiseWidget( 1 );
@@ -243,7 +243,7 @@ void CWBugListContainer::markBugCommand( BugCommand *cmd )
m_listBugs->triggerUpdate();
}
-void CWBugListContainer::clearCommand( const QString &bug )
+void CWBugListContainer::clearCommand( const TQString &bug )
{
BugLVI *item = (BugLVI *)m_listBugs->firstChild();
while( item ) {
@@ -256,14 +256,14 @@ void CWBugListContainer::clearCommand( const QString &bug )
m_listBugs->triggerUpdate();
}
-void CWBugListContainer::searchBugByTitle( int options, const QString& pattern )
+void CWBugListContainer::searchBugByTitle( int options, const TQString& pattern )
{
m_find = new KFind( pattern, options, this );
// Connect signals to code which handles highlighting
// of found text.
- connect(m_find, SIGNAL( highlight( const QString &, int, int ) ),
- this, SLOT( searchHighlight( 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( searchHighlight( const TQString &, int, int ) ) );
+ connect(m_find, TQT_SIGNAL( findNext() ), this, TQT_SLOT( slotFindNext() ) );
m_findItem = (BugLVI *)m_listBugs->firstChild();
if ( options & KFindDialog::FromCursor && m_listBugs->currentItem() )
@@ -302,7 +302,7 @@ void CWBugListContainer::slotFindNext()
}
}
-void CWBugListContainer::searchHighlight( const QString &, int, int )
+void CWBugListContainer::searchHighlight( const TQString &, int, int )
{
if ( m_findItem ) {
m_listBugs->clearSelection();
@@ -311,9 +311,9 @@ void CWBugListContainer::searchHighlight( const QString &, int, int )
}
}
-QStringList CWBugListContainer::selectedBugs() const
+TQStringList CWBugListContainer::selectedBugs() const
{
- QStringList lst;
+ TQStringList lst;
BugLVI *item = (BugLVI *)m_listBugs->firstChild();
while( item ) {
if ( item->isSelected() )
diff --git a/kbugbuster/gui/cwbuglistcontainer.h b/kbugbuster/gui/cwbuglistcontainer.h
index bcda4c15..9dd1d9bd 100644
--- a/kbugbuster/gui/cwbuglistcontainer.h
+++ b/kbugbuster/gui/cwbuglistcontainer.h
@@ -20,7 +20,7 @@
#include "package.h"
#include "bug.h"
-#include <qwidget.h>
+#include <tqwidget.h>
class KListView;
class KFind;
@@ -40,28 +40,28 @@ class CWBugListContainer : public QWidget
Q_OBJECT
public:
- CWBugListContainer( QWidget* parent = 0, const char* name = 0 );
+ CWBugListContainer( TQWidget* parent = 0, const char* name = 0 );
~CWBugListContainer();
- void setBugList( const Package &package, const QString &component, const Bug::List &bugs );
+ void setBugList( const Package &package, const TQString &component, const Bug::List &bugs );
/**
- * Overloaded method that takes a QString for the label. To be used when the
+ * Overloaded method that takes a TQString for the label. To be used when the
* bug list doesn't belong to a package, liek search results
*/
- void setBugList( const QString &label, const Bug::List &bugs );
+ void setBugList( const TQString &label, const Bug::List &bugs );
- void searchBugByTitle( int options, const QString& pattern );
+ void searchBugByTitle( int options, const TQString& pattern );
/** Return list of selected bugs in the listview. Used for merging. */
- QStringList selectedBugs() const;
+ TQStringList selectedBugs() const;
public slots:
void setNoList();
- void setLoading( const Package &package, const QString &component );
- void setLoading( const QString &label );
+ void setLoading( const Package &package, const TQString &component );
+ void setLoading( const TQString &label );
void setCacheMiss( const Package &package );
- void setCacheMiss( const QString &label );
+ void setCacheMiss( const TQString &label );
void slotFindNext();
signals:
@@ -72,17 +72,17 @@ signals:
void currentChanged( const Bug & );
private slots:
- void execute( QListViewItem * );
- void changeCurrent( QListViewItem * );
+ void execute( TQListViewItem * );
+ void changeCurrent( TQListViewItem * );
void markBugCommand( BugCommand * );
- void clearCommand( const QString & );
+ void clearCommand( const TQString & );
- void searchHighlight( const QString &, int, int );
+ void searchHighlight( const TQString &, int, int );
private:
- QLabel *m_listLabel;
- QWidgetStack *m_listStack;
+ TQLabel *m_listLabel;
+ TQWidgetStack *m_listStack;
KListView *m_listBugs;
KFind *m_find;
diff --git a/kbugbuster/gui/cwloadingwidget.cpp b/kbugbuster/gui/cwloadingwidget.cpp
index ddd218a5..0c51241d 100644
--- a/kbugbuster/gui/cwloadingwidget.cpp
+++ b/kbugbuster/gui/cwloadingwidget.cpp
@@ -16,8 +16,8 @@
#include "cwloadingwidget.h"
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kpixmap.h>
#include <kpixmapeffect.h>
@@ -27,16 +27,16 @@
using namespace KBugBusterMainWindow;
-CWLoadingWidget::CWLoadingWidget( WidgetMode mode, QWidget *parent,
+CWLoadingWidget::CWLoadingWidget( WidgetMode mode, TQWidget *parent,
const char * name )
-: QFrame( parent, name )
+: TQFrame( parent, name )
{
init( mode );
}
-CWLoadingWidget::CWLoadingWidget( const QString &text, WidgetMode mode,
- QWidget *parent, const char * name )
-: QFrame( parent, name )
+CWLoadingWidget::CWLoadingWidget( const TQString &text, WidgetMode mode,
+ TQWidget *parent, const char * name )
+: TQFrame( parent, name )
{
init( mode );
setText( text );
@@ -46,13 +46,13 @@ void CWLoadingWidget::init( WidgetMode mode )
{
m_mode = mode;
- QPalette pal = palette();
- pal.setColor( QPalette::Active, QColorGroup::Background,
- QColor( 49, 121, 173 ) );
- pal.setColor( QPalette::Inactive, QColorGroup::Background,
- QColor( 49, 121, 173 ) );
- pal.setColor( QPalette::Disabled, QColorGroup::Background,
- QColor( 49, 121, 173 ) );
+ TQPalette pal = palette();
+ pal.setColor( TQPalette::Active, TQColorGroup::Background,
+ TQColor( 49, 121, 173 ) );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Background,
+ TQColor( 49, 121, 173 ) );
+ pal.setColor( TQPalette::Disabled, TQColorGroup::Background,
+ TQColor( 49, 121, 173 ) );
setPalette( pal );
setFrameShape( StyledPanel );
@@ -65,25 +65,25 @@ void CWLoadingWidget::init( WidgetMode mode )
if( m_mode == TopFrame )
{
m_logoPixmap =
- new QPixmap( locate( "data", "kbugbuster/pics/logo.png" ) );
+ new TQPixmap( locate( "data", "kbugbuster/pics/logo.png" ) );
m_topRightPixmap =
- new QPixmap( locate( "data", "kbugbuster/pics/top-right.png" ) );
+ new TQPixmap( locate( "data", "kbugbuster/pics/top-right.png" ) );
m_barsPixmap =
- new QPixmap( locate( "data", "kbugbuster/pics/bars.png" ) );
+ new TQPixmap( locate( "data", "kbugbuster/pics/bars.png" ) );
m_toolsPixmap = 0L;
m_toolsPixmapEffect = 0L;
}
else
{
m_toolsPixmap =
- new QPixmap( locate( "data", "kbugbuster/pics/tools.png" ) );
+ new TQPixmap( locate( "data", "kbugbuster/pics/tools.png" ) );
m_toolsPixmapEffect = new KPixmap( m_toolsPixmap->size() );
- QPainter pb;
+ TQPainter pb;
pb.begin( m_toolsPixmapEffect );
pb.fillRect( 0, 0, m_toolsPixmap->width(), m_toolsPixmap->height(),
- QBrush( QColor( 49, 121, 172 ) ) );
+ TQBrush( TQColor( 49, 121, 172 ) ) );
pb.drawPixmap( 0, 0, *m_toolsPixmap );
pb.end();
@@ -98,12 +98,12 @@ void CWLoadingWidget::init( WidgetMode mode )
m_buffer = new QPixmap;
}
-void CWLoadingWidget::resizeEvent( QResizeEvent * )
+void CWLoadingWidget::resizeEvent( TQResizeEvent * )
{
updatePixmap();
}
-void CWLoadingWidget::setText( const QString &text )
+void CWLoadingWidget::setText( const TQString &text )
{
m_text = text;
updatePixmap();
@@ -112,21 +112,21 @@ void CWLoadingWidget::setText( const QString &text )
void CWLoadingWidget::updatePixmap()
{
- QRect cr = contentsRect();
+ TQRect cr = contentsRect();
cr.setWidth( cr.width() + 2 );
cr.setHeight( cr.height() + 2 );
m_buffer->resize( cr.width(), cr.height() );
- QPainter p( m_buffer );
+ TQPainter p( m_buffer );
// fill background
p.fillRect( 0, 0, cr.width(), cr.height(),
- QBrush( QColor( 49, 121, 173 ) ) );
+ TQBrush( TQColor( 49, 121, 173 ) ) );
if( m_mode == TopFrame )
{
- QFont bigFont = QFont( KGlobalSettings::generalFont().family(),
- 28, QFont::Bold, true );
+ TQFont bigFont = TQFont( KGlobalSettings::generalFont().family(),
+ 28, TQFont::Bold, true );
int xoffset = m_logoPixmap->width();
@@ -146,7 +146,7 @@ void CWLoadingWidget::updatePixmap()
AlignAuto | AlignVCenter, m_text );
// Draw intro text
- QString desc = i18n( "Welcome to KBugBuster, a tool to manage the "
+ TQString desc = i18n( "Welcome to KBugBuster, a tool to manage the "
"KDE Bug Report System. With KBugBuster you can "
"manage outstanding bug reports for KDE from a "
"convenient front end." );
@@ -155,9 +155,9 @@ void CWLoadingWidget::updatePixmap()
AlignAuto | AlignVCenter | WordBreak, desc );
// Draw the caption text
- QString caption = i18n( "KBugBuster" );
+ TQString caption = i18n( "KBugBuster" );
p.setFont( bigFont );
- p.setPen( QColor(139, 183, 222) );
+ p.setPen( TQColor(139, 183, 222) );
p.drawText( 220, 60, caption );
p.setPen( black );
p.drawText( 217, 57, caption );
@@ -189,11 +189,11 @@ void CWLoadingWidget::updatePixmap()
if( boxW > 500 )
boxW = 500;
- QRect br = fontMetrics().boundingRect( boxX, boxY,
+ TQRect br = fontMetrics().boundingRect( boxX, boxY,
boxW, cr.height() - boxY - 10 - 2 * fheight,
AlignAuto | AlignTop | WordBreak, m_text );
- QRect box = br;
+ TQRect box = br;
box.setHeight( box.height() + 2 * fheight );
box.setWidth( box.width() + 2 * 10 );
if( box.width() < cr.width() - 2 * boxX )
@@ -202,7 +202,7 @@ void CWLoadingWidget::updatePixmap()
box.setHeight( QMIN( cr.height() - boxY - 2 * fheight - 10, 100 ) );
p.setClipRect( box );
- p.fillRect( box, QBrush( QColor( 204, 222, 234 ) ) );
+ p.fillRect( box, TQBrush( TQColor( 204, 222, 234 ) ) );
p.drawPixmap( toolsEffectX, toolsEffectY, *m_toolsPixmapEffect );
p.setViewport( box );
@@ -237,17 +237,17 @@ CWLoadingWidget::~CWLoadingWidget()
m_buffer = 0L;
}
-void CWLoadingWidget::mouseReleaseEvent( QMouseEvent * )
+void CWLoadingWidget::mouseReleaseEvent( TQMouseEvent * )
{
emit clicked();
}
-void CWLoadingWidget::drawContents( QPainter *p )
+void CWLoadingWidget::drawContents( TQPainter *p )
{
if( !m_buffer || m_buffer->isNull() )
- p->fillRect( contentsRect(), QBrush( QColor( 255, 121, 172 ) ) );
+ p->fillRect( contentsRect(), TQBrush( TQColor( 255, 121, 172 ) ) );
else
- p->drawPixmap( QPoint( contentsRect().x(), contentsRect().y()),
+ p->drawPixmap( TQPoint( contentsRect().x(), contentsRect().y()),
*m_buffer, contentsRect() );
}
diff --git a/kbugbuster/gui/cwloadingwidget.h b/kbugbuster/gui/cwloadingwidget.h
index 17c91f05..9aa3b0b5 100644
--- a/kbugbuster/gui/cwloadingwidget.h
+++ b/kbugbuster/gui/cwloadingwidget.h
@@ -18,8 +18,8 @@
#ifndef KBBMAINWINDOW_CWLOADINGWIDGET_H
#define KBBMAINWINDOW_CWLOADINGWIDGET_H
-#include <qlabel.h>
-#include <qframe.h>
+#include <tqlabel.h>
+#include <tqframe.h>
class QPixmap;
class KPixmap;
@@ -42,19 +42,19 @@ public:
*/
enum WidgetMode { TopFrame = 0, BottomFrame };
- CWLoadingWidget( WidgetMode mode = TopFrame, QWidget* parent = 0,
+ CWLoadingWidget( WidgetMode mode = TopFrame, TQWidget* parent = 0,
const char* name = 0 );
- CWLoadingWidget( const QString &text, WidgetMode mode = TopFrame,
- QWidget* parent = 0, const char* name = 0 );
+ CWLoadingWidget( const TQString &text, WidgetMode mode = TopFrame,
+ TQWidget* parent = 0, const char* name = 0 );
~CWLoadingWidget();
- QString text() const { return m_text; }
- void setText( const QString &text );
+ TQString text() const { return m_text; }
+ void setText( const TQString &text );
protected:
- virtual void mouseReleaseEvent( QMouseEvent * );
- virtual void drawContents( QPainter *p );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void mouseReleaseEvent( TQMouseEvent * );
+ virtual void drawContents( TQPainter *p );
+ virtual void resizeEvent( TQResizeEvent * );
signals:
void clicked();
@@ -63,19 +63,19 @@ private:
void init( WidgetMode mode );
void updatePixmap();
- QString m_text;
+ TQString m_text;
WidgetMode m_mode;
// Pixmaps used
- QPixmap *m_toolsPixmap;
- QPixmap *m_logoPixmap;
- QPixmap *m_topRightPixmap;
- QPixmap *m_barsPixmap;
+ TQPixmap *m_toolsPixmap;
+ TQPixmap *m_logoPixmap;
+ TQPixmap *m_topRightPixmap;
+ TQPixmap *m_barsPixmap;
// For performance reasons we apply the KPixmapEffect only once
KPixmap *m_toolsPixmapEffect;
- QPixmap *m_buffer;
+ TQPixmap *m_buffer;
};
diff --git a/kbugbuster/gui/cwsearchwidget.cpp b/kbugbuster/gui/cwsearchwidget.cpp
index 8f7fcb26..5a075bb8 100644
--- a/kbugbuster/gui/cwsearchwidget.cpp
+++ b/kbugbuster/gui/cwsearchwidget.cpp
@@ -14,34 +14,34 @@
*************************************************************************
*/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kdialog.h>
-#include <qlineedit.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "cwsearchwidget.h"
using namespace KBugBusterMainWindow;
-CWSearchWidget::CWSearchWidget( QWidget *parent , const char * name )
+CWSearchWidget::CWSearchWidget( TQWidget *parent , const char * name )
: CWSearchWidget_Base( parent, name )
{
// Set fonts and margins
CWSearchWidget_BaseLayout->setSpacing( KDialog::spacingHint() );
CWSearchWidget_BaseLayout->setMargin( KDialog::marginHint() );
- QFont f = m_searchLabel->font();
+ TQFont f = m_searchLabel->font();
f.setBold( true );
m_searchLabel->setFont( f );
- connect( m_searchDesc, SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( textDescriptionChanged ( const QString & ) ) );
+ connect( m_searchDesc, TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( textDescriptionChanged ( const TQString & ) ) );
- connect( m_searchBugNumber, SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( textNumberChanged ( const QString & ) ) );
+ connect( m_searchBugNumber, TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( textNumberChanged ( const TQString & ) ) );
m_searchDescBtn->setEnabled( !m_searchDesc->text().isEmpty() );
m_searchBugNumberBtn->setEnabled( !m_searchBugNumber->text().isEmpty() );
@@ -53,12 +53,12 @@ CWSearchWidget::~CWSearchWidget()
{
}
-void CWSearchWidget::textDescriptionChanged ( const QString &_text )
+void CWSearchWidget::textDescriptionChanged ( const TQString &_text )
{
m_searchDescBtn->setEnabled( !_text.isEmpty() );
}
-void CWSearchWidget::textNumberChanged ( const QString &_text )
+void CWSearchWidget::textNumberChanged ( const TQString &_text )
{
m_searchBugNumberBtn->setEnabled( !_text.isEmpty() );
}
diff --git a/kbugbuster/gui/cwsearchwidget.h b/kbugbuster/gui/cwsearchwidget.h
index 4cf65720..108a1872 100644
--- a/kbugbuster/gui/cwsearchwidget.h
+++ b/kbugbuster/gui/cwsearchwidget.h
@@ -30,12 +30,12 @@ class CWSearchWidget : public CWSearchWidget_Base
Q_OBJECT
public:
- CWSearchWidget( QWidget* parent = 0, const char* name = 0 );
+ CWSearchWidget( TQWidget* parent = 0, const char* name = 0 );
~CWSearchWidget();
public slots:
- void textNumberChanged ( const QString & );
- void textDescriptionChanged ( const QString & );
+ void textNumberChanged ( const TQString & );
+ void textDescriptionChanged ( const TQString & );
};
} // namespace
diff --git a/kbugbuster/gui/kbbbookmarkmanager.h b/kbugbuster/gui/kbbbookmarkmanager.h
index 64edfc24..af58a461 100644
--- a/kbugbuster/gui/kbbbookmarkmanager.h
+++ b/kbugbuster/gui/kbbbookmarkmanager.h
@@ -10,7 +10,7 @@ public:
static KBookmarkManager * self() {
if ( !s_bookmarkManager )
{
- QString bookmarksFile = locateLocal("data", QString::fromLatin1("kbugbuster/bookmarks.xml"));
+ TQString bookmarksFile = locateLocal("data", TQString::fromLatin1("kbugbuster/bookmarks.xml"));
s_bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile );
}
return s_bookmarkManager;
diff --git a/kbugbuster/gui/kbbmainwindow.cpp b/kbugbuster/gui/kbbmainwindow.cpp
index 66a9b588..24730fda 100644
--- a/kbugbuster/gui/kbbmainwindow.cpp
+++ b/kbugbuster/gui/kbbmainwindow.cpp
@@ -16,13 +16,13 @@
#include "kbbmainwindow.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
-#include <qprogressbar.h>
-#include <qpushbutton.h>
-#include <qtextview.h>
-#include <qwidgetstack.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
+#include <tqtextview.h>
+#include <tqwidgetstack.h>
#include <kaction.h>
#include <kbookmarkmenu.h>
@@ -61,15 +61,15 @@ using namespace KBugBusterMainWindow;
class TextViewer : public KDialogBase
{
public:
- TextViewer( const QString &title, QWidget *parent = 0 )
+ TextViewer( const TQString &title, TQWidget *parent = 0 )
: KDialogBase( Plain, title, Ok, Ok, parent, 0,
false )
{
- QFrame *topFrame = plainPage();
+ TQFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout( topFrame );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topFrame );
- mTextView = new QTextEdit( topFrame );
+ mTextView = new TQTextEdit( topFrame );
mTextView->setReadOnly( true );
mTextView->setTextFormat( PlainText );
topLayout->addWidget( mTextView );
@@ -77,27 +77,27 @@ class TextViewer : public KDialogBase
resize( 600, 400 );
}
- void setText( const QString &text )
+ void setText( const TQString &text )
{
mTextView->setText( text );
}
private:
- QTextEdit *mTextView;
+ TQTextEdit *mTextView;
};
KBookmarkManager* KBBBookmarkManager::s_bookmarkManager;
-KBBMainWindow::KBBMainWindow( const QCString &initialPackage,
- const QCString &initialComponent,
- const QCString &initialBug,
- QWidget * , const char * name )
+KBBMainWindow::KBBMainWindow( const TQCString &initialPackage,
+ const TQCString &initialComponent,
+ const TQCString &initialBug,
+ TQWidget * , const char * name )
: KMainWindow( 0, name ), mPreferencesDialog( 0 ), mResponseViewer( 0 ),
mBugSourceViewer( 0 ), mPackageSelectDialog( 0 )
{
BugSystem::self()->setCurrentServer( KBBPrefs::instance()->mCurrentServer );
- m_statusLabel = new QLabel( i18n( "Welcome to <b>KBugBuster</b>." ), statusBar() );
+ m_statusLabel = new TQLabel( i18n( "Welcome to <b>KBugBuster</b>." ), statusBar() );
m_statusLabel->setMaximumHeight( statusBar()->fontMetrics().height() + 6 );
m_statusLabel->setIndent( KDialog::marginHint() / 2 );
statusBar()->addWidget( m_statusLabel, 1 );
@@ -108,25 +108,25 @@ KBBMainWindow::KBBMainWindow( const QCString &initialPackage,
initActions();
- m_progressBar = new QProgressBar( 100, statusBar() );
+ m_progressBar = new TQProgressBar( 100, statusBar() );
m_progressBar->setCenterIndicator( true );
m_progressBar->setMinimumWidth( 150 );
m_progressBar->setMaximumHeight( statusBar()->fontMetrics().height() + 6 );
statusBar()->addWidget( m_progressBar );
- connect( m_mainWidget, SIGNAL( resetProgressBar() ),
- m_progressBar, SLOT( reset() ) );
- connect( m_mainWidget, SIGNAL( searchPackage() ),
- this, SLOT( searchPackage() ) );
- connect( m_mainWidget, SIGNAL( searchBugNumber() ),
- this, SLOT( searchBugNumber() ) );
+ connect( m_mainWidget, TQT_SIGNAL( resetProgressBar() ),
+ m_progressBar, TQT_SLOT( reset() ) );
+ connect( m_mainWidget, TQT_SIGNAL( searchPackage() ),
+ this, TQT_SLOT( searchPackage() ) );
+ connect( m_mainWidget, TQT_SIGNAL( searchBugNumber() ),
+ this, TQT_SLOT( searchBugNumber() ) );
- connect( BugSystem::self(), SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotStatusMsg( const QString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotStatusMsg( const TQString & ) ) );
- connect( BugSystem::self(), SIGNAL( infoMessage( const QString & ) ),
- SLOT( slotStatusMsg( const QString & ) ) );
- connect( BugSystem::self(), SIGNAL( infoPercent( unsigned long ) ),
- SLOT( slotSetPercent( unsigned long ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoMessage( const TQString & ) ),
+ TQT_SLOT( slotStatusMsg( const TQString & ) ) );
+ connect( BugSystem::self(), TQT_SIGNAL( infoPercent( unsigned long ) ),
+ TQT_SLOT( slotSetPercent( unsigned long ) ) );
m_mainWidget->readConfig();
}
@@ -145,60 +145,60 @@ void KBBMainWindow::initActions()
{
// Prepare and create XML GUI
fileQuit = KStdAction::quit( this,
- SLOT( close() ), actionCollection() );
+ TQT_SLOT( close() ), actionCollection() );
fileQuit->setToolTip( i18n( "Quit KBugBuster" ) );
- new KAction( i18n("See &Pending Changes"), "contents", 0, this, SLOT( slotListChanges() ),
+ new KAction( i18n("See &Pending Changes"), "contents", 0, this, TQT_SLOT( slotListChanges() ),
actionCollection(), "file_seechanges" );
- new KAction( i18n("&Submit Changes"), "mail_send", 0, this, SLOT( slotSubmit() ),
+ new KAction( i18n("&Submit Changes"), "mail_send", 0, this, TQT_SLOT( slotSubmit() ),
actionCollection(), "file_submit" );
- reloadpacklist = new KAction( i18n("Reload &Product List"), "reload", CTRL+Qt::Key_F5, m_mainWidget, SLOT( slotReloadPackageList() ),
+ reloadpacklist = new KAction( i18n("Reload &Product List"), "reload", CTRL+Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadPackageList() ),
actionCollection(), "reload_packagelist" );
- reloadpack= new KAction( i18n("Reload Bug &List (for current product)"), "reload", Qt::Key_F5, m_mainWidget, SLOT( slotReloadPackage() ),
+ reloadpack= new KAction( i18n("Reload Bug &List (for current product)"), "reload", Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadPackage() ),
actionCollection(), "reload_package" );
- reloadbug = new KAction( i18n("Reload Bug &Details (for current bug)"), "reload", SHIFT+Qt::Key_F5, m_mainWidget, SLOT( slotReloadBug() ),
+ reloadbug = new KAction( i18n("Reload Bug &Details (for current bug)"), "reload", SHIFT+Qt::Key_F5, m_mainWidget, TQT_SLOT( slotReloadBug() ),
actionCollection(), "reload_bug" );
- loadMyBugs = new KAction( i18n( "Load &My Bugs List" ), 0, m_mainWidget, SLOT( slotLoadMyBugs() ),
+ loadMyBugs = new KAction( i18n( "Load &My Bugs List" ), 0, m_mainWidget, TQT_SLOT( slotLoadMyBugs() ),
actionCollection(), "load_my_bugs" );
- reloadall = new KAction( i18n("Load All Bug Details (for current product)"), Qt::Key_F6, m_mainWidget, SLOT( slotRetrieveAllBugDetails() ), actionCollection(), "load_allbugs" );
- new KAction( i18n("Extract &Attachments"), "filesave", Qt::Key_F4, m_mainWidget, SLOT( slotExtractAttachments() ),
+ reloadall = new KAction( i18n("Load All Bug Details (for current product)"), Qt::Key_F6, m_mainWidget, TQT_SLOT( slotRetrieveAllBugDetails() ), actionCollection(), "load_allbugs" );
+ new KAction( i18n("Extract &Attachments"), "filesave", Qt::Key_F4, m_mainWidget, TQT_SLOT( slotExtractAttachments() ),
actionCollection(), "extract_attachments" );
- new KAction( i18n("Clear Cache"), 0, this, SLOT( clearCache() ),
+ new KAction( i18n("Clear Cache"), 0, this, TQT_SLOT( clearCache() ),
actionCollection(), "clear_cache" );
new KAction( i18n("&Search by Product..."), "goto", CTRL+Qt::Key_P, this,
- SLOT( searchPackage() ), actionCollection(), "search_package" );
+ TQT_SLOT( searchPackage() ), actionCollection(), "search_package" );
new KAction( i18n("Search by Bug &Number..."), "filefind", CTRL+Qt::Key_N, this,
- SLOT( searchBugNumber() ), actionCollection(), "search_bugnumber" );
+ TQT_SLOT( searchBugNumber() ), actionCollection(), "search_bugnumber" );
// For now "Description" searches by title. Maybe later we can have a
// full-text search interfacing bugs.kde.org and rename the current one to "By Title".
new KAction( i18n("Search by &Description...") ,"find", CTRL+Qt::Key_D, this,
- SLOT( searchDescription() ), actionCollection(), "search_description" );
+ TQT_SLOT( searchDescription() ), actionCollection(), "search_description" );
// new KAction( i18n("&Merge"), "view_remove", CTRL+Qt::Key_M, m_mainWidget,
-// SLOT( mergeBugs() ), actionCollection(), "cmd_merge" );
+// TQT_SLOT( mergeBugs() ), actionCollection(), "cmd_merge" );
// new KAction( i18n("&Unmerge"), "view_top_bottom", CTRL+SHIFT+Qt::Key_M, m_mainWidget,
-// SLOT( unmergeBugs() ), actionCollection(), "cmd_unmerge" );
+// TQT_SLOT( unmergeBugs() ), actionCollection(), "cmd_unmerge" );
new KAction( i18n("C&lose..."), "edittrash", CTRL+Qt::Key_L, m_mainWidget,
- SLOT( closeBug() ), actionCollection(), "cmd_close" );
+ TQT_SLOT( closeBug() ), actionCollection(), "cmd_close" );
// new KAction( i18n("Clos&e Silently"), "edittrash", CTRL+Qt::Key_E, m_mainWidget,
-// SLOT( closeBugSilently() ), actionCollection(), "cmd_close_silently" );
+// TQT_SLOT( closeBugSilently() ), actionCollection(), "cmd_close_silently" );
new KAction( i18n("Re&open"), "idea", CTRL+Qt::Key_O, m_mainWidget,
- SLOT( reopenBug() ), actionCollection(), "cmd_reopen" );
+ TQT_SLOT( reopenBug() ), actionCollection(), "cmd_reopen" );
// new KAction( i18n("Re&assign..."), "folder_new", CTRL+Qt::Key_A, m_mainWidget,
-// SLOT( reassignBug() ), actionCollection(), "cmd_reassign" );
+// TQT_SLOT( reassignBug() ), actionCollection(), "cmd_reassign" );
// new KAction( i18n("Change &Title..."), "text_under", CTRL+Qt::Key_T, m_mainWidget,
-// SLOT( titleBug() ), actionCollection(), "cmd_title" );
+// TQT_SLOT( titleBug() ), actionCollection(), "cmd_title" );
// new KAction( i18n("Change &Severity..."), "edit", CTRL+Qt::Key_S, m_mainWidget,
-// SLOT( severityBug() ), actionCollection(), "cmd_severity" );
+// TQT_SLOT( severityBug() ), actionCollection(), "cmd_severity" );
new KAction( i18n("&Reply..."), "mail_replyall",CTRL+Qt::Key_R , m_mainWidget,
- SLOT( replyBug() ), actionCollection(), "cmd_reply" );
+ TQT_SLOT( replyBug() ), actionCollection(), "cmd_reply" );
new KAction( i18n("Reply &Privately..."), "mail_reply", CTRL+Qt::Key_I, m_mainWidget,
- SLOT( replyPrivateBug() ), actionCollection(), "cmd_replyprivate" );
+ TQT_SLOT( replyPrivateBug() ), actionCollection(), "cmd_replyprivate" );
- KStdAction::showMenubar(this, SLOT( slotToggleMenubar() ), actionCollection() );
+ KStdAction::showMenubar(this, TQT_SLOT( slotToggleMenubar() ), actionCollection() );
#if KDE_IS_VERSION( 3, 1, 90 )
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
@@ -206,7 +206,7 @@ void KBBMainWindow::initActions()
m_disconnectedAction = new KToggleAction( i18n("&Disconnected Mode"), 0,
this,
- SLOT( slotDisconnectedAction() ),
+ TQT_SLOT( slotDisconnectedAction() ),
actionCollection(),
"settings_disconnected" );
m_disconnectedAction->setChecked( BugSystem::self()->disconnected() );
@@ -215,16 +215,16 @@ void KBBMainWindow::initActions()
m_pamBookmarks = new KActionMenu( i18n( "&Bookmarks" ), "bookmark", actionCollection(), "bookmarks" );
m_pBookmarkMenu = new KBookmarkMenu( KBBBookmarkManager::self(), this, m_pamBookmarks->popupMenu(), actionCollection(), true );
- KStdAction::preferences( this, SLOT(preferences()), actionCollection() );
+ KStdAction::preferences( this, TQT_SLOT(preferences()), actionCollection() );
- KToggleAction *toggleTmp = new KToggleAction( i18n("Show Closed Bugs"), "recycled", 0, this, SLOT( slotToggleDone() ),
+ KToggleAction *toggleTmp = new KToggleAction( i18n("Show Closed Bugs"), "recycled", 0, this, TQT_SLOT( slotToggleDone() ),
actionCollection(), "cmd_toggle_done" );
#if KDE_IS_VERSION( 3, 2, 90 )
toggleTmp->setCheckedState(i18n("Hide Closed Bugs"));
#endif
toggleTmp->setChecked( KBBPrefs::instance()->mShowClosedBugs );
- toggleTmp =new KToggleAction( i18n("Show Wishes"), "bookmark", 0, this, SLOT( slotToggleWishes() ),
+ toggleTmp =new KToggleAction( i18n("Show Wishes"), "bookmark", 0, this, TQT_SLOT( slotToggleWishes() ),
actionCollection(), "cmd_toggle_wishes" );
#if KDE_IS_VERSION( 3, 2, 90 )
toggleTmp->setCheckedState(i18n("Hide Wishes"));
@@ -233,7 +233,7 @@ void KBBMainWindow::initActions()
mSelectServerAction = new KSelectAction( i18n( "Select Server" ), 0, 0,
this,
- SLOT( slotSelectServer() ),
+ TQT_SLOT( slotSelectServer() ),
actionCollection(),
"select_server" );
@@ -241,10 +241,10 @@ void KBBMainWindow::initActions()
if ( KBBPrefs::instance()->mDebugMode ) {
new KAction( i18n("Show Last Server Response..."), 0 , this,
- SLOT( showLastResponse() ), actionCollection(),
+ TQT_SLOT( showLastResponse() ), actionCollection(),
"debug_lastresponse" );
new KAction( i18n("Show Bug HTML Source..."), 0 , this,
- SLOT( showBugSource() ), actionCollection(),
+ TQT_SLOT( showBugSource() ), actionCollection(),
"debug_showbugsource" );
}
@@ -268,12 +268,12 @@ void KBBMainWindow::slotToggleMenubar()
void KBBMainWindow::setupSelectServerAction()
{
- QStringList servers;
+ TQStringList servers;
int current = -1;
- QValueList<BugServer *> serverList = BugSystem::self()->serverList();
- QValueList<BugServer *>::ConstIterator it;
+ TQValueList<BugServer *> serverList = BugSystem::self()->serverList();
+ TQValueList<BugServer *>::ConstIterator it;
for ( it = serverList.begin(); it != serverList.end(); ++it ) {
- QString name = (*it)->serverConfig().name();
+ TQString name = (*it)->serverConfig().name();
servers.append( name );
if ( name == KBBPrefs::instance()->mCurrentServer ) {
current = servers.count() - 1;
@@ -285,9 +285,9 @@ void KBBMainWindow::setupSelectServerAction()
}
}
-QString KBBMainWindow::currentURL() const
+TQString KBBMainWindow::currentURL() const
{
- QString number=m_mainWidget->currentNumber();
+ TQString number=m_mainWidget->currentNumber();
if (number.isEmpty())
return "";
@@ -295,20 +295,20 @@ QString KBBMainWindow::currentURL() const
return "bug:"+number;
}
-QString KBBMainWindow::currentTitle() const
+TQString KBBMainWindow::currentTitle() const
{
return "#"+m_mainWidget->currentNumber()+": "+m_mainWidget->currentTitle();
}
-void KBBMainWindow::openBookmarkURL( const QString & url )
+void KBBMainWindow::openBookmarkURL( const TQString & url )
{
if ( url.left(4)=="bug:" ) {
- QString bugnumber = url.mid(4);
+ TQString bugnumber = url.mid(4);
m_mainWidget->slotRetrieveBugDetails( Bug::fromNumber( bugnumber ) );
}
}
-// --- SLOT IMPLEMENTATIONS -------------------------------------------------
+// --- TQT_SLOT IMPLEMENTATIONS -------------------------------------------------
void KBBMainWindow::slotDisconnectedAction()
{
@@ -324,7 +324,7 @@ void KBBMainWindow::slotDisconnectedAction()
loadMyBugs->setEnabled( enable );
}
-void KBBMainWindow::slotStatusMsg( const QString &text )
+void KBBMainWindow::slotStatusMsg( const TQString &text )
{
// Change status message permanently
m_statusLabel->setText( text );
@@ -337,12 +337,12 @@ void KBBMainWindow::slotSubmit()
void KBBMainWindow::slotListChanges()
{
- QStringList list = BugSystem::self()->server()->listCommands();
+ TQStringList list = BugSystem::self()->server()->listCommands();
if (list.count() > 0)
{
int ret = KMessageBox::questionYesNoList( this, i18n("List of pending commands:"),
- list, QString::null, KStdGuiItem::clear(), KStdGuiItem::close() );
+ list, TQString::null, KStdGuiItem::clear(), KStdGuiItem::close() );
if ( ret == KMessageBox::Yes )
{
// Ask for confirmation, it's too easy to click the wrong button in the above dlg box
@@ -371,7 +371,7 @@ void KBBMainWindow::searchPackage()
}
mPackageSelectDialog->setPackages( BugSystem::self()->packageList() );
BugServerConfig cfg = BugSystem::self()->server()->serverConfig();
- QStringList recent = cfg.recentPackages();
+ TQStringList recent = cfg.recentPackages();
kdDebug() << "MainWindow RECENT: " << recent.join(",") << endl;
mPackageSelectDialog->setRecentPackages( recent );
@@ -382,16 +382,16 @@ void KBBMainWindow::searchPackage()
return;
}
- QString component = mPackageSelectDialog->selectedComponent();
+ TQString component = mPackageSelectDialog->selectedComponent();
m_mainWidget->slotRetrieveBugList( package.name(), component );
}
void KBBMainWindow::searchBugNumber()
{
bool ok = false;
- QString result = KInputDialog::getText( i18n("Search for Bug Number"),
+ TQString result = KInputDialog::getText( i18n("Search for Bug Number"),
i18n("Please enter a bug number:"),
- QString::null, &ok, this );
+ TQString::null, &ok, this );
if ( ok ) {
//Strip whitespace and # if needed
result = result.stripWhiteSpace();
@@ -420,7 +420,7 @@ bool KBBMainWindow::queryClose()
if ( ! BugSystem::self()->server()->commandsPending() ) return true;
int result = KMessageBox::warningYesNoCancel(this,i18n("There are unsent bug commands."
- " Do you want to send them now?"), QString::null, i18n("Send"), i18n("Do Not Send"));
+ " Do you want to send them now?"), TQString::null, i18n("Send"), i18n("Do Not Send"));
if ( result == KMessageBox::Cancel ) return false;
if ( result == KMessageBox::Yes ) {
BugSystem::self()->sendCommands();
@@ -432,10 +432,10 @@ void KBBMainWindow::preferences()
{
if (!mPreferencesDialog) {
mPreferencesDialog = new PreferencesDialog(this);
- connect( mPreferencesDialog, SIGNAL( configChanged() ),
- SLOT( setupSelectServerAction() ) );
- connect( mPreferencesDialog, SIGNAL( configChanged() ),
- m_mainWidget, SLOT( slotReloadPackage() ) );
+ connect( mPreferencesDialog, TQT_SIGNAL( configChanged() ),
+ TQT_SLOT( setupSelectServerAction() ) );
+ connect( mPreferencesDialog, TQT_SIGNAL( configChanged() ),
+ m_mainWidget, TQT_SLOT( slotReloadPackage() ) );
}
mPreferencesDialog->show();
mPreferencesDialog->raise();
@@ -462,7 +462,7 @@ void KBBMainWindow::slotSelectServer()
{
m_mainWidget->writeConfig();
- QString currentServer = mSelectServerAction->currentText();
+ TQString currentServer = mSelectServerAction->currentText();
BugSystem::self()->setCurrentServer( currentServer );
diff --git a/kbugbuster/gui/kbbmainwindow.h b/kbugbuster/gui/kbbmainwindow.h
index f139c733..b16479cf 100644
--- a/kbugbuster/gui/kbbmainwindow.h
+++ b/kbugbuster/gui/kbbmainwindow.h
@@ -19,7 +19,7 @@
#include <kapplication.h>
#include <kbookmarkmanager.h>
#include <kmainwindow.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "package.h"
#include "bug.h"
@@ -52,22 +52,22 @@ class KBBMainWindow : public KMainWindow, virtual public KBookmarkOwner
/**
* construtor of KBugBusterApp, calls all init functions to create the application.
*/
- KBBMainWindow( const QCString &initialPackage = "",
- const QCString &initialCpomponent = "",
- const QCString &initialBug = "",
- QWidget* parent = 0, const char* name = 0 );
+ KBBMainWindow( const TQCString &initialPackage = "",
+ const TQCString &initialCpomponent = "",
+ const TQCString &initialBug = "",
+ TQWidget* parent = 0, const char* name = 0 );
~KBBMainWindow();
/// Overloaded functions of KBookmarkOwner
- virtual void openBookmarkURL( const QString & _url );
- virtual QString currentTitle() const;
- virtual QString currentURL() const;
+ virtual void openBookmarkURL( const TQString & _url );
+ virtual TQString currentTitle() const;
+ virtual TQString currentURL() const;
public slots:
/**
* Event handlers for our KActions
*/
- void slotStatusMsg( const QString &text );
+ void slotStatusMsg( const TQString &text );
void slotDisconnectedAction();
void slotSubmit();
void slotListChanges();
@@ -122,8 +122,8 @@ class KBBMainWindow : public KMainWindow, virtual public KBookmarkOwner
* Status bar label. We need this, because the default Qt version doesn't
* support rich text in the messages
*/
- QLabel *m_statusLabel;
- QProgressBar *m_progressBar;
+ TQLabel *m_statusLabel;
+ TQProgressBar *m_progressBar;
PreferencesDialog *mPreferencesDialog;
diff --git a/kbugbuster/gui/loadallbugsdlg.cpp b/kbugbuster/gui/loadallbugsdlg.cpp
index 40ecd6d8..d6203c07 100644
--- a/kbugbuster/gui/loadallbugsdlg.cpp
+++ b/kbugbuster/gui/loadallbugsdlg.cpp
@@ -18,28 +18,28 @@
#include "bugcache.h"
#include <kdebug.h>
#include <kio/defaultprogress.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-LoadAllBugsDlg::LoadAllBugsDlg( const Package& pkg, const QString &component )
- : QDialog( 0L, "progressdlg", TRUE )
+LoadAllBugsDlg::LoadAllBugsDlg( const Package& pkg, const TQString &component )
+ : TQDialog( 0L, "progressdlg", TRUE )
{
m_bugLoadingProgress = new KIO::DefaultProgress( this );
- connect( m_bugLoadingProgress, SIGNAL( stopped() ),
- this, SLOT( slotStopped() ) );
+ connect( m_bugLoadingProgress, TQT_SIGNAL( stopped() ),
+ this, TQT_SLOT( slotStopped() ) );
setCaption( i18n( "Loading All Bugs for Product %1" ).arg( pkg.name() ) );
connect( BugSystem::self(),
- SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
- SLOT( slotBugDetailsAvailable( const Bug &, const BugDetails & ) ) );
+ TQT_SIGNAL( bugDetailsAvailable( const Bug &, const BugDetails & ) ),
+ TQT_SLOT( slotBugDetailsAvailable( const Bug &, const BugDetails & ) ) );
connect( BugSystem::self(),
- SIGNAL( bugDetailsLoadingError() ),
- SLOT( slotBugDetailsLoadingError() ) );
+ TQT_SIGNAL( bugDetailsLoadingError() ),
+ TQT_SLOT( slotBugDetailsLoadingError() ) );
// The package (and its buglist) has to be in the cache already...
m_bugs = BugSystem::self()->cache()->loadBugList( pkg, component, true );
m_count = m_bugs.count();
m_bugLoadingProgress->slotTotalSize( 0, m_count );
kdDebug() << "LoadAllBugsDlg: " << m_count << " bugs to load" << endl;
m_processed = 0;
- QTimer::singleShot( 0, this, SLOT( loadNextBug() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( loadNextBug() ) );
}
void LoadAllBugsDlg::slotBugDetailsAvailable( const Bug &bug, const BugDetails & )
diff --git a/kbugbuster/gui/loadallbugsdlg.h b/kbugbuster/gui/loadallbugsdlg.h
index 685abcb0..cc7c0661 100644
--- a/kbugbuster/gui/loadallbugsdlg.h
+++ b/kbugbuster/gui/loadallbugsdlg.h
@@ -15,7 +15,7 @@
#ifndef loadallbugsdlg_h
#define loadallbugsdlg_h
-#include <qdialog.h>
+#include <tqdialog.h>
#include "bug.h"
class Package;
class BugDetails;
@@ -26,7 +26,7 @@ class LoadAllBugsDlg : public QDialog
{
Q_OBJECT
public:
- LoadAllBugsDlg( const Package& pkg, const QString &component );
+ LoadAllBugsDlg( const Package& pkg, const TQString &component );
protected slots:
void slotBugDetailsAvailable( const Bug &bug, const BugDetails &bd );
diff --git a/kbugbuster/gui/messageeditor.cpp b/kbugbuster/gui/messageeditor.cpp
index 517ef80b..f10e0fb4 100644
--- a/kbugbuster/gui/messageeditor.cpp
+++ b/kbugbuster/gui/messageeditor.cpp
@@ -1,8 +1,8 @@
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include <ktextedit.h>
#include <kinputdialog.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -11,33 +11,33 @@
#include "kbbprefs.h"
#include "messageeditor.h"
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "messageeditor.moc"
-MessageEditor::MessageEditor( QWidget *parent )
+MessageEditor::MessageEditor( TQWidget *parent )
: KDialogBase(Plain,i18n("Edit Message Buttons"),Ok|Cancel,Ok,parent,0,
true,true)
{
- QFrame *topFrame = plainPage();
- QBoxLayout *topLayout = new QVBoxLayout(topFrame,0,spacingHint());
+ TQFrame *topFrame = plainPage();
+ TQBoxLayout *topLayout = new TQVBoxLayout(topFrame,0,spacingHint());
- QBoxLayout *selectionLayout = new QHBoxLayout;
+ TQBoxLayout *selectionLayout = new QHBoxLayout;
topLayout->addLayout(selectionLayout);
- QLabel *selectionLabel = new QLabel(i18n("Button:"),topFrame);
+ TQLabel *selectionLabel = new TQLabel(i18n("Button:"),topFrame);
selectionLayout->addWidget(selectionLabel);
- mSelectionCombo = new QComboBox(topFrame);
+ mSelectionCombo = new TQComboBox(topFrame);
selectionLayout->addWidget(mSelectionCombo);
- connect(mSelectionCombo,SIGNAL(activated(int)),SLOT(changeMessage()));
+ connect(mSelectionCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(changeMessage()));
- QPushButton *addButton = new QPushButton(i18n("Add Button..."),topFrame);
+ TQPushButton *addButton = new TQPushButton(i18n("Add Button..."),topFrame);
selectionLayout->addWidget(addButton);
- connect(addButton,SIGNAL(clicked()),SLOT(addButton()));
+ connect(addButton,TQT_SIGNAL(clicked()),TQT_SLOT(addButton()));
- QPushButton *removeButton = new QPushButton(i18n("Remove Button"),topFrame);
+ TQPushButton *removeButton = new TQPushButton(i18n("Remove Button"),topFrame);
selectionLayout->addWidget(removeButton);
- connect(removeButton,SIGNAL(clicked()),SLOT(removeButton()));
+ connect(removeButton,TQT_SIGNAL(clicked()),TQT_SLOT(removeButton()));
mMessageEdit = new KTextEdit(topFrame);
topLayout->addWidget(mMessageEdit,1);
@@ -51,7 +51,7 @@ void MessageEditor::updateConfig()
mSelectionCombo->clear();
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for(it = mMessageButtons.begin();it != mMessageButtons.end();++it) {
mSelectionCombo->insertItem(it.key());
}
@@ -61,9 +61,9 @@ void MessageEditor::updateConfig()
void MessageEditor::addButton()
{
- QString txt;
+ TQString txt;
txt = KInputDialog::getText(i18n("Add Message Button"),
- i18n("Enter button name:"), QString::null,
+ i18n("Enter button name:"), TQString::null,
NULL, this );
if ( !txt.isNull() ) {
diff --git a/kbugbuster/gui/messageeditor.h b/kbugbuster/gui/messageeditor.h
index e32e8cec..57855edf 100644
--- a/kbugbuster/gui/messageeditor.h
+++ b/kbugbuster/gui/messageeditor.h
@@ -9,7 +9,7 @@ class KTextEdit;
class MessageEditor : public KDialogBase {
Q_OBJECT
public:
- MessageEditor( QWidget *parent );
+ MessageEditor( TQWidget *parent );
protected slots:
void slotOk();
@@ -23,11 +23,11 @@ class MessageEditor : public KDialogBase {
void updateConfig();
private:
- QComboBox *mSelectionCombo;
+ TQComboBox *mSelectionCombo;
KTextEdit *mMessageEdit;
- QString mCurrentButton;
- QMap <QString,QString> mMessageButtons;
+ TQString mCurrentButton;
+ TQMap <TQString,TQString> mMessageButtons;
};
#endif
diff --git a/kbugbuster/gui/msginputdialog.cpp b/kbugbuster/gui/msginputdialog.cpp
index a3fc39c7..8d12cc35 100644
--- a/kbugbuster/gui/msginputdialog.cpp
+++ b/kbugbuster/gui/msginputdialog.cpp
@@ -2,13 +2,13 @@
// (c) 2001, Cornelius Schumacher
#include <ktextedit.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qcombobox.h>
-#include <qsplitter.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqsplitter.h>
+#include <tqlabel.h>
#include "messageeditor.h"
#include "kbbprefs.h"
@@ -19,9 +19,9 @@
#include "msginputdialog.moc"
MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug,
- const Package &package, const QString &quotedMsg,
- QWidget *parent)
- : KDialogBase(Plain,QString::null,User1|User2|Ok|Cancel,Ok,parent,0,false,
+ const Package &package, const TQString &quotedMsg,
+ TQWidget *parent)
+ : KDialogBase(Plain,TQString::null,User1|User2|Ok|Cancel,Ok,parent,0,false,
true,KStdGuiItem::clear(),i18n( "&Edit Presets..." )),
mBug( bug ),
mPackage( package ),
@@ -41,32 +41,32 @@ MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug,
break;
}
- QFrame *topFrame = plainPage();
- ( new QHBoxLayout( topFrame ) )->setAutoAdd( true );
+ TQFrame *topFrame = plainPage();
+ ( new TQHBoxLayout( topFrame ) )->setAutoAdd( true );
- mSplitter = new QSplitter( QSplitter::Horizontal, topFrame );
+ mSplitter = new TQSplitter( TQSplitter::Horizontal, topFrame );
- QWidget *w = new QWidget( mSplitter );
- ( new QVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true );
+ TQWidget *w = new TQWidget( mSplitter );
+ ( new TQVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true );
if ( mType == Reply ) {
- QWidget *r = new QWidget( w );
- QHBoxLayout* rlayout = new QHBoxLayout( r );
+ TQWidget *r = new TQWidget( w );
+ TQHBoxLayout* rlayout = new TQHBoxLayout( r );
- QLabel *rlabel = new QLabel( i18n("&Recipient:"),r );
- QFont f = r->font();
+ TQLabel *rlabel = new TQLabel( i18n("&Recipient:"),r );
+ TQFont f = r->font();
f.setBold( true );
r->setFont( f );
rlayout->add( rlabel );
- mRecipient = new QComboBox( r );
+ mRecipient = new TQComboBox( r );
mRecipient->insertItem( i18n("Normal (bugs.kde.org & Maintainer & kde-bugs-dist)"), BugCommand::Normal );
mRecipient->insertItem( i18n("Maintonly (bugs.kde.org & Maintainer)"), BugCommand::Maintonly );
mRecipient->insertItem( i18n("Quiet (bugs.kde.org only)"), BugCommand::Quiet );
rlabel->setBuddy( mRecipient );
rlayout->add( mRecipient );
- QSpacerItem *rspacer= new QSpacerItem( 1,1,QSizePolicy::Expanding );
+ TQSpacerItem *rspacer= new TQSpacerItem( 1,1,TQSizePolicy::Expanding );
rlayout->addItem( rspacer );
// Reply currently only replies to the bug tracking system
@@ -74,30 +74,30 @@ MsgInputDialog::MsgInputDialog(MsgInputDialog::MessageType type, const Bug &bug,
}
- QLabel *l = new QLabel( i18n( "&Message" ), w );
- QFont f = l->font();
+ TQLabel *l = new TQLabel( i18n( "&Message" ), w );
+ TQFont f = l->font();
f.setBold( true );
l->setFont( f );
mMessageEdit = new KTextEdit( w );
mMessageEdit->setMinimumWidth( mMessageEdit->fontMetrics().width('x') * 72 );
- mMessageEdit->setWordWrap( QTextEdit::FixedColumnWidth );
+ mMessageEdit->setWordWrap( TQTextEdit::FixedColumnWidth );
mMessageEdit->setWrapColumnOrWidth( 72 );
l->setBuddy( mMessageEdit );
- w = new QWidget( mSplitter );
- ( new QVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true );
- l = new QLabel( i18n( "&Preset Messages" ), w );
+ w = new TQWidget( mSplitter );
+ ( new TQVBoxLayout( w, spacingHint(), -1 ) )->setAutoAdd( true );
+ l = new TQLabel( i18n( "&Preset Messages" ), w );
l->setFont( f );
mPresets = new KListBox( w );
updatePresets();
l->setBuddy( mPresets );
- connect( mPresets, SIGNAL( executed( QListBoxItem* ) ),
- SLOT( slotPresetSelected( QListBoxItem * ) ) );
- connect( this, SIGNAL( user2Clicked() ), SLOT( editPresets() ) );
- connect( this, SIGNAL( user1Clicked() ), SLOT( clearMessage() ) );
+ connect( mPresets, TQT_SIGNAL( executed( TQListBoxItem* ) ),
+ TQT_SLOT( slotPresetSelected( TQListBoxItem * ) ) );
+ connect( this, TQT_SIGNAL( user2Clicked() ), TQT_SLOT( editPresets() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clearMessage() ) );
mMessageEdit->setFocus();
if ( !quotedMsg.isEmpty() )
@@ -116,7 +116,7 @@ void MsgInputDialog::readConfig()
{
resize( KBBPrefs::instance()->mMsgDlgWidth,
KBBPrefs::instance()->mMsgDlgHeight );
- QValueList<int> sizes = KBBPrefs::instance()->mMsgDlgSplitter;
+ TQValueList<int> sizes = KBBPrefs::instance()->mMsgDlgSplitter;
mSplitter->setSizes( sizes );
}
@@ -131,15 +131,15 @@ void MsgInputDialog::updatePresets()
{
mPresets->clear();
- QMap<QString,QString> messageButtons = KBBPrefs::instance()->mMessageButtons;
+ TQMap<TQString,TQString> messageButtons = KBBPrefs::instance()->mMessageButtons;
int id = 0;
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for( it = messageButtons.begin(); it != messageButtons.end(); ++it )
mPresets->insertItem( it.key(), id );
}
-QString MsgInputDialog::message() const
+TQString MsgInputDialog::message() const
{
return mMessageEdit->text();
}
@@ -153,7 +153,7 @@ void MsgInputDialog::editPresets()
updatePresets();
}
-void MsgInputDialog::slotPresetSelected( QListBoxItem *lbi )
+void MsgInputDialog::slotPresetSelected( TQListBoxItem *lbi )
{
mMessageEdit->setText( KBBPrefs::instance()->mMessageButtons[ lbi->text() ] );
}
@@ -195,18 +195,18 @@ void MsgInputDialog::slotCancel()
delete this;
}
-void MsgInputDialog::insertQuotedMessage( const QString &msg )
+void MsgInputDialog::insertQuotedMessage( const TQString &msg )
{
- Q_ASSERT( mMessageEdit->wordWrap() == QTextEdit::FixedColumnWidth );
+ Q_ASSERT( mMessageEdit->wordWrap() == TQTextEdit::FixedColumnWidth );
- const QString quotationMarker = "> ";
+ const TQString quotationMarker = "> ";
const unsigned int wrapColumn = mMessageEdit->wrapColumnOrWidth();
// ### Needs something more sophisticated than simplifyWhiteSpace to
// handle quoting multiple paragraphs properly.
- QString line = msg.simplifyWhiteSpace();
+ TQString line = msg.simplifyWhiteSpace();
- QString quotedMsg;
+ TQString quotedMsg;
while ( line.length() + quotationMarker.length() + 1 > wrapColumn ) {
int pos = wrapColumn - quotationMarker.length() - 1;
while ( pos > 0 && !line[ pos ].isSpace() )
diff --git a/kbugbuster/gui/msginputdialog.h b/kbugbuster/gui/msginputdialog.h
index 9de767e3..809ff0d2 100644
--- a/kbugbuster/gui/msginputdialog.h
+++ b/kbugbuster/gui/msginputdialog.h
@@ -17,10 +17,10 @@ class MsgInputDialog : public KDialogBase
enum MessageType{ Close, Reply, ReplyPrivate };
MsgInputDialog( MessageType, const Bug &, const Package &,
- const QString &, QWidget *parent=0);
+ const TQString &, TQWidget *parent=0);
virtual ~MsgInputDialog();
- QString message() const;
+ TQString message() const;
protected slots:
void slotOk();
@@ -29,7 +29,7 @@ class MsgInputDialog : public KDialogBase
private slots:
void editPresets();
void updatePresets();
- void slotPresetSelected( QListBoxItem * );
+ void slotPresetSelected( TQListBoxItem * );
void clearMessage();
void queueCommand();
@@ -40,11 +40,11 @@ class MsgInputDialog : public KDialogBase
void readConfig();
void writeConfig();
- void insertQuotedMessage( const QString &quotedMsg );
+ void insertQuotedMessage( const TQString &quotedMsg );
- QComboBox *mRecipient;
+ TQComboBox *mRecipient;
KTextEdit *mMessageEdit;
- QSplitter *mSplitter;
+ TQSplitter *mSplitter;
KListBox *mPresets;
Bug mBug;
diff --git a/kbugbuster/gui/packagelvi.cpp b/kbugbuster/gui/packagelvi.cpp
index 7fe7cfe6..6374fe29 100644
--- a/kbugbuster/gui/packagelvi.cpp
+++ b/kbugbuster/gui/packagelvi.cpp
@@ -1,5 +1,5 @@
/*
- packagelvi.cpp - Custom QListViewItem that holds a Package object
+ packagelvi.cpp - Custom TQListViewItem that holds a Package object
copyright : (c) 2001 by Martijn Klingens
email : klingens@kde.org
@@ -16,15 +16,15 @@
#include "packagelvi.h"
-PackageLVI::PackageLVI( QListView *parent , const Package &pkg, const QString &component )
-: QListViewItem( parent, pkg.name(), pkg.description() )
+PackageLVI::PackageLVI( TQListView *parent , const Package &pkg, const TQString &component )
+: TQListViewItem( parent, pkg.name(), pkg.description() )
{
m_package = pkg;
m_component = component;
}
-PackageLVI::PackageLVI( QListViewItem *parent , const Package &pkg, const QString &component )
-: QListViewItem( parent, component )
+PackageLVI::PackageLVI( TQListViewItem *parent , const Package &pkg, const TQString &component )
+: TQListViewItem( parent, component )
{
m_package = pkg;
m_component = component;
diff --git a/kbugbuster/gui/packagelvi.h b/kbugbuster/gui/packagelvi.h
index 32f48642..5582e06e 100644
--- a/kbugbuster/gui/packagelvi.h
+++ b/kbugbuster/gui/packagelvi.h
@@ -1,5 +1,5 @@
/*
- packagelvi.h - Custom QListViewItem that holds a Package object
+ packagelvi.h - Custom TQListViewItem that holds a Package object
copyright : (c) 2001 by Martijn Klingens
email : klingens@kde.org
@@ -17,7 +17,7 @@
#ifndef PACKAGELVI_H
#define PACKAGELVI_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "package.h"
@@ -28,21 +28,21 @@ class PackageLVI : public QListViewItem
{
public:
// Top-level package
- PackageLVI( QListView *parent , const Package &pkg, const QString &component );
+ PackageLVI( TQListView *parent , const Package &pkg, const TQString &component );
// Child component
- PackageLVI( QListViewItem *parent , const Package &pkg, const QString &component );
+ PackageLVI( TQListViewItem *parent , const Package &pkg, const TQString &component );
~PackageLVI();
Package& package() { return m_package; }
void setPackage( const Package &pkg ) { m_package = pkg; }
- QString component() { return m_component; }
- void setComponent( const QString &component ) { m_component = component; }
+ TQString component() { return m_component; }
+ void setComponent( const TQString &component ) { m_component = component; }
private:
Package m_package;
- QString m_component;
+ TQString m_component;
};
#endif // PACKAGELVI_H
diff --git a/kbugbuster/gui/packageselectdialog.cpp b/kbugbuster/gui/packageselectdialog.cpp
index 7b791e9d..31dfdcef 100644
--- a/kbugbuster/gui/packageselectdialog.cpp
+++ b/kbugbuster/gui/packageselectdialog.cpp
@@ -1,6 +1,6 @@
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qheader.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kcompletion.h>
@@ -14,10 +14,10 @@
#include "packageselectdialog.h"
#include "packageselectdialog.moc"
-PackageListView::PackageListView( QWidget *parent ) :
- QListView( parent )
+PackageListView::PackageListView( TQWidget *parent ) :
+ TQListView( parent )
{
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
void PackageListView::resetTyped()
@@ -25,41 +25,41 @@ void PackageListView::resetTyped()
mTyped = "";
}
-void PackageListView::keyPressEvent( QKeyEvent *e )
+void PackageListView::keyPressEvent( TQKeyEvent *e )
{
// Disable listview text completion for now
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
return;
int k = e->key();
if ( k == Key_Return || k == Key_Escape ) e->ignore();
- QString key = e->text();
+ TQString key = e->text();
mTyped.append(key);
emit typed( mTyped );
}
-PackageSelectDialog::PackageSelectDialog(QWidget *parent,const char *name) :
+PackageSelectDialog::PackageSelectDialog(TQWidget *parent,const char *name) :
KDialogBase( parent, name, true, i18n("Select Product"), Ok|Cancel )
{
- QWidget *topWidget = new QWidget( this );
+ TQWidget *topWidget = new TQWidget( this );
setMainWidget( topWidget );
- QBoxLayout *topLayout = new QVBoxLayout( topWidget );
- QSplitter *topSplitter = new QSplitter( QSplitter::Vertical, topWidget );
+ TQBoxLayout *topLayout = new TQVBoxLayout( topWidget );
+ TQSplitter *topSplitter = new TQSplitter( TQSplitter::Vertical, topWidget );
topSplitter->setOpaqueResize( true );
topLayout->addWidget( topSplitter );
- mRecentList = new QListView( topSplitter );
+ mRecentList = new TQListView( topSplitter );
mRecentList->addColumn( i18n("Recent") );
mRecentList->resize( mRecentList->width(), mRecentList->fontMetrics().height() *
KBBPrefs::instance()->mRecentPackagesCount );
- connect( mRecentList, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int) ),
- SLOT( recentSelected( int, QListViewItem * ) ) );
- connect( mRecentList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotOk() ) );
+ connect( mRecentList, TQT_SIGNAL( mouseButtonPressed( int, TQListViewItem *, const TQPoint &, int) ),
+ TQT_SLOT( recentSelected( int, TQListViewItem * ) ) );
+ connect( mRecentList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotOk() ) );
mCompletion = new KCompletion;
mCompletion->setCompletionMode( KGlobalSettings::CompletionAuto );
@@ -69,21 +69,21 @@ PackageSelectDialog::PackageSelectDialog(QWidget *parent,const char *name) :
mCompleteList->addColumn( i18n("Description") );
mCompleteList->setRootIsDecorated(true);
mCompleteList->setAllColumnsShowFocus( true );
- connect( mCompleteList, SIGNAL( typed( const QString & ) ),
- SLOT( completeTyped( const QString & ) ) );
+ connect( mCompleteList, TQT_SIGNAL( typed( const TQString & ) ),
+ TQT_SLOT( completeTyped( const TQString & ) ) );
- connect( mCompleteList, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint &, int) ),
- SLOT( completeSelected( int, QListViewItem * ) ) );
- connect( mCompleteList, SIGNAL( doubleClicked( QListViewItem * ) ),
- SLOT( slotOk() ) );
+ connect( mCompleteList, TQT_SIGNAL( mouseButtonPressed( int, TQListViewItem *, const TQPoint &, int) ),
+ TQT_SLOT( completeSelected( int, TQListViewItem * ) ) );
+ connect( mCompleteList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ TQT_SLOT( slotOk() ) );
mPackageEdit = new KLineEdit( topWidget );
mPackageEdit->setFocus();
topLayout->addWidget( mPackageEdit );
- connect( mPackageEdit, SIGNAL( textChanged( const QString & ) ),
- SLOT( completeTyped( const QString & ) ) );
+ connect( mPackageEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ TQT_SLOT( completeTyped( const TQString & ) ) );
enableButtonOK( !mPackageEdit->text().isEmpty() );
}
@@ -92,12 +92,12 @@ PackageSelectDialog::~PackageSelectDialog()
delete mCompletion;
}
-void PackageSelectDialog::setRecentPackages( const QStringList &recent )
+void PackageSelectDialog::setRecentPackages( const TQStringList &recent )
{
mRecentList->clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for( it = recent.begin(); it != recent.end(); ++it ) {
- new QListViewItem( mRecentList, *it );
+ new TQListViewItem( mRecentList, *it );
}
}
@@ -108,13 +108,13 @@ void PackageSelectDialog::setPackages( const Package::List &pkgs )
mCompletionDict.clear();
Package::List::ConstIterator it;
for( it = pkgs.begin(); it != pkgs.end(); ++it ) {
- PackageLVI *item = new PackageLVI( mCompleteList, (*it), QString::null );
- QStringList components = (*it).components();
+ PackageLVI *item = new PackageLVI( mCompleteList, (*it), TQString::null );
+ TQStringList components = (*it).components();
if (components.count() > 1) {
- for( QStringList::ConstIterator cit = components.begin(); cit != components.end(); ++cit ) {
+ for( TQStringList::ConstIterator cit = components.begin(); cit != components.end(); ++cit ) {
PackageLVI *component = new PackageLVI( item, (*it), (*cit) );
- QString completionName = (*it).name() + "/" + (*cit);
+ TQString completionName = (*it).name() + "/" + (*cit);
mCompletion->addItem( completionName );
mCompletionDict.insert( completionName, component );
@@ -126,7 +126,7 @@ void PackageSelectDialog::setPackages( const Package::List &pkgs )
}
}
-void PackageSelectDialog::recentSelected( int, QListViewItem *item )
+void PackageSelectDialog::recentSelected( int, TQListViewItem *item )
{
kdDebug() << "PackageSelectDialog::recentSelected()" << endl;
if ( item ) {
@@ -139,7 +139,7 @@ void PackageSelectDialog::recentSelected( int, QListViewItem *item )
}
}
-void PackageSelectDialog::completeSelected( int, QListViewItem *item )
+void PackageSelectDialog::completeSelected( int, TQListViewItem *item )
{
PackageLVI *lvi = dynamic_cast<PackageLVI*>(item);
@@ -161,14 +161,14 @@ void PackageSelectDialog::slotOk()
mSelectedPackage = item->package();
mSelectedComponent = item->component();
- QString recent_key;
+ TQString recent_key;
if ( item->component().isEmpty() )
recent_key = item->package().name();
else
recent_key = item->package().name() + "/" + item->component();
BugServer *server = BugSystem::self()->server();
- QStringList recent = server->serverConfig().recentPackages();
+ TQStringList recent = server->serverConfig().recentPackages();
if( !recent.contains( recent_key ) ) {
recent.prepend( recent_key );
if ( int( recent.count() ) > KBBPrefs::instance()->mRecentPackagesCount ) {
@@ -178,9 +178,9 @@ void PackageSelectDialog::slotOk()
server->serverConfig().setRecentPackages( recent );
}
} else {
- QListViewItem *recentItem = mRecentList->selectedItem();
+ TQListViewItem *recentItem = mRecentList->selectedItem();
if ( recentItem ) {
- QStringList tokens = QStringList::split( '/', recentItem->text( 0 ) );
+ TQStringList tokens = TQStringList::split( '/', recentItem->text( 0 ) );
mSelectedPackage = BugSystem::self()->package( tokens[0] );
mSelectedComponent = tokens[1];
}
@@ -194,15 +194,15 @@ Package PackageSelectDialog::selectedPackage()
return mSelectedPackage;
}
-QString PackageSelectDialog::selectedComponent()
+TQString PackageSelectDialog::selectedComponent()
{
return mSelectedComponent;
}
-void PackageSelectDialog::completeTyped( const QString &typed )
+void PackageSelectDialog::completeTyped( const TQString &typed )
{
kdDebug() << "completeTyped: " << typed << endl;
- QString completed = mCompletion->makeCompletion( typed );
+ TQString completed = mCompletion->makeCompletion( typed );
kdDebug() << "completed: " << completed << endl;
if ( !completed.isEmpty() ) {
mCompleteList->setSelected( mCompletionDict[ completed ], true );
diff --git a/kbugbuster/gui/packageselectdialog.h b/kbugbuster/gui/packageselectdialog.h
index 1fe596aa..471fe8b5 100644
--- a/kbugbuster/gui/packageselectdialog.h
+++ b/kbugbuster/gui/packageselectdialog.h
@@ -1,7 +1,7 @@
#ifndef PACKAGESELECTDIALOG_H
#define PACKAGESELECTDIALOG_H
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
@@ -14,51 +14,51 @@ class PackageListView : public QListView
{
Q_OBJECT
public:
- PackageListView( QWidget *parent );
+ PackageListView( TQWidget *parent );
void resetTyped();
signals:
- void typed( const QString & );
+ void typed( const TQString & );
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
private:
- QString mTyped;
+ TQString mTyped;
};
class PackageSelectDialog : public KDialogBase
{
Q_OBJECT
public:
- PackageSelectDialog(QWidget *parent=0,const char *name=0);
+ PackageSelectDialog(TQWidget *parent=0,const char *name=0);
~PackageSelectDialog();
- void setRecentPackages( const QStringList & );
+ void setRecentPackages( const TQStringList & );
void setPackages( const Package::List &pkgs );
Package selectedPackage();
- QString selectedComponent();
+ TQString selectedComponent();
protected slots:
void slotOk();
private slots:
- void recentSelected( int, QListViewItem * );
- void completeSelected( int, QListViewItem * );
- void completeTyped( const QString & );
+ void recentSelected( int, TQListViewItem * );
+ void completeSelected( int, TQListViewItem * );
+ void completeTyped( const TQString & );
private:
Package::List mPackages;
Package mSelectedPackage;
- QString mSelectedComponent;
+ TQString mSelectedComponent;
- QListView *mRecentList;
+ TQListView *mRecentList;
PackageListView *mCompleteList;
KLineEdit *mPackageEdit;
KCompletion *mCompletion;
- QDict<QListViewItem> mCompletionDict;
+ TQDict<TQListViewItem> mCompletionDict;
};
#endif
diff --git a/kbugbuster/gui/preferencesdialog.cpp b/kbugbuster/gui/preferencesdialog.cpp
index 9cafff28..2af4879a 100644
--- a/kbugbuster/gui/preferencesdialog.cpp
+++ b/kbugbuster/gui/preferencesdialog.cpp
@@ -1,12 +1,12 @@
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qlistview.h>
-#include <qhbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlistview.h>
+#include <tqhbox.h>
#include <knuminput.h>
#include <kurl.h>
@@ -27,8 +27,8 @@
class ServerItem : public QListViewItem
{
public:
- ServerItem( QListView *listView, const BugServerConfig &cfg )
- : QListViewItem( listView )
+ ServerItem( TQListView *listView, const BugServerConfig &cfg )
+ : TQListViewItem( listView )
{
setServerConfig( cfg );
}
@@ -51,7 +51,7 @@ class ServerItem : public QListViewItem
class ServerListView : public QListView
{
public:
- ServerListView( QWidget *parent ) : QListView( parent )
+ ServerListView( TQWidget *parent ) : TQListView( parent )
{
addColumn( i18n("Name") );
addColumn( i18n("Base URL") );
@@ -60,7 +60,7 @@ class ServerListView : public QListView
}
};
-PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name )
+PreferencesDialog::PreferencesDialog( TQWidget* parent, const char* name )
: KDialogBase ( IconList, i18n("Preferences"), Ok|Apply|Cancel, Ok,
parent, name, false, true )
{
@@ -76,67 +76,67 @@ PreferencesDialog::~PreferencesDialog()
void PreferencesDialog::setupServerPage()
{
- QFrame *topFrame = addPage( i18n("Servers"), 0,
+ TQFrame *topFrame = addPage( i18n("Servers"), 0,
DesktopIcon( "gohome", KIcon::SizeMedium ) );
- QBoxLayout *layout = new QVBoxLayout( topFrame );
+ TQBoxLayout *layout = new TQVBoxLayout( topFrame );
layout->setSpacing( spacingHint() );
mServerList = new ServerListView( topFrame );
layout->addWidget( mServerList );
- QHBox *buttonBox = new QHBox( topFrame );
+ TQHBox *buttonBox = new TQHBox( topFrame );
buttonBox->setSpacing( spacingHint() );
layout->addWidget( buttonBox );
- QPushButton *addButton = new QPushButton( i18n("Add Server..."), buttonBox );
- connect( addButton, SIGNAL( clicked() ), SLOT( addServer() ) );
+ TQPushButton *addButton = new TQPushButton( i18n("Add Server..."), buttonBox );
+ connect( addButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addServer() ) );
- QPushButton *editButton = new QPushButton( i18n("Edit Server..."), buttonBox );
- connect( editButton, SIGNAL( clicked() ), SLOT( editServer() ) );
+ TQPushButton *editButton = new TQPushButton( i18n("Edit Server..."), buttonBox );
+ connect( editButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editServer() ) );
- QPushButton *removeButton = new QPushButton( i18n("Delete Server"), buttonBox );
- connect( removeButton, SIGNAL( clicked() ), SLOT( removeServer() ) );
+ TQPushButton *removeButton = new TQPushButton( i18n("Delete Server"), buttonBox );
+ connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeServer() ) );
- QPushButton *button = new QPushButton( i18n("Select Server From List..."),
+ TQPushButton *button = new TQPushButton( i18n("Select Server From List..."),
topFrame );
layout->addWidget( button );
- connect( button, SIGNAL( clicked() ), SLOT( selectServer() ) );
- connect( mServerList, SIGNAL( doubleClicked ( QListViewItem *)), this, SLOT( editServer()));
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( selectServer() ) );
+ connect( mServerList, TQT_SIGNAL( doubleClicked ( TQListViewItem *)), this, TQT_SLOT( editServer()));
}
void PreferencesDialog::setupAdvancedPage()
{
- QFrame *topFrame = addPage( i18n("Advanced"), 0,
+ TQFrame *topFrame = addPage( i18n("Advanced"), 0,
DesktopIcon( "misc", KIcon::SizeMedium ) );
- QBoxLayout *layout = new QVBoxLayout( topFrame );
+ TQBoxLayout *layout = new TQVBoxLayout( topFrame );
layout->setSpacing( spacingHint() );
- QButtonGroup *mailGroup = new QButtonGroup( 1, Horizontal,
+ TQButtonGroup *mailGroup = new TQButtonGroup( 1, Horizontal,
i18n( "Mail Client" ), topFrame );
layout->addWidget( mailGroup );
- mKMailButton = new QRadioButton( i18n( "&KMail" ), mailGroup );
- mDirectButton = new QRadioButton( i18n( "D&irect" ), mailGroup );
- mSendmailButton = new QRadioButton( i18n( "&Sendmail" ), mailGroup );
+ mKMailButton = new TQRadioButton( i18n( "&KMail" ), mailGroup );
+ mDirectButton = new TQRadioButton( i18n( "D&irect" ), mailGroup );
+ mSendmailButton = new TQRadioButton( i18n( "&Sendmail" ), mailGroup );
- mShowClosedCheckBox = new QCheckBox( i18n( "Show closed bugs" ), topFrame );
+ mShowClosedCheckBox = new TQCheckBox( i18n( "Show closed bugs" ), topFrame );
layout->addWidget( mShowClosedCheckBox );
- mShowWishesCheckBox = new QCheckBox( i18n( "Show wishes" ), topFrame );
+ mShowWishesCheckBox = new TQCheckBox( i18n( "Show wishes" ), topFrame );
layout->addWidget( mShowWishesCheckBox );
- mShowVotedCheckBox = new QCheckBox( i18n( "Show bugs with number of votes greater than:" ), topFrame );
+ mShowVotedCheckBox = new TQCheckBox( i18n( "Show bugs with number of votes greater than:" ), topFrame );
layout->addWidget( mShowVotedCheckBox );
mMinVotesInput = new KIntNumInput( topFrame );
mMinVotesInput->setMinValue( 0 );
- connect( mShowVotedCheckBox, SIGNAL(toggled(bool)),
- mMinVotesInput, SLOT(setEnabled(bool)) );
+ connect( mShowVotedCheckBox, TQT_SIGNAL(toggled(bool)),
+ mMinVotesInput, TQT_SLOT(setEnabled(bool)) );
layout->addWidget( mMinVotesInput );
- mSendBccCheckBox = new QCheckBox( i18n( "Send BCC to myself" ), topFrame );
+ mSendBccCheckBox = new TQCheckBox( i18n( "Send BCC to myself" ), topFrame );
layout->addWidget( mSendBccCheckBox );
}
@@ -166,7 +166,7 @@ void PreferencesDialog::addServer()
{
ServerConfigDialog *dlg = new ServerConfigDialog( this );
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
new ServerItem( mServerList, dlg->serverConfig() );
}
}
@@ -180,14 +180,14 @@ void PreferencesDialog::editServer()
dlg->setServerConfig( item->serverConfig() );
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
item->setServerConfig( dlg->serverConfig() );
}
}
void PreferencesDialog::removeServer()
{
- QListViewItem *item = mServerList->currentItem();
+ TQListViewItem *item = mServerList->currentItem();
if ( !item ) return;
delete item;
@@ -198,7 +198,7 @@ void PreferencesDialog::selectServer()
SelectServerDlg *dlg =new SelectServerDlg( this, "Select Server" );
int result = dlg->exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
ServerItem *item = dlg->serverSelected();
if ( item ) {
new ServerItem( mServerList, item->serverConfig() );
@@ -208,9 +208,9 @@ void PreferencesDialog::selectServer()
}
void PreferencesDialog::createServerItem( ServerListView *listView,
- const QString &name,
- const QString &url,
- const QString &version )
+ const TQString &name,
+ const TQString &url,
+ const TQString &version )
{
BugServerConfig cfg( name, KURL( url ) );
cfg.setBugzillaVersion( version );
@@ -239,8 +239,8 @@ void PreferencesDialog::readConfig()
mSendBccCheckBox->setChecked( KBBPrefs::instance()->mSendBCC );
mServerList->clear();
- QValueList<BugServer *> servers = BugSystem::self()->serverList();
- QValueList<BugServer *>::ConstIterator it;
+ TQValueList<BugServer *> servers = BugSystem::self()->serverList();
+ TQValueList<BugServer *>::ConstIterator it;
for( it = servers.begin(); it != servers.end(); ++it ) {
new ServerItem( mServerList, (*it)->serverConfig() );
}
@@ -262,8 +262,8 @@ void PreferencesDialog::writeConfig()
KBBPrefs::instance()->mSendBCC = mSendBccCheckBox->isChecked();
KBBPrefs::instance()->writeConfig();
- QValueList<BugServerConfig> servers;
- QListViewItem *item;
+ TQValueList<BugServerConfig> servers;
+ TQListViewItem *item;
for ( item = mServerList->firstChild(); item;
item = item->nextSibling() ) {
servers.append( static_cast<ServerItem *>( item )->serverConfig() );
@@ -289,7 +289,7 @@ SelectServerDlg::SelectServerDlg(PreferencesDialog *parent, const char */*name*/
parent->createServerItem( list, "Ximian", "http://bugzilla.ximian.com", "2.10" );
parent->createServerItem( list, "RedHat", "http://bugzilla.redhat.com/bugzilla/", "2.17.1" );
parent->createServerItem( list, "Mandriva", "http://qa.mandriva.com/", "2.17.4" );
- connect( list, SIGNAL( doubleClicked ( QListViewItem *)), this, SLOT( slotDoubleClicked( QListViewItem *)));
+ connect( list, TQT_SIGNAL( doubleClicked ( TQListViewItem *)), this, TQT_SLOT( slotDoubleClicked( TQListViewItem *)));
}
@@ -298,7 +298,7 @@ ServerItem *SelectServerDlg::serverSelected()
return static_cast<ServerItem *>( list->currentItem() );
}
-void SelectServerDlg::slotDoubleClicked( QListViewItem *)
+void SelectServerDlg::slotDoubleClicked( TQListViewItem *)
{
accept();
}
diff --git a/kbugbuster/gui/preferencesdialog.h b/kbugbuster/gui/preferencesdialog.h
index 29c72eaf..9dd0dc05 100644
--- a/kbugbuster/gui/preferencesdialog.h
+++ b/kbugbuster/gui/preferencesdialog.h
@@ -14,11 +14,11 @@ class PreferencesDialog : public KDialogBase
{
Q_OBJECT
public:
- PreferencesDialog( QWidget* parent = 0, const char* name = 0 );
+ PreferencesDialog( TQWidget* parent = 0, const char* name = 0 );
~PreferencesDialog();
- void createServerItem( ServerListView *listView, const QString &name,
- const QString &url, const QString &version );
+ void createServerItem( ServerListView *listView, const TQString &name,
+ const TQString &url, const TQString &version );
public:
void readConfig();
@@ -45,15 +45,15 @@ class PreferencesDialog : public KDialogBase
private:
- QCheckBox *mShowClosedCheckBox;
- QCheckBox *mShowWishesCheckBox;
- QCheckBox *mShowVotedCheckBox;
- QCheckBox *mSendBccCheckBox;
+ TQCheckBox *mShowClosedCheckBox;
+ TQCheckBox *mShowWishesCheckBox;
+ TQCheckBox *mShowVotedCheckBox;
+ TQCheckBox *mSendBccCheckBox;
KIntNumInput *mMinVotesInput;
- QRadioButton *mKMailButton;
- QRadioButton *mDirectButton;
- QRadioButton *mSendmailButton;
- QListView *mServerList;
+ TQRadioButton *mKMailButton;
+ TQRadioButton *mDirectButton;
+ TQRadioButton *mSendmailButton;
+ TQListView *mServerList;
};
class ServerListView;
@@ -66,7 +66,7 @@ public:
SelectServerDlg(PreferencesDialog *parent, const char */*name*/ );
ServerItem *serverSelected();
protected slots:
- void slotDoubleClicked( QListViewItem *);
+ void slotDoubleClicked( TQListViewItem *);
protected:
ServerListView *list;
diff --git a/kbugbuster/gui/serverconfigdialog.cpp b/kbugbuster/gui/serverconfigdialog.cpp
index 32c5e241..feaab83d 100644
--- a/kbugbuster/gui/serverconfigdialog.cpp
+++ b/kbugbuster/gui/serverconfigdialog.cpp
@@ -6,45 +6,45 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qcombobox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqcombobox.h>
-ServerConfigDialog::ServerConfigDialog( QWidget *parent, const char *name ) :
+ServerConfigDialog::ServerConfigDialog( TQWidget *parent, const char *name ) :
KDialogBase( parent, name, true, i18n("Edit Bugzilla Server"), Ok|Cancel )
{
- QWidget *topFrame = makeMainWidget();
+ TQWidget *topFrame = makeMainWidget();
- QGridLayout *topLayout = new QGridLayout( topFrame );
+ TQGridLayout *topLayout = new TQGridLayout( topFrame );
topLayout->setSpacing( spacingHint() );
- QLabel *label;
+ TQLabel *label;
- mServerName = new QLineEdit( topFrame );
- label = new QLabel( mServerName, i18n("Name:"), topFrame );
+ mServerName = new TQLineEdit( topFrame );
+ label = new TQLabel( mServerName, i18n("Name:"), topFrame );
topLayout->addWidget( label, 0, 0 );
topLayout->addWidget( mServerName, 0, 1 );
mServerName->setFocus();
- mServerUrl = new QLineEdit( topFrame );
- label = new QLabel( mServerUrl, i18n("URL:"), topFrame );
+ mServerUrl = new TQLineEdit( topFrame );
+ label = new TQLabel( mServerUrl, i18n("URL:"), topFrame );
topLayout->addWidget( label, 1, 0 );
topLayout->addWidget( mServerUrl, 1, 1 );
- mUser = new QLineEdit( topFrame );
- label = new QLabel( mUser, i18n("User:"), topFrame );
+ mUser = new TQLineEdit( topFrame );
+ label = new TQLabel( mUser, i18n("User:"), topFrame );
topLayout->addWidget( label, 2, 0 );
topLayout->addWidget( mUser, 2, 1 );
mPassword = new KPasswordEdit( topFrame );
- label = new QLabel( mPassword, i18n("Password:"), topFrame );
+ label = new TQLabel( mPassword, i18n("Password:"), topFrame );
topLayout->addWidget( label, 3, 0 );
topLayout->addWidget( mPassword, 3, 1 );
- mVersion = new QComboBox( topFrame );
- label = new QLabel( mVersion, i18n("Bugzilla version:"), topFrame );
+ mVersion = new TQComboBox( topFrame );
+ label = new TQLabel( mVersion, i18n("Bugzilla version:"), topFrame );
topLayout->addWidget( label, 4, 0 );
topLayout->addWidget( mVersion, 4, 1 );
mVersion->insertStringList( BugServerConfig::bugzillaVersions() );
diff --git a/kbugbuster/gui/serverconfigdialog.h b/kbugbuster/gui/serverconfigdialog.h
index 5764bfdf..33d4573b 100644
--- a/kbugbuster/gui/serverconfigdialog.h
+++ b/kbugbuster/gui/serverconfigdialog.h
@@ -12,17 +12,17 @@ class ServerConfigDialog : public KDialogBase
{
Q_OBJECT
public:
- ServerConfigDialog( QWidget *parent = 0 , const char *name = 0 );
+ ServerConfigDialog( TQWidget *parent = 0 , const char *name = 0 );
void setServerConfig( const BugServerConfig & );
BugServerConfig serverConfig();
private:
- QLineEdit *mServerName;
- QLineEdit *mServerUrl;
- QLineEdit *mUser;
+ TQLineEdit *mServerName;
+ TQLineEdit *mServerUrl;
+ TQLineEdit *mUser;
KPasswordEdit *mPassword;
- QComboBox *mVersion;
+ TQComboBox *mVersion;
};
#endif
diff --git a/kbugbuster/gui/severityselectdialog.cpp b/kbugbuster/gui/severityselectdialog.cpp
index 714e6f3a..0ef4e2f7 100644
--- a/kbugbuster/gui/severityselectdialog.cpp
+++ b/kbugbuster/gui/severityselectdialog.cpp
@@ -1,6 +1,6 @@
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kdebug.h>
@@ -10,17 +10,17 @@
#include "severityselectdialog.h"
#include "severityselectdialog.moc"
-SeveritySelectDialog::SeveritySelectDialog(QWidget *parent,const char *name) :
+SeveritySelectDialog::SeveritySelectDialog(TQWidget *parent,const char *name) :
KDialogBase( parent, name, true, i18n("Select Severity"), Ok|Cancel )
{
- mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Severity"), this );
+ mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Severity"), this );
setMainWidget( mButtonGroup );
- QValueList<Bug::Severity> severities = Bug::severities();
- QValueList<Bug::Severity>::ConstIterator it;
+ TQValueList<Bug::Severity> severities = Bug::severities();
+ TQValueList<Bug::Severity>::ConstIterator it;
for( it = severities.begin(); it != severities.end(); ++it ) {
mButtonGroup->insert(
- new QRadioButton( Bug::severityToString( *it ), mButtonGroup ), int(*it) );
+ new TQRadioButton( Bug::severityToString( *it ), mButtonGroup ), int(*it) );
}
}
@@ -34,7 +34,7 @@ Bug::Severity SeveritySelectDialog::selectedSeverity()
return (Bug::Severity)mButtonGroup->id( mButtonGroup->selected() );
}
-QString SeveritySelectDialog::selectedSeverityAsString()
+TQString SeveritySelectDialog::selectedSeverityAsString()
{
return Bug::severityToString( selectedSeverity() );
}
diff --git a/kbugbuster/gui/severityselectdialog.h b/kbugbuster/gui/severityselectdialog.h
index 12f36fe5..150123cd 100644
--- a/kbugbuster/gui/severityselectdialog.h
+++ b/kbugbuster/gui/severityselectdialog.h
@@ -9,15 +9,15 @@ class SeveritySelectDialog : public KDialogBase
{
Q_OBJECT
public:
- SeveritySelectDialog(QWidget *parent=0,const char *name=0);
+ SeveritySelectDialog(TQWidget *parent=0,const char *name=0);
void setSeverity( Bug::Severity );
Bug::Severity selectedSeverity();
- QString selectedSeverityAsString();
+ TQString selectedSeverityAsString();
private:
- QButtonGroup *mButtonGroup;
+ TQButtonGroup *mButtonGroup;
};
#endif
diff --git a/kbugbuster/kresources/kcalresource.cpp b/kbugbuster/kresources/kcalresource.cpp
index c27e8e51..5af8b8be 100644
--- a/kbugbuster/kresources/kcalresource.cpp
+++ b/kbugbuster/kresources/kcalresource.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>
@@ -117,9 +117,9 @@ void KCalResource::writeConfig( KConfig *config )
mPrefs->writeConfig();
}
-QString KCalResource::cacheFile()
+TQString KCalResource::cacheFile()
{
- QString file = locateLocal( "cache", "kcal/kresources/" + identifier() );
+ TQString file = locateLocal( "cache", "kcal/kresources/" + identifier() );
kdDebug() << "KCalResource::cacheFile(): " << file << endl;
return file;
}
@@ -157,8 +157,8 @@ bool KCalResource::doLoad()
BugSystem *kbb = BugSystem::self();
kdDebug() << "KNOWN SERVERS:" << endl;
- QValueList<BugServer *> servers = kbb->serverList();
- QValueList<BugServer *>::ConstIterator it;
+ TQValueList<BugServer *> servers = kbb->serverList();
+ TQValueList<BugServer *>::ConstIterator it;
for( it = servers.begin(); it != servers.end(); ++it ) {
kdDebug() << " " << (*it)->identifier() << endl;
}
@@ -175,9 +175,9 @@ bool KCalResource::doLoad()
Package package = kbb->package( mPrefs->product() );
- connect( kbb, SIGNAL( bugListAvailable( const Package &, const QString &,
+ connect( kbb, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &,
const Bug::List & ) ),
- SLOT( slotBugListAvailable( const Package &, const QString &,
+ TQT_SLOT( slotBugListAvailable( const Package &, const TQString &,
const Bug::List & ) ) );
kbb->retrieveBugList( package, mPrefs->component() );
@@ -185,14 +185,14 @@ bool KCalResource::doLoad()
return true;
}
-void KCalResource::slotBugListAvailable( const Package &, const QString &,
+void KCalResource::slotBugListAvailable( const Package &, const TQString &,
const Bug::List &bugs )
{
kdDebug() << "KCalResource::slotBugListAvailable()" << endl;
if ( bugs.isEmpty() ) return;
- QString masterUid = "kbb_" + BugSystem::self()->server()->identifier();
+ TQString masterUid = "kbb_" + BugSystem::self()->server()->identifier();
KCal::Todo *masterTodo = mCalendar.todo( masterUid );
if ( !masterTodo ) {
masterTodo = new KCal::Todo;
@@ -205,13 +205,13 @@ void KCalResource::slotBugListAvailable( const Package &, const QString &,
for( it = bugs.begin(); it != bugs.end(); ++it ) {
Bug bug = *it;
kdDebug() << " Bug " << bug.number() << ": " << bug.title() << endl;
- QString uid = "KBugBuster_" + bug.number();
+ TQString uid = "KBugBuster_" + bug.number();
KCal::Todo *newTodo = 0;
KCal::Todo *todo = mCalendar.todo( uid );
if ( !todo ) {
newTodo = new KCal::Todo;
newTodo->setUid( uid );
- QString uri = "http://bugs.kde.org/show_bug.cgi?id=%1";
+ TQString uri = "http://bugs.kde.org/show_bug.cgi?id=%1";
newTodo->addAttachment( new KCal::Attachment( uri.arg( bug.number() ) ) );
todo = newTodo;
}
@@ -268,8 +268,8 @@ bool KCalResource::doSave()
mCalendar.save( cacheFile() );
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;
}
diff --git a/kbugbuster/kresources/kcalresource.h b/kbugbuster/kresources/kcalresource.h
index 19270a74..b9683d7e 100644
--- a/kbugbuster/kresources/kcalresource.h
+++ b/kbugbuster/kresources/kcalresource.h
@@ -21,9 +21,9 @@
#ifndef KCALRESOURCE_H
#define KCALRESOURCE_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>
@@ -76,7 +76,7 @@ class KCalResource : public KCal::ResourceCached
/**
Return name of file used as cache for remote file.
*/
- QString cacheFile();
+ TQString cacheFile();
KABC::Lock *lock();
@@ -85,7 +85,7 @@ class KCalResource : public KCal::ResourceCached
void dump() const;
protected slots:
- void slotBugListAvailable( const Package &, const QString &,
+ void slotBugListAvailable( const Package &, const TQString &,
const Bug::List &bugs );
void slotLoadJobResult( KIO::Job * );
diff --git a/kbugbuster/kresources/kcalresourceconfig.cpp b/kbugbuster/kresources/kcalresourceconfig.cpp
index 008aa8c9..58466642 100644
--- a/kbugbuster/kresources/kcalresourceconfig.cpp
+++ b/kbugbuster/kresources/kcalresourceconfig.cpp
@@ -21,8 +21,8 @@
#include <typeinfo>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <klocale.h>
@@ -34,29 +34,29 @@
#include "resourceprefs.h"
#include "kcalresourceconfig.h"
-KCalResourceConfig::KCalResourceConfig( QWidget* parent, const char* name )
+KCalResourceConfig::KCalResourceConfig( 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("Server:"), this );
+ TQLabel *label = new TQLabel( i18n("Server:"), this );
mainLayout->addWidget( label, 0, 0 );
mServerEdit = new KLineEdit( this );
mainLayout->addWidget( mServerEdit, 0, 1 );
- label = new QLabel( i18n("Product:"), this );
+ label = new TQLabel( i18n("Product:"), this );
mainLayout->addWidget( label, 1, 0 );
mProductEdit = new KLineEdit( this );
mainLayout->addWidget( mProductEdit, 1, 1 );
- label = new QLabel( i18n("Component:"), this );
+ label = new TQLabel( i18n("Component:"), this );
mainLayout->addWidget( label, 2, 0 );
mComponentEdit = new KLineEdit( this );
diff --git a/kbugbuster/kresources/kcalresourceconfig.h b/kbugbuster/kresources/kcalresourceconfig.h
index 1381f9d9..6a83ad67 100644
--- a/kbugbuster/kresources/kcalresourceconfig.h
+++ b/kbugbuster/kresources/kcalresourceconfig.h
@@ -35,7 +35,7 @@ class KCalResourceConfig : public KRES::ConfigWidget
{
Q_OBJECT
public:
- KCalResourceConfig( QWidget *parent = 0, const char *name = 0 );
+ KCalResourceConfig( TQWidget *parent = 0, const char *name = 0 );
public slots:
virtual void loadSettings( KRES::Resource *resource );
diff --git a/kbugbuster/main.cpp b/kbugbuster/main.cpp
index 456d9dc6..f2e98fca 100644
--- a/kbugbuster/main.cpp
+++ b/kbugbuster/main.cpp
@@ -73,8 +73,8 @@ int main(int argc, char *argv[])
// Since all background jobs remaing running after closing the
// main window we force a quit here
- QObject::connect( &app, SIGNAL( lastWindowClosed() ),
- &app, SLOT( quit() ) );
+ TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ),
+ &app, TQT_SLOT( quit() ) );
mainWin->show();
return app.exec();
}
diff --git a/kcachegrind/kcachegrind/cachegrindloader.cpp b/kcachegrind/kcachegrind/cachegrindloader.cpp
index e0bf2b83..0a146de0 100644
--- a/kcachegrind/kcachegrind/cachegrindloader.cpp
+++ b/kcachegrind/kcachegrind/cachegrindloader.cpp
@@ -18,8 +18,8 @@
#include <errno.h>
-#include <qfile.h>
-#include <qcstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -42,9 +42,9 @@ class CachegrindLoader: public Loader
public:
CachegrindLoader();
- bool canLoadTrace(QFile* file);
+ bool canLoadTrace(TQFile* file);
bool loadTrace(TracePart*);
- bool isPartOfTrace(QString file, TraceData*);
+ bool isPartOfTrace(TQString file, TraceData*);
private:
bool loadTraceInternal(TracePart*);
@@ -58,17 +58,17 @@ private:
void ensureObject();
void ensureFile();
void ensureFunction();
- void setObject(const QString&);
- void setCalledObject(const QString&);
- void setFile(const QString&);
- void setCalledFile(const QString&);
- void setFunction(const QString&);
- void setCalledFunction(const QString&);
-
- QString _emptyString;
+ void setObject(const TQString&);
+ void setCalledObject(const TQString&);
+ void setFile(const TQString&);
+ void setCalledFile(const TQString&);
+ void setFunction(const TQString&);
+ void setCalledFunction(const TQString&);
+
+ TQString _emptyString;
// current line in file to read in
- QString _filename;
+ TQString _filename;
int _lineNo;
TraceSubMapping* subMapping;
@@ -120,13 +120,13 @@ private:
* "Name" : Regular name
*/
void clearCompression();
- const QString& checkUnknown(const QString& n);
- TraceObject* compressedObject(const QString& name);
- TraceFile* compressedFile(const QString& name);
- TraceFunction* compressedFunction(const QString& name,
+ const TQString& checkUnknown(const TQString& n);
+ TraceObject* compressedObject(const TQString& name);
+ TraceFile* compressedFile(const TQString& name);
+ TraceFunction* compressedFunction(const TQString& name,
TraceFile*, TraceObject*);
- QPtrVector<TraceCostItem> _objectVector, _fileVector, _functionVector;
+ TQPtrVector<TraceCostItem> _objectVector, _fileVector, _functionVector;
};
@@ -140,16 +140,16 @@ CachegrindLoader::CachegrindLoader()
: Loader("Callgrind",
i18n( "Import filter for Cachegrind/Callgrind generated profile data files") )
{
- _emptyString = QString("");
+ _emptyString = TQString("");
}
-bool CachegrindLoader::canLoadTrace(QFile* file)
+bool CachegrindLoader::canLoadTrace(TQFile* file)
{
if (!file) return false;
if (!file->isOpen()) {
if (!file->open( IO_ReadOnly ) ) {
- kdDebug() << QFile::encodeName(_filename) << ": "
+ kdDebug() << TQFile::encodeName(_filename) << ": "
<< strerror( errno ) << endl;
return false;
}
@@ -165,7 +165,7 @@ bool CachegrindLoader::canLoadTrace(QFile* file)
return false;
buf[read] = 0;
- QCString s;
+ TQCString s;
s.setRawData(buf, read+1);
int pos = s.find("events:");
if (pos>0 && buf[pos-1] != '\n') pos = -1;
@@ -181,8 +181,8 @@ bool CachegrindLoader::loadTrace(TracePart* p)
CachegrindLoader l;
/* emit progress signals via the singleton loader */
- connect(&l, SIGNAL(updateStatus(QString, int)),
- this, SIGNAL(updateStatus(QString, int)));
+ connect(&l, TQT_SIGNAL(updateStatus(TQString, int)),
+ this, TQT_SIGNAL(updateStatus(TQString, int)));
return l.loadTraceInternal(p);
}
@@ -335,13 +335,13 @@ void CachegrindLoader::clearCompression()
_functionVector.resize(10000);
}
-const QString& CachegrindLoader::checkUnknown(const QString& n)
+const TQString& CachegrindLoader::checkUnknown(const TQString& n)
{
if (n == "???") return _emptyString;
return n;
}
-TraceObject* CachegrindLoader::compressedObject(const QString& name)
+TraceObject* CachegrindLoader::compressedObject(const TQString& name)
{
if ((name[0] != '(') || !name[1].isDigit()) return _data->object(checkUnknown(name));
@@ -368,7 +368,7 @@ TraceObject* CachegrindLoader::compressedObject(const QString& name)
_objectVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
o = (TraceObject*) _objectVector.at(index);
if (o && (o->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -395,7 +395,7 @@ TraceObject* CachegrindLoader::compressedObject(const QString& name)
// Note: Callgrind sometimes gives different IDs for same file
// (when references to same source file come from different ELF objects)
-TraceFile* CachegrindLoader::compressedFile(const QString& name)
+TraceFile* CachegrindLoader::compressedFile(const TQString& name)
{
if ((name[0] != '(') || !name[1].isDigit()) return _data->file(checkUnknown(name));
@@ -422,7 +422,7 @@ TraceFile* CachegrindLoader::compressedFile(const QString& name)
_fileVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
f = (TraceFile*) _fileVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -449,7 +449,7 @@ TraceFile* CachegrindLoader::compressedFile(const QString& name)
// Note: Callgrind gives different IDs even for same function
// when parts of the function are from different source files.
// Thus, it is no error when multiple indexes map to same function.
-TraceFunction* CachegrindLoader::compressedFunction(const QString& name,
+TraceFunction* CachegrindLoader::compressedFunction(const TQString& name,
TraceFile* file,
TraceObject* object)
{
@@ -481,7 +481,7 @@ TraceFunction* CachegrindLoader::compressedFunction(const QString& name,
_functionVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
f = (TraceFunction*) _functionVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -528,7 +528,7 @@ void CachegrindLoader::ensureObject()
currentPartObject = currentObject->partObject(_part);
}
-void CachegrindLoader::setObject(const QString& name)
+void CachegrindLoader::setObject(const TQString& name)
{
currentObject = compressedObject(name);
if (!currentObject) {
@@ -543,7 +543,7 @@ void CachegrindLoader::setObject(const QString& name)
currentPartFunction = 0;
}
-void CachegrindLoader::setCalledObject(const QString& name)
+void CachegrindLoader::setCalledObject(const TQString& name)
{
currentCalledObject = compressedObject(name);
@@ -567,7 +567,7 @@ void CachegrindLoader::ensureFile()
currentPartFile = currentFile->partFile(_part);
}
-void CachegrindLoader::setFile(const QString& name)
+void CachegrindLoader::setFile(const TQString& name)
{
currentFile = compressedFile(name);
@@ -583,7 +583,7 @@ void CachegrindLoader::setFile(const QString& name)
currentPartLine = 0;
}
-void CachegrindLoader::setCalledFile(const QString& name)
+void CachegrindLoader::setCalledFile(const TQString& name)
{
currentCalledFile = compressedFile(name);
@@ -616,7 +616,7 @@ void CachegrindLoader::ensureFunction()
currentPartObject);
}
-void CachegrindLoader::setFunction(const QString& name)
+void CachegrindLoader::setFunction(const TQString& name)
{
ensureFile();
ensureObject();
@@ -643,7 +643,7 @@ void CachegrindLoader::setFunction(const QString& name)
currentPartLine = 0;
}
-void CachegrindLoader::setCalledFunction(const QString& name)
+void CachegrindLoader::setCalledFunction(const TQString& name)
{
// if called object/file not set, use current object/file
if (!currentCalledObject) {
@@ -723,7 +723,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
_part = part;
_data = part->data();
- QFile* pFile = part->file();
+ TQFile* pFile = part->file();
if (!pFile) return false;
@@ -735,7 +735,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
return false;
}
kdDebug() << "Loading " << _filename << " ..." << endl;
- QString statusMsg = i18n("Loading %1").arg(_filename);
+ TQString statusMsg = i18n("Loading %1").arg(_filename);
int statusProgress = 0;
emit updateStatus(statusMsg,statusProgress);
@@ -762,7 +762,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
#if TRACE_LOADER
kdDebug() << "[CachegrindLoader] " << _filename << ":" << _lineNo
- << " - '" << QString(line) << "'" << endl;
+ << " - '" << TQString(line) << "'" << endl;
#endif
// if we cannot strip a character, this was an empty line
@@ -776,7 +776,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!parsePosition(line, currentPos)) {
kdError() << _filename << ":" << _lineNo
<< " - Invalid position specification ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
continue;
}
@@ -854,7 +854,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// cmd:
if (line.stripPrefix("md:")) {
- QString command = QString(line).stripWhiteSpace();
+ TQString command = TQString(line).stripWhiteSpace();
if (!_data->command().isEmpty() &&
_data->command() != command) {
@@ -953,7 +953,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// thread:
if (line.stripPrefix("hread:")) {
- part->setThreadID(QString(line).toInt());
+ part->setThreadID(TQString(line).toInt());
continue;
}
@@ -1017,19 +1017,19 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// part:
if (line.stripPrefix("art:")) {
- part->setPartNumber(QString(line).toInt());
+ part->setPartNumber(TQString(line).toInt());
continue;
}
// pid:
if (line.stripPrefix("id:")) {
- part->setProcessID(QString(line).toInt());
+ part->setProcessID(TQString(line).toInt());
continue;
}
// positions:
if (line.stripPrefix("ositions:")) {
- QString positions(line);
+ TQString positions(line);
hasLineInfo = (positions.find("line")>=0);
hasAddrInfo = (positions.find("instr")>=0);
continue;
@@ -1079,7 +1079,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
}
kdError() << _filename << ":" << _lineNo
- << " - Invalid line '" << c << QString(line) << "'" << endl;
+ << " - Invalid line '" << c << TQString(line) << "'" << endl;
continue;
}
@@ -1183,7 +1183,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
else if (nextLineType == CallCost) {
@@ -1250,7 +1250,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of call cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
else { // (nextLineType == BoringJump || nextLineType == CondJump)
@@ -1301,7 +1301,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of jump cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
diff --git a/kcachegrind/kcachegrind/callgraphview.cpp b/kcachegrind/kcachegrind/callgraphview.cpp
index f7e50514..990d4014 100644
--- a/kcachegrind/kcachegrind/callgraphview.cpp
+++ b/kcachegrind/kcachegrind/callgraphview.cpp
@@ -23,17 +23,17 @@
#include <stdlib.h>
#include <math.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qcanvas.h>
-#include <qwmatrix.h>
-#include <qpair.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qprocess.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqcanvas.h>
+#include <tqwmatrix.h>
+#include <tqpair.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqprocess.h>
#include <kdebug.h>
#include <klocale.h>
@@ -95,8 +95,8 @@ int GraphEdgeList::compareItems(Item item1, Item item2)
dx1 -= x; dy1 -= y;
}
else {
- QPointArray a1 = e1->controlPoints();
- QPointArray a2 = e2->controlPoints();
+ TQPointArray a1 = e1->controlPoints();
+ TQPointArray a2 = e2->controlPoints();
a1.point(a1.count()-2,&x,&y);
a2.point(a2.count()-1,&dx2,&dy2);
dx2 -= x; dy2 -= y;
@@ -300,7 +300,7 @@ GraphEdge::GraphEdge()
_lastFromCaller = true;
}
-QString GraphEdge::prettyName()
+TQString GraphEdge::prettyName()
{
if (_c) return _c->prettyName();
if (_from) return i18n("Call(s) from %1").arg(_from->prettyName());
@@ -369,17 +369,17 @@ TraceCall* GraphEdge::priorVisible()
// GraphOptions
//
-QString GraphOptions::layoutString(Layout l)
+TQString GraphOptions::layoutString(Layout l)
{
- if (l == Circular) return QString("Circular");
- if (l == LeftRight) return QString("LeftRight");
- return QString("TopDown");
+ if (l == Circular) return TQString("Circular");
+ if (l == LeftRight) return TQString("LeftRight");
+ return TQString("TopDown");
}
-GraphOptions::Layout GraphOptions::layout(QString s)
+GraphOptions::Layout GraphOptions::layout(TQString s)
{
- if (s == QString("Circular")) return Circular;
- if (s == QString("LeftRight")) return LeftRight;
+ if (s == TQString("Circular")) return Circular;
+ if (s == TQString("LeftRight")) return LeftRight;
return TopDown;
}
@@ -413,12 +413,12 @@ GraphExporter::GraphExporter()
_go = this;
_tmpFile = 0;
_item = 0;
- reset(0, 0, 0, TraceItem::NoCostType, QString::null);
+ reset(0, 0, 0, TraceItem::NoCostType, TQString::null);
}
GraphExporter::GraphExporter(TraceData* d, TraceFunction* f, TraceCostType* ct,
- TraceItem::CostType gt, QString filename)
+ TraceItem::CostType gt, TQString filename)
{
_go = this;
_tmpFile = 0;
@@ -439,7 +439,7 @@ GraphExporter::~GraphExporter()
void GraphExporter::reset(TraceData*, TraceItem* i, TraceCostType* ct,
- TraceItem::CostType gt, QString filename)
+ TraceItem::CostType gt, TQString filename)
{
_graphCreated = false;
_nodeMap.clear();
@@ -467,7 +467,7 @@ void GraphExporter::reset(TraceData*, TraceItem* i, TraceCostType* ct,
if (!i) return;
if (filename.isEmpty()) {
- _tmpFile = new KTempFile(QString::null, ".dot");
+ _tmpFile = new KTempFile(TQString::null, ".dot");
_dotName = _tmpFile->name();
_useBox = true;
}
@@ -538,18 +538,18 @@ void GraphExporter::writeDot()
{
if (!_item) return;
- QFile* file = 0;
- QTextStream* stream = 0;
+ TQFile* file = 0;
+ TQTextStream* stream = 0;
if (_tmpFile)
stream = _tmpFile->textStream();
else {
- file = new QFile(_dotName);
+ file = new TQFile(_dotName);
if ( !file->open( IO_WriteOnly ) ) {
kdError() << "Can't write dot file '" << _dotName << "'" << endl;
return;
}
- stream = new QTextStream(file);
+ stream = new TQTextStream(file);
}
if (!_graphCreated) createGraph();
@@ -563,7 +563,7 @@ void GraphExporter::writeDot()
*stream << "digraph \"callgraph\" {\n";
if (_go->layout() == LeftRight) {
- *stream << QString(" rankdir=LR;\n");
+ *stream << TQString(" rankdir=LR;\n");
}
else if (_go->layout() == Circular) {
TraceFunction *f = 0;
@@ -579,12 +579,12 @@ void GraphExporter::writeDot()
break;
}
if (f)
- *stream << QString(" center=F%1;\n").arg((long)f, 0, 16);
- *stream << QString(" overlap=false;\n splines=true;\n");
+ *stream << TQString(" center=F%1;\n").arg((long)f, 0, 16);
+ *stream << TQString(" overlap=false;\n splines=true;\n");
}
// for clustering
- QMap<TraceCostItem*,QPtrList<GraphNode> > nLists;
+ TQMap<TraceCostItem*,TQPtrList<GraphNode> > nLists;
GraphNodeMap::Iterator nit;
for ( nit = _nodeMap.begin();
@@ -606,19 +606,19 @@ void GraphExporter::writeDot()
nLists[g].append(&n);
}
- QMap<TraceCostItem*,QPtrList<GraphNode> >::Iterator lit;
+ TQMap<TraceCostItem*,TQPtrList<GraphNode> >::Iterator lit;
int cluster = 0;
for ( lit = nLists.begin();
lit != nLists.end(); ++lit, cluster++ ) {
- QPtrList<GraphNode>& l = lit.data();
+ TQPtrList<GraphNode>& l = lit.data();
TraceCostItem* i = lit.key();
if (_go->clusterGroups() && i) {
- QString iabr = i->prettyName();
+ TQString iabr = i->prettyName();
if ((int)iabr.length() > Configuration::maxSymbolLength())
iabr = iabr.left(Configuration::maxSymbolLength()) + "...";
- *stream << QString("subgraph \"cluster%1\" { label=\"%2\";\n")
+ *stream << TQString("subgraph \"cluster%1\" { label=\"%2\";\n")
.arg(cluster).arg(iabr);
}
@@ -626,25 +626,25 @@ void GraphExporter::writeDot()
for(np = l.first(); np; np = l.next() ) {
TraceFunction* f = np->function();
- QString abr = f->prettyName();
+ TQString abr = f->prettyName();
if ((int)abr.length() > Configuration::maxSymbolLength())
abr = abr.left(Configuration::maxSymbolLength()) + "...";
- *stream << QString(" F%1 [").arg((long)f, 0, 16);
+ *stream << TQString(" F%1 [").arg((long)f, 0, 16);
if (_useBox) {
// make label 3 lines for CallGraphView
- *stream << QString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n")
+ *stream << TQString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n")
.arg(abr)
.arg(SubCost(np->incl).pretty());
}
else
- *stream << QString("label=\"%1\\n%2\"];\n")
+ *stream << TQString("label=\"%1\\n%2\"];\n")
.arg(abr)
.arg(SubCost(np->incl).pretty());
}
if (_go->clusterGroups() && i)
- *stream << QString("}\n");
+ *stream << TQString("}\n");
}
GraphEdgeMap::Iterator eit;
@@ -674,20 +674,20 @@ void GraphExporter::writeDot()
from.callingSet.remove(&e);
to.callerSet.remove(&e);
- *stream << QString(" F%1 -> F%2 [weight=%3")
+ *stream << TQString(" F%1 -> F%2 [weight=%3")
.arg((long)e.from(), 0, 16)
.arg((long)e.to(), 0, 16)
.arg((long)log(log(e.cost)));
if (_go->detailLevel() ==1)
- *stream << QString(",label=\"%1\"")
+ *stream << TQString(",label=\"%1\"")
.arg(SubCost(e.cost).pretty());
else if (_go->detailLevel() ==2)
- *stream << QString(",label=\"%3\\n%4 x\"")
+ *stream << TQString(",label=\"%3\\n%4 x\"")
.arg(SubCost(e.cost).pretty())
.arg(SubCost(e.count).pretty());
- *stream << QString("];\n");
+ *stream << TQString("];\n");
}
if (_go->showSkipped()) {
@@ -713,9 +713,9 @@ void GraphExporter::writeDot()
e->cost = costSum;
e->count = countSum;
- *stream << QString(" R%1 [shape=point,label=\"\"];\n")
+ *stream << TQString(" R%1 [shape=point,label=\"\"];\n")
.arg((long)n.function(), 0, 16);
- *stream << QString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n")
+ *stream << TQString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n")
.arg((long)n.function(), 0, 16)
.arg((long)n.function(), 0, 16)
.arg(SubCost(costSum).pretty())
@@ -736,9 +736,9 @@ void GraphExporter::writeDot()
e->cost = costSum;
e->count = countSum;
- *stream << QString(" S%1 [shape=point,label=\"\"];\n")
+ *stream << TQString(" S%1 [shape=point,label=\"\"];\n")
.arg((long)n.function(), 0, 16);
- *stream << QString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n")
+ *stream << TQString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n")
.arg((long)n.function(), 0, 16)
.arg((long)n.function(), 0, 16)
.arg(SubCost(costSum).pretty())
@@ -783,7 +783,7 @@ void GraphExporter::sortEdges()
}
}
-TraceFunction* GraphExporter::toFunc(QString s)
+TraceFunction* GraphExporter::toFunc(TQString s)
{
if (s[0] != 'F') return 0;
bool ok;
@@ -963,8 +963,8 @@ void GraphExporter::buildGraph(TraceFunction* f, int d,
//
// PannerView
//
-PannerView::PannerView(QWidget * parent, const char * name)
- : QCanvasView(parent, name, WNoAutoErase | WStaticContents)
+PannerView::PannerView(TQWidget * parent, const char * name)
+ : TQCanvasView(parent, name, WNoAutoErase | WStaticContents)
{
_movingZoomRect = false;
@@ -973,31 +973,31 @@ PannerView::PannerView(QWidget * parent, const char * name)
setBackgroundMode(Qt::NoBackground);
}
-void PannerView::setZoomRect(QRect r)
+void PannerView::setZoomRect(TQRect r)
{
- QRect oldRect = _zoomRect;
+ TQRect oldRect = _zoomRect;
_zoomRect = r;
updateContents(oldRect);
updateContents(_zoomRect);
}
-void PannerView::drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph)
+void PannerView::drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph)
{
- // save/restore around QCanvasView::drawContents seems to be needed
+ // save/restore around TQCanvasView::drawContents seems to be needed
// for QT 3.0 to get the red rectangle drawn correct
p->save();
- QCanvasView::drawContents(p,clipx,clipy,clipw,cliph);
+ TQCanvasView::drawContents(p,clipx,clipy,clipw,cliph);
p->restore();
if (_zoomRect.isValid()) {
p->setPen(red.dark());
p->drawRect(_zoomRect);
p->setPen(red);
- p->drawRect(QRect(_zoomRect.x()+1, _zoomRect.y()+1,
+ p->drawRect(TQRect(_zoomRect.x()+1, _zoomRect.y()+1,
_zoomRect.width()-2, _zoomRect.height()-2));
}
}
-void PannerView::contentsMousePressEvent(QMouseEvent* e)
+void PannerView::contentsMousePressEvent(TQMouseEvent* e)
{
if (_zoomRect.isValid()) {
if (!_zoomRect.contains(e->pos()))
@@ -1009,7 +1009,7 @@ void PannerView::contentsMousePressEvent(QMouseEvent* e)
}
}
-void PannerView::contentsMouseMoveEvent(QMouseEvent* e)
+void PannerView::contentsMouseMoveEvent(TQMouseEvent* e)
{
if (_movingZoomRect) {
emit zoomRectMoved(e->pos().x() - _lastPos.x(), e->pos().y() - _lastPos.y());
@@ -1017,7 +1017,7 @@ void PannerView::contentsMouseMoveEvent(QMouseEvent* e)
}
}
-void PannerView::contentsMouseReleaseEvent(QMouseEvent*)
+void PannerView::contentsMouseReleaseEvent(TQMouseEvent*)
{
_movingZoomRect = false;
emit zoomRectMoveFinished();
@@ -1032,8 +1032,8 @@ void PannerView::contentsMouseReleaseEvent(QMouseEvent*)
//
CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n,
- int x, int y, int w, int h, QCanvas* c)
- : QCanvasRectangle(x, y, w, h, c), _node(n), _view(v)
+ int x, int y, int w, int h, TQCanvas* c)
+ : TQCanvasRectangle(x, y, w, h, c), _node(n), _view(v)
{
setPosition(0, DrawParams::TopCenter);
setPosition(1, DrawParams::BottomCenter);
@@ -1061,7 +1061,7 @@ CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n,
double total = totalCost->subCost(_view->costType());
double inclP = 100.0 * n->incl / total;
if (_view->topLevel()->showPercentage())
- setText(1, QString("%1 %")
+ setText(1, TQString("%1 %")
.arg(inclP, 0, 'f', Configuration::percentPrecision()));
else
setText(1, SubCost(n->incl).pretty());
@@ -1078,15 +1078,15 @@ void CanvasNode::updateGroup()
{
if (!_view || !_node) return;
- QColor c = Configuration::functionColor(_view->groupType(),
+ TQColor c = Configuration::functionColor(_view->groupType(),
_node->function());
setBackColor(c);
update();
}
-void CanvasNode::drawShape(QPainter& p)
+void CanvasNode::drawShape(TQPainter& p)
{
- QRect r = rect(), origRect = r;
+ TQRect r = rect(), origRect = r;
r.setRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2);
@@ -1095,7 +1095,7 @@ void CanvasNode::drawShape(QPainter& p)
r.setRect(r.x()+2, r.y()+2, r.width()-4, r.height()-4);
if (StoredDrawParams::selected() && _view->hasFocus()) {
- _view->style().drawPrimitive( QStyle::PE_FocusRect, &p, r,
+ _view->style().drawPrimitive( TQStyle::PE_FocusRect, &p, r,
_view->colorGroup());
}
@@ -1114,14 +1114,14 @@ void CanvasNode::drawShape(QPainter& p)
//
CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
- int x, int y, int w, int h, QCanvas* c)
- : QCanvasRectangle(x, y, w, h, c), _ce(ce), _view(v)
+ int x, int y, int w, int h, TQCanvas* c)
+ : TQCanvasRectangle(x, y, w, h, c), _ce(ce), _view(v)
{
GraphEdge* e = ce->edge();
if (!e) return;
setPosition(1, DrawParams::TopCenter);
- setText(1, QString("%1 x").arg(SubCost(e->count).pretty()));
+ setText(1, TQString("%1 x").arg(SubCost(e->count).pretty()));
setPosition(0, DrawParams::BottomCenter);
@@ -1141,24 +1141,24 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
double total = totalCost->subCost(_view->costType());
double inclP = 100.0 * e->cost / total;
if (_view->topLevel()->showPercentage())
- setText(0, QString("%1 %")
+ setText(0, TQString("%1 %")
.arg(inclP, 0, 'f', Configuration::percentPrecision()));
else
setText(0, SubCost(e->cost).pretty());
setPixmap(0, percentagePixmap(25,10,(int)(inclP+.5), Qt::blue, true));
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
- QPixmap p= loader->loadIcon(icon, KIcon::Small, 0,
+ TQPixmap p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
setPixmap(0, p);
}
}
-void CanvasEdgeLabel::drawShape(QPainter& p)
+void CanvasEdgeLabel::drawShape(TQPainter& p)
{
- QRect r = rect();
+ TQRect r = rect();
//p.setPen(blue);
//p.drawRect(r);
RectDrawing d(r);
@@ -1169,23 +1169,23 @@ void CanvasEdgeLabel::drawShape(QPainter& p)
//
// CanvasEdgeArrow
-CanvasEdgeArrow::CanvasEdgeArrow(CanvasEdge* ce, QCanvas* c)
- : QCanvasPolygon(c), _ce(ce)
+CanvasEdgeArrow::CanvasEdgeArrow(CanvasEdge* ce, TQCanvas* c)
+ : TQCanvasPolygon(c), _ce(ce)
{}
-void CanvasEdgeArrow::drawShape(QPainter& p)
+void CanvasEdgeArrow::drawShape(TQPainter& p)
{
if (_ce->isSelected()) p.setBrush(Qt::red);
- QCanvasPolygon::drawShape(p);
+ TQCanvasPolygon::drawShape(p);
}
//
// CanvasEdge
//
-CanvasEdge::CanvasEdge(GraphEdge* e, QCanvas* c)
- : QCanvasSpline(c), _edge(e)
+CanvasEdge::CanvasEdge(GraphEdge* e, TQCanvas* c)
+ : TQCanvasSpline(c), _edge(e)
{
_label = 0;
_arrow = 0;
@@ -1193,12 +1193,12 @@ CanvasEdge::CanvasEdge(GraphEdge* e, QCanvas* c)
void CanvasEdge::setSelected(bool s)
{
- QCanvasItem::setSelected(s);
+ TQCanvasItem::setSelected(s);
update();
if (_arrow) _arrow->setSelected(s);
}
-QPointArray CanvasEdge::areaPoints() const
+TQPointArray CanvasEdge::areaPoints() const
{
int minX = poly[0].x(), minY = poly[0].y();
int maxX = minX, maxY = minY;
@@ -1213,7 +1213,7 @@ QPointArray CanvasEdge::areaPoints() const
if (poly[i].y() > maxY) maxY = poly[i].y();
if (0) qDebug(" P %d: %d/%d", i, poly[i].x(), poly[i].y());
}
- QPointArray a = poly.copy(), b = poly.copy();
+ TQPointArray a = poly.copy(), b = poly.copy();
if (minX == maxX) {
a.translate(-2, 0);
b.translate(2, 0);
@@ -1235,7 +1235,7 @@ QPointArray CanvasEdge::areaPoints() const
return a;
}
-void CanvasEdge::drawShape(QPainter& p)
+void CanvasEdge::drawShape(TQPainter& p)
{
if (isSelected()) p.setPen(Qt::red);
@@ -1247,10 +1247,10 @@ void CanvasEdge::drawShape(QPainter& p)
// CanvasFrame
//
-QPixmap* CanvasFrame::_p = 0;
+TQPixmap* CanvasFrame::_p = 0;
-CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
- : QCanvasRectangle(c)
+CanvasFrame::CanvasFrame(CanvasNode* n, TQCanvas* c)
+ : TQCanvasRectangle(c)
{
if (!_p) {
@@ -1258,27 +1258,27 @@ CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
float v1 = 130.0, v2 = 10.0, v = v1, f = 1.03;
// calculate pix size
- QRect r(0, 0, 30, 30);
+ TQRect r(0, 0, 30, 30);
while (v>v2) {
r.setRect(r.x()-d, r.y()-d, r.width()+2*d, r.height()+2*d);
v /= f;
}
- _p = new QPixmap(r.size());
+ _p = new TQPixmap(r.size());
_p->fill(Qt::white);
- QPainter p(_p);
+ TQPainter p(_p);
p.setPen(Qt::NoPen);
r.moveBy(-r.x(), -r.y());
while (v<v1) {
v *= f;
- p.setBrush(QColor(265-(int)v, 265-(int)v, 265-(int)v));
+ p.setBrush(TQColor(265-(int)v, 265-(int)v, 265-(int)v));
- p.drawRect(QRect(r.x(), r.y(), r.width(), d));
- p.drawRect(QRect(r.x(), r.bottom()-d, r.width(), d));
- p.drawRect(QRect(r.x(), r.y()+d, d, r.height()-2*d));
- p.drawRect(QRect(r.right()-d, r.y()+d, d, r.height()-2*d));
+ p.drawRect(TQRect(r.x(), r.y(), r.width(), d));
+ p.drawRect(TQRect(r.x(), r.bottom()-d, r.width(), d));
+ p.drawRect(TQRect(r.x(), r.y()+d, d, r.height()-2*d));
+ p.drawRect(TQRect(r.right()-d, r.y()+d, d, r.height()-2*d));
r.setRect(r.x()+d, r.y()+d, r.width()-2*d, r.height()-2*d);
}
@@ -1290,7 +1290,7 @@ CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
}
-void CanvasFrame::drawShape(QPainter& p)
+void CanvasFrame::drawShape(TQPainter& p)
{
p.drawPixmap( int(x()), int(y()), *_p );
}
@@ -1305,25 +1305,25 @@ void CanvasFrame::drawShape(QPainter& p)
class CallGraphTip: public QToolTip
{
public:
- CallGraphTip( QWidget* p ):QToolTip(p) {}
+ CallGraphTip( TQWidget* p ):TQToolTip(p) {}
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
};
-void CallGraphTip::maybeTip( const QPoint& pos )
+void CallGraphTip::maybeTip( const TQPoint& pos )
{
if (!parentWidget()->inherits( "CallGraphView" )) return;
CallGraphView* cgv = (CallGraphView*)parentWidget();
- QPoint cPos = cgv->viewportToContents(pos);
+ TQPoint cPos = cgv->viewportToContents(pos);
if (0) qDebug("CallGraphTip for (%d/%d) -> (%d/%d) ?",
pos.x(), pos.y(), cPos.x(), cPos.y());
- QCanvasItemList l = cgv->canvas()->collisions(cPos);
+ TQCanvasItemList l = cgv->canvas()->collisions(cPos);
if (l.count() == 0) return;
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
CanvasNode* cn = (CanvasNode*)i;
@@ -1331,10 +1331,10 @@ void CallGraphTip::maybeTip( const QPoint& pos )
if (0) qDebug("CallGraphTip: Mouse on Node '%s'",
n->function()->prettyName().ascii());
- QString tipStr = QString("%1 (%2)").arg(cn->text(0)).arg(cn->text(1));
- QPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft());
- QPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight());
- tip(QRect(vPosTL, vPosBR), tipStr);
+ TQString tipStr = TQString("%1 (%2)").arg(cn->text(0)).arg(cn->text(1));
+ TQPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft());
+ TQPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight());
+ tip(TQRect(vPosTL, vPosBR), tipStr);
return;
}
@@ -1351,13 +1351,13 @@ void CallGraphTip::maybeTip( const QPoint& pos )
if (0) qDebug("CallGraphTip: Mouse on Edge '%s'",
e->prettyName().ascii());
- QString tipStr;
+ TQString tipStr;
if (!ce->label())
tipStr = e->prettyName();
else
- tipStr = QString("%1 (%2)")
+ tipStr = TQString("%1 (%2)")
.arg(ce->label()->text(0)).arg(ce->label()->text(1));
- tip(QRect(pos.x()-5,pos.y()-5,pos.x()+5,pos.y()+5), tipStr);
+ tip(TQRect(pos.x()-5,pos.y()-5,pos.x()+5,pos.y()+5), tipStr);
}
}
@@ -1368,8 +1368,8 @@ void CallGraphTip::maybeTip( const QPoint& pos )
// CallGraphView
//
CallGraphView::CallGraphView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QCanvasView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQCanvasView(parent, name), TraceItemView(parentView)
{
_zoomPosition = DEFAULT_ZOOMPOS;
_lastAutoPosition = TopLeft;
@@ -1383,30 +1383,30 @@ CallGraphView::CallGraphView(TraceItemView* parentView,
_exporter.setGraphOptions(this);
- _completeView->setVScrollBarMode(QScrollView::AlwaysOff);
- _completeView->setHScrollBarMode(QScrollView::AlwaysOff);
+ _completeView->setVScrollBarMode(TQScrollView::AlwaysOff);
+ _completeView->setHScrollBarMode(TQScrollView::AlwaysOff);
_completeView->raise();
_completeView->hide();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
setBackgroundMode(Qt::NoBackground);
- connect(this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(contentsMovingSlot(int,int)));
- connect(_completeView, SIGNAL(zoomRectMoved(int,int)),
- this, SLOT(zoomRectMoved(int,int)));
- connect(_completeView, SIGNAL(zoomRectMoveFinished()),
- this, SLOT(zoomRectMoveFinished()));
+ connect(this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(contentsMovingSlot(int,int)));
+ connect(_completeView, TQT_SIGNAL(zoomRectMoved(int,int)),
+ this, TQT_SLOT(zoomRectMoved(int,int)));
+ connect(_completeView, TQT_SIGNAL(zoomRectMoveFinished()),
+ this, TQT_SLOT(zoomRectMoveFinished()));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
// tooltips...
_tip = new CallGraphTip(this);
_renderProcess = 0;
_prevSelectedNode = 0;
- connect(&_renderTimer, SIGNAL(timeout()),
- this, SLOT(showRenderWarning()));
+ connect(&_renderTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(showRenderWarning()));
}
CallGraphView::~CallGraphView()
@@ -1420,7 +1420,7 @@ CallGraphView::~CallGraphView()
}
}
-QString CallGraphView::whatsThis() const
+TQString CallGraphView::whatsThis() const
{
return i18n( "<b>Call Graph around active Function</b>"
"<p>Depending on configuration, this view shows "
@@ -1440,11 +1440,11 @@ QString CallGraphView::whatsThis() const
"Call Treemap; the selected function is highlighted.<p>");
}
-void CallGraphView::updateSizes(QSize s)
+void CallGraphView::updateSizes(TQSize s)
{
if (!_canvas) return;
- if (s == QSize(0,0)) s = size();
+ if (s == TQSize(0,0)) s = size();
// the part of the canvas that should be visible
int cWidth = _canvas->width() - 2*_xMargin + 100;
@@ -1478,7 +1478,7 @@ void CallGraphView::updateSizes(QSize s)
_canvas->width(), _canvas->height(),
cWidth, cHeight, zoom);
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale( zoom, zoom );
_completeView->setWorldMatrix(wm);
@@ -1497,22 +1497,22 @@ void CallGraphView::updateSizes(QSize s)
int cvH = _completeView->height();
int x = width()- cvW - verticalScrollBar()->width() -2;
int y = height()-cvH - horizontalScrollBar()->height() -2;
- QPoint oldZoomPos = _completeView->pos();
- QPoint newZoomPos = QPoint(0,0);
+ TQPoint oldZoomPos = _completeView->pos();
+ TQPoint newZoomPos = TQPoint(0,0);
ZoomPosition zp = _zoomPosition;
if (zp == Auto) {
- QPoint tl1Pos = viewportToContents(QPoint(0,0));
- QPoint tl2Pos = viewportToContents(QPoint(cvW,cvH));
- QPoint tr1Pos = viewportToContents(QPoint(x,0));
- QPoint tr2Pos = viewportToContents(QPoint(x+cvW,cvH));
- QPoint bl1Pos = viewportToContents(QPoint(0,y));
- QPoint bl2Pos = viewportToContents(QPoint(cvW,y+cvH));
- QPoint br1Pos = viewportToContents(QPoint(x,y));
- QPoint br2Pos = viewportToContents(QPoint(x+cvW,y+cvH));
- int tlCols = _canvas->collisions(QRect(tl1Pos,tl2Pos)).count();
- int trCols = _canvas->collisions(QRect(tr1Pos,tr2Pos)).count();
- int blCols = _canvas->collisions(QRect(bl1Pos,bl2Pos)).count();
- int brCols = _canvas->collisions(QRect(br1Pos,br2Pos)).count();
+ TQPoint tl1Pos = viewportToContents(TQPoint(0,0));
+ TQPoint tl2Pos = viewportToContents(TQPoint(cvW,cvH));
+ TQPoint tr1Pos = viewportToContents(TQPoint(x,0));
+ TQPoint tr2Pos = viewportToContents(TQPoint(x+cvW,cvH));
+ TQPoint bl1Pos = viewportToContents(TQPoint(0,y));
+ TQPoint bl2Pos = viewportToContents(TQPoint(cvW,y+cvH));
+ TQPoint br1Pos = viewportToContents(TQPoint(x,y));
+ TQPoint br2Pos = viewportToContents(TQPoint(x+cvW,y+cvH));
+ int tlCols = _canvas->collisions(TQRect(tl1Pos,tl2Pos)).count();
+ int trCols = _canvas->collisions(TQRect(tr1Pos,tr2Pos)).count();
+ int blCols = _canvas->collisions(TQRect(bl1Pos,bl2Pos)).count();
+ int brCols = _canvas->collisions(TQRect(br1Pos,br2Pos)).count();
int minCols = tlCols;
zp = _lastAutoPosition;
switch(zp) {
@@ -1532,13 +1532,13 @@ void CallGraphView::updateSizes(QSize s)
switch(zp) {
case TopRight:
- newZoomPos = QPoint(x,0);
+ newZoomPos = TQPoint(x,0);
break;
case BottomLeft:
- newZoomPos = QPoint(0,y);
+ newZoomPos = TQPoint(0,y);
break;
case BottomRight:
- newZoomPos = QPoint(x,y);
+ newZoomPos = TQPoint(x,y);
break;
default:
break;
@@ -1546,7 +1546,7 @@ void CallGraphView::updateSizes(QSize s)
if (newZoomPos != oldZoomPos) _completeView->move(newZoomPos);
}
-void CallGraphView::focusInEvent(QFocusEvent*)
+void CallGraphView::focusInEvent(TQFocusEvent*)
{
if (!_canvas) return;
@@ -1556,13 +1556,13 @@ void CallGraphView::focusInEvent(QFocusEvent*)
}
}
-void CallGraphView::focusOutEvent(QFocusEvent* e)
+void CallGraphView::focusOutEvent(TQFocusEvent* e)
{
// trigger updates as in focusInEvent
focusInEvent(e);
}
-void CallGraphView::keyPressEvent(QKeyEvent* e)
+void CallGraphView::keyPressEvent(TQKeyEvent* e)
{
if (!_canvas) {
e->ignore();
@@ -1639,9 +1639,9 @@ void CallGraphView::keyPressEvent(QKeyEvent* e)
else e->ignore();
}
-void CallGraphView::resizeEvent(QResizeEvent* e)
+void CallGraphView::resizeEvent(TQResizeEvent* e)
{
- QCanvasView::resizeEvent(e);
+ TQCanvasView::resizeEvent(e);
if (_canvas) updateSizes(e->size());
}
@@ -1734,8 +1734,8 @@ void CallGraphView::doUpdate(int changeType)
return;
}
- QCanvasItemList l = _canvas->allItems();
- QCanvasItemList::iterator it;
+ TQCanvasItemList l = _canvas->allItems();
+ TQCanvasItemList::iterator it;
for (it = l.begin();it != l.end(); ++it)
if ((*it)->rtti() == CANVAS_NODE)
((CanvasNode*) (*it))->updateGroup();
@@ -1764,15 +1764,15 @@ void CallGraphView::clear()
setCanvas(0);
}
-void CallGraphView::showText(QString s)
+void CallGraphView::showText(TQString s)
{
clear();
_renderTimer.stop();
- _canvas = new QCanvas(QApplication::desktop()->width(),
- QApplication::desktop()->height());
+ _canvas = new TQCanvas(TQApplication::desktop()->width(),
+ TQApplication::desktop()->height());
- QCanvasText* t = new QCanvasText(s, _canvas);
+ TQCanvasText* t = new TQCanvasText(s, _canvas);
t->move(5, 5);
t->show();
center(0,0);
@@ -1783,7 +1783,7 @@ void CallGraphView::showText(QString s)
void CallGraphView::showRenderWarning()
{
- QString s;
+ TQString s;
if (_renderProcess)
s =i18n("Warning: a long lasting graph layouting is in progress.\n"
@@ -1805,7 +1805,7 @@ void CallGraphView::stopRendering()
_renderProcess->kill();
delete _renderProcess;
_renderProcess = 0;
- _unparsedOutput = QString::null;
+ _unparsedOutput = TQString::null;
_renderTimer.start(200, true);
}
@@ -1817,9 +1817,9 @@ void CallGraphView::refresh()
// we want to keep a selected node item at the same global position
_prevSelectedNode = _selectedNode;
- _prevSelectedPos = QPoint(-1,-1);
+ _prevSelectedPos = TQPoint(-1,-1);
if (_selectedNode) {
- QPoint center = _selectedNode->canvasNode()->boundingRect().center();
+ TQPoint center = _selectedNode->canvasNode()->boundingRect().center();
_prevSelectedPos = contentsToViewport(center);
}
@@ -1846,7 +1846,7 @@ void CallGraphView::refresh()
_exporter.reset(_data, _activeItem, _costType, _groupType);
_exporter.writeDot();
- _renderProcess = new QProcess(this);
+ _renderProcess = new TQProcess(this);
if (_layout == GraphOptions::Circular)
_renderProcess->addArgument( "twopi" );
else
@@ -1854,17 +1854,17 @@ void CallGraphView::refresh()
_renderProcess->addArgument(_exporter.filename());
_renderProcess->addArgument( "-Tplain" );
- connect( _renderProcess, SIGNAL(readyReadStdout()),
- this, SLOT(readDotOutput()) );
- connect( _renderProcess, SIGNAL(processExited()),
- this, SLOT(dotExited()) );
+ connect( _renderProcess, TQT_SIGNAL(readyReadStdout()),
+ this, TQT_SLOT(readDotOutput()) );
+ connect( _renderProcess, TQT_SIGNAL(processExited()),
+ this, TQT_SLOT(dotExited()) );
if (1) kdDebug() << "Running '"
<< _renderProcess->arguments().join(" ")
<< "'..." << endl;
if ( !_renderProcess->start() ) {
- QString e = i18n("No call graph is available because the following\n"
+ TQString e = i18n("No call graph is available because the following\n"
"command cannot be run:\n'%1'\n")
.arg(_renderProcess->arguments().join(" "));
e += i18n("Please check that 'dot' is installed (package GraphViz).");
@@ -1876,7 +1876,7 @@ void CallGraphView::refresh()
return;
}
- _unparsedOutput = QString::null;
+ _unparsedOutput = TQString::null;
// layouting of more than seconds is dubious
_renderTimer.start(1000, true);
@@ -1889,12 +1889,12 @@ void CallGraphView::readDotOutput()
void CallGraphView::dotExited()
{
- QString line, cmd;
+ TQString line, cmd;
CanvasNode *rItem;
- QCanvasEllipse* eItem;
+ TQCanvasEllipse* eItem;
CanvasEdge* sItem;
CanvasEdgeLabel* lItem;
- QTextStream* dotStream;
+ TQTextStream* dotStream;
double scale = 1.0, scaleX = 1.0, scaleY = 1.0;
double dotWidth, dotHeight;
GraphNode* activeNode = 0;
@@ -1903,7 +1903,7 @@ void CallGraphView::dotExited()
_renderTimer.stop();
viewport()->setUpdatesEnabled(false);
clear();
- dotStream = new QTextStream(_unparsedOutput, IO_ReadOnly);
+ dotStream = new TQTextStream(_unparsedOutput, IO_ReadOnly);
int lineno = 0;
while (1) {
@@ -1912,7 +1912,7 @@ void CallGraphView::dotExited()
lineno++;
if (line.isEmpty()) continue;
- QTextStream lineStream(line, IO_ReadOnly);
+ TQTextStream lineStream(line, IO_ReadOnly);
lineStream >> cmd;
if (0) qDebug("%s:%d - line '%s', cmd '%s'",
@@ -1922,7 +1922,7 @@ void CallGraphView::dotExited()
if (cmd == "stop") break;
if (cmd == "graph") {
- QString dotWidthString, dotHeightString;
+ TQString dotWidthString, dotHeightString;
lineStream >> scale >> dotWidthString >> dotHeightString;
dotWidth = dotWidthString.toDouble();
dotHeight = dotHeightString.toDouble();
@@ -1938,14 +1938,14 @@ void CallGraphView::dotExited()
// We use as minimum canvas size the desktop size.
// Otherwise, the canvas would have to be resized on widget resize.
_xMargin = 50;
- if (w < QApplication::desktop()->width())
- _xMargin += (QApplication::desktop()->width()-w)/2;
+ if (w < TQApplication::desktop()->width())
+ _xMargin += (TQApplication::desktop()->width()-w)/2;
_yMargin = 50;
- if (h < QApplication::desktop()->height())
- _yMargin += (QApplication::desktop()->height()-h)/2;
+ if (h < TQApplication::desktop()->height())
+ _yMargin += (TQApplication::desktop()->height()-h)/2;
- _canvas = new QCanvas(int(w+2*_xMargin), int(h+2*_yMargin));
+ _canvas = new TQCanvas(int(w+2*_xMargin), int(h+2*_yMargin));
#if DEBUG_GRAPH
kdDebug() << _exporter.filename().ascii() << ":" << lineno
@@ -1973,7 +1973,7 @@ void CallGraphView::dotExited()
if (cmd == "node") {
// x, y are centered in node
- QString nodeName, label, nodeX, nodeY, nodeWidth, nodeHeight;
+ TQString nodeName, label, nodeX, nodeY, nodeWidth, nodeHeight;
double x, y, width, height;
lineStream >> nodeName >> nodeX >> nodeY >> nodeWidth >> nodeHeight;
x = nodeX.toDouble();
@@ -2001,7 +2001,7 @@ void CallGraphView::dotExited()
// Unnamed nodes with collapsed edges (with 'R' and 'S')
if (nodeName[0] == 'R' || nodeName[0] == 'S') {
w = 10, h = 10;
- eItem = new QCanvasEllipse(w, h, _canvas);
+ eItem = new TQCanvasEllipse(w, h, _canvas);
eItem->move(xx, yy);
eItem->setBrush(Qt::gray);
eItem->setZ(1.0);
@@ -2032,9 +2032,9 @@ void CallGraphView::dotExited()
// edge
- QString node1Name, node2Name, label, edgeX, edgeY;
+ TQString node1Name, node2Name, label, edgeX, edgeY;
double x, y;
- QPointArray pa;
+ TQPointArray pa;
int points, i;
lineStream >> node1Name >> node2Name >> points;
@@ -2074,7 +2074,7 @@ void CallGraphView::dotExited()
}
// calls into/out of cycles are special: make them blue
- QColor arrowColor = Qt::black;
+ TQColor arrowColor = Qt::black;
TraceFunction* caller = e->fromNode() ? e->fromNode()->function() : 0;
TraceFunction* called = e->toNode() ? e->toNode()->function() : 0;
if ( (caller && (caller->cycle() == caller)) ||
@@ -2083,7 +2083,7 @@ void CallGraphView::dotExited()
sItem = new CanvasEdge(e, _canvas);
e->setCanvasEdge(sItem);
sItem->setControlPoints(pa, false);
- sItem->setPen(QPen(arrowColor, 1 /*(int)log(log(e->cost))*/ ));
+ sItem->setPen(TQPen(arrowColor, 1 /*(int)log(log(e->cost))*/ ));
sItem->setZ(0.5);
sItem->show();
@@ -2092,14 +2092,14 @@ void CallGraphView::dotExited()
sItem->setSelected(e == _selectedEdge);
// Arrow head
- QPoint arrowDir;
+ TQPoint arrowDir;
int indexHead = -1;
// check if head is at start of spline...
// this is needed because dot always gives points from top to bottom
CanvasNode* fromNode = e->fromNode() ? e->fromNode()->canvasNode() : 0;
if (fromNode) {
- QPoint toCenter = fromNode->rect().center();
+ TQPoint toCenter = fromNode->rect().center();
int dx0 = pa.point(0).x() - toCenter.x();
int dy0 = pa.point(0).y() - toCenter.y();
int dx1 = pa.point(points-1).x() - toCenter.x();
@@ -2127,11 +2127,11 @@ void CallGraphView::dotExited()
// arrow around pa.point(indexHead) with direction arrowDir
arrowDir *= 10.0/sqrt(double(arrowDir.x()*arrowDir.x() +
arrowDir.y()*arrowDir.y()));
- QPointArray a(3);
+ TQPointArray a(3);
a.setPoint(0, pa.point(indexHead) + arrowDir);
- a.setPoint(1, pa.point(indexHead) + QPoint(arrowDir.y()/2,
+ a.setPoint(1, pa.point(indexHead) + TQPoint(arrowDir.y()/2,
-arrowDir.x()/2));
- a.setPoint(2, pa.point(indexHead) + QPoint(-arrowDir.y()/2,
+ a.setPoint(2, pa.point(indexHead) + TQPoint(-arrowDir.y()/2,
arrowDir.x()/2));
if (0) qDebug(" Arrow: ( %d/%d, %d/%d, %d/%d)",
@@ -2151,7 +2151,7 @@ void CallGraphView::dotExited()
if (lineStream.atEnd()) continue;
// parse quoted label
- QChar c;
+ TQChar c;
lineStream >> c;
while (c.isSpace()) lineStream >> c;
if (c != '\"') {
@@ -2194,19 +2194,19 @@ void CallGraphView::dotExited()
// _exporter.sortEdges();
if (!_canvas) {
- _canvas = new QCanvas(size().width(),size().height());
- QString s = i18n("Error running the graph layouting tool.\n");
+ _canvas = new TQCanvas(size().width(),size().height());
+ TQString s = i18n("Error running the graph layouting tool.\n");
s += i18n("Please check that 'dot' is installed (package GraphViz).");
- QCanvasText* t = new QCanvasText(s, _canvas);
+ TQCanvasText* t = new TQCanvasText(s, _canvas);
t->move(5, 5);
t->show();
center(0,0);
}
else if (!activeNode && !activeEdge) {
- QString s = i18n("There is no call graph available for function\n"
+ TQString s = i18n("There is no call graph available for function\n"
"\t'%1'\n"
"because it has no cost of the selected event type.");
- QCanvasText* t = new QCanvasText(s.arg(_activeItem->name()), _canvas);
+ TQCanvasText* t = new TQCanvasText(s.arg(_activeItem->name()), _canvas);
// t->setTextFlags(Qt::AlignHCenter | Qt::AlignVCenter);
t->move(5,5);
t->show();
@@ -2273,7 +2273,7 @@ void CallGraphView::dotExited()
void CallGraphView::contentsMovingSlot(int x, int y)
{
- QRect z(int(x * _cvZoom), int(y * _cvZoom),
+ TQRect z(int(x * _cvZoom), int(y * _cvZoom),
int(visibleWidth() * _cvZoom)-1, int(visibleHeight() * _cvZoom)-1);
if (0) qDebug("moving: (%d,%d) => (%d/%d - %dx%d)",
x, y, z.x(), z.y(), z.width(), z.height());
@@ -2292,16 +2292,16 @@ void CallGraphView::zoomRectMoveFinished()
if (_zoomPosition == Auto) updateSizes();
}
-void CallGraphView::contentsMousePressEvent(QMouseEvent* e)
+void CallGraphView::contentsMousePressEvent(TQMouseEvent* e)
{
// clicking on the viewport sets focus
setFocus();
_isMoving = true;
- QCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItemList l = canvas()->collisions(e->pos());
if (l.count()>0) {
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
GraphNode* n = ((CanvasNode*)i)->node();
@@ -2328,7 +2328,7 @@ void CallGraphView::contentsMousePressEvent(QMouseEvent* e)
_lastPos = e->globalPos();
}
-void CallGraphView::contentsMouseMoveEvent(QMouseEvent* e)
+void CallGraphView::contentsMouseMoveEvent(TQMouseEvent* e)
{
if (_isMoving) {
int dx = e->globalPos().x() - _lastPos.x();
@@ -2338,17 +2338,17 @@ void CallGraphView::contentsMouseMoveEvent(QMouseEvent* e)
}
}
-void CallGraphView::contentsMouseReleaseEvent(QMouseEvent*)
+void CallGraphView::contentsMouseReleaseEvent(TQMouseEvent*)
{
_isMoving = false;
if (_zoomPosition == Auto) updateSizes();
}
-void CallGraphView::contentsMouseDoubleClickEvent(QMouseEvent* e)
+void CallGraphView::contentsMouseDoubleClickEvent(TQMouseEvent* e)
{
- QCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItemList l = canvas()->collisions(e->pos());
if (l.count() == 0) return;
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
GraphNode* n = ((CanvasNode*)i)->node();
@@ -2375,12 +2375,12 @@ void CallGraphView::contentsMouseDoubleClickEvent(QMouseEvent* e)
}
}
-void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
+void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e)
{
- QCanvasItemList l = canvas()->collisions(e->pos());
- QCanvasItem* i = (l.count() == 0) ? 0 : l.first();
+ TQCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItem* i = (l.count() == 0) ? 0 : l.first();
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction *f = 0, *cycle = 0;
TraceCall* c = 0;
@@ -2392,7 +2392,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
f = n->function();
cycle = f->cycle();
- QString name = f->prettyName();
+ TQString name = f->prettyName();
popup.insertItem(i18n("Go to '%1'")
.arg(Configuration::shortenSymbol(name)), 93);
if (cycle && (cycle != f)) {
@@ -2414,7 +2414,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
e->prettyName().ascii());
c = e->call();
if (c) {
- QString name = c->prettyName();
+ TQString name = c->prettyName();
popup.insertItem(i18n("Go to '%1'")
.arg(Configuration::shortenSymbol(name)), 95);
@@ -2431,14 +2431,14 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
addGoMenu(&popup);
popup.insertSeparator();
- QPopupMenu epopup;
+ TQPopupMenu epopup;
epopup.insertItem(i18n("As PostScript"), 201);
epopup.insertItem(i18n("As Image ..."), 202);
popup.insertItem(i18n("Export Graph"), &epopup, 200);
popup.insertSeparator();
- QPopupMenu gpopup1;
+ TQPopupMenu gpopup1;
gpopup1.setCheckable(true);
gpopup1.insertItem(i18n("Unlimited"), 100);
gpopup1.setItemEnabled(100, (_funcLimit>0.005));
@@ -2461,7 +2461,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup1.setItemChecked(106,true); break;
}
- QPopupMenu gpopup2;
+ TQPopupMenu gpopup2;
gpopup2.setCheckable(true);
gpopup2.insertItem(i18n("Unlimited"), 110);
gpopup2.setItemEnabled(110, (_funcLimit>0.005));
@@ -2484,7 +2484,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup2.setItemChecked(116,true); break;
}
- QPopupMenu gpopup3;
+ TQPopupMenu gpopup3;
gpopup3.setCheckable(true);
gpopup3.insertItem(i18n("No Minimum"), 120);
gpopup3.setItemEnabled(120,
@@ -2511,7 +2511,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
else gpopup3.setItemChecked(128,true);
double oldFuncLimit = _funcLimit;
- QPopupMenu gpopup4;
+ TQPopupMenu gpopup4;
gpopup4.setCheckable(true);
gpopup4.insertItem(i18n("Same as Node"), 160);
gpopup4.insertItem(i18n("50 % of Node"), 161);
@@ -2524,7 +2524,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
else if (_callLimit >= 0.2 * _funcLimit) gpopup4.setItemChecked(162,true);
else gpopup4.setItemChecked(163,true);
- QPopupMenu gpopup;
+ TQPopupMenu gpopup;
gpopup.setCheckable(true);
gpopup.insertItem(i18n("Caller Depth"), &gpopup1, 80);
gpopup.insertItem(i18n("Callee Depth"), &gpopup2, 81);
@@ -2538,7 +2538,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup.insertItem(i18n("Cluster Groups"), 132);
gpopup.setItemChecked(132,_clusterGroups);
- QPopupMenu vpopup;
+ TQPopupMenu vpopup;
vpopup.setCheckable(true);
vpopup.insertItem(i18n("Compact"), 140);
vpopup.insertItem(i18n("Normal"), 141);
@@ -2554,7 +2554,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
vpopup.setItemChecked(151,_layout == LeftRight);
vpopup.setItemChecked(152,_layout == Circular);
- QPopupMenu opopup;
+ TQPopupMenu opopup;
opopup.insertItem(i18n("TopLeft"), 170);
opopup.insertItem(i18n("TopRight"), 171);
opopup.insertItem(i18n("BottomLeft"), 172);
@@ -2585,7 +2585,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
if (!f) break;
GraphExporter ge(data(), f, costType(), groupType(),
- QString("callgraph.dot"));
+ TQString("callgraph.dot"));
ge.setGraphOptions(this);
ge.writeDot();
@@ -2598,11 +2598,11 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
{
if (!_canvas) return;
- QString fn = KFileDialog::getSaveFileName(":","*.png");
+ TQString fn = KFileDialog::getSaveFileName(":","*.png");
if (!fn.isEmpty()) {
- QPixmap pix(_canvas->size());
- QPainter p(&pix);
+ TQPixmap pix(_canvas->size());
+ TQPainter p(&pix);
_canvas->drawArea( _canvas->rect(), &p );
pix.save(fn,"PNG");
}
@@ -2664,29 +2664,29 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
if (r>169 && r<180) updateSizes();
}
-CallGraphView::ZoomPosition CallGraphView::zoomPos(QString s)
+CallGraphView::ZoomPosition CallGraphView::zoomPos(TQString s)
{
- if (s == QString("TopLeft")) return TopLeft;
- if (s == QString("TopRight")) return TopRight;
- if (s == QString("BottomLeft")) return BottomLeft;
- if (s == QString("BottomRight")) return BottomRight;
- if (s == QString("Automatic")) return Auto;
+ if (s == TQString("TopLeft")) return TopLeft;
+ if (s == TQString("TopRight")) return TopRight;
+ if (s == TQString("BottomLeft")) return BottomLeft;
+ if (s == TQString("BottomRight")) return BottomRight;
+ if (s == TQString("Automatic")) return Auto;
return DEFAULT_ZOOMPOS;
}
-QString CallGraphView::zoomPosString(ZoomPosition p)
+TQString CallGraphView::zoomPosString(ZoomPosition p)
{
- if (p == TopRight) return QString("TopRight");
- if (p == BottomLeft) return QString("BottomLeft");
- if (p == BottomRight) return QString("BottomRight");
- if (p == Auto) return QString("Automatic");
+ if (p == TopRight) return TQString("TopRight");
+ if (p == BottomLeft) return TQString("BottomLeft");
+ if (p == BottomRight) return TQString("BottomRight");
+ if (p == Auto) return TQString("Automatic");
- return QString("TopLeft");
+ return TQString("TopLeft");
}
void CallGraphView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -2710,7 +2710,7 @@ void CallGraphView::readViewConfig(KConfig* c,
}
void CallGraphView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/callgraphview.h b/kcachegrind/kcachegrind/callgraphview.h
index 8f154e6c..dcabc0ef 100644
--- a/kcachegrind/kcachegrind/callgraphview.h
+++ b/kcachegrind/kcachegrind/callgraphview.h
@@ -23,10 +23,10 @@
#ifndef CALLGRAPHVIEW_H
#define CALLGRAPHVIEW_H
-#include <qcanvas.h>
-#include <qwidget.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqcanvas.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include "treemap.h" // for DrawParams
#include "tracedata.h"
@@ -42,7 +42,7 @@ class CallGraphView;
// sorts according start/end position of a call arc
// this depends on attached CanvasEdge's !
-class GraphEdgeList: public QPtrList<GraphEdge>
+class GraphEdgeList: public TQPtrList<GraphEdge>
{
public:
GraphEdgeList();
@@ -56,7 +56,7 @@ class GraphEdgeList: public QPtrList<GraphEdge>
};
-typedef QMap<GraphEdge*, int> GraphEdgeSet;
+typedef TQMap<GraphEdge*, int> GraphEdgeSet;
// temporary parts of call graph to be shown
class GraphNode
@@ -120,7 +120,7 @@ public:
TraceFunction* to() { return _to; }
// has special cases for collapsed edges
- QString prettyName();
+ TQString prettyName();
void setCaller(TraceFunction* f) { _from = f; }
void setCalling(TraceFunction* f) { _to = f; }
@@ -149,8 +149,8 @@ public:
};
-typedef QMap<TraceFunction*, GraphNode> GraphNodeMap;
-typedef QMap<QPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap;
+typedef TQMap<TraceFunction*, GraphNode> GraphNodeMap;
+typedef TQMap<QPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap;
/* Abstract Interface for graph options */
@@ -169,8 +169,8 @@ class GraphOptions
virtual int detailLevel() = 0;
virtual Layout layout() = 0;
- static QString layoutString(Layout);
- static Layout layout(QString);
+ static TQString layoutString(Layout);
+ static Layout layout(TQString);
};
/* Graph Options Storage */
@@ -220,13 +220,13 @@ class GraphExporter: public StorableGraphOptions
public:
GraphExporter();
GraphExporter(TraceData*, TraceFunction*, TraceCostType*,
- TraceItem::CostType, QString filename = QString::null);
+ TraceItem::CostType, TQString filename = TQString::null);
virtual ~GraphExporter();
void reset(TraceData*, TraceItem*, TraceCostType*,
- TraceItem::CostType, QString filename = QString::null);
+ TraceItem::CostType, TQString filename = TQString::null);
- QString filename() { return _dotName; }
+ TQString filename() { return _dotName; }
int edgeCount() { return _edgeMap.count(); }
int nodeCount() { return _nodeMap.count(); }
@@ -246,7 +246,7 @@ public:
* Don't use the returned pointer directly, but only with
* node() or edge(), because it could be a dangling pointer.
*/
- TraceFunction* toFunc(QString);
+ TraceFunction* toFunc(TQString);
GraphNode* node(TraceFunction*);
GraphEdge* edge(TraceFunction*, TraceFunction*);
@@ -259,7 +259,7 @@ public:
private:
void buildGraph(TraceFunction*, int, bool, double);
- QString _dotName;
+ TQString _dotName;
TraceItem* _item;
TraceCostType* _costType;
TraceItem::CostType _groupType;
@@ -286,23 +286,23 @@ class PannerView: public QCanvasView
Q_OBJECT
public:
- PannerView(QWidget * parent = 0, const char * name = 0);
+ PannerView(TQWidget * parent = 0, const char * name = 0);
- void setZoomRect(QRect r);
+ void setZoomRect(TQRect r);
signals:
void zoomRectMoved(int dx, int dy);
void zoomRectMoveFinished();
protected:
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
- void contentsMouseReleaseEvent(QMouseEvent*);
- void drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
+ void contentsMouseReleaseEvent(TQMouseEvent*);
+ void drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph);
- QRect _zoomRect;
+ TQRect _zoomRect;
bool _movingZoomRect;
- QPoint _lastPos;
+ TQPoint _lastPos;
};
@@ -321,14 +321,14 @@ enum {
CANVAS_FRAME
};
-class CanvasNode: public QCanvasRectangle, public StoredDrawParams
+class CanvasNode: public TQCanvasRectangle, public StoredDrawParams
{
public:
- CanvasNode(CallGraphView*,GraphNode*, int, int, int, int, QCanvas*);
+ CanvasNode(CallGraphView*,GraphNode*, int, int, int, int, TQCanvas*);
void updateGroup();
void setSelected(bool);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
GraphNode* node() { return _node; }
int rtti() const { return CANVAS_NODE; }
@@ -338,12 +338,12 @@ private:
CallGraphView* _view;
};
-class CanvasEdgeLabel: public QCanvasRectangle, public StoredDrawParams
+class CanvasEdgeLabel: public TQCanvasRectangle, public StoredDrawParams
{
public:
- CanvasEdgeLabel(CallGraphView*, CanvasEdge*, int, int, int, int, QCanvas*);
+ CanvasEdgeLabel(CallGraphView*, CanvasEdge*, int, int, int, int, TQCanvas*);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
CanvasEdge* canvasEdge() { return _ce; }
int rtti() const { return CANVAS_EDGELABEL; }
@@ -356,9 +356,9 @@ private:
class CanvasEdgeArrow: public QCanvasPolygon
{
public:
- CanvasEdgeArrow(CanvasEdge*, QCanvas*);
+ CanvasEdgeArrow(CanvasEdge*, TQCanvas*);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
CanvasEdge* canvasEdge() { return _ce; }
int rtti() const { return CANVAS_EDGEARROW; }
@@ -371,11 +371,11 @@ private:
class CanvasEdge: public QCanvasSpline
{
public:
- CanvasEdge(GraphEdge*, QCanvas*);
+ CanvasEdge(GraphEdge*, TQCanvas*);
void setSelected(bool);
- void drawShape(QPainter&);
- QPointArray areaPoints() const;
+ void drawShape(TQPainter&);
+ TQPointArray areaPoints() const;
CanvasEdgeLabel* label() { return _label; }
void setLabel(CanvasEdgeLabel* l) { _label = l; }
@@ -395,13 +395,13 @@ private:
class CanvasFrame: public QCanvasRectangle
{
public:
- CanvasFrame( CanvasNode*, QCanvas *canvas );
+ CanvasFrame( CanvasNode*, TQCanvas *canvas );
int rtti () const { return CANVAS_FRAME; }
- bool hit( const QPoint&) const { return false; }
+ bool hit( const TQPoint&) const { return false; }
protected:
- void drawShape( QPainter & );
+ void drawShape( TQPainter & );
private:
- static QPixmap* _p;
+ static TQPixmap* _p;
};
@@ -412,7 +412,7 @@ class CallGraphTip;
* and another zoomed out CanvasView in a border acting as
* a panner to select to visible part (only if needed)
*/
-class CallGraphView: public QCanvasView, public TraceItemView,
+class CallGraphView: public TQCanvasView, public TraceItemView,
public StorableGraphOptions
{
Q_OBJECT
@@ -421,18 +421,18 @@ public:
enum ZoomPosition { TopLeft, TopRight, BottomLeft, BottomRight, Auto };
CallGraphView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
~CallGraphView();
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
ZoomPosition zoomPos() const { return _zoomPosition; }
- static ZoomPosition zoomPos(QString);
- static QString zoomPosString(ZoomPosition);
+ static ZoomPosition zoomPos(TQString);
+ static TQString zoomPosString(ZoomPosition);
public slots:
void contentsMovingSlot(int,int);
@@ -445,26 +445,26 @@ public slots:
void dotExited();
protected:
- void resizeEvent(QResizeEvent*);
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
- void contentsMouseReleaseEvent(QMouseEvent*);
- void contentsMouseDoubleClickEvent(QMouseEvent*);
- void contentsContextMenuEvent(QContextMenuEvent*);
- void keyPressEvent(QKeyEvent*);
- void focusInEvent(QFocusEvent*);
- void focusOutEvent(QFocusEvent*);
+ void resizeEvent(TQResizeEvent*);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
+ void contentsMouseReleaseEvent(TQMouseEvent*);
+ void contentsMouseDoubleClickEvent(TQMouseEvent*);
+ void contentsContextMenuEvent(TQContextMenuEvent*);
+ void keyPressEvent(TQKeyEvent*);
+ void focusInEvent(TQFocusEvent*);
+ void focusOutEvent(TQFocusEvent*);
private:
- void updateSizes(QSize s = QSize(0,0));
+ void updateSizes(TQSize s = TQSize(0,0));
TraceItem* canShow(TraceItem*);
void doUpdate(int);
void refresh();
void makeFrame(CanvasNode*, bool active);
void clear();
- void showText(QString);
+ void showText(TQString);
- QCanvas *_canvas;
+ TQCanvas *_canvas;
int _xMargin, _yMargin;
PannerView *_completeView;
double _cvZoom;
@@ -472,7 +472,7 @@ private:
CallGraphTip* _tip;
bool _isMoving;
- QPoint _lastPos;
+ TQPoint _lastPos;
GraphExporter _exporter;
@@ -483,11 +483,11 @@ private:
ZoomPosition _zoomPosition, _lastAutoPosition;
// background rendering
- QProcess* _renderProcess;
- QTimer _renderTimer;
+ TQProcess* _renderProcess;
+ TQTimer _renderTimer;
GraphNode* _prevSelectedNode;
- QPoint _prevSelectedPos;
- QString _unparsedOutput;
+ TQPoint _prevSelectedPos;
+ TQString _unparsedOutput;
};
diff --git a/kcachegrind/kcachegrind/callitem.cpp b/kcachegrind/kcachegrind/callitem.cpp
index 67200daa..ebca4903 100644
--- a/kcachegrind/kcachegrind/callitem.cpp
+++ b/kcachegrind/kcachegrind/callitem.cpp
@@ -20,7 +20,7 @@
* Items for caller/callee view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -34,8 +34,8 @@
// CallItem
-CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
- : QListViewItem(parent)
+CallItem::CallItem(CallView* view, TQListView* parent, TraceCall* c)
+ : TQListViewItem(parent)
{
_call = c;
_view = view;
@@ -43,7 +43,7 @@ CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
_active = _view->activeFunction();
bool baseIsCycle = (_active && (_active == _active->cycle()));
- QString fName;
+ TQString fName;
if (_view->showCallers()) {
_shown = _call->caller(true);
fName = c->callerName(!baseIsCycle);
@@ -62,7 +62,7 @@ CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
void CallItem::updateGroup()
{
- QColor c = Configuration::functionColor(_view->groupType(), _shown);
+ TQColor c = Configuration::functionColor(_view->groupType(), _shown);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -73,7 +73,7 @@ void CallItem::updateCost()
bool selectedIsCycle = (_active == _active->cycle());
if (_call->isRecursion()) sameCycle=true;
- QString cStr;
+ TQString cStr;
if ((selectedIsCycle || shownIsCycle) && sameCycle)
cStr = "-";
else {
@@ -100,16 +100,16 @@ void CallItem::updateCost()
double total = totalCost->subCost(ct);
if (total == 0.0) {
- QString str = "-";
+ TQString str = "-";
setText(0, str);
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (_view->topLevel()->showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _call->prettySubCost(ct));
@@ -124,16 +124,16 @@ void CallItem::updateCost()
double total = totalCost->subCost(ct2);
if (total == 0.0) {
- QString str = "-";
+ TQString str = "-";
setText(1, str);
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum2 / total;
if (_view->topLevel()->showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _call->prettySubCost(ct2));
@@ -142,10 +142,10 @@ void CallItem::updateCost()
}
}
- QPixmap p;
+ TQPixmap p;
if (sameCycle && !selectedIsCycle && !shownIsCycle) {
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -154,7 +154,7 @@ void CallItem::updateCost()
}
-int CallItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CallItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const CallItem* ci1 = this;
const CallItem* ci2 = (CallItem*) i;
@@ -180,6 +180,6 @@ int CallItem::compare(QListViewItem * i, int col, bool ascending ) const
if (ci1->_cc > ci2->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/callitem.h b/kcachegrind/kcachegrind/callitem.h
index 0bebeb71..4eb0ebb0 100644
--- a/kcachegrind/kcachegrind/callitem.h
+++ b/kcachegrind/kcachegrind/callitem.h
@@ -23,7 +23,7 @@
#ifndef CALLITEM_H
#define CALLITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CallView;
@@ -31,9 +31,9 @@ class CallView;
class CallItem: public QListViewItem
{
public:
- CallItem(CallView*, QListView*, TraceCall* c);
+ CallItem(CallView*, TQListView*, TraceCall* c);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCall* call() { return _call; }
CallView* view() { return _view; }
void updateCost();
diff --git a/kcachegrind/kcachegrind/callmapview.cpp b/kcachegrind/kcachegrind/callmapview.cpp
index a10a334b..95930afe 100644
--- a/kcachegrind/kcachegrind/callmapview.cpp
+++ b/kcachegrind/kcachegrind/callmapview.cpp
@@ -20,8 +20,8 @@
* Call Map View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -51,7 +51,7 @@
CallMapView::CallMapView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: TreeMapWidget(new CallMapBaseItem(), parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -77,24 +77,24 @@ CallMapView::CallMapView(bool showCallers, TraceItemView* parentView,
setMinimalArea(DEFAULT_MAXAREA);
connect(this,
- SIGNAL(doubleClicked(TreeMapItem*)),
- SLOT(activatedSlot(TreeMapItem*)));
+ TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ TQT_SLOT(activatedSlot(TreeMapItem*)));
connect(this,
- SIGNAL(returnPressed(TreeMapItem*)),
- SLOT(activatedSlot(TreeMapItem*)));
+ TQT_SIGNAL(returnPressed(TreeMapItem*)),
+ TQT_SLOT(activatedSlot(TreeMapItem*)));
connect(this,
- SIGNAL(currentChanged(TreeMapItem*, bool)),
- SLOT(selectedSlot(TreeMapItem*, bool)));
+ TQT_SIGNAL(currentChanged(TreeMapItem*, bool)),
+ TQT_SLOT(selectedSlot(TreeMapItem*, bool)));
connect(this,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint &)),
- SLOT(context(TreeMapItem*,const QPoint &)));
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint &)),
+ TQT_SLOT(context(TreeMapItem*,const TQPoint &)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-QString CallMapView::whatsThis() const
+TQString CallMapView::whatsThis() const
{
- QString s = _showCallers ?
+ TQString s = _showCallers ?
i18n( "<b>Caller Map</b>"
"<p>This graph shows the nested hierarchy of "
"all callers of the current activated function. "
@@ -139,23 +139,23 @@ void CallMapView::setData(TraceData* d)
((CallMapBaseItem*)base())->setFunction(0);
}
-void CallMapView::context(TreeMapItem* i,const QPoint & p)
+void CallMapView::context(TreeMapItem* i,const TQPoint & p)
{
if (!i) return;
- QPopupMenu popup;
- QPopupMenu fpopup; // select function subpopup
- QPopupMenu vpopup; // visualisation subpopup
- QPopupMenu dpopup; // split direction
- QPopupMenu bpopup; // border subpopup
- QPopupMenu l1popup; // depth limit subpopup
- QPopupMenu l2popup; // function limit subpopup
- QPopupMenu l3popup; // area limit subpopup
+ TQPopupMenu popup;
+ TQPopupMenu fpopup; // select function subpopup
+ TQPopupMenu vpopup; // visualisation subpopup
+ TQPopupMenu dpopup; // split direction
+ TQPopupMenu bpopup; // border subpopup
+ TQPopupMenu l1popup; // depth limit subpopup
+ TQPopupMenu l2popup; // function limit subpopup
+ TQPopupMenu l3popup; // area limit subpopup
TreeMapItem* item = i;
int count;
- QString shortCurrentName;
+ TQString shortCurrentName;
if (i) {
shortCurrentName = i->text(0);
if ((int)shortCurrentName.length() > Configuration::maxSymbolLength())
@@ -167,7 +167,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
popup.insertItem(i18n("Go To"), &fpopup, 100);
count = 0;
while (count<Configuration::maxSymbolCount() && item) {
- QString name = item->text(0);
+ TQString name = item->text(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
fpopup.insertItem(name, 101+count);
@@ -215,7 +215,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
l2popup.insertSeparator();
count = 0;
while (count<Configuration::maxSymbolCount() && item) {
- QString name = item->text(0);
+ TQString name = item->text(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
l2popup.insertItem(name, 201+count);
@@ -229,7 +229,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
}
if (!foundStopName && !fieldStop(0).isEmpty()) {
l2popup.insertSeparator();
- QString name = fieldStop(0);
+ TQString name = fieldStop(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
l2popup.insertItem(name, 199);
@@ -272,7 +272,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
vpopup.setCheckable(true);
popup.insertItem(i18n("Visualisation"), &vpopup, 10);
- QPopupMenu splitpopup;
+ TQPopupMenu splitpopup;
addSplitDirectionItems(&splitpopup, 1001);
vpopup.insertItem(i18n("Split Direction"), &splitpopup, 1000);
@@ -389,7 +389,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
case 56: setMaxDrawingDepth(maxDepth-1); break;
case 57: setMaxDrawingDepth(maxDepth+1); break;
- case 200: setFieldStop(0, QString::null); break;
+ case 200: setFieldStop(0, TQString::null); break;
case 60: setMinimalArea(-1); break;
case 61: setMinimalArea(10); break;
@@ -428,7 +428,7 @@ void CallMapView::selectedSlot(TreeMapItem* item, bool kbd)
if (item->text(0).isEmpty()) return;
if (kbd) {
- QString msg = i18n("Call Map: Current is '%1'").arg(item->text(0));
+ TQString msg = i18n("Call Map: Current is '%1'").arg(item->text(0));
if (_topLevel)
_topLevel->showMessage(msg, 5000);
}
@@ -528,7 +528,7 @@ void CallMapView::doUpdate(int changeType)
-QColor CallMapView::groupColor(TraceFunction* f) const
+TQColor CallMapView::groupColor(TraceFunction* f) const
{
if (!f)
return colorGroup().button();
@@ -537,9 +537,9 @@ QColor CallMapView::groupColor(TraceFunction* f) const
}
-QString CallMapView::tipString(TreeMapItem* i) const
+TQString CallMapView::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
int count = 0;
//qDebug("CallMapView::tipString for '%s'", i->text(0).ascii());
@@ -592,7 +592,7 @@ void CallMapBaseItem::setFunction(TraceFunction* f)
}
-QString CallMapBaseItem::text(int textNo) const
+TQString CallMapBaseItem::text(int textNo) const
{
if (textNo == 0) {
if (!_f)
@@ -601,11 +601,11 @@ QString CallMapBaseItem::text(int textNo) const
return _f->prettyName();
}
- if (!_f) return QString::null;
+ if (!_f) return TQString::null;
if (textNo == 2) return _f->prettyLocation();
if (textNo == 3) return _f->calledCount().pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct = ((CallMapView*)widget())->costType();
TraceCost* t = ((CallMapView*)widget())->totalCost();
@@ -617,15 +617,15 @@ QString CallMapBaseItem::text(int textNo) const
else
sum = 100.0 * _f->inclusive()->subCost(ct) / total;
- return QString("%1 %")
+ return TQString("%1 %")
.arg(sum, 0, 'f', Configuration::percentPrecision());
}
return _f->inclusive()->prettySubCost(ct);
}
-QPixmap CallMapBaseItem::pixmap(int i) const
+TQPixmap CallMapBaseItem::pixmap(int i) const
{
- if ((i != 1) || !_f) return QPixmap();
+ if ((i != 1) || !_f) return TQPixmap();
TraceCostType* ct = ((CallMapView*)widget())->costType();
TraceCost* t = ((CallMapView*)widget())->totalCost();
@@ -709,7 +709,7 @@ TreeMapItemList* CallMapBaseItem::children()
return _children;
}
-QColor CallMapBaseItem::backColor() const
+TQColor CallMapBaseItem::backColor() const
{
return ((CallMapView*)widget())->groupColor(_f);
}
@@ -734,7 +734,7 @@ void CallMapCallingItem::init()
#endif
}
-QString CallMapCallingItem::text(int textNo) const
+TQString CallMapCallingItem::text(int textNo) const
{
if (textNo == 0) {
if (!_c)
@@ -745,7 +745,7 @@ QString CallMapCallingItem::text(int textNo) const
if (textNo == 2) return _c->called()->prettyLocation();
if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct;
ct = ((CallMapView*)widget())->costType();
@@ -755,15 +755,15 @@ QString CallMapCallingItem::text(int textNo) const
// percentage relative to function cost
TraceCost* t = ((CallMapView*)widget())->totalCost();
double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return val.pretty();
}
-QPixmap CallMapCallingItem::pixmap(int i) const
+TQPixmap CallMapCallingItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
TraceCostType* ct = ((CallMapView*)widget())->costType();
@@ -836,7 +836,7 @@ TreeMapItemList* CallMapCallingItem::children()
}
-QColor CallMapCallingItem::backColor() const
+TQColor CallMapCallingItem::backColor() const
{
CallMapView* w = (CallMapView*)widget();
return w->groupColor(_c->called());
@@ -851,7 +851,7 @@ CallMapCallerItem::CallMapCallerItem(double factor, TraceCall* c)
_c = c;
}
-QString CallMapCallerItem::text(int textNo) const
+TQString CallMapCallerItem::text(int textNo) const
{
if (textNo == 0) {
if (!_c)
@@ -862,7 +862,7 @@ QString CallMapCallerItem::text(int textNo) const
if (textNo == 2) return _c->caller()->prettyLocation();
if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct;
ct = ((CallMapView*)widget())->costType();
@@ -871,16 +871,16 @@ QString CallMapCallerItem::text(int textNo) const
if (Configuration::showPercentage()) {
TraceCost* t = ((CallMapView*)widget())->totalCost();
double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return val.pretty();
}
-QPixmap CallMapCallerItem::pixmap(int i) const
+TQPixmap CallMapCallerItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
TraceCostType* ct = ((CallMapView*)widget())->costType();
@@ -942,14 +942,14 @@ TreeMapItemList* CallMapCallerItem::children()
return _children;
}
-QColor CallMapCallerItem::backColor() const
+TQColor CallMapCallerItem::backColor() const
{
CallMapView* w = (CallMapView*)widget();
return w->groupColor(_c->caller());
}
void CallMapView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -976,7 +976,7 @@ void CallMapView::readViewConfig(KConfig* c,
}
void CallMapView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/callmapview.h b/kcachegrind/kcachegrind/callmapview.h
index 97cfaec0..e0af71f4 100644
--- a/kcachegrind/kcachegrind/callmapview.h
+++ b/kcachegrind/kcachegrind/callmapview.h
@@ -34,22 +34,22 @@ class CallMapView: public TreeMapWidget, public TraceItemView
public:
CallMapView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
void setData(TraceData*);
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
bool showCallers() const { return _showCallers; }
TraceCost* totalCost();
- QString tipString(TreeMapItem*) const;
- QColor groupColor(TraceFunction*) const;
+ TQString tipString(TreeMapItem*) const;
+ TQColor groupColor(TraceFunction*) const;
private slots:
- void context(TreeMapItem*,const QPoint &);
+ void context(TreeMapItem*,const TQPoint &);
void selectedSlot(TreeMapItem*, bool);
void activatedSlot(TreeMapItem*);
@@ -75,10 +75,10 @@ public:
double sum() const;
double value() const ;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceFunction* _f;
@@ -96,10 +96,10 @@ public:
double value() const;
double sum() const;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCall* _c;
@@ -115,10 +115,10 @@ public:
TraceFunction* function() { return _c->caller(); }
double value() const;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCall* _c;
diff --git a/kcachegrind/kcachegrind/callview.cpp b/kcachegrind/kcachegrind/callview.cpp
index 10ec3ea6..4f22b4e9 100644
--- a/kcachegrind/kcachegrind/callview.cpp
+++ b/kcachegrind/kcachegrind/callview.cpp
@@ -20,8 +20,8 @@
* Call Views
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -36,8 +36,8 @@
CallView::CallView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -57,29 +57,29 @@ CallView::CallView(bool showCallers, TraceItemView* parentView,
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
setAllColumnsShowFocus(true);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CallView::whatsThis() const
+TQString CallView::whatsThis() const
{
return _showCallers ?
i18n( "<b>List of direct Callers</b>"
@@ -107,16 +107,16 @@ QString CallView::whatsThis() const
}
-void CallView::context(QListViewItem* i, const QPoint & p, int col)
+void CallView::context(TQListViewItem* i, const TQPoint & p, int col)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
// Menu entry:
TraceCall* c = i ? ((CallItem*) i)->call() : 0;
TraceFunction *f = 0, *cycle = 0;
if (c) {
- QString name = _showCallers ? c->callerName(true) : c->calledName(true);
+ TQString name = _showCallers ? c->callerName(true) : c->calledName(true);
f = _showCallers ? c->caller(true) : c->called(true);
cycle = f->cycle();
@@ -142,7 +142,7 @@ void CallView::context(QListViewItem* i, const QPoint & p, int col)
else if (r == 94) activated(cycle);
}
-void CallView::selectedSlot(QListViewItem * i)
+void CallView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
TraceCall* c = ((CallItem*) i)->call();
@@ -153,7 +153,7 @@ void CallView::selectedSlot(QListViewItem * i)
selected(f);
}
-void CallView::activatedSlot(QListViewItem * i)
+void CallView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceCall* c = ((CallItem*) i)->call();
@@ -187,7 +187,7 @@ void CallView::doUpdate(int changeType)
return;
}
- CallItem* ci = (CallItem*) QListView::selectedItem();
+ CallItem* ci = (CallItem*) TQListView::selectedItem();
TraceCall* c;
TraceItem* ti;
if (ci) {
@@ -196,7 +196,7 @@ void CallView::doUpdate(int changeType)
if (ti == _selectedItem) return;
}
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
c = ((CallItem*) item)->call();
ti = _showCallers ? c->caller() : c->called();
@@ -211,7 +211,7 @@ void CallView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CallItem*)item)->updateGroup();
return;
@@ -241,14 +241,14 @@ void CallView::refresh()
TraceCallList l = _showCallers ? f->callers(true) : f->callings(true);
// Allow resizing of column 1
- setColumnWidthMode(1, QListView::Maximum);
+ setColumnWidthMode(1, TQListView::Maximum);
for (call=l.first();call;call=l.next())
if (call->subCost(_costType)>0)
new CallItem(this, this, call);
if (!_costType2) {
- setColumnWidthMode(1, QListView::Manual);
+ setColumnWidthMode(1, TQListView::Manual);
setColumnWidth(1, 0);
}
}
diff --git a/kcachegrind/kcachegrind/callview.h b/kcachegrind/kcachegrind/callview.h
index 1e765bd2..e8d09050 100644
--- a/kcachegrind/kcachegrind/callview.h
+++ b/kcachegrind/kcachegrind/callview.h
@@ -23,26 +23,26 @@
#ifndef CALLVIEW_H
#define CALLVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class CallView: public QListView, public TraceItemView
+class CallView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CallView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
bool showCallers() const { return _showCallers; }
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/configdlg.cpp b/kcachegrind/kcachegrind/configdlg.cpp
index 36cba569..5ab60e02 100644
--- a/kcachegrind/kcachegrind/configdlg.cpp
+++ b/kcachegrind/kcachegrind/configdlg.cpp
@@ -20,12 +20,12 @@
* Configuration Dialog for KCachegrind
*/
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qdict.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqdict.h>
+#include <tqmessagebox.h>
#include <kcolorbutton.h>
#include <kfiledialog.h>
@@ -38,7 +38,7 @@
ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
:ConfigDlgBase(parent, name)
{
_config = c;
@@ -54,7 +54,7 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
contextEdit->setValidator(numValidator );
#if 0
- QListViewItem *oItem, *fItem, *cItem, *fnItem;
+ TQListViewItem *oItem, *fItem, *cItem, *fnItem;
oItem = new(colorList, i18n("ELF Objects"));
fItem = new(colorList, i18n("Source Files"));
@@ -62,36 +62,36 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
fnItem = new(colorList, i18n("Function (no Grouping)"));
#endif
- connect(objectCombo, SIGNAL(activated(const QString &)),
- this, SLOT(objectActivated(const QString &)));
- connect(objectCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(objectActivated(const QString &)));
- connect(objectCheck, SIGNAL(toggled(bool)),
- this, SLOT(objectCheckChanged(bool)));
- connect(objectColor, SIGNAL(changed(const QColor &)),
- this, SLOT(objectColorChanged(const QColor &)));
-
- connect(classCombo, SIGNAL(activated(const QString &)),
- this, SLOT(classActivated(const QString &)));
- connect(classCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(classActivated(const QString &)));
- connect(classCheck, SIGNAL(toggled(bool)),
- this, SLOT(classCheckChanged(bool)));
- connect(classColor, SIGNAL(changed(const QColor &)),
- this, SLOT(classColorChanged(const QColor &)));
-
- connect(fileCombo, SIGNAL(activated(const QString &)),
- this, SLOT(fileActivated(const QString &)));
- connect(fileCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(fileActivated(const QString &)));
- connect(fileCheck, SIGNAL(toggled(bool)),
- this, SLOT(fileCheckChanged(bool)));
- connect(fileColor, SIGNAL(changed(const QColor &)),
- this, SLOT(fileColorChanged(const QColor &)));
-
- QString objectPrefix = TraceCost::typeName(TraceCost::Object);
- QString classPrefix = TraceCost::typeName(TraceCost::Class);
- QString filePrefix = TraceCost::typeName(TraceCost::File);
+ connect(objectCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(objectActivated(const TQString &)));
+ connect(objectCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(objectActivated(const TQString &)));
+ connect(objectCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(objectCheckChanged(bool)));
+ connect(objectColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(objectColorChanged(const TQColor &)));
+
+ connect(classCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(classActivated(const TQString &)));
+ connect(classCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(classActivated(const TQString &)));
+ connect(classCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(classCheckChanged(bool)));
+ connect(classColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(classColorChanged(const TQColor &)));
+
+ connect(fileCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(fileActivated(const TQString &)));
+ connect(fileCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(fileActivated(const TQString &)));
+ connect(fileCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(fileCheckChanged(bool)));
+ connect(fileColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(fileColorChanged(const TQColor &)));
+
+ TQString objectPrefix = TraceCost::typeName(TraceCost::Object);
+ TQString classPrefix = TraceCost::typeName(TraceCost::Class);
+ TQString filePrefix = TraceCost::typeName(TraceCost::File);
objectCombo->setDuplicatesEnabled(false);
classCombo->setDuplicatesEnabled(false);
@@ -102,29 +102,29 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
// first unspecified cost items from data
TraceObjectMap::Iterator oit;
- QStringList oList;
+ TQStringList oList;
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit )
oList.append((*oit).prettyName());
TraceClassMap::Iterator cit;
- QStringList cList;
+ TQStringList cList;
for ( cit = data->classMap().begin();
cit != data->classMap().end(); ++cit )
cList.append((*cit).prettyName());
TraceFileMap::Iterator fit;
- QStringList fList;
+ TQStringList fList;
for ( fit = data->fileMap().begin();
fit != data->fileMap().end(); ++fit )
fList.append((*fit).prettyName());
// then already defined colors (have to check for duplicates!)
- QDictIterator<Configuration::ColorSetting> it( c->_colors );
+ TQDictIterator<Configuration::ColorSetting> it( c->_colors );
for( ; it.current(); ++it ) {
if ((*it)->automatic) continue;
- QString n = it.currentKey();
+ TQString n = it.currentKey();
if (n.startsWith(objectPrefix)) {
n = n.remove(0, objectPrefix.length()+1);
if (oList.findIndex(n) == -1) oList.append(n);
@@ -150,53 +150,53 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
classActivated(classCombo->currentText());
fileActivated(fileCombo->currentText());
- maxListEdit->setText(QString::number(c->_maxListCount));
+ maxListEdit->setText(TQString::number(c->_maxListCount));
_dirItem = 0;
- QListViewItem* i = new QListViewItem(dirList, i18n("(always)"));
+ TQListViewItem* i = new TQListViewItem(dirList, i18n("(always)"));
i->setOpen(true);
- QStringList::Iterator sit = c->_generalSourceDirs.begin();
+ TQStringList::Iterator sit = c->_generalSourceDirs.begin();
for(; sit != c->_generalSourceDirs.end(); ++sit ) {
- QString d = (*sit);
+ TQString d = (*sit);
if (d.isEmpty()) d = "/";
- new QListViewItem(i, d);
+ new TQListViewItem(i, d);
}
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit ) {
- QString n = (*oit).name();
- i = new QListViewItem(dirList, n);
+ TQString n = (*oit).name();
+ i = new TQListViewItem(dirList, n);
i->setOpen(true);
- QStringList* dirs = c->_objectSourceDirs[n];
+ TQStringList* dirs = c->_objectSourceDirs[n];
if (!dirs) continue;
sit = dirs->begin();
for(; sit != dirs->end(); ++sit ) {
- QString d = (*sit);
+ TQString d = (*sit);
if (d.isEmpty()) d = "/";
- new QListViewItem(i, d);
+ new TQListViewItem(i, d);
}
}
- connect(dirList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(dirsItemChanged(QListViewItem*)));
- connect(addDirButton, SIGNAL(clicked()),
- this, SLOT(dirsAddPressed()));
- connect(deleteDirButton, SIGNAL(clicked()),
- this, SLOT(dirsDeletePressed()));
+ connect(dirList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(dirsItemChanged(TQListViewItem*)));
+ connect(addDirButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirsAddPressed()));
+ connect(deleteDirButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirsDeletePressed()));
dirList->setSelected(dirList->firstChild(), true);
- symbolCount->setText(QString::number(c->_maxSymbolCount));
- symbolLength->setText(QString::number(c->_maxSymbolLength));
- precisionEdit->setText(QString::number(c->_percentPrecision));
- contextEdit->setText(QString::number(c->_context));
+ symbolCount->setText(TQString::number(c->_maxSymbolCount));
+ symbolLength->setText(TQString::number(c->_maxSymbolLength));
+ precisionEdit->setText(TQString::number(c->_percentPrecision));
+ contextEdit->setText(TQString::number(c->_context));
}
ConfigDlg::~ConfigDlg()
{
}
-bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
+bool ConfigDlg::configure(Configuration* c, TraceData* d, TQWidget* p)
{
ConfigDlg dlg(c, d, p);
@@ -207,11 +207,11 @@ bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
if (ok && newValue < 500)
c->_maxListCount = newValue;
else
- QMessageBox::warning(p, i18n("KCachegrind Configuration"),
+ TQMessageBox::warning(p, i18n("KCachegrind Configuration"),
i18n("The Maximum Number of List Items should be below 500."
"The previous set value (%1) will still be used.")
- .arg(QString::number(c->_maxListCount)),
- QMessageBox::Ok, 0);
+ .arg(TQString::number(c->_maxListCount)),
+ TQMessageBox::Ok, 0);
c->_maxSymbolCount = dlg.symbolCount->text().toInt();
c->_maxSymbolLength = dlg.symbolLength->text().toInt();
@@ -222,13 +222,13 @@ bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
return false;
}
-void ConfigDlg::objectActivated(const QString & s)
+void ConfigDlg::objectActivated(const TQString & s)
{
// qDebug("objectActivated: %s", s.ascii());
if (s.isEmpty()) { _objectCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::Object) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::Object) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -262,18 +262,18 @@ void ConfigDlg::objectCheckChanged(bool b)
}
}
-void ConfigDlg::objectColorChanged(const QColor & c)
+void ConfigDlg::objectColorChanged(const TQColor & c)
{
if (_objectCS) _objectCS->color = c;
}
-void ConfigDlg::classActivated(const QString & s)
+void ConfigDlg::classActivated(const TQString & s)
{
// qDebug("classActivated: %s", s.ascii());
if (s.isEmpty()) { _classCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::Class) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::Class) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -293,19 +293,19 @@ void ConfigDlg::classCheckChanged(bool b)
if (_classCS) _classCS->automatic = b;
}
-void ConfigDlg::classColorChanged(const QColor & c)
+void ConfigDlg::classColorChanged(const TQColor & c)
{
if (_classCS) _classCS->color = c;
}
-void ConfigDlg::fileActivated(const QString & s)
+void ConfigDlg::fileActivated(const TQString & s)
{
// qDebug("fileActivated: %s", s.ascii());
if (s.isEmpty()) { _fileCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::File) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::File) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -324,13 +324,13 @@ void ConfigDlg::fileCheckChanged(bool b)
if (_fileCS) _fileCS->automatic = b;
}
-void ConfigDlg::fileColorChanged(const QColor & c)
+void ConfigDlg::fileColorChanged(const TQColor & c)
{
if (_fileCS) _fileCS->color = c;
}
-void ConfigDlg::dirsItemChanged(QListViewItem* i)
+void ConfigDlg::dirsItemChanged(TQListViewItem* i)
{
_dirItem = i;
deleteDirButton->setEnabled(i->depth() == 1);
@@ -340,13 +340,13 @@ void ConfigDlg::dirsItemChanged(QListViewItem* i)
void ConfigDlg::dirsDeletePressed()
{
if (!_dirItem || (_dirItem->depth() == 0)) return;
- QListViewItem* p = _dirItem->parent();
+ TQListViewItem* p = _dirItem->parent();
if (!p) return;
Configuration* c = Configuration::config();
- QString objName = p->text(0);
+ TQString objName = p->text(0);
- QStringList* dirs;
+ TQStringList* dirs;
if (objName == i18n("(always)"))
dirs = &(c->_generalSourceDirs);
else
@@ -365,9 +365,9 @@ void ConfigDlg::dirsAddPressed()
if (!_dirItem || (_dirItem->depth() >0)) return;
Configuration* c = Configuration::config();
- QString objName = _dirItem->text(0);
+ TQString objName = _dirItem->text(0);
- QStringList* dirs;
+ TQStringList* dirs;
if (objName == i18n("(always)"))
dirs = &(c->_generalSourceDirs);
else {
@@ -378,8 +378,8 @@ void ConfigDlg::dirsAddPressed()
}
}
- QString newDir;
- newDir = KFileDialog::getExistingDirectory(QString::null,
+ TQString newDir;
+ newDir = KFileDialog::getExistingDirectory(TQString::null,
this,
i18n("Choose Source Folder"));
if (newDir.isEmpty()) return;
@@ -391,8 +391,8 @@ void ConfigDlg::dirsAddPressed()
if (dirs->findIndex(newDir)>=0) return;
dirs->append(newDir);
- if (newDir.isEmpty()) newDir = QString("/");
- new QListViewItem(_dirItem, newDir);
+ if (newDir.isEmpty()) newDir = TQString("/");
+ new TQListViewItem(_dirItem, newDir);
}
#include "configdlg.moc"
diff --git a/kcachegrind/kcachegrind/configdlg.h b/kcachegrind/kcachegrind/configdlg.h
index ceace6dd..521caf15 100644
--- a/kcachegrind/kcachegrind/configdlg.h
+++ b/kcachegrind/kcachegrind/configdlg.h
@@ -34,22 +34,22 @@ class ConfigDlg : public ConfigDlgBase
public:
ConfigDlg(Configuration*, TraceData*,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
~ConfigDlg();
- static bool configure(Configuration*, TraceData*, QWidget*);
+ static bool configure(Configuration*, TraceData*, TQWidget*);
protected slots:
- void objectActivated(const QString &);
+ void objectActivated(const TQString &);
void objectCheckChanged(bool);
- void objectColorChanged(const QColor &);
- void classActivated(const QString &);
+ void objectColorChanged(const TQColor &);
+ void classActivated(const TQString &);
void classCheckChanged(bool);
- void classColorChanged(const QColor &);
- void fileActivated(const QString &);
+ void classColorChanged(const TQColor &);
+ void fileActivated(const TQString &);
void fileCheckChanged(bool);
- void fileColorChanged(const QColor &);
- void dirsItemChanged(QListViewItem*);
+ void fileColorChanged(const TQColor &);
+ void dirsItemChanged(TQListViewItem*);
void dirsDeletePressed();
void dirsAddPressed();
@@ -58,7 +58,7 @@ private:
TraceData* _data;
Configuration::ColorSetting *_objectCS, *_classCS, *_fileCS;
- QListViewItem* _dirItem;
+ TQListViewItem* _dirItem;
};
#endif
diff --git a/kcachegrind/kcachegrind/configuration.cpp b/kcachegrind/kcachegrind/configuration.cpp
index 9df92a39..1a6c4d58 100644
--- a/kcachegrind/kcachegrind/configuration.cpp
+++ b/kcachegrind/kcachegrind/configuration.cpp
@@ -34,9 +34,9 @@
// Some predefined cost types...
//
-static QStringList knownTypes()
+static TQStringList knownTypes()
{
- QStringList l;
+ TQStringList l;
l << "Ir" << "Dr" << "Dw"
<< "I1mr" << "D1mr" << "D1mw"
@@ -49,16 +49,16 @@ static QStringList knownTypes()
}
-static QString knownFormula(QString name)
+static TQString knownFormula(TQString name)
{
- if (name =="L1m") return QString("I1mr + D1mr + D1mw");
- if (name =="L2m") return QString("I2mr + D2mr + D2mw");
- if (name =="CEst") return QString("Ir + 10 L1m + 100 L2m");
+ if (name =="L1m") return TQString("I1mr + D1mr + D1mw");
+ if (name =="L2m") return TQString("I2mr + D2mr + D2mw");
+ if (name =="CEst") return TQString("Ir + 10 L1m + 100 L2m");
- return QString::null;
+ return TQString::null;
}
-static QString knownLongName(QString name)
+static TQString knownLongName(TQString name)
{
if (name == "Ir") return i18n("Instruction Fetch");
if (name =="Dr") return i18n("Data Read Access");
@@ -76,7 +76,7 @@ static QString knownLongName(QString name)
if (name =="L2m") return i18n("L2 Miss Sum");
if (name =="CEst") return i18n("Cycle Estimation");
- return QString::null;
+ return TQString::null;
}
@@ -127,14 +127,14 @@ void Configuration::saveOptions(KConfig* kconfig)
Configuration* c = config();
// color options
- KConfigGroup colorConfig(kconfig, QCString("CostColors"));
- QDictIterator<ColorSetting> it( c->_colors );
+ KConfigGroup colorConfig(kconfig, TQCString("CostColors"));
+ TQDictIterator<ColorSetting> it( c->_colors );
int count = 1;
for( ; it.current(); ++it ) {
if ( !(*it)->automatic ) {
- colorConfig.writeEntry( QString("Name%1").arg(count),
+ colorConfig.writeEntry( TQString("Name%1").arg(count),
it.currentKey());
- colorConfig.writeEntry( QString("Color%1").arg(count),
+ colorConfig.writeEntry( TQString("Color%1").arg(count),
(*it)->color);
//qDebug("Written Color %s (%d)", it.currentKey().ascii(), count);
@@ -144,21 +144,21 @@ void Configuration::saveOptions(KConfig* kconfig)
colorConfig.writeEntry( "Count", count-1);
// source options
- KConfigGroup sourceConfig(kconfig, QCString("Source"));
+ KConfigGroup sourceConfig(kconfig, TQCString("Source"));
sourceConfig.writeEntry("Dirs", c->_generalSourceDirs, ':');
- QDictIterator<QStringList> it2( c->_objectSourceDirs );
+ TQDictIterator<TQStringList> it2( c->_objectSourceDirs );
count = 1;
for( ; it2.current(); ++it2 ) {
- sourceConfig.writeEntry( QString("Object%1").arg(count),
+ sourceConfig.writeEntry( TQString("Object%1").arg(count),
it2.currentKey());
- sourceConfig.writeEntry( QString("Dirs%1").arg(count),
+ sourceConfig.writeEntry( TQString("Dirs%1").arg(count),
*(*it2), ':');
count++;
}
sourceConfig.writeEntry( "Count", count-1);
// general options
- KConfigGroup generalConfig(kconfig, QCString("General"));
+ KConfigGroup generalConfig(kconfig, TQCString("General"));
generalConfig.writeEntry("ShowPercentage", c->_showPercentage);
generalConfig.writeEntry("ShowExpanded", c->_showExpanded);
generalConfig.writeEntry("ShowCycles", c->_showCycles);
@@ -171,20 +171,20 @@ void Configuration::saveOptions(KConfig* kconfig)
generalConfig.writeEntry("Context", c->_context);
generalConfig.writeEntry("NoCostInside", c->_noCostInside);
- KConfigGroup ctConfig(kconfig, QCString("CostTypes"));
+ KConfigGroup ctConfig(kconfig, TQCString("CostTypes"));
int ctCount = TraceCostType::knownTypeCount();
ctConfig.writeEntry( "Count", ctCount);
for (int i=0; i<ctCount; i++) {
TraceCostType* t = TraceCostType::knownType(i);
- ctConfig.writeEntry( QString("Name%1").arg(i+1), t->name());
+ ctConfig.writeEntry( TQString("Name%1").arg(i+1), t->name());
// Use localized key
TraceItemView::writeConfigEntry(&ctConfig,
- QString("Longname%1").arg(i+1).ascii(),
+ TQString("Longname%1").arg(i+1).ascii(),
t->longName(),
knownLongName(t->name()).utf8().data() /*, true */ );
TraceItemView::writeConfigEntry(&ctConfig,
- QString("Formula%1").arg(i+1).ascii(),
+ TQString("Formula%1").arg(i+1).ascii(),
t->formula(), knownFormula(t->name()).utf8().data());
}
}
@@ -202,23 +202,23 @@ void Configuration::readOptions(KConfig* kconfig)
// colors for default cost types:
// red for L2 misses, green for L1 misses, blue for normal accesses
- c->color("CostType-I2mr")->color = QColor(240, 0, 0);
- c->color("CostType-D2mr")->color = QColor(180,40,40);
- c->color("CostType-D2mw")->color = QColor(120,80,80);
+ c->color("CostType-I2mr")->color = TQColor(240, 0, 0);
+ c->color("CostType-D2mr")->color = TQColor(180,40,40);
+ c->color("CostType-D2mw")->color = TQColor(120,80,80);
- c->color("CostType-I1mr")->color = QColor(0, 240, 0);
- c->color("CostType-D1mr")->color = QColor(40,180,40);
- c->color("CostType-D1mw")->color = QColor(80,120,80);
+ c->color("CostType-I1mr")->color = TQColor(0, 240, 0);
+ c->color("CostType-D1mr")->color = TQColor(40,180,40);
+ c->color("CostType-D1mw")->color = TQColor(80,120,80);
- c->color("CostType-Ir")->color = QColor(0, 0, 240);
- c->color("CostType-Dr")->color = QColor(40,40,180);
- c->color("CostType-Dw")->color = QColor(80,80,120);
+ c->color("CostType-Ir")->color = TQColor(0, 0, 240);
+ c->color("CostType-Dr")->color = TQColor(40,40,180);
+ c->color("CostType-Dw")->color = TQColor(80,80,120);
- KConfigGroup colorConfig(kconfig, QCString("CostColors"));
+ KConfigGroup colorConfig(kconfig, TQCString("CostColors"));
count = colorConfig.readNumEntry("Count", 0);
for (i=1;i<=count;i++) {
- QString n = colorConfig.readEntry(QString("Name%1").arg(i));
- QColor color = colorConfig.readColorEntry(QString("Color%1").arg(i));
+ TQString n = colorConfig.readEntry(TQString("Name%1").arg(i));
+ TQColor color = colorConfig.readColorEntry(TQString("Color%1").arg(i));
if (n.isEmpty()) continue;
@@ -233,25 +233,25 @@ void Configuration::readOptions(KConfig* kconfig)
}
// source options
- KConfigGroup sourceConfig(kconfig, QCString("Source"));
- QStringList dirs;
+ KConfigGroup sourceConfig(kconfig, TQCString("Source"));
+ TQStringList dirs;
dirs = sourceConfig.readListEntry("Dirs", ':');
if (dirs.count()>0) c->_generalSourceDirs = dirs;
count = sourceConfig.readNumEntry("Count", 0);
c->_objectSourceDirs.clear();
if (count>17) c->_objectSourceDirs.resize(count);
for (i=1;i<=count;i++) {
- QString n = sourceConfig.readEntry(QString("Object%1").arg(i));
- dirs = sourceConfig.readListEntry(QString("Dirs%1").arg(i), ':');
+ TQString n = sourceConfig.readEntry(TQString("Object%1").arg(i));
+ dirs = sourceConfig.readListEntry(TQString("Dirs%1").arg(i), ':');
if (n.isEmpty() || (dirs.count()==0)) continue;
- c->_objectSourceDirs.insert(n, new QStringList(dirs));
+ c->_objectSourceDirs.insert(n, new TQStringList(dirs));
}
// general options
- KConfigGroup generalConfig(kconfig, QCString("General"));
+ KConfigGroup generalConfig(kconfig, TQCString("General"));
c->_showPercentage = generalConfig.readBoolEntry("ShowPercentage", true);
c->_showExpanded = generalConfig.readBoolEntry("ShowExpanded", false);
c->_showCycles = generalConfig.readBoolEntry("ShowCycles", true);
@@ -267,14 +267,14 @@ void Configuration::readOptions(KConfig* kconfig)
// known cost types
if (TraceCostType::knownTypeCount()==0) {
- KConfigGroup ctConfig(kconfig, QCString("CostTypes"));
+ KConfigGroup ctConfig(kconfig, TQCString("CostTypes"));
int ctCount = ctConfig.readNumEntry("Count", 0);
if (ctCount>0) {
for (int i=1;i<=ctCount;i++) {
- QString n = ctConfig.readEntry(QString("Name%1").arg(i));
- QString l = ctConfig.readEntry(QString("Longname%1").arg(i));
+ TQString n = ctConfig.readEntry(TQString("Name%1").arg(i));
+ TQString l = ctConfig.readEntry(TQString("Longname%1").arg(i));
if (l.isEmpty()) l = knownLongName(n);
- QString f = ctConfig.readEntry(QString("Formula%1").arg(i));
+ TQString f = ctConfig.readEntry(TQString("Formula%1").arg(i));
if (f.isEmpty()) f = knownFormula(n);
TraceCostType::add(new TraceCostType(n, l, f));
@@ -283,10 +283,10 @@ void Configuration::readOptions(KConfig* kconfig)
else {
// add default types
- QString longName, formula;
+ TQString longName, formula;
TraceCostType* ct;
- QStringList l = knownTypes();
- for ( QStringList::Iterator it = l.begin();
+ TQStringList l = knownTypes();
+ for ( TQStringList::Iterator it = l.begin();
it != l.end(); ++it ) {
longName = knownLongName(*it);
formula = knownFormula(*it);
@@ -297,35 +297,35 @@ void Configuration::readOptions(KConfig* kconfig)
}
}
-QColor Configuration::groupColor(TraceItem* cost)
+TQColor Configuration::groupColor(TraceItem* cost)
{
- QString n;
+ TQString n;
if (!cost)
- n = QString("default");
+ n = TQString("default");
else
n = TraceCost::typeName(cost->type()) + "-" + cost->prettyName();
return color(n)->color;
}
-QColor Configuration::costTypeColor(TraceCostType* t)
+TQColor Configuration::costTypeColor(TraceCostType* t)
{
- QString n;
+ TQString n;
if (!t)
- n = QString("CostType-default");
+ n = TQString("CostType-default");
else
- n = QString("CostType-%1").arg(t->name());
+ n = TQString("CostType-%1").arg(t->name());
return color(n)->color;
}
-QColor Configuration::functionColor(TraceCost::CostType gt,
+TQColor Configuration::functionColor(TraceCost::CostType gt,
TraceFunction* f)
{
TraceCost* group = f;
- QString n;
+ TQString n;
switch(gt) {
case TraceCost::Object: group = f->object(); break;
@@ -347,7 +347,7 @@ QColor Configuration::functionColor(TraceCost::CostType gt,
return groupColor(group);
}
-Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
+Configuration::ColorSetting* Configuration::color(TQString n, bool createNew)
{
// qDebug("Color for %s", n.latin1());
@@ -366,7 +366,7 @@ Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
}
//qDebug("New color for %s: H %d, S %d", n.ascii(), h, 64+s);
- QColor color = QColor(h, 64+s, 192, QColor::Hsv);
+ TQColor color = TQColor(h, 64+s, 192, TQColor::Hsv);
cs = new ColorSetting;
cs->name = n;
@@ -383,9 +383,9 @@ Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
* current trace. If a special object is given in 2nd argument,
* put its Source Base in front.
*/
-QStringList Configuration::sourceDirs(TraceData* data, TraceObject* o)
+TQStringList Configuration::sourceDirs(TraceData* data, TraceObject* o)
{
- QStringList l = config()->_generalSourceDirs, *ol, *ol2 = 0;
+ TQStringList l = config()->_generalSourceDirs, *ol, *ol2 = 0;
TraceObjectMap::Iterator oit;
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit ) {
@@ -462,7 +462,7 @@ int Configuration::maxSymbolLength()
return config()->_maxSymbolLength;
}
-QString Configuration::shortenSymbol(QString s)
+TQString Configuration::shortenSymbol(TQString s)
{
if ((int)s.length() > maxSymbolLength())
s = s.left(maxSymbolLength()) + "...";
diff --git a/kcachegrind/kcachegrind/configuration.h b/kcachegrind/kcachegrind/configuration.h
index 5543ed81..478f6176 100644
--- a/kcachegrind/kcachegrind/configuration.h
+++ b/kcachegrind/kcachegrind/configuration.h
@@ -23,9 +23,9 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include "tracedata.h"
@@ -44,10 +44,10 @@ public:
static void readOptions(KConfig*);
// color for visualisation of an object
- static QColor functionColor(TraceItem::CostType gt, TraceFunction*);
- static QColor groupColor(TraceItem*);
- static QColor costTypeColor(TraceCostType*);
- static QStringList sourceDirs(TraceData*, TraceObject* o = 0);
+ static TQColor functionColor(TraceItem::CostType gt, TraceFunction*);
+ static TQColor groupColor(TraceItem*);
+ static TQColor costTypeColor(TraceCostType*);
+ static TQStringList sourceDirs(TraceData*, TraceObject* o = 0);
static bool showPercentage();
static bool showExpanded();
static bool showCycles();
@@ -57,7 +57,7 @@ public:
// max symbol lengths/count in tooltip/popup
static int maxSymbolLength();
// strip a symbol name according to <maxSymbolLength>
- static QString shortenSymbol(QString);
+ static TQString shortenSymbol(TQString);
static int maxSymbolCount();
// max. number of items in lists
static int maxListCount();
@@ -76,17 +76,17 @@ public:
private:
struct ColorSetting {
- QString name;
- QColor color;
+ TQString name;
+ TQColor color;
bool automatic;
};
- static ColorSetting* color(QString, bool createNew = true);
+ static ColorSetting* color(TQString, bool createNew = true);
- QDict<ColorSetting> _colors;
+ TQDict<ColorSetting> _colors;
- QStringList _generalSourceDirs;
- QDict<QStringList> _objectSourceDirs;
+ TQStringList _generalSourceDirs;
+ TQDict<TQStringList> _objectSourceDirs;
bool _showPercentage, _showExpanded, _showCycles;
double _cycleCut;
diff --git a/kcachegrind/kcachegrind/costlistitem.cpp b/kcachegrind/kcachegrind/costlistitem.cpp
index e0136030..1e777b05 100644
--- a/kcachegrind/kcachegrind/costlistitem.cpp
+++ b/kcachegrind/kcachegrind/costlistitem.cpp
@@ -18,8 +18,8 @@
#include <math.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,9 +33,9 @@
// CostListItem
-CostListItem::CostListItem(QListView* parent, TraceCostItem* costItem,
+CostListItem::CostListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, int size)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_groupSize = size;
_skipped = 0;
@@ -49,9 +49,9 @@ CostListItem::CostListItem(QListView* parent, TraceCostItem* costItem,
}
}
-CostListItem::CostListItem(QListView* parent, int skipped,
+CostListItem::CostListItem(TQListView* parent, int skipped,
TraceCostItem* costItem, TraceCostType* ct)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_skipped = skipped;
_costItem = costItem;
@@ -70,8 +70,8 @@ void CostListItem::updateName()
{
if (!_costItem) return;
- QString n = _costItem->prettyName();
- if (_groupSize>=0) n += QString(" (%1)").arg(_groupSize);
+ TQString n = _costItem->prettyName();
+ if (_groupSize>=0) n += TQString(" (%1)").arg(_groupSize);
setText(1, n);
}
@@ -89,22 +89,22 @@ void CostListItem::update()
double total = d->subCost(_costType);
if (total == 0.0) {
- setText(0, QString("---"));
- setPixmap(0, QPixmap());
+ setText(0, TQString("---"));
+ setPixmap(0, TQPixmap());
return;
}
_pure = _costItem->subCost(_costType);
double pure = 100.0 * _pure / total;
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(pure, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(pure, 0, 'f', Configuration::percentPrecision());
else
str = _costItem->prettySubCost(_costType);
if (_skipped) {
// special handling for skip entries...
- setText(0, QString("< %1").arg(str));
+ setText(0, TQString("< %1").arg(str));
return;
}
@@ -112,7 +112,7 @@ void CostListItem::update()
setPixmap(0, costPixmap(_costType, _costItem, total, false));
}
-int CostListItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CostListItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const CostListItem* fi1 = this;
const CostListItem* fi2 = (CostListItem*) i;
@@ -132,5 +132,5 @@ int CostListItem::compare(QListViewItem * i, int col, bool ascending ) const
if (fi1->_pure > fi2->_pure) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/costlistitem.h b/kcachegrind/kcachegrind/costlistitem.h
index 0027dfda..6c1ccbc8 100644
--- a/kcachegrind/kcachegrind/costlistitem.h
+++ b/kcachegrind/kcachegrind/costlistitem.h
@@ -19,19 +19,19 @@
#ifndef COSTLISTITEM_H
#define COSTLISTITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CostListItem: public QListViewItem
{
public:
- CostListItem(QListView* parent, TraceCostItem* cost,
+ CostListItem(TQListView* parent, TraceCostItem* cost,
TraceCostType* ct, int size = -1);
// entry with multiple skipped items
- CostListItem(QListView* parent, int skipped, TraceCostItem* cost,
+ CostListItem(TQListView* parent, int skipped, TraceCostItem* cost,
TraceCostType* ct);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCostItem* costItem() { return (_skipped) ? 0 : _costItem; }
void setCostType(TraceCostType* ct);
void update();
diff --git a/kcachegrind/kcachegrind/costtypeitem.cpp b/kcachegrind/kcachegrind/costtypeitem.cpp
index 7bc02ea4..dc35cb2b 100644
--- a/kcachegrind/kcachegrind/costtypeitem.cpp
+++ b/kcachegrind/kcachegrind/costtypeitem.cpp
@@ -20,7 +20,7 @@
* Items of cost type view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -31,9 +31,9 @@
// CostTypeItem
-CostTypeItem::CostTypeItem(QListView* parent, TraceCostItem* costItem,
+CostTypeItem::CostTypeItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_costItem = costItem;
_costType = ct;
@@ -42,7 +42,7 @@ CostTypeItem::CostTypeItem(QListView* parent, TraceCostItem* costItem,
if (ct) {
setText(0, ct->longName());
setText(3, ct->name());
- QString formula = ct->formula();
+ TQString formula = ct->formula();
setText(5, formula);
if (!formula.isEmpty()) {
setText(4, "=");
@@ -73,9 +73,9 @@ void CostTypeItem::update()
if (total == 0.0) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
setText(2, "-");
- setPixmap(2, QPixmap());
+ setPixmap(2, TQPixmap());
return;
}
@@ -103,7 +103,7 @@ void CostTypeItem::update()
_pure = _costItem ? _costItem->subCost(_costType) : SubCost(0);
double pure = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage()) {
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -113,14 +113,14 @@ void CostTypeItem::update()
if (!f) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
return;
}
_sum = f->inclusive()->subCost(_costType);
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -130,7 +130,7 @@ void CostTypeItem::update()
}
-int CostTypeItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CostTypeItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
CostTypeItem* fi = (CostTypeItem*) i;
if (col==0) {
@@ -143,7 +143,7 @@ int CostTypeItem::compare(QListViewItem * i, int col, bool ascending ) const
if (_pure > fi->_pure) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/costtypeitem.h b/kcachegrind/kcachegrind/costtypeitem.h
index 3eb5ea0a..7593151e 100644
--- a/kcachegrind/kcachegrind/costtypeitem.h
+++ b/kcachegrind/kcachegrind/costtypeitem.h
@@ -23,17 +23,17 @@
#ifndef COSTTYEPITEM_H
#define COSTTYEPITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CostTypeItem: public QListViewItem
{
public:
- CostTypeItem(QListView* parent, TraceCostItem* costItem,
+ CostTypeItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
void setGroupType(TraceCost::CostType);
TraceCostItem* costItem() { return _costItem; }
TraceCostType* costType() { return _costType; }
diff --git a/kcachegrind/kcachegrind/costtypeview.cpp b/kcachegrind/kcachegrind/costtypeview.cpp
index b3e8f117..6642e7af 100644
--- a/kcachegrind/kcachegrind/costtypeview.cpp
+++ b/kcachegrind/kcachegrind/costtypeview.cpp
@@ -20,8 +20,8 @@
* Cost Type View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -36,14 +36,14 @@
CostTypeView::CostTypeView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
addColumn( i18n( "Event Type" ) );
addColumn( i18n( "Incl." ) );
addColumn( i18n( "Self" ) );
addColumn( i18n( "Short" ) );
- addColumn( QString::null );
+ addColumn( TQString::null );
addColumn( i18n( "Formula" ) );
setSorting(-1);
@@ -54,29 +54,29 @@ CostTypeView::CostTypeView(TraceItemView* parentView,
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(itemRenamed(QListViewItem*,int,const QString&)),
- SLOT(renamedSlot(QListViewItem*,int,const QString&)));
+ TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)),
+ TQT_SLOT(renamedSlot(TQListViewItem*,int,const TQString&)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CostTypeView::whatsThis() const
+TQString CostTypeView::whatsThis() const
{
return i18n( "<b>Cost Types List</b>"
"<p>This list shows all cost types available "
@@ -88,9 +88,9 @@ QString CostTypeView::whatsThis() const
}
-void CostTypeView::context(QListViewItem* i, const QPoint & p, int)
+void CostTypeView::context(TQListViewItem* i, const TQPoint & p, int)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
@@ -151,22 +151,22 @@ void CostTypeView::context(QListViewItem* i, const QPoint & p, int)
i++;
}
// add same new cost type to this mapping and to known types
- QString shortName = i18n("New%1").arg(i);
- QString longName = i18n("New Cost Type %1").arg(i);
+ TQString shortName = i18n("New%1").arg(i);
+ TQString longName = i18n("New Cost Type %1").arg(i);
TraceCostType::add(new TraceCostType(shortName, longName, "0"));
_data->mapping()->add(new TraceCostType(shortName, longName, "0"));
refresh();
}
}
-void CostTypeView::selectedSlot(QListViewItem * i)
+void CostTypeView::selectedSlot(TQListViewItem * i)
{
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
if (ct)
selectedCostType(ct);
}
-void CostTypeView::activatedSlot(QListViewItem * i)
+void CostTypeView::activatedSlot(TQListViewItem * i)
{
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
if (ct)
@@ -199,7 +199,7 @@ void CostTypeView::doUpdate(int changeType)
if (changeType == costType2Changed) return;
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CostTypeItem*)item)->setGroupType(_groupType);
@@ -207,7 +207,7 @@ void CostTypeView::doUpdate(int changeType)
}
if (changeType == costTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
if ( ((CostTypeItem*)item)->costType() == _costType) {
setSelected(item, true);
@@ -219,7 +219,7 @@ void CostTypeView::doUpdate(int changeType)
}
if (changeType == partsChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CostTypeItem*)item)->update();
@@ -250,9 +250,9 @@ void CostTypeView::refresh()
TraceCostItem* c = (TraceCostItem*) _activeItem;
TraceCostType* ct =0 ;
- QListViewItem* item = 0;
- QString sumStr, pureStr;
- QListViewItem* costItem=0;
+ TQListViewItem* item = 0;
+ TQString sumStr, pureStr;
+ TQListViewItem* costItem=0;
TraceCostMapping* m = _data->mapping();
for (int i=m->virtualCount()-1;i>=0;i--) {
@@ -276,7 +276,7 @@ void CostTypeView::refresh()
}
-void CostTypeView::renamedSlot(QListViewItem* item,int c,const QString& t)
+void CostTypeView::renamedSlot(TQListViewItem* item,int c,const TQString& t)
{
TraceCostType* ct = item ? ((CostTypeItem*) item)->costType() : 0;
if (!ct || ct->isReal()) return;
diff --git a/kcachegrind/kcachegrind/costtypeview.h b/kcachegrind/kcachegrind/costtypeview.h
index b6eab280..63d95ea7 100644
--- a/kcachegrind/kcachegrind/costtypeview.h
+++ b/kcachegrind/kcachegrind/costtypeview.h
@@ -23,26 +23,26 @@
#ifndef COSTTYPEVIEW_H
#define COSTTYPEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class CostTypeView: public QListView, public TraceItemView
+class CostTypeView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CostTypeView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
- void renamedSlot(QListViewItem*,int,const QString&);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
+ void renamedSlot(TQListViewItem*,int,const TQString&);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/coverageitem.cpp b/kcachegrind/kcachegrind/coverageitem.cpp
index 3cf5bbc1..3c93a88e 100644
--- a/kcachegrind/kcachegrind/coverageitem.cpp
+++ b/kcachegrind/kcachegrind/coverageitem.cpp
@@ -20,7 +20,7 @@
* Items of coverage view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -32,11 +32,11 @@
// CallerCoverageItem
-CallerCoverageItem::CallerCoverageItem(QListView* parent, Coverage* c,
+CallerCoverageItem::CallerCoverageItem(TQListView* parent, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = 0;
_coverage = c;
@@ -50,11 +50,11 @@ CallerCoverageItem::CallerCoverageItem(QListView* parent, Coverage* c,
setGroupType(gt);
}
-CallerCoverageItem::CallerCoverageItem(QListView* parent, int skipped, Coverage* c,
+CallerCoverageItem::CallerCoverageItem(TQListView* parent, int skipped, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = skipped;
_coverage = c;
@@ -74,7 +74,7 @@ void CallerCoverageItem::setGroupType(TraceCost::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -87,22 +87,22 @@ void CallerCoverageItem::setCostType(TraceCostType* ct)
void CallerCoverageItem::update()
{
if (!_coverage) {
- setText(0, QString::null);
- setText(1, QString::null);
+ setText(0, TQString::null);
+ setText(1, TQString::null);
return;
}
_pSum = 100.0 * _coverage->inclusive();
SubCost realSum = _base->inclusive()->subCost(_costType);
_sum = SubCost(realSum * _coverage->inclusive());
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
else
str = _sum.pretty();
if (_skipped) {
- setText(0, QString("< %1").arg(str));
+ setText(0, TQString("< %1").arg(str));
return;
}
@@ -112,15 +112,15 @@ void CallerCoverageItem::update()
// call count
_cc = SubCost(_coverage->callCount());
- setText(2, _cc ? _cc.pretty() : QString("(0)"));
+ setText(2, _cc ? _cc.pretty() : TQString("(0)"));
// distance (min/max/median)
_distance = _coverage->inclusiveMedian();
- QString distString;
+ TQString distString;
if (_coverage->minDistance() == _coverage->maxDistance())
- distString = QString::number(_distance);
+ distString = TQString::number(_distance);
else
- distString = QString("%1-%2 (%3)")
+ distString = TQString("%1-%2 (%3)")
.arg(_coverage->minDistance())
.arg(_coverage->maxDistance())
.arg(_distance);
@@ -128,7 +128,7 @@ void CallerCoverageItem::update()
}
-int CallerCoverageItem::compare(QListViewItem * i,
+int CallerCoverageItem::compare(TQListViewItem * i,
int col, bool ascending ) const
{
const CallerCoverageItem* ci1 = this;
@@ -165,18 +165,18 @@ int CallerCoverageItem::compare(QListViewItem * i,
if (ci1->_cc > ci2->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
// CalleeCoverageItem
-CalleeCoverageItem::CalleeCoverageItem(QListView* parent, Coverage* c,
+CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = 0;
_coverage = c;
@@ -190,11 +190,11 @@ CalleeCoverageItem::CalleeCoverageItem(QListView* parent, Coverage* c,
setGroupType(gt);
}
-CalleeCoverageItem::CalleeCoverageItem(QListView* parent, int skipped, Coverage* c,
+CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = skipped;
_coverage = c;
@@ -214,7 +214,7 @@ void CalleeCoverageItem::setGroupType(TraceCost::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(4, colorPixmap(10, 10, c));
}
@@ -227,9 +227,9 @@ void CalleeCoverageItem::setCostType(TraceCostType* ct)
void CalleeCoverageItem::update()
{
if (!_coverage) {
- setText(0, QString::null);
- setText(1, QString::null);
- setText(2, QString::null);
+ setText(0, TQString::null);
+ setText(1, TQString::null);
+ setText(2, TQString::null);
return;
}
@@ -240,14 +240,14 @@ void CalleeCoverageItem::update()
_sum = SubCost(realSum * _coverage->inclusive());
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
else
str = _sum.pretty();
if (_skipped) {
- str = QString("< %1").arg(str);
+ str = TQString("< %1").arg(str);
setText(0, str);
setText(1, str);
return;
@@ -258,7 +258,7 @@ void CalleeCoverageItem::update()
_self = SubCost(realSum * _coverage->self());
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(_pSelf, 0, 'f', Configuration::percentPrecision()));
}
else {
@@ -272,22 +272,22 @@ void CalleeCoverageItem::update()
_cc = SubCost(_coverage->callCount());
- setText(3, _cc ? _cc.pretty() : QString("(0)"));
+ setText(3, _cc ? _cc.pretty() : TQString("(0)"));
// for comparations
_distance = _coverage->inclusiveMedian();
- QString distString;
+ TQString distString;
if (_coverage->minDistance() == _coverage->maxDistance())
- distString = QString::number(_distance);
+ distString = TQString::number(_distance);
else {
int sMed = _coverage->selfMedian();
- QString med;
+ TQString med;
if (_distance == sMed)
- med = QString::number(_distance);
+ med = TQString::number(_distance);
else
- med = QString("%1/%2").arg(_distance).arg(sMed);
+ med = TQString("%1/%2").arg(_distance).arg(sMed);
- distString = QString("%1-%2 (%3)")
+ distString = TQString("%1-%2 (%3)")
.arg(_coverage->minDistance())
.arg(_coverage->maxDistance())
.arg(med);
@@ -296,7 +296,7 @@ void CalleeCoverageItem::update()
}
-int CalleeCoverageItem::compare(QListViewItem * i,
+int CalleeCoverageItem::compare(TQListViewItem * i,
int col, bool ascending ) const
{
CalleeCoverageItem* ci = (CalleeCoverageItem*) i;
@@ -337,7 +337,7 @@ int CalleeCoverageItem::compare(QListViewItem * i,
if (_cc > ci->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/coverageitem.h b/kcachegrind/kcachegrind/coverageitem.h
index abd7f6eb..29666890 100644
--- a/kcachegrind/kcachegrind/coverageitem.h
+++ b/kcachegrind/kcachegrind/coverageitem.h
@@ -23,7 +23,7 @@
#ifndef COVERAGEITEM_H
#define COVERAGEITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class Coverage;
@@ -31,12 +31,12 @@ class Coverage;
class CallerCoverageItem: public QListViewItem
{
public:
- CallerCoverageItem(QListView* parent, Coverage* c, TraceFunction* base,
+ CallerCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- CallerCoverageItem(QListView* parent, int skipped, Coverage* c, TraceFunction* base,
+ CallerCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
@@ -57,12 +57,12 @@ private:
class CalleeCoverageItem: public QListViewItem
{
public:
- CalleeCoverageItem(QListView* parent, Coverage* c, TraceFunction* base,
+ CalleeCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- CalleeCoverageItem(QListView* parent, int skipped, Coverage* c, TraceFunction* base,
+ CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
diff --git a/kcachegrind/kcachegrind/coverageview.cpp b/kcachegrind/kcachegrind/coverageview.cpp
index 9ca6b1db..4452efca 100644
--- a/kcachegrind/kcachegrind/coverageview.cpp
+++ b/kcachegrind/kcachegrind/coverageview.cpp
@@ -20,8 +20,8 @@
* Coverage Views
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -37,8 +37,8 @@
CoverageView::CoverageView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -62,29 +62,29 @@ CoverageView::CoverageView(bool showCallers, TraceItemView* parentView,
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
setAllColumnsShowFocus(true);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CoverageView::whatsThis() const
+TQString CoverageView::whatsThis() const
{
return _showCallers ?
i18n( "<b>List of all Callers</b>"
@@ -148,9 +148,9 @@ QString CoverageView::whatsThis() const
"function of the other panel is changed instead.</p>");
}
-void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
+void CoverageView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction* f = 0;
if (i) {
@@ -160,7 +160,7 @@ void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
}
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -177,7 +177,7 @@ void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
if (r == 93) activated(f);
}
-void CoverageView::selectedSlot(QListViewItem * i)
+void CoverageView::selectedSlot(TQListViewItem * i)
{
TraceFunction* f = 0;
if (i) {
@@ -192,7 +192,7 @@ void CoverageView::selectedSlot(QListViewItem * i)
}
}
-void CoverageView::activatedSlot(QListViewItem * i)
+void CoverageView::activatedSlot(TQListViewItem * i)
{
TraceFunction* f = 0;
if (i) {
@@ -229,7 +229,7 @@ void CoverageView::doUpdate(int changeType)
}
TraceFunction* f = 0;
- QListViewItem* i = QListView::selectedItem();
+ TQListViewItem* i = TQListView::selectedItem();
if (i) {
f = _showCallers ?
((CallerCoverageItem*)i)->function() :
@@ -237,7 +237,7 @@ void CoverageView::doUpdate(int changeType)
}
if (f == _selectedItem) return;
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
f = _showCallers ?
((CallerCoverageItem*)item)->function() :
@@ -252,7 +252,7 @@ void CoverageView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
if (_showCallers)
((CallerCoverageItem*)item)->setGroupType(_groupType);
diff --git a/kcachegrind/kcachegrind/coverageview.h b/kcachegrind/kcachegrind/coverageview.h
index 4b1b8b20..e0edeea5 100644
--- a/kcachegrind/kcachegrind/coverageview.h
+++ b/kcachegrind/kcachegrind/coverageview.h
@@ -23,26 +23,26 @@
#ifndef COVERAGEVIEW_H
#define COVERAGEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
#include "listutils.h"
-class CoverageView: public QListView, public TraceItemView
+class CoverageView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CoverageView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/dumpmanager.cpp b/kcachegrind/kcachegrind/dumpmanager.cpp
index 6dda67e6..2f0891a4 100644
--- a/kcachegrind/kcachegrind/dumpmanager.cpp
+++ b/kcachegrind/kcachegrind/dumpmanager.cpp
@@ -11,7 +11,7 @@
// Dump
//
-Dump::Dump(QString file)
+Dump::Dump(TQString file)
{
_filename = file;
}
diff --git a/kcachegrind/kcachegrind/dumpmanager.h b/kcachegrind/kcachegrind/dumpmanager.h
index 3e2ff9e1..4925819d 100644
--- a/kcachegrind/kcachegrind/dumpmanager.h
+++ b/kcachegrind/kcachegrind/dumpmanager.h
@@ -12,13 +12,13 @@
#ifndef DUMPMANAGER_H
#define DUMPMANAGER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class Dump;
class TraceData;
-typedef QPtrList<Dump> DumpList;
+typedef TQPtrList<Dump> DumpList;
/**
@@ -27,12 +27,12 @@ typedef QPtrList<Dump> DumpList;
class Dump
{
public:
- Dump(QString);
+ Dump(TQString);
- QString filename() { return _filename; }
+ TQString filename() { return _filename; }
private:
- QString _filename;
+ TQString _filename;
};
diff --git a/kcachegrind/kcachegrind/dumpselection.cpp b/kcachegrind/kcachegrind/dumpselection.cpp
index c16470a7..4d812ef9 100644
--- a/kcachegrind/kcachegrind/dumpselection.cpp
+++ b/kcachegrind/kcachegrind/dumpselection.cpp
@@ -20,7 +20,7 @@
DumpSelection::DumpSelection( TopLevel* top,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: DumpSelectionBase(parent, name), TraceItemView(0, top)
{
}
diff --git a/kcachegrind/kcachegrind/dumpselection.h b/kcachegrind/kcachegrind/dumpselection.h
index 8c59d3e4..3bec46ae 100644
--- a/kcachegrind/kcachegrind/dumpselection.h
+++ b/kcachegrind/kcachegrind/dumpselection.h
@@ -20,10 +20,10 @@ class DumpSelection : public DumpSelectionBase, public TraceItemView
Q_OBJECT
public:
- DumpSelection( TopLevel*, QWidget* parent = 0, const char* name = 0);
+ DumpSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0);
virtual ~DumpSelection();
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
};
#endif
diff --git a/kcachegrind/kcachegrind/functionitem.cpp b/kcachegrind/kcachegrind/functionitem.cpp
index d6d93c0d..3b694ddf 100644
--- a/kcachegrind/kcachegrind/functionitem.cpp
+++ b/kcachegrind/kcachegrind/functionitem.cpp
@@ -23,8 +23,8 @@
//#include <math.h>
-//#include <qpainter.h>
-//#include <qregexp.h>
+//#include <tqpainter.h>
+//#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -37,9 +37,9 @@
// FunctionItem
-FunctionItem::FunctionItem(QListView* parent, TraceFunction* f,
+FunctionItem::FunctionItem(TQListView* parent, TraceFunction* f,
TraceCostType* ct, TraceCost::CostType gt)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
#if 0
_costPixValid = false;
@@ -56,9 +56,9 @@ FunctionItem::FunctionItem(QListView* parent, TraceFunction* f,
setText(4, f->prettyLocation());
}
-FunctionItem::FunctionItem(QListView* parent, int skipped,
+FunctionItem::FunctionItem(TQListView* parent, int skipped,
TraceFunction* f, TraceCostType* ct)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
#if 0
_costPixValid = false;
@@ -73,11 +73,11 @@ FunctionItem::FunctionItem(QListView* parent, int skipped,
}
#if 0
-const QPixmap* FunctionItem::pixmap(int column) const
+const TQPixmap* FunctionItem::pixmap(int column) const
{
if (column == 3) {
if (!_groupPixValid) {
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
_groupPix = colorPixmap(10, 10, c);
_groupPixValid = true;
}
@@ -105,7 +105,7 @@ void FunctionItem::setGroupType(TraceCost::CostType gt)
_groupPixValid = false;
viewList()->repaint();
#else
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(3, colorPixmap(10, 10, c));
#endif
}
@@ -119,7 +119,7 @@ void FunctionItem::setCostType(TraceCostType* c)
void FunctionItem::update()
{
double inclTotal = _function->data()->subCost(_costType);
- QString str;
+ TQString str;
TraceCost* selfCost = _function->data();
if (Configuration::showExpanded()) {
@@ -141,7 +141,7 @@ void FunctionItem::update()
_sum = _function->inclusive()->subCost(_costType);
double incl = 100.0 * _sum / inclTotal;
if (Configuration::showPercentage())
- str = QString("%1").arg(incl, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(incl, 0, 'f', Configuration::percentPrecision());
else
str = _function->inclusive()->prettySubCost(_costType);
str = "< " + str;
@@ -155,22 +155,22 @@ void FunctionItem::update()
str = _function->prettyCalledCount();
else {
if (_function == _function->cycle())
- str = QString("-");
+ str = TQString("-");
else
- str = QString("(0)");
+ str = TQString("(0)");
}
setText(2, str);
// Incl. cost
_sum = _function->inclusive()->subCost(_costType);
if (inclTotal == 0.0) {
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
setText(0, "-");
}
else {
double incl = 100.0 * _sum / inclTotal;
if (Configuration::showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(incl, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _function->inclusive()->prettySubCost(_costType));
@@ -181,14 +181,14 @@ void FunctionItem::update()
// self
_pure = _function->subCost(_costType);
if (selfTotal == 0.0) {
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
setText(1, "-");
}
else {
double self = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(self, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _function->prettySubCost(_costType));
@@ -198,7 +198,7 @@ void FunctionItem::update()
}
-int FunctionItem::compare(QListViewItem * i, int col, bool ascending ) const
+int FunctionItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const FunctionItem* fi1 = this;
const FunctionItem* fi2 = (FunctionItem*) i;
@@ -231,6 +231,6 @@ int FunctionItem::compare(QListViewItem * i, int col, bool ascending ) const
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/functionitem.h b/kcachegrind/kcachegrind/functionitem.h
index 6a59a14d..1c49e1be 100644
--- a/kcachegrind/kcachegrind/functionitem.h
+++ b/kcachegrind/kcachegrind/functionitem.h
@@ -23,26 +23,26 @@
#ifndef FUNCTIONITEM_H
#define FUNCTIONITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class FunctionItem: public QListViewItem
{
public:
- FunctionItem(QListView* parent, TraceFunction* function,
+ FunctionItem(TQListView* parent, TraceFunction* function,
TraceCostType* ct, TraceCost::CostType gt);
// constructor for a "Skipped ... " entry
- FunctionItem(QListView* parent, int skipped,
+ FunctionItem(TQListView* parent, int skipped,
TraceFunction* function, TraceCostType* ct);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
void update();
#if 0
- const QPixmap* pixmap (int column) const;
+ const TQPixmap* pixmap (int column) const;
bool _costPixValid, _groupPixValid;
QPixMap _costPix, _groupPix;
#endif
diff --git a/kcachegrind/kcachegrind/functionselection.cpp b/kcachegrind/kcachegrind/functionselection.cpp
index 7df6d13c..212637ec 100644
--- a/kcachegrind/kcachegrind/functionselection.cpp
+++ b/kcachegrind/kcachegrind/functionselection.cpp
@@ -20,14 +20,14 @@
* For function selection, to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
@@ -41,14 +41,14 @@
#include "toplevel.h"
FunctionSelection::FunctionSelection( TopLevel* top,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: FunctionSelectionBase(parent, name), TraceItemView(0, top)
{
_group = 0;
_inSetGroup = false;
_inSetFunction = false;
- QStringList args;
+ TQStringList args;
args << i18n("(No Grouping)")
<< TraceCost::i18nTypeName(TraceItem::Object)
<< TraceCost::i18nTypeName(TraceItem::File)
@@ -57,17 +57,17 @@ FunctionSelection::FunctionSelection( TopLevel* top,
groupBox->insertStringList(args);
// this needs same order of grouptype actionlist!
- connect(groupBox, SIGNAL(activated(int)),
- top, SLOT(groupTypeSelected(int)));
+ connect(groupBox, TQT_SIGNAL(activated(int)),
+ top, TQT_SLOT(groupTypeSelected(int)));
// search while typing...
- connect(searchEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(searchChanged(const QString&)));
- connect(&_searchTimer, SIGNAL(timeout()),
- this, SLOT(queryDelayed()));
+ connect(searchEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(searchChanged(const TQString&)));
+ connect(&_searchTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(queryDelayed()));
// select first matching group/function on return
- connect(searchEdit, SIGNAL(returnPressed()),
- this, SLOT(searchReturnPressed()));
+ connect(searchEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(searchReturnPressed()));
searchEdit->setMinimumWidth(50);
// we start with desending cost sorting
@@ -78,46 +78,46 @@ FunctionSelection::FunctionSelection( TopLevel* top,
functionList->setAllColumnsShowFocus(true);
// functionList->setShowSortIndicator(true);
// we can have very long function and location names
- functionList->setColumnWidthMode(3, QListView::Manual);
+ functionList->setColumnWidthMode(3, TQListView::Manual);
functionList->setColumnWidth(3, 200);
- functionList->setColumnWidthMode(4, QListView::Manual);
+ functionList->setColumnWidthMode(4, TQListView::Manual);
functionList->setColumnWidth(4, 200);
groupList->setSorting(0,false);
groupList->setColumnAlignment(0, Qt::AlignRight);
groupList->setAllColumnsShowFocus(true);
// groupList->setShowSortIndicator(true);
- groupList->setResizeMode(QListView::LastColumn);
+ groupList->setResizeMode(TQListView::LastColumn);
#if 0
// single click press activation
- connect(functionList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
+ connect(functionList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
connect(functionList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(functionContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(functionContext(TQListViewItem*, const TQPoint &, int)));
#else
// single click release activation
- connect(functionList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(functionSelected(QListViewItem*)));
- connect(functionList, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
- connect(functionList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
+ connect(functionList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(functionSelected(TQListViewItem*)));
+ connect(functionList, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
+ connect(functionList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
connect(functionList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(functionContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(functionContext(TQListViewItem*, const TQPoint &, int)));
#endif
- connect(groupList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(groupSelected(QListViewItem*)));
- connect(groupList, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(groupDoubleClicked(QListViewItem*)));
- connect(groupList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(groupDoubleClicked(QListViewItem*)));
+ connect(groupList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(groupSelected(TQListViewItem*)));
+ connect(groupList, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(groupDoubleClicked(TQListViewItem*)));
+ connect(groupList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(groupDoubleClicked(TQListViewItem*)));
connect(groupList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(groupContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(groupContext(TQListViewItem*, const TQPoint &, int)));
// start hidden
groupList->hide();
@@ -131,7 +131,7 @@ void FunctionSelection::searchReturnPressed()
{
query(searchEdit->text());
- QListViewItem* item;
+ TQListViewItem* item;
if (_groupType != TraceItem::Function) {
// if current group not matching, select first matching group
item = groupList->currentItem();
@@ -150,7 +150,7 @@ void FunctionSelection::searchReturnPressed()
}
// trigger the query after some delay, dependent on length
-void FunctionSelection::searchChanged(const QString& q)
+void FunctionSelection::searchChanged(const TQString& q)
{
_searchDelayed = q;
int ms = 100;
@@ -164,10 +164,10 @@ void FunctionSelection::queryDelayed()
query(_searchDelayed);
}
-void FunctionSelection::functionContext(QListViewItem* i,
- const QPoint & p, int c)
+void FunctionSelection::functionContext(TQListViewItem* i,
+ const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction* f = 0;
if (i) {
@@ -190,10 +190,10 @@ void FunctionSelection::functionContext(QListViewItem* i,
if (r == 93) activated(f);
}
-void FunctionSelection::groupContext(QListViewItem* /*i*/,
- const QPoint & p, int c)
+void FunctionSelection::groupContext(TQListViewItem* /*i*/,
+ const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
#if 0
TraceCostItem* g = 0;
@@ -217,9 +217,9 @@ void FunctionSelection::groupContext(QListViewItem* /*i*/,
}
-void FunctionSelection::addGroupMenu(QPopupMenu* popup)
+void FunctionSelection::addGroupMenu(TQPopupMenu* popup)
{
- QPopupMenu *popup1 = new QPopupMenu(popup);
+ TQPopupMenu *popup1 = new TQPopupMenu(popup);
popup1->setCheckable(true);
if (_groupType != TraceItem::Function) {
@@ -237,8 +237,8 @@ void FunctionSelection::addGroupMenu(QPopupMenu* popup)
case TraceItem::FunctionCycle: popup1->setItemChecked(4, true); break;
default: break;
}
- connect(popup1,SIGNAL(activated(int)),
- _topLevel,SLOT(groupTypeSelected(int)));
+ connect(popup1,TQT_SIGNAL(activated(int)),
+ _topLevel,TQT_SLOT(groupTypeSelected(int)));
popup->insertItem(i18n("Grouping"), popup1);
}
@@ -298,15 +298,15 @@ void FunctionSelection::doUpdate(int changeType)
TraceFunction* f = (TraceFunction*) _activeItem;
// if already current, nothing to do
- QListViewItem* i = functionList->currentItem();
+ TQListViewItem* i = functionList->currentItem();
if (i && (((FunctionItem*)i)->function() == f)) {
functionList->setSelected(i,true);
return;
}
// reset searchEdit (as not activated from this view)
- _searchString = QString::null;
- query(QString::null);
+ _searchString = TQString::null;
+ query(TQString::null);
// select cost item group of function
switch(_groupType) {
@@ -318,7 +318,7 @@ void FunctionSelection::doUpdate(int changeType)
break;
}
- QListViewItem* item = functionList->firstChild();
+ TQListViewItem* item = functionList->firstChild();
for (;item;item = item->nextSibling())
if (((FunctionItem*)item)->function() == f)
break;
@@ -368,8 +368,8 @@ void FunctionSelection::doUpdate(int changeType)
}
// reset searchEdit
- _searchString = QString::null;
- query(QString::null);
+ _searchString = TQString::null;
+ query(TQString::null);
refresh();
}
@@ -386,7 +386,7 @@ void FunctionSelection::setGroup(TraceCostItem* g)
if (g == _group) return;
_group = g;
- QListViewItem* item = groupList->firstChild();
+ TQListViewItem* item = groupList->firstChild();
for (;item;item = item->nextSibling())
if (((CostListItem*)item)->costItem() == g)
break;
@@ -432,7 +432,7 @@ void FunctionSelection::refresh()
TraceObjectMap::Iterator oit;
TraceClassMap::Iterator cit;
TraceFileMap::Iterator fit;
- QListViewItem *i = 0, *item = 0, *fitem = 0;
+ TQListViewItem *i = 0, *item = 0, *fitem = 0;
// Fill up group list.
// Always show group of current function, even if cost below low limit.
@@ -480,7 +480,7 @@ void FunctionSelection::refresh()
default:
{
- QListViewItem* oldItem = functionList->selectedItem();
+ TQListViewItem* oldItem = functionList->selectedItem();
TraceFunction* oldFunction = 0;
int oldPos = 0;
if (oldItem) {
@@ -491,7 +491,7 @@ void FunctionSelection::refresh()
oldFunction = 0;
}
- // switching off QListView updates is buggy with some QT versions...
+ // switching off TQListView updates is buggy with some QT versions...
//functionList->setUpdatesEnabled(false);
functionList->clear();
setCostColumnWidths();
@@ -585,7 +585,7 @@ void FunctionSelection::refresh()
}
-void FunctionSelection::groupSelected(QListViewItem* i)
+void FunctionSelection::groupSelected(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -614,7 +614,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
return;
}
- // switching off QListView updates is buggy with some QT versions...
+ // switching off TQListView updates is buggy with some QT versions...
//functionList->setUpdatesEnabled(false);
functionList->clear();
@@ -633,7 +633,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
}
#endif
- QRegExp re(_searchString, false, true);
+ TQRegExp re(_searchString, false, true);
FunctionItem* fitem = 0;
TraceFunction *f;
@@ -677,7 +677,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
}
}
-void FunctionSelection::groupDoubleClicked(QListViewItem* i)
+void FunctionSelection::groupDoubleClicked(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -691,9 +691,9 @@ void FunctionSelection::groupDoubleClicked(QListViewItem* i)
}
-TraceCostItem* FunctionSelection::group(QString s)
+TraceCostItem* FunctionSelection::group(TQString s)
{
- QListViewItem *item;
+ TQListViewItem *item;
item = groupList->firstChild();
for(;item;item = item->nextSibling())
if (((CostListItem*)item)->costItem()->name() == s)
@@ -704,7 +704,7 @@ TraceCostItem* FunctionSelection::group(QString s)
-void FunctionSelection::functionSelected(QListViewItem* i)
+void FunctionSelection::functionSelected(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -721,7 +721,7 @@ void FunctionSelection::functionSelected(QListViewItem* i)
}
}
-void FunctionSelection::functionActivated(QListViewItem* i)
+void FunctionSelection::functionActivated(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -735,7 +735,7 @@ void FunctionSelection::functionActivated(QListViewItem* i)
void FunctionSelection::updateGroupSizes(bool hideEmpty)
{
- QListViewItem* item = groupList->firstChild();
+ TQListViewItem* item = groupList->firstChild();
for (;item;item = item->nextSibling()) {
CostListItem* i = (CostListItem*)item;
int size = (_groupSize.contains(i->costItem())) ?
@@ -745,7 +745,7 @@ void FunctionSelection::updateGroupSizes(bool hideEmpty)
}
}
-void FunctionSelection::query(QString query)
+void FunctionSelection::query(TQString query)
{
if (searchEdit->text() != query)
searchEdit->setText(query);
@@ -759,7 +759,7 @@ void FunctionSelection::query(QString query)
}
_searchString = query;
- QRegExp re(query, false, true);
+ TQRegExp re(query, false, true);
_groupSize.clear();
TraceFunction* f = 0;
@@ -841,7 +841,7 @@ void FunctionSelection::query(QString query)
bool FunctionSelection::setTopFunction()
{
- QListViewItem* i = functionList->firstChild();
+ TQListViewItem* i = functionList->firstChild();
// this emits a function selection
functionList->setSelected(i, true);
functionActivated(i);
@@ -851,15 +851,15 @@ bool FunctionSelection::setTopFunction()
void FunctionSelection::setCostColumnWidths()
{
if (_costType && (_costType->subCost(_data->callMax())>0) ) {
- functionList->setColumnWidthMode(0, QListView::Maximum);
+ functionList->setColumnWidthMode(0, TQListView::Maximum);
functionList->setColumnWidth(0,50);
- functionList->setColumnWidthMode(2, QListView::Maximum);
+ functionList->setColumnWidthMode(2, TQListView::Maximum);
functionList->setColumnWidth(2,50);
}
else {
- functionList->setColumnWidthMode(0, QListView::Manual);
+ functionList->setColumnWidthMode(0, TQListView::Manual);
functionList->setColumnWidth(0,0);
- functionList->setColumnWidthMode(2, QListView::Manual);
+ functionList->setColumnWidthMode(2, TQListView::Manual);
functionList->setColumnWidth(2,0);
}
diff --git a/kcachegrind/kcachegrind/functionselection.h b/kcachegrind/kcachegrind/functionselection.h
index c5e7c871..4a8db0be 100644
--- a/kcachegrind/kcachegrind/functionselection.h
+++ b/kcachegrind/kcachegrind/functionselection.h
@@ -40,28 +40,28 @@ class FunctionSelection : public FunctionSelectionBase, public TraceItemView
Q_OBJECT
public:
- FunctionSelection( TopLevel*, QWidget* parent = 0, const char* name = 0);
+ FunctionSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0);
~FunctionSelection();
- TraceCostItem* group(QString);
+ TraceCostItem* group(TQString);
void setGroup(TraceCostItem*);
- void query(QString);
+ void query(TQString);
bool setTopFunction();
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
- void addGroupMenu(QPopupMenu*);
+ void addGroupMenu(TQPopupMenu*);
public slots:
void searchReturnPressed();
- void searchChanged(const QString&);
+ void searchChanged(const TQString&);
void queryDelayed();
- void groupDoubleClicked( QListViewItem* );
- void functionActivated( QListViewItem* );
- void groupSelected( QListViewItem* );
- void functionSelected( QListViewItem* );
- void functionContext(QListViewItem*, const QPoint &, int);
- void groupContext(QListViewItem*, const QPoint &, int);
+ void groupDoubleClicked( TQListViewItem* );
+ void functionActivated( TQListViewItem* );
+ void groupSelected( TQListViewItem* );
+ void functionSelected( TQListViewItem* );
+ void functionContext(TQListViewItem*, const TQPoint &, int);
+ void groupContext(TQListViewItem*, const TQPoint &, int);
private:
TraceItem* canShow(TraceItem* i);
@@ -73,9 +73,9 @@ private:
TraceCostItem* _group;
- QString _searchString, _searchDelayed;
- QTimer _searchTimer;
- QMap<TraceCostItem*,int> _groupSize;
+ TQString _searchString, _searchDelayed;
+ TQTimer _searchTimer;
+ TQMap<TraceCostItem*,int> _groupSize;
HighestCostList _hc;
// when setting a
diff --git a/kcachegrind/kcachegrind/instritem.cpp b/kcachegrind/kcachegrind/instritem.cpp
index c7cdfba3..97c09661 100644
--- a/kcachegrind/kcachegrind/instritem.cpp
+++ b/kcachegrind/kcachegrind/instritem.cpp
@@ -20,8 +20,8 @@
* Items of instruction view.
*/
-#include <qpixmap.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kapplication.h>
@@ -37,9 +37,9 @@
// InstrItem
// for messages
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
- Addr addr, const QString& msg)
- : QListViewItem(parent)
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
+ Addr addr, const TQString& msg)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -56,11 +56,11 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for code lines
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
Addr addr, bool inside,
- const QString& code, const QString& cmd,
- const QString& args, TraceInstr* instr)
- : QListViewItem(parent)
+ const TQString& code, const TQString& cmd,
+ const TQString& args, TraceInstr* instr)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -86,9 +86,9 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for call lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrCall* instrCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -101,13 +101,13 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _instrCall->callCount();
- QString templ = " ";
+ TQString templ = " ";
if (cc==0)
templ += i18n("Active call to '%1'");
else
templ += i18n("%n call to '%1'", "%n calls to '%1'", cc);
- QString callStr = templ.arg(_instrCall->call()->calledName());
+ TQString callStr = templ.arg(_instrCall->call()->calledName());
TraceFunction* calledF = _instrCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -118,9 +118,9 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
}
// for jump lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrJump* instrJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -132,7 +132,7 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString jStr;
+ TQString jStr;
if (_instrJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to 0x%3")
.arg(_instrJump->followedCount().pretty())
@@ -155,7 +155,7 @@ void InstrItem::updateGroup()
if (!_instrCall) return;
TraceFunction* f = _instrCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(6, colorPixmap(10, 10, c));
}
@@ -174,10 +174,10 @@ void InstrItem::updateCost()
if (_instrCall &&
((_instrCall->call()->inCycle()>0) ||
(_instrCall->call()->isRecursion()>0))) {
- QString str;
- QPixmap p;
+ TQString str;
+ TQPixmap p;
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -200,15 +200,15 @@ void InstrItem::updateCost()
TraceCostType *ct = _view->costType();
_pure = ct ? instrCost->subCost(ct) : SubCost(0);
if (_pure == 0) {
- setText(1, QString::null);
- setPixmap(1, QPixmap());
+ setText(1, TQString::null);
+ setPixmap(1, TQPixmap());
}
else {
double total = totalCost->subCost(ct);
double pure = 100.0 * _pure / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _pure.pretty());
@@ -219,15 +219,15 @@ void InstrItem::updateCost()
TraceCostType *ct2 = _view->costType2();
_pure2 = ct2 ? instrCost->subCost(ct2) : SubCost(0);
if (_pure2 == 0) {
- setText(2, QString::null);
- setPixmap(2, QPixmap());
+ setText(2, TQString::null);
+ setPixmap(2, TQPixmap());
}
else {
double total = totalCost->subCost(ct2);
double pure = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -237,7 +237,7 @@ void InstrItem::updateCost()
}
-int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
+int InstrItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const InstrItem* ii1 = this;
const InstrItem* ii2 = (InstrItem*) i;
@@ -293,50 +293,50 @@ int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void InstrItem::paintCell( QPainter *p, const QColorGroup &cg,
+void InstrItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if ( !_inside || ((column==1) || column==2))
- _cg.setColor( QColorGroup::Base, cg.button() );
+ _cg.setColor( TQColorGroup::Base, cg.button() );
else if ((_instrCall || _instrJump) && column>2)
- _cg.setColor( QColorGroup::Base, cg.midlight() );
+ _cg.setColor( TQColorGroup::Base, cg.midlight() );
if (column == 3)
paintArrows(p, _cg, width);
else
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void InstrItem::setJumpArray(const QMemArray<TraceInstrJump*>& a)
+void InstrItem::setJumpArray(const TQMemArray<TraceInstrJump*>& a)
{
_jump.duplicate(a);
}
-void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
InstrView* iv = (InstrView*) lv;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole
- = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole
+ = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- iv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ iv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
if ( isSelected() && lv->allColumnsShowFocus() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
int marg = lv->itemMargin();
int yy = height()/2, y1, y2;
- QColor c;
+ TQColor c;
int start = -1, end = -1;
@@ -372,7 +372,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
if (_jump[i] == ((TraceItemView*)_view)->selectedItem()) {
p->fillRect( marg + 6*i-2, (y1==0) ? y1: y1-2,
8, (y2-y1==height())? y2:y2+2,
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
c = lv->colorGroup().highlightedText();
}
#endif
@@ -407,7 +407,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(iv->arrowLevels() - end) + 10;
- QPointArray a;
+ TQPointArray a;
a.putPoints(0, 7, x, y+h,
x,y, x+w-8, y, x+w-8, y-2,
x+w, yy,
@@ -453,10 +453,10 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int InstrItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int InstrItem::width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const
{
- if (c != 3) return QListViewItem::width(fm, lv, c);
+ if (c != 3) return TQListViewItem::width(fm, lv, c);
InstrView* iv = (InstrView*) lv;
int levels = iv->arrowLevels();
diff --git a/kcachegrind/kcachegrind/instritem.h b/kcachegrind/kcachegrind/instritem.h
index 33634995..8f04b47a 100644
--- a/kcachegrind/kcachegrind/instritem.h
+++ b/kcachegrind/kcachegrind/instritem.h
@@ -23,7 +23,7 @@
#ifndef INSTRITEM_H
#define INSTRITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class InstrView;
@@ -33,21 +33,21 @@ class InstrItem: public QListViewItem
public:
// for messages
- InstrItem(InstrView* iv, QListView* parent,
- Addr addr, const QString&);
+ InstrItem(InstrView* iv, TQListView* parent,
+ Addr addr, const TQString&);
// for instruction lines
- InstrItem(InstrView* iv, QListView* parent,
+ InstrItem(InstrView* iv, TQListView* parent,
Addr addr, bool inside,
- const QString&, const QString&, const QString&,
+ const TQString&, const TQString&, const TQString&,
TraceInstr* instr);
// for call instr
- InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+ InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrCall* instrCall);
// for jump lines
- InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+ InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrJump* instrJump);
Addr addr() const { return _addr; }
@@ -55,22 +55,22 @@ public:
TraceInstrCall* instrCall() const { return _instrCall; }
TraceInstrJump* instrJump() const { return _instrJump; }
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
- void paintCell(QPainter *p, const QColorGroup &cg,
+ void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
- int width( const QFontMetrics& fm,
- const QListView* lv, int c ) const;
+ int width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const;
void updateGroup();
void updateCost();
// arrow lines
- void setJumpArray(const QMemArray<TraceInstrJump*>& a);
+ void setJumpArray(const TQMemArray<TraceInstrJump*>& a);
protected:
- void paintArrows(QPainter *p, const QColorGroup &cg, int width);
- QMemArray<TraceInstrJump*> _jump;
+ void paintArrows(TQPainter *p, const TQColorGroup &cg, int width);
+ TQMemArray<TraceInstrJump*> _jump;
private:
InstrView* _view;
diff --git a/kcachegrind/kcachegrind/instrview.cpp b/kcachegrind/kcachegrind/instrview.cpp
index d1b023bc..8a67296e 100644
--- a/kcachegrind/kcachegrind/instrview.cpp
+++ b/kcachegrind/kcachegrind/instrview.cpp
@@ -20,10 +20,10 @@
* Instruction View
*/
-#include <qfile.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -111,8 +111,8 @@ static bool parseLine(char* buf, Addr& addr,
InstrView::InstrView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showHexCode = DEFAULT_SHOWHEXCODE;
_lastHexCodeWidth = 50;
@@ -136,29 +136,29 @@ InstrView::InstrView(TraceItemView* parentView,
setColumnAlignment(2, Qt::AlignRight);
connect(this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
- connect(this, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(selectedSlot(QListViewItem*)));
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(selectedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-void InstrView::paintEmptyArea( QPainter * p, const QRect & r)
+void InstrView::paintEmptyArea( TQPainter * p, const TQRect & r)
{
- QListView::paintEmptyArea(p, r);
+ TQListView::paintEmptyArea(p, r);
}
-QString InstrView::whatsThis() const
+TQString InstrView::whatsThis() const
{
return i18n( "<b>Annotated Assembler</b>"
"<p>The annotated assembler list shows the "
@@ -175,9 +175,9 @@ QString InstrView::whatsThis() const
"make the destination function of this call current.</p>");
}
-void InstrView::context(QListViewItem* i, const QPoint & p, int c)
+void InstrView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceInstrCall* ic = i ? ((InstrItem*) i)->instrCall() : 0;
TraceInstrJump* ij = i ? ((InstrItem*) i)->instrJump() : 0;
@@ -185,7 +185,7 @@ void InstrView::context(QListViewItem* i, const QPoint & p, int c)
TraceInstr* instr = ij ? ij->instrTo() : 0;
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -222,7 +222,7 @@ void InstrView::context(QListViewItem* i, const QPoint & p, int c)
}
-void InstrView::selectedSlot(QListViewItem * i)
+void InstrView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
// programatically selected items are not signalled
@@ -250,7 +250,7 @@ void InstrView::selectedSlot(QListViewItem * i)
}
}
-void InstrView::activatedSlot(QListViewItem * i)
+void InstrView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceInstrCall* ic = ((InstrItem*) i)->instrCall();
@@ -311,13 +311,13 @@ void InstrView::doUpdate(int changeType)
return;
}
- InstrItem *ii = (InstrItem*)QListView::selectedItem();
+ InstrItem *ii = (InstrItem*)TQListView::selectedItem();
if (ii) {
if ((ii->instr() == _selectedItem) ||
(ii->instr() && (ii->instr()->line() == _selectedItem))) return;
}
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling()) {
ii = (InstrItem*)item;
if ((ii->instr() == _selectedItem) ||
@@ -346,7 +346,7 @@ void InstrView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling())
for (item2 = item->firstChild();item2;item2 = item2->nextSibling())
((InstrItem*)item2)->updateGroup();
@@ -359,11 +359,11 @@ void InstrView::doUpdate(int changeType)
void InstrView::setColumnWidths()
{
if (_showHexCode) {
- setColumnWidthMode(4, QListView::Maximum);
+ setColumnWidthMode(4, TQListView::Maximum);
setColumnWidth(4, _lastHexCodeWidth);
}
else {
- setColumnWidthMode(4, QListView::Manual);
+ setColumnWidthMode(4, TQListView::Manual);
setColumnWidth(4, 0);
}
}
@@ -373,7 +373,7 @@ void InstrView::refresh()
_arrowLevels = 0;
// reset to automatic sizing to get column width
- setColumnWidthMode(4, QListView::Maximum);
+ setColumnWidthMode(4, TQListView::Maximum);
clear();
setColumnWidth(0, 20);
@@ -406,7 +406,7 @@ void InstrView::refresh()
if (!f) return;
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
// check for instruction map
TraceInstrMap::Iterator itStart, it, tmpIt, itEnd;
@@ -486,7 +486,7 @@ void InstrView::refresh()
setColumnWidths();
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
@@ -613,17 +613,17 @@ bool InstrView::fillInstrRange(TraceFunction* function,
dumpEndAddr = (*tmpIt).addr() +20;
// generate command
- QString popencmd, objfile;
+ TQString popencmd, objfile;
objfile = function->object()->name();
- objfile = objfile.replace(QRegExp("[\"']"), ""); // security...
- popencmd = QString("objdump -C -d "
+ objfile = objfile.replace(TQRegExp("[\"']"), ""); // security...
+ popencmd = TQString("objdump -C -d "
"--start-address=0x%1 --stop-address=0x%2 \"%3\"")
.arg(dumpStartAddr.toString()).arg(dumpEndAddr.toString())
.arg(objfile);
if (1) qDebug("Running '%s'...", popencmd.ascii());
// and run...
- FILE* iFILE = popen(QFile::encodeName( popencmd ), "r");
+ FILE* iFILE = popen(TQFile::encodeName( popencmd ), "r");
if (iFILE == 0) {
new InstrItem(this, this, 1,
i18n("There is an error trying to execute the command"));
@@ -636,7 +636,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
i18n("This utility can be found in the 'binutils' package."));
return false;
}
- QFile file;
+ TQFile file;
file.open(IO_ReadOnly, iFILE);
#define BUF_SIZE 256
@@ -648,7 +648,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
SubCost most = 0;
TraceInstr* currInstr;
InstrItem *ii, *ii2, *item = 0, *first = 0, *selected = 0;
- QString code, cmd, args;
+ TQString code, cmd, args;
bool needObjAddr = true, needCostAddr = true;
costAddr = 0;
@@ -715,9 +715,9 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// this sets addr
parseLine(buf, addr, pos1, pos2, pos3);
- code = QString(buf + pos1);
- cmd = QString(buf + pos2);
- args = QString(buf + pos3);
+ code = TQString(buf + pos1);
+ cmd = TQString(buf + pos2);
+ args = TQString(buf + pos3);
if (costAddr == objAddr) {
currInstr = &(*costIt);
@@ -735,7 +735,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
}
else {
addr = costAddr;
- code = cmd = QString();
+ code = cmd = TQString();
args = i18n("(No Assembler)");
currInstr = &(*costIt);
@@ -775,8 +775,8 @@ bool InstrView::fillInstrRange(TraceFunction* function,
if (!skipLineWritten) {
skipLineWritten = true;
// a "skipping" line: print "..." instead of a line number
- code = cmd = QString();
- args = QString("...");
+ code = cmd = TQString();
+ args = TQString("...");
}
else
continue;
@@ -847,7 +847,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// for arrows: go down the list according to list sorting
sort();
- QListViewItem *item1, *item2;
+ TQListViewItem *item1, *item2;
for (item1=firstChild();item1;item1 = item1->nextSibling()) {
ii = (InstrItem*)item1;
updateJumpArray(ii->addr(), ii, true, false);
@@ -875,7 +875,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
"There are %n cost lines without assembler code.", noAssLines));
new InstrItem(this, this, 2,
i18n("This happens because the code of"));
- new InstrItem(this, this, 3, QString(" %1").arg(objfile));
+ new InstrItem(this, this, 3, TQString(" %1").arg(objfile));
new InstrItem(this, this, 4,
i18n("does not seem to match the profile data file."));
new InstrItem(this, this, 5, "");
@@ -910,7 +910,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
void InstrView::updateInstrItems()
{
InstrItem* ii;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for (;item;item = item->nextSibling()) {
ii = (InstrItem*)item;
TraceInstr* instr = ii->instr();
@@ -918,7 +918,7 @@ void InstrView::updateInstrItems()
ii->updateCost();
- QListViewItem *next, *i = ii->firstChild();
+ TQListViewItem *next, *i = ii->firstChild();
for (;i;i = next) {
next = i->nextSibling();
((InstrItem*)i)->updateCost();
@@ -927,7 +927,7 @@ void InstrView::updateInstrItems()
}
void InstrView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -939,7 +939,7 @@ void InstrView::readViewConfig(KConfig* c,
}
void InstrView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/instrview.h b/kcachegrind/kcachegrind/instrview.h
index cc9c7d2d..c807a0a4 100644
--- a/kcachegrind/kcachegrind/instrview.h
+++ b/kcachegrind/kcachegrind/instrview.h
@@ -23,12 +23,12 @@
#ifndef INSTRVIEW_H
#define INSTRVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "traceitemview.h"
class InstrItem;
-class InstrView : public QListView, public TraceItemView
+class InstrView : public TQListView, public TraceItemView
{
friend class InstrItem;
@@ -36,22 +36,22 @@ class InstrView : public QListView, public TraceItemView
public:
InstrView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
protected:
int arrowLevels() { return _arrowLevels; }
- void paintEmptyArea( QPainter *, const QRect & );
+ void paintEmptyArea( TQPainter *, const TQRect & );
private slots:
- void context(QListViewItem*, const QPoint &, int);
- void selectedSlot(QListViewItem *);
- void activatedSlot(QListViewItem *);
+ void context(TQListViewItem*, const TQPoint &, int);
+ void selectedSlot(TQListViewItem *);
+ void activatedSlot(TQListViewItem *);
private:
TraceItem* canShow(TraceItem*);
@@ -69,7 +69,7 @@ private:
// arrows
int _arrowLevels;
// temporary needed on creation...
- QMemArray<TraceInstrJump*> _jump;
+ TQMemArray<TraceInstrJump*> _jump;
TraceInstrJumpList _lowList, _highList;
// remember width of hex code column if hidden
diff --git a/kcachegrind/kcachegrind/listutils.cpp b/kcachegrind/kcachegrind/listutils.cpp
index 0e9ebd32..5c4a838c 100644
--- a/kcachegrind/kcachegrind/listutils.cpp
+++ b/kcachegrind/kcachegrind/listutils.cpp
@@ -17,18 +17,18 @@
*/
/*
- * Some helper functions for QListViewItem derivates
+ * Some helper functions for TQListViewItem derivates
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "listutils.h"
#define COSTPIX_WIDTH 25
-QPixmap colorPixmap(int w, int h, QColor c)
+TQPixmap colorPixmap(int w, int h, TQColor c)
{
- static QPixmap* pixs[37];
- static QColor cols[37];
+ static TQPixmap* pixs[37];
+ static TQColor cols[37];
static bool inited = false;
if (!inited) {
@@ -46,9 +46,9 @@ QPixmap colorPixmap(int w, int h, QColor c)
}
- QPixmap* pix = new QPixmap(w, h);
+ TQPixmap* pix = new TQPixmap(w, h);
pix->fill(c);
- QPainter p(pix);
+ TQPainter p(pix);
p.setPen(c.light());
p.drawLine(0, 0, w-1, 0);
p.drawLine(0, 0, 0, h-1);
@@ -65,7 +65,7 @@ QPixmap colorPixmap(int w, int h, QColor c)
* Create a percentage pixmap with a filling rate of p percent (0-100).
* When withFrame==false, the pixmap is truncated to only the filled portion.
*/
-QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
+TQPixmap percentagePixmap(int w, int h, int percent, TQColor c, bool framed)
{
int iw, ix1, ix2, ih, iy1, iy2;
@@ -82,11 +82,11 @@ QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
/* Limit bar to 100% */
int filled = (percent>100) ? iw+1 : iw*percent/100+1;
if (!framed) w=filled-1;
- if (w<3) return QPixmap();
+ if (w<3) return TQPixmap();
- QPixmap pix(w, h);
+ TQPixmap pix(w, h);
pix.fill(Qt::white);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setPen(Qt::black);
if (framed)
p.drawRect(0, 0, w, h);
@@ -108,15 +108,15 @@ QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
return pix;
}
-inline QColor partitionColor(int d, int max)
+inline TQColor partitionColor(int d, int max)
{
- return QColor( (720*d/max) % 360,
- 255-(128*d/max), 192, QColor::Hsv);
+ return TQColor( (720*d/max) % 360,
+ 255-(128*d/max), 192, TQColor::Hsv);
}
-QPixmap partitionPixmap(int w, int h,
- double* hist, QColor* cArray, int maxIndex, bool framed)
+TQPixmap partitionPixmap(int w, int h,
+ double* hist, TQColor* cArray, int maxIndex, bool framed)
{
int lastPos = 0, nextPos;
double val=0.0, sum=0.0;
@@ -141,18 +141,18 @@ QPixmap partitionPixmap(int w, int h,
int filled = (int)(iw*sum+1);
if (!framed && (filled < w)) w=filled;
- if (w<3) return QPixmap();
+ if (w<3) return TQPixmap();
- QPixmap pix(w, h);
+ TQPixmap pix(w, h);
pix.fill(Qt::white);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setPen(Qt::black);
if (framed)
p.drawRect(0, 0, w, h);
//qDebug("Sum %f, dw %d", sum,dw);
- QColor c, cLast;
+ TQColor c, cLast;
bool leftDrawn = false;
int x1, x2=0;
int lastDiff=0, diff;
@@ -205,20 +205,20 @@ QPixmap partitionPixmap(int w, int h,
}
-QPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed)
+TQPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed)
{
if (ct->isReal()) {
- QColor color = ct->color();
+ TQColor color = ct->color();
double p = 100.0 * cost->subCost(ct) / total;
return percentagePixmap(COSTPIX_WIDTH, 10, (int)(p+.5), color, framed);
}
int maxIndex;
double h[MaxRealIndexValue];
- QColor* cs = ct->mapping()->realColors();
+ TQColor* cs = ct->mapping()->realColors();
maxIndex = ct->histCost(cost, total, h);
- if (maxIndex ==0) return QPixmap();
+ if (maxIndex ==0) return TQPixmap();
return partitionPixmap(COSTPIX_WIDTH, 10, h, cs, maxIndex, framed);
}
diff --git a/kcachegrind/kcachegrind/listutils.h b/kcachegrind/kcachegrind/listutils.h
index 9a086ae1..e3e13fb5 100644
--- a/kcachegrind/kcachegrind/listutils.h
+++ b/kcachegrind/kcachegrind/listutils.h
@@ -17,23 +17,23 @@
*/
/*
- * Some helper functions for QListViewItem derivates
+ * Some helper functions for TQListViewItem derivates
*/
#ifndef LISTUTILS_H
#define LISTUTILS_H
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include "tracedata.h"
-QString bigNum(SubCost);
-QPixmap colorPixmap(int w, int h, QColor c);
-QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed);
-QPixmap partitionPixmap(int w, int h, double* hist, QColor*,
+TQString bigNum(SubCost);
+TQPixmap colorPixmap(int w, int h, TQColor c);
+TQPixmap percentagePixmap(int w, int h, int percent, TQColor c, bool framed);
+TQPixmap partitionPixmap(int w, int h, double* hist, TQColor*,
int maxIndex, bool framed);
-QPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed);
+TQPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed);
/**
* A class to calculate the <maxSize> TraceCost items
@@ -58,8 +58,8 @@ class HighestCostList
TraceCostList _list;
int _maxSize, _count;
TraceCostType* _costType;
- QMemArray<TraceCost*> _item;
- QMemArray<SubCost> _cost;
+ TQMemArray<TraceCost*> _item;
+ TQMemArray<SubCost> _cost;
};
#endif
diff --git a/kcachegrind/kcachegrind/loader.cpp b/kcachegrind/kcachegrind/loader.cpp
index 30199c03..a4aecf56 100644
--- a/kcachegrind/kcachegrind/loader.cpp
+++ b/kcachegrind/kcachegrind/loader.cpp
@@ -27,7 +27,7 @@
LoaderList Loader::_loaderList;
-Loader::Loader(QString name, QString desc)
+Loader::Loader(TQString name, TQString desc)
{
_name = name;
_description = desc;
@@ -36,7 +36,7 @@ Loader::Loader(QString name, QString desc)
Loader::~Loader()
{}
-bool Loader::canLoadTrace(QFile*)
+bool Loader::canLoadTrace(TQFile*)
{
return false;
}
@@ -46,7 +46,7 @@ bool Loader::loadTrace(TracePart*)
return false;
}
-Loader* Loader::matchingLoader(QFile* file)
+Loader* Loader::matchingLoader(TQFile* file)
{
Loader* l;
for (l=_loaderList.first(); l; l = _loaderList.next())
@@ -56,7 +56,7 @@ Loader* Loader::matchingLoader(QFile* file)
return 0;
}
-Loader* Loader::loader(QString name)
+Loader* Loader::loader(TQString name)
{
Loader* l;
for (l=_loaderList.first(); l; l = _loaderList.next())
diff --git a/kcachegrind/kcachegrind/loader.h b/kcachegrind/kcachegrind/loader.h
index d3363c1f..7624c744 100644
--- a/kcachegrind/kcachegrind/loader.h
+++ b/kcachegrind/kcachegrind/loader.h
@@ -23,9 +23,9 @@
#ifndef LOADER_H
#define LOADER_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class QFile;
class TraceData;
@@ -33,7 +33,7 @@ class TracePart;
class Loader;
-typedef QPtrList<Loader> LoaderList;
+typedef TQPtrList<Loader> LoaderList;
/**
* To implement a new loader, inherit from the Loader class
@@ -51,25 +51,25 @@ class Loader: public QObject
Q_OBJECT
public:
- Loader(QString name, QString desc);
+ Loader(TQString name, TQString desc);
virtual ~Loader();
- virtual bool canLoadTrace(QFile* file);
+ virtual bool canLoadTrace(TQFile* file);
virtual bool loadTrace(TracePart*);
- static Loader* matchingLoader(QFile* file);
- static Loader* loader(QString name);
+ static Loader* matchingLoader(TQFile* file);
+ static Loader* loader(TQString name);
static void initLoaders();
static void deleteLoaders();
- QString name() const { return _name; }
- QString description() const { return _description; }
+ TQString name() const { return _name; }
+ TQString description() const { return _description; }
signals:
- void updateStatus(QString, int);
+ void updateStatus(TQString, int);
private:
- QString _name, _description;
+ TQString _name, _description;
static LoaderList _loaderList;
};
diff --git a/kcachegrind/kcachegrind/main.cpp b/kcachegrind/kcachegrind/main.cpp
index 50c9d5eb..80455ea0 100644
--- a/kcachegrind/kcachegrind/main.cpp
+++ b/kcachegrind/kcachegrind/main.cpp
@@ -23,7 +23,7 @@
// for KCACHEGRIND_VERSION
#include "../version.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
@@ -73,7 +73,7 @@ int main( int argc, char ** argv )
for(int i = 0; i < args->count(); i++) {
t = new TopLevel();
t->show();
- t->loadDelayed(QFile::decodeName(args->arg(i)));
+ t->loadDelayed(TQFile::decodeName(args->arg(i)));
}
}
else {
@@ -84,7 +84,7 @@ int main( int argc, char ** argv )
}
}
- a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
+ a.connect( &a, TQT_SIGNAL( lastWindowClosed() ), &a, TQT_SLOT( quit() ) );
int res = a.exec();
// to make leak checking in valgrind happy...
diff --git a/kcachegrind/kcachegrind/multiview.cpp b/kcachegrind/kcachegrind/multiview.cpp
index da3ed73a..4288e2df 100644
--- a/kcachegrind/kcachegrind/multiview.cpp
+++ b/kcachegrind/kcachegrind/multiview.cpp
@@ -23,7 +23,7 @@
* (with wrap around).
*/
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -34,8 +34,8 @@
// MultiView
//
-MultiView::MultiView(TopLevel* top, QWidget* parent, const char* name)
- : QSplitter(parent, name), TraceItemView(0, top)
+MultiView::MultiView(TopLevel* top, TQWidget* parent, const char* name)
+ : TQSplitter(parent, name), TraceItemView(0, top)
{
// default
setOrientation(Qt::Horizontal);
@@ -65,9 +65,9 @@ void MultiView::appendView()
int n = _views.count()+1;
TabView* tv = new TabView(this, this,
- QString("TabView-%1").arg(n).ascii());
- connect(tv, SIGNAL(activated(TabView*)),
- this, SLOT(tabActivated(TabView*)) );
+ TQString("TabView-%1").arg(n).ascii());
+ connect(tv, TQT_SIGNAL(activated(TabView*)),
+ this, TQT_SLOT(tabActivated(TabView*)) );
_views.append(tv);
tv->show();
@@ -166,17 +166,17 @@ void MultiView::doUpdate(int changeType)
void MultiView::readViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
if (0) qDebug("%s::readConfig(%s%s)", name(),
prefix.ascii(), postfix.ascii());
- QString active;
+ TQString active;
KConfigGroup* g = configGroup(c, prefix, postfix);
int n = g->readNumEntry("Panels", 1);
setChildCount(n);
- setOrientation( (g->readEntry("Orientation") == QString("Horizontal")) ?
+ setOrientation( (g->readEntry("Orientation") == TQString("Horizontal")) ?
Qt::Horizontal : Qt::Vertical );
setSizes(g->readIntListEntry("PanelSizes"));
@@ -187,7 +187,7 @@ void MultiView::readViewConfig(KConfig* c,
TabView* tv, *activeTV = 0;
for(tv=_views.first();tv;tv=_views.next()) {
if (tv->name() == active) activeTV=tv;
- tv->readViewConfig(c, QString("%1-%2").arg(prefix).arg(tv->name()),
+ tv->readViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()),
postfix, withOptions);
}
@@ -201,7 +201,7 @@ void MultiView::readViewConfig(KConfig* c,
}
void MultiView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -216,7 +216,7 @@ void MultiView::saveViewConfig(KConfig* c,
TabView* tv;
for(tv=_views.first();tv;tv=_views.next())
- tv->saveViewConfig(c, QString("%1-%2").arg(prefix).arg(tv->name()),
+ tv->saveViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()),
postfix, withOptions);
}
diff --git a/kcachegrind/kcachegrind/multiview.h b/kcachegrind/kcachegrind/multiview.h
index adf0b329..b4b53928 100644
--- a/kcachegrind/kcachegrind/multiview.h
+++ b/kcachegrind/kcachegrind/multiview.h
@@ -26,19 +26,19 @@
#ifndef MULTIVIEW_H
#define MULTIVIEW_H
-#include <qsplitter.h>
-#include <qptrlist.h>
+#include <tqsplitter.h>
+#include <tqptrlist.h>
#include "traceitemview.h"
-#include "tabview.h" // because of QPtrList<TabView>
+#include "tabview.h" // because of TQPtrList<TabView>
-class MultiView : public QSplitter, public TraceItemView
+class MultiView : public TQSplitter, public TraceItemView
{
Q_OBJECT
public:
- MultiView(TopLevel* top, QWidget* parent = 0, const char* name = 0);
+ MultiView(TopLevel* top, TQWidget* parent = 0, const char* name = 0);
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
TabView* activeTabView() const { return _active; }
void setData(TraceData*);
@@ -50,8 +50,8 @@ public:
void selected(TraceItemView*, TraceItem*);
void activated(TraceItemView*, TraceItem*);
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
public slots:
void tabActivated(TabView*);
@@ -60,7 +60,7 @@ public slots:
void doUpdate(int);
TabView* _active;
- QPtrList<TabView> _views;
+ TQPtrList<TabView> _views;
};
#endif
diff --git a/kcachegrind/kcachegrind/partgraph.cpp b/kcachegrind/kcachegrind/partgraph.cpp
index c3ed6064..11f4cd29 100644
--- a/kcachegrind/kcachegrind/partgraph.cpp
+++ b/kcachegrind/kcachegrind/partgraph.cpp
@@ -29,7 +29,7 @@
// PartAreaWidget
-PartAreaWidget::PartAreaWidget(QWidget* parent, const char* name)
+PartAreaWidget::PartAreaWidget(TQWidget* parent, const char* name)
: TreeMapWidget(new BasePartItem(), parent, name)
{
_data = 0;
@@ -128,7 +128,7 @@ bool PartAreaWidget::isHidden(TracePart* part) const
return (_hiddenParts.containsRef(part)>0);
}
-QColor PartAreaWidget::groupColor(TraceFunction* f) const
+TQColor PartAreaWidget::groupColor(TraceFunction* f) const
{
if (!f)
return colorGroup().button();
@@ -136,9 +136,9 @@ QColor PartAreaWidget::groupColor(TraceFunction* f) const
return Configuration::functionColor(_groupType, f);
}
-QString PartAreaWidget::tipString(TreeMapItem* i) const
+TQString PartAreaWidget::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
int count = 0;
//qDebug("PartAreaWidget::tipString for '%s'", i->name().ascii());
@@ -219,7 +219,7 @@ TreeMapItemList* BasePartItem::children()
return _children;
}
-QString BasePartItem::text(int textNo) const
+TQString BasePartItem::text(int textNo) const
{
if (textNo == 0) {
if (!_data)
@@ -228,11 +228,11 @@ QString BasePartItem::text(int textNo) const
if (_data->parts().count() == 0)
return i18n("(no part)");
}
- return QString::null;
+ return TQString::null;
}
-QColor BasePartItem::backColor() const
+TQColor BasePartItem::backColor() const
{
return widget()->colorGroup().base();
}
@@ -257,13 +257,13 @@ PartItem::PartItem(TracePart* p)
_factor=1;
}
-QString PartItem::text(int textNo) const
+TQString PartItem::text(int textNo) const
{
if (textNo == 0)
return _p->prettyName();
if (textNo != 1)
- return QString::null;
+ return TQString::null;
TraceCostType* ct;
PartAreaWidget* w = (PartAreaWidget*)widget();
@@ -275,16 +275,16 @@ QString PartItem::text(int textNo) const
if (Configuration::showPercentage()) {
TraceCost* t = _p->data()->totals();
double p = 100.0 * v / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return v.pretty();
}
-QPixmap PartItem::pixmap(int i) const
+TQPixmap PartItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
@@ -401,7 +401,7 @@ TreeMapItemList* PartItem::children()
}
-QColor PartItem::backColor() const
+TQColor PartItem::backColor() const
{
PartAreaWidget* w = (PartAreaWidget*)widget();
return w->groupColor(0);
@@ -416,7 +416,7 @@ SubPartItem::SubPartItem(TraceCost* c)
_factor=1;
}
-QString SubPartItem::text(int textNo) const
+TQString SubPartItem::text(int textNo) const
{
if (textNo == 0) {
if (!_partCostItem)
@@ -426,7 +426,7 @@ QString SubPartItem::text(int textNo) const
}
if (textNo != 1)
- return QString::null;
+ return TQString::null;
TraceCostType* ct;
PartAreaWidget* w = (PartAreaWidget*)widget();
@@ -442,15 +442,15 @@ QString SubPartItem::text(int textNo) const
TraceCost* t = Configuration::showExpanded() ?
_partCostItem->part() : _partCostItem->part()->data()->totals();
double p = 100.0 * v / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return v.pretty();
}
-QPixmap SubPartItem::pixmap(int i) const
+TQPixmap SubPartItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
@@ -521,7 +521,7 @@ TreeMapItemList* SubPartItem::children()
}
-QColor SubPartItem::backColor() const
+TQColor SubPartItem::backColor() const
{
PartAreaWidget* w = (PartAreaWidget*)widget();
if (w->visualisation() == PartAreaWidget::Inclusive)
diff --git a/kcachegrind/kcachegrind/partgraph.h b/kcachegrind/kcachegrind/partgraph.h
index d2cf2f73..7b8056a7 100644
--- a/kcachegrind/kcachegrind/partgraph.h
+++ b/kcachegrind/kcachegrind/partgraph.h
@@ -34,7 +34,7 @@ public:
// Visualisation inside of trace parts
enum VisualisationMode { NoVisualisation, Partitioning, Inclusive };
- PartAreaWidget(QWidget* parent=0, const char* name=0);
+ PartAreaWidget(TQWidget* parent=0, const char* name=0);
void setData(TraceData* d);
void setCostType(TraceCostType* ct);
@@ -51,8 +51,8 @@ public:
bool zoomFunction() const { return _zoomFunction; }
int callLevels() const { return _callLevels; }
- QColor groupColor(TraceFunction*) const;
- QString tipString(TreeMapItem*) const;
+ TQColor groupColor(TraceFunction*) const;
+ TQString tipString(TreeMapItem*) const;
void changeHidden(const TracePartList& list);
bool isHidden(TracePart*) const;
@@ -80,10 +80,10 @@ public:
int rtti() const { return 1; }
double value() const;
- QString text(int) const;
+ TQString text(int) const;
int borderWidth() const { return 0; }
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceData* _data;
@@ -98,10 +98,10 @@ public:
double value() const;
double sum() const;
int borderWidth() const { return 0; }
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TracePart* _p;
@@ -117,10 +117,10 @@ public:
double value() const;
double sum() const;
SplitMode splitMode() const { return Vertical; }
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCost* _partCostItem;
diff --git a/kcachegrind/kcachegrind/partlistitem.cpp b/kcachegrind/kcachegrind/partlistitem.cpp
index 19965f7c..40c2db36 100644
--- a/kcachegrind/kcachegrind/partlistitem.cpp
+++ b/kcachegrind/kcachegrind/partlistitem.cpp
@@ -18,8 +18,8 @@
#include <math.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,10 +33,10 @@
// PartListItem
-PartListItem::PartListItem(QListView* parent, TraceCostItem* costItem,
+PartListItem::PartListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt,
TracePart* part)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_partCostItem = costItem->findDepFromPart(part);
_part = part;
@@ -44,7 +44,7 @@ PartListItem::PartListItem(QListView* parent, TraceCostItem* costItem,
_costType = ct;
#if 0
- QString partName = QString::number(part->partNumber());
+ TQString partName = TQString::number(part->partNumber());
if (part->data()->maxThreadID() >1)
partName += i18n(" (Thread %1)").arg(part->threadID());
setText(0, partName);
@@ -100,13 +100,13 @@ void PartListItem::update()
_sum = pf ? pf->inclusive()->subCost(_costType) : SubCost(0);
if (selfTotal == 0 || !_partCostItem) {
- setText(2, QString("-"));
- setPixmap(2, QPixmap());
+ setText(2, TQString("-"));
+ setPixmap(2, TQPixmap());
}
else {
double pure = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage()) {
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -116,13 +116,13 @@ void PartListItem::update()
}
if (total == 0 || !pf) {
- setText(1, QString("-"));
- setPixmap(1, QPixmap());
+ setText(1, TQString("-"));
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -132,7 +132,7 @@ void PartListItem::update()
}
if (!pf) {
- setText(3, QString("-"));
+ setText(3, TQString("-"));
_callers = 0;
return;
}
@@ -140,7 +140,7 @@ void PartListItem::update()
TracePartCall* pc;
TracePartCallList pl;
SubCost callers, callees;
- QString str;
+ TQString str;
callers = 0;
pl = pf->partCallers();
@@ -158,7 +158,7 @@ void PartListItem::update()
}
-int PartListItem::compare(QListViewItem * i, int col, bool ascending ) const
+int PartListItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
PartListItem* fi = (PartListItem*) i;
if (col==0) {
@@ -185,5 +185,5 @@ int PartListItem::compare(QListViewItem * i, int col, bool ascending ) const
if (_callers > fi->_callers) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/partlistitem.h b/kcachegrind/kcachegrind/partlistitem.h
index 811762bb..6704f51e 100644
--- a/kcachegrind/kcachegrind/partlistitem.h
+++ b/kcachegrind/kcachegrind/partlistitem.h
@@ -19,7 +19,7 @@
#ifndef PARTLISTITEM_H
#define PARTLISTITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
/**
@@ -32,10 +32,10 @@
class PartListItem: public QListViewItem
{
public:
- PartListItem(QListView* parent, TraceCostItem* costItem,
+ PartListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt, TracePart* part);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCost* partCostItem() { return _partCostItem; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
diff --git a/kcachegrind/kcachegrind/partselection.cpp b/kcachegrind/kcachegrind/partselection.cpp
index 66d5ec5a..dfd1b096 100644
--- a/kcachegrind/kcachegrind/partselection.cpp
+++ b/kcachegrind/kcachegrind/partselection.cpp
@@ -20,14 +20,14 @@
* For part file selection, to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kconfig.h>
@@ -36,7 +36,7 @@
#include "partselection.h"
#include "partgraph.h"
-PartSelection::PartSelection( QWidget* parent, const char* name)
+PartSelection::PartSelection( TQWidget* parent, const char* name)
: PartSelectionBase(parent, name)
{
_data = 0;
@@ -58,16 +58,16 @@ PartSelection::PartSelection( QWidget* parent, const char* name)
partAreaWidget->setFieldType(0, i18n( "Name" ));
partAreaWidget->setFieldType(1, i18n( "Cost" ));
- connect(partAreaWidget, SIGNAL(selectionChanged()),
- this, SLOT(selectionChanged()));
- connect(partAreaWidget, SIGNAL(currentChanged(TreeMapItem*, bool)),
- this, SLOT(currentChangedSlot(TreeMapItem*, bool)));
- connect(partAreaWidget, SIGNAL(doubleClicked(TreeMapItem*)),
- this, SLOT(doubleClicked(TreeMapItem*)));
+ connect(partAreaWidget, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(selectionChanged()));
+ connect(partAreaWidget, TQT_SIGNAL(currentChanged(TreeMapItem*, bool)),
+ this, TQT_SLOT(currentChangedSlot(TreeMapItem*, bool)));
+ connect(partAreaWidget, TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ this, TQT_SLOT(doubleClicked(TreeMapItem*)));
connect(partAreaWidget,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint &)),
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint &)),
this,
- SLOT(contextMenuRequested(TreeMapItem*,const QPoint &)));
+ TQT_SLOT(contextMenuRequested(TreeMapItem*,const TQPoint &)));
_showInfo = true;
showInfo(false);
@@ -145,10 +145,10 @@ void PartSelection::currentChangedSlot(TreeMapItem* i, bool kbd)
if (!kbd) return;
if (i->text(0).isEmpty()) return;
- QString str = i->text(0);
+ TQString str = i->text(0);
if (!i->text(1).isEmpty())
str += " (" + i->text(1) + ")";
- QString msg = i18n("Profile Part Overview: Current is '%1'").arg(str);
+ TQString msg = i18n("Profile Part Overview: Current is '%1'").arg(str);
emit showMessage(msg, 5000);
if (_showInfo) fillInfo();
@@ -269,15 +269,15 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list)
}
void PartSelection::contextMenuRequested(TreeMapItem* i,
- const QPoint & p)
+ const TQPoint & p)
{
if (!i) return;
- QPopupMenu popup;
- QPopupMenu ppopup;
- QPopupMenu vpopup;
+ TQPopupMenu popup;
+ TQPopupMenu ppopup;
+ TQPopupMenu vpopup;
- QString str;
+ TQString str;
TreeMapItem* s = 0;
if (_data && (_data->parts().count()>1)) {
@@ -465,7 +465,7 @@ void PartSelection::readVisualisationConfig(KConfigGroup* config)
{
bool enable;
- QString mode = config->readEntry("PartitionMode", "Inclusive");
+ TQString mode = config->readEntry("PartitionMode", "Inclusive");
if (mode == "Inclusive")
partAreaWidget->setVisualisation(PartAreaWidget::Inclusive);
else
@@ -502,7 +502,7 @@ void PartSelection::readVisualisationConfig(KConfigGroup* config)
void PartSelection::saveVisualisationConfig(KConfigGroup* config)
{
- QString mode;
+ TQString mode;
if (partAreaWidget->visualisation() == PartAreaWidget::Inclusive)
mode = "Inclusive";
else
@@ -542,7 +542,7 @@ void PartSelection::fillInfo()
return;
}
- QString info = _data->activePartRange();
+ TQString info = _data->activePartRange();
TreeMapItem* i = partAreaWidget->current();
while (i && i->rtti()!=2) i = i->parent();
diff --git a/kcachegrind/kcachegrind/partselection.h b/kcachegrind/kcachegrind/partselection.h
index 7052db79..b3ea10ba 100644
--- a/kcachegrind/kcachegrind/partselection.h
+++ b/kcachegrind/kcachegrind/partselection.h
@@ -24,7 +24,7 @@
#ifndef PARTSELECTION_H
#define PARTSELECTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include "partselectionbase.h"
#include "partgraph.h"
@@ -40,7 +40,7 @@ class PartSelection: public PartSelectionBase
Q_OBJECT
public:
- PartSelection( QWidget* parent = 0, const char* name = 0);
+ PartSelection( TQWidget* parent = 0, const char* name = 0);
~PartSelection();
TraceData* data() { return _data; }
@@ -57,13 +57,13 @@ signals:
void partsUnhideAll();
void groupChanged(TraceCostItem*);
void functionChanged(TraceItem*);
- void showMessage(const QString&, int);
+ void showMessage(const TQString&, int);
void goBack();
public slots:
void selectionChanged();
void doubleClicked(TreeMapItem*);
- void contextMenuRequested(TreeMapItem*, const QPoint &);
+ void contextMenuRequested(TreeMapItem*, const TQPoint &);
void currentChangedSlot(TreeMapItem*, bool);
void setPart(TracePart*);
diff --git a/kcachegrind/kcachegrind/partview.cpp b/kcachegrind/kcachegrind/partview.cpp
index 73799221..470a8dea 100644
--- a/kcachegrind/kcachegrind/partview.cpp
+++ b/kcachegrind/kcachegrind/partview.cpp
@@ -20,9 +20,9 @@
* Part View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qheader.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqheader.h>
#include <klocale.h>
#include "configuration.h"
@@ -38,8 +38,8 @@
PartView::PartView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_inSelectionUpdate = false;
@@ -58,17 +58,17 @@ PartView::PartView(TraceItemView* parentView,
setSelectionMode(Extended);
connect( this,
- SIGNAL( selectionChanged() ),
- SLOT( selectionChangedSlot() ) );
+ TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( selectionChangedSlot() ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString PartView::whatsThis() const
+TQString PartView::whatsThis() const
{
return i18n( "<b>Trace Part List</b>"
"<p>This list shows all trace parts of the loaded "
@@ -96,9 +96,9 @@ QString PartView::whatsThis() const
}
-void PartView::context(QListViewItem* i, const QPoint & pos, int)
+void PartView::context(TQListViewItem* i, const TQPoint & pos, int)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TracePart* p = i ? ((PartListItem*) i)->part() : 0;
@@ -127,7 +127,7 @@ void PartView::selectionChangedSlot()
if (_inSelectionUpdate) return;
TracePartList l;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for(;item;item = item->nextSibling())
if (item->isSelected())
l.append( ((PartListItem*)item)->part() );
@@ -150,7 +150,7 @@ void PartView::doUpdate(int changeType)
if (changeType == selectedItemChanged) return;
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((PartListItem*)item)->setGroupType(_groupType);
@@ -158,7 +158,7 @@ void PartView::doUpdate(int changeType)
}
if (changeType == costTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((PartListItem*)item)->setCostType(_costType);
@@ -169,7 +169,7 @@ void PartView::doUpdate(int changeType)
TracePart* part;
- QListViewItem* item;
+ TQListViewItem* item;
_inSelectionUpdate = true;
item = firstChild();
for(;item;item = item->nextSibling()) {
@@ -212,7 +212,7 @@ void PartView::refresh()
_inSelectionUpdate = true;
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
for (part = allParts.first(); part; part = allParts.next()) {
if (hidden.findRef(part)>=0) continue;
item = new PartListItem(this, f, _costType, _groupType, part);
diff --git a/kcachegrind/kcachegrind/partview.h b/kcachegrind/kcachegrind/partview.h
index 36f89a1c..03793e36 100644
--- a/kcachegrind/kcachegrind/partview.h
+++ b/kcachegrind/kcachegrind/partview.h
@@ -23,25 +23,25 @@
#ifndef PARTVIEW_H
#define PARTVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class PartView: public QListView, public TraceItemView
+class PartView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
PartView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
void refresh();
private slots:
- void context(QListViewItem*,const QPoint &, int);
+ void context(TQListViewItem*,const TQPoint &, int);
void selectionChangedSlot();
private:
diff --git a/kcachegrind/kcachegrind/pool.cpp b/kcachegrind/kcachegrind/pool.cpp
index 75ed4bb2..d4a89a72 100644
--- a/kcachegrind/kcachegrind/pool.cpp
+++ b/kcachegrind/kcachegrind/pool.cpp
@@ -18,7 +18,7 @@
#include <string.h>
#include <stdlib.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include "pool.h"
// FixPool
diff --git a/kcachegrind/kcachegrind/sourceitem.cpp b/kcachegrind/kcachegrind/sourceitem.cpp
index cbb8db6e..40a97ca3 100644
--- a/kcachegrind/kcachegrind/sourceitem.cpp
+++ b/kcachegrind/kcachegrind/sourceitem.cpp
@@ -20,9 +20,9 @@
* Items of source view.
*/
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -37,11 +37,11 @@
// SourceItem
// for source lines
-SourceItem::SourceItem(SourceView* sv, QListView* parent,
+SourceItem::SourceItem(SourceView* sv, TQListView* parent,
int fileno, unsigned int lineno,
- bool inside, const QString& src,
+ bool inside, const TQString& src,
TraceLine* line)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -54,20 +54,20 @@ SourceItem::SourceItem(SourceView* sv, QListView* parent,
if (src == "...")
setText(0, src);
else
- setText(0, QString::number(lineno));
+ setText(0, TQString::number(lineno));
- QString s = src;
- setText(4, s.replace( QRegExp("\t"), " " ));
+ TQString s = src;
+ setText(4, s.replace( TQRegExp("\t"), " " ));
updateGroup();
updateCost();
}
// for call lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineCall* lineCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -81,13 +81,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _lineCall->callCount();
- QString templ = " ";
+ TQString templ = " ";
if (cc==0)
templ += i18n("Active call to '%1'");
else
templ += i18n("%n call to '%1'", "%n calls to '%1'", cc);
- QString callStr = templ.arg(_lineCall->call()->calledName());
+ TQString callStr = templ.arg(_lineCall->call()->calledName());
TraceFunction* calledF = _lineCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -98,10 +98,10 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
}
// for jump lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineJump* lineJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -114,13 +114,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString to;
+ TQString to;
if (_lineJump->lineTo()->functionSource() == _line->functionSource())
to = _lineJump->lineTo()->name();
else
to = _lineJump->lineTo()->prettyName();
- QString jStr;
+ TQString jStr;
if (_lineJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to %3")
.arg(_lineJump->followedCount().pretty())
@@ -140,7 +140,7 @@ void SourceItem::updateGroup()
if (!_lineCall) return;
TraceFunction* f = _lineCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(4, colorPixmap(10, 10, c));
}
@@ -158,10 +158,10 @@ void SourceItem::updateCost()
if (_lineCall &&
((_lineCall->call()->inCycle()>0) ||
(_lineCall->call()->isRecursion()>0))) {
- QString str;
- QPixmap p;
+ TQString str;
+ TQPixmap p;
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -184,15 +184,15 @@ void SourceItem::updateCost()
TraceCostType* ct = _view->costType();
_pure = ct ? lineCost->subCost(ct) : SubCost(0);
if (_pure == 0) {
- setText(1, QString::null);
- setPixmap(1, QPixmap());
+ setText(1, TQString::null);
+ setPixmap(1, TQPixmap());
}
else {
double total = totalCost->subCost(ct);
double pure = 100.0 * _pure / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _pure.pretty());
@@ -203,15 +203,15 @@ void SourceItem::updateCost()
TraceCostType* ct2 = _view->costType2();
_pure2 = ct2 ? lineCost->subCost(ct2) : SubCost(0);
if (_pure2 == 0) {
- setText(2, QString::null);
- setPixmap(2, QPixmap());
+ setText(2, TQString::null);
+ setPixmap(2, TQPixmap());
}
else {
double total = totalCost->subCost(ct2);
double pure2 = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure2, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -221,7 +221,7 @@ void SourceItem::updateCost()
}
-int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
+int SourceItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const SourceItem* si1 = this;
const SourceItem* si2 = (SourceItem*) i;
@@ -281,50 +281,50 @@ int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void SourceItem::paintCell( QPainter *p, const QColorGroup &cg,
+void SourceItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if ( !_inside || ((column==1) || (column==2)))
- _cg.setColor( QColorGroup::Base, cg.button() );
+ _cg.setColor( TQColorGroup::Base, cg.button() );
else if ((_lineCall || _lineJump) && column>2)
- _cg.setColor( QColorGroup::Base, cg.midlight() );
+ _cg.setColor( TQColorGroup::Base, cg.midlight() );
if (column == 3)
paintArrows(p, _cg, width);
else
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void SourceItem::setJumpArray(const QMemArray<TraceLineJump*>& a)
+void SourceItem::setJumpArray(const TQMemArray<TraceLineJump*>& a)
{
_jump.duplicate(a);
}
-void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void SourceItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
SourceView* sv = (SourceView*) lv;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole
- = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole
+ = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- sv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ sv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
if ( isSelected() && lv->allColumnsShowFocus() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
int marg = lv->itemMargin();
int yy = height()/2, y1, y2;
- QColor c;
+ TQColor c;
int start = -1, end = -1;
@@ -382,7 +382,7 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(sv->arrowLevels() - end) + 10;
- QPointArray a;
+ TQPointArray a;
a.putPoints(0, 7, x, y+h,
x,y, x+w-8, y, x+w-8, y-2,
x+w, yy,
@@ -428,10 +428,10 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int SourceItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int SourceItem::width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const
{
- if (c != 3) return QListViewItem::width(fm, lv, c);
+ if (c != 3) return TQListViewItem::width(fm, lv, c);
SourceView* sv = (SourceView*) lv;
int levels = sv->arrowLevels();
diff --git a/kcachegrind/kcachegrind/sourceitem.h b/kcachegrind/kcachegrind/sourceitem.h
index 0afa7a0b..5f32da4c 100644
--- a/kcachegrind/kcachegrind/sourceitem.h
+++ b/kcachegrind/kcachegrind/sourceitem.h
@@ -23,7 +23,7 @@
#ifndef SOURCEITEM_H
#define SOURCEITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class SourceView;
@@ -32,18 +32,18 @@ class SourceItem: public QListViewItem
{
public:
// for source lines
- SourceItem(SourceView* sv, QListView* parent,
+ SourceItem(SourceView* sv, TQListView* parent,
int fileno, unsigned int lineno,
- bool inside, const QString& src,
+ bool inside, const TQString& src,
TraceLine* line = 0);
// for call lines
- SourceItem(SourceView* sv, QListViewItem* parent,
+ SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineCall* lineCall);
// for jump lines
- SourceItem(SourceView* sv, QListViewItem* parent,
+ SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineJump* lineJump);
@@ -54,21 +54,21 @@ public:
TraceLineCall* lineCall() const { return _lineCall; }
TraceLineJump* lineJump() const { return _lineJump; }
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
- int width( const QFontMetrics& fm,
- const QListView* lv, int c ) const;
+ int width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const;
void updateGroup();
void updateCost();
// arrow lines
- void setJumpArray(const QMemArray<TraceLineJump*>& a);
+ void setJumpArray(const TQMemArray<TraceLineJump*>& a);
protected:
- void paintArrows(QPainter *p, const QColorGroup &cg, int width);
- QMemArray<TraceLineJump*> _jump;
+ void paintArrows(TQPainter *p, const TQColorGroup &cg, int width);
+ TQMemArray<TraceLineJump*> _jump;
private:
SourceView* _view;
diff --git a/kcachegrind/kcachegrind/sourceview.cpp b/kcachegrind/kcachegrind/sourceview.cpp
index 50088a23..a3a301c6 100644
--- a/kcachegrind/kcachegrind/sourceview.cpp
+++ b/kcachegrind/kcachegrind/sourceview.cpp
@@ -20,10 +20,10 @@
* Source View
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,8 +38,8 @@
SourceView::SourceView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_inSelectionUpdate = false;
@@ -57,34 +57,34 @@ SourceView::SourceView(TraceItemView* parentView,
setColumnAlignment(0, Qt::AlignRight);
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
connect(this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(selectedSlot(QListViewItem*)));
+ TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(selectedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-void SourceView::paintEmptyArea( QPainter * p, const QRect & r)
+void SourceView::paintEmptyArea( TQPainter * p, const TQRect & r)
{
- QListView::paintEmptyArea(p, r);
+ TQListView::paintEmptyArea(p, r);
}
-QString SourceView::whatsThis() const
+TQString SourceView::whatsThis() const
{
return i18n( "<b>Annotated Source</b>"
"<p>The annotated source list shows the "
@@ -99,9 +99,9 @@ QString SourceView::whatsThis() const
"make the destination function current.</p>");
}
-void SourceView::context(QListViewItem* i, const QPoint & p, int c)
+void SourceView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
// Menu entry:
TraceLineCall* lc = i ? ((SourceItem*) i)->lineCall() : 0;
@@ -110,7 +110,7 @@ void SourceView::context(QListViewItem* i, const QPoint & p, int c)
TraceLine* line = lj ? lj->lineTo() : 0;
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -135,7 +135,7 @@ void SourceView::context(QListViewItem* i, const QPoint & p, int c)
}
-void SourceView::selectedSlot(QListViewItem * i)
+void SourceView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
// programatically selected items are not signalled
@@ -167,7 +167,7 @@ void SourceView::selectedSlot(QListViewItem * i)
}
}
-void SourceView::activatedSlot(QListViewItem * i)
+void SourceView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceLineCall* lc = ((SourceItem*) i)->lineCall();
@@ -230,14 +230,14 @@ void SourceView::doUpdate(int changeType)
if (_selectedItem->type() == TraceItem::Instr)
sLine = ((TraceInstr*)_selectedItem)->line();
- SourceItem* si = (SourceItem*)QListView::selectedItem();
+ SourceItem* si = (SourceItem*)TQListView::selectedItem();
if (si) {
if (si->line() == sLine) return;
if (si->lineCall() &&
(si->lineCall()->call()->called() == _selectedItem)) return;
}
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling()) {
si = (SourceItem*)item;
if (si->line() == sLine) {
@@ -265,7 +265,7 @@ void SourceView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling())
for (item2 = item->firstChild();item2;item2 = item2->nextSibling())
((SourceItem*)item2)->updateGroup();
@@ -309,7 +309,7 @@ void SourceView::refresh()
if (!f) return;
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
TraceFunctionSource* mainSF = f->sourceFile();
@@ -332,7 +332,7 @@ void SourceView::refresh()
fillSourceFile(sf, fileno);
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
@@ -340,19 +340,19 @@ void SourceView::refresh()
// helper for fillSourceList:
// search recursive for a file, starting from a base dir
-static bool checkFileExistance(QString& dir, const QString& name)
+static bool checkFileExistance(TQString& dir, const TQString& name)
{
// we leave this in...
qDebug("Checking %s/%s", dir.ascii(), name.ascii());
- if (QFile::exists(dir + "/" + name)) return true;
+ if (TQFile::exists(dir + "/" + name)) return true;
// check in subdirectories
- QDir d(dir);
- d.setFilter( QDir::Dirs | QDir::NoSymLinks );
- d.setSorting( QDir::Unsorted );
- QStringList subdirs = d.entryList();
- QStringList::Iterator it =subdirs.begin();
+ TQDir d(dir);
+ d.setFilter( TQDir::Dirs | TQDir::NoSymLinks );
+ d.setSorting( TQDir::Unsorted );
+ TQStringList subdirs = d.entryList();
+ TQStringList::Iterator it =subdirs.begin();
for(; it != subdirs.end(); ++it ) {
if (*it == "." || *it == ".." || *it == "CVS") continue;
@@ -513,24 +513,24 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 1, false,
i18n("with any source line of this function in file"));
new SourceItem(this, this, fileno, 2, false,
- QString(" '%1'").arg(sf->function()->prettyName()));
+ TQString(" '%1'").arg(sf->function()->prettyName()));
new SourceItem(this, this, fileno, 3, false,
i18n("Thus, no annotated source can be shown."));
return;
}
}
- QString filename = sf->file()->shortName();
- QString dir = sf->file()->directory();
+ TQString filename = sf->file()->shortName();
+ TQString dir = sf->file()->directory();
if (!dir.isEmpty())
filename = dir + "/" + filename;
if (nextCostLineno>0) {
// we have debug info... search for source file
- if (!QFile::exists(filename)) {
- QStringList list = Configuration::sourceDirs(_data,
+ if (!TQFile::exists(filename)) {
+ TQStringList list = Configuration::sourceDirs(_data,
sf->function()->object());
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
dir = *it;
@@ -564,7 +564,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 0, false,
i18n("There is no source available for the following function:"));
new SourceItem(this, this, fileno, 1, false,
- QString(" '%1'").arg(sf->function()->prettyName()));
+ TQString(" '%1'").arg(sf->function()->prettyName()));
if (sf->file()->name().isEmpty()) {
new SourceItem(this, this, fileno, 2, false,
i18n("This is because no debug information is present."));
@@ -574,7 +574,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 4, false,
i18n("The function is located in this ELF object:"));
new SourceItem(this, this, fileno, 5, false,
- QString(" '%1'")
+ TQString(" '%1'")
.arg(sf->function()->object()->prettyName()));
}
}
@@ -582,7 +582,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 2, false,
i18n("This is because its source file cannot be found:"));
new SourceItem(this, this, fileno, 3, false,
- QString(" '%1'").arg(sf->file()->name()));
+ TQString(" '%1'").arg(sf->file()->name()));
new SourceItem(this, this, fileno, 4, false,
i18n("Add the folder of this file to the source folder list."));
new SourceItem(this, this, fileno, 5, false,
@@ -636,7 +636,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
TraceLine* currLine;
SourceItem *si, *si2, *item = 0, *first = 0, *selected = 0;
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly)) return;
while (1) {
readBytes=file.readLine(buf, sizeof( buf ));
@@ -702,7 +702,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
skipLineWritten = false;
si = new SourceItem(this, this,
- fileno, fileLineno, inside, QString(buf),
+ fileno, fileLineno, inside, TQString(buf),
currLine);
if (!currLine) continue;
@@ -755,7 +755,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
// for arrows: go down the list according to list sorting
sort();
- QListViewItem *item1, *item2;
+ TQListViewItem *item1, *item2;
for (item1=firstChild();item1;item1 = item1->nextSibling()) {
si = (SourceItem*)item1;
updateJumpArray(si->lineno(), si, true, false);
@@ -781,7 +781,7 @@ void SourceView::updateSourceItems()
setColumnWidth(1, 50);
setColumnWidth(2, _costType2 ? 50:0);
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
if (_costType)
setColumnText(1, _costType->name());
@@ -789,7 +789,7 @@ void SourceView::updateSourceItems()
setColumnText(2, _costType2->name());
SourceItem* si;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for (;item;item = item->nextSibling()) {
si = (SourceItem*)item;
TraceLine* l = si->line();
@@ -797,7 +797,7 @@ void SourceView::updateSourceItems()
si->updateCost();
- QListViewItem *next, *i = si->firstChild();
+ TQListViewItem *next, *i = si->firstChild();
for (;i;i = next) {
next = i->nextSibling();
((SourceItem*)i)->updateCost();
@@ -805,7 +805,7 @@ void SourceView::updateSourceItems()
}
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
diff --git a/kcachegrind/kcachegrind/sourceview.h b/kcachegrind/kcachegrind/sourceview.h
index 0e1319af..6856eddb 100644
--- a/kcachegrind/kcachegrind/sourceview.h
+++ b/kcachegrind/kcachegrind/sourceview.h
@@ -23,12 +23,12 @@
#ifndef SOURCEVIEW_H
#define SOURCEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "traceitemview.h"
class SourceItem;
-class SourceView : public QListView, public TraceItemView
+class SourceView : public TQListView, public TraceItemView
{
friend class SourceItem;
@@ -36,19 +36,19 @@ class SourceView : public QListView, public TraceItemView
public:
SourceView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
protected:
int arrowLevels() { return _arrowLevels; }
- void paintEmptyArea( QPainter *, const QRect & );
+ void paintEmptyArea( TQPainter *, const TQRect & );
private slots:
- void context(QListViewItem*, const QPoint &, int);
- void selectedSlot(QListViewItem *);
- void activatedSlot(QListViewItem *);
+ void context(TQListViewItem*, const TQPoint &, int);
+ void selectedSlot(TQListViewItem *);
+ void activatedSlot(TQListViewItem *);
private:
TraceItem* canShow(TraceItem*);
@@ -63,7 +63,7 @@ private:
// arrows
int _arrowLevels;
// temporary needed on creation...
- QMemArray<TraceLineJump*> _jump;
+ TQMemArray<TraceLineJump*> _jump;
TraceLineJumpList _lowList, _highList;
};
diff --git a/kcachegrind/kcachegrind/stackbrowser.cpp b/kcachegrind/kcachegrind/stackbrowser.cpp
index fa6480ea..78095eb2 100644
--- a/kcachegrind/kcachegrind/stackbrowser.cpp
+++ b/kcachegrind/kcachegrind/stackbrowser.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
+#include <tqlistview.h>
#include "stackbrowser.h"
@@ -259,9 +259,9 @@ Stack* Stack::split(TraceFunction* f)
return new Stack(_top, calls );
}
-QString Stack::toString()
+TQString Stack::toString()
{
- QString res = _top->name();
+ TQString res = _top->name();
TraceCall *c;
for (c=_calls.first();c;c=_calls.next())
res += "\n > " + c->called()->name();
diff --git a/kcachegrind/kcachegrind/stackbrowser.h b/kcachegrind/kcachegrind/stackbrowser.h
index d1205833..e7d6b802 100644
--- a/kcachegrind/kcachegrind/stackbrowser.h
+++ b/kcachegrind/kcachegrind/stackbrowser.h
@@ -49,7 +49,7 @@ public:
TraceFunction* caller(TraceFunction*, bool extend);
TraceFunction* called(TraceFunction*, bool extend);
- QString toString();
+ TQString toString();
private:
Stack(TraceFunction* top, TraceCallList list);
diff --git a/kcachegrind/kcachegrind/stackitem.cpp b/kcachegrind/kcachegrind/stackitem.cpp
index 075b9111..e3763ab4 100644
--- a/kcachegrind/kcachegrind/stackitem.cpp
+++ b/kcachegrind/kcachegrind/stackitem.cpp
@@ -20,7 +20,7 @@
* Items of stack dockable.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -31,8 +31,8 @@
// StackItem
StackItem::StackItem(StackSelection* ss,
- QListView* parent, TraceFunction* f)
- :QListViewItem(parent)
+ TQListView* parent, TraceFunction* f)
+ :TQListViewItem(parent)
{
_view = ss;
_function = f;
@@ -41,13 +41,13 @@ StackItem::StackItem(StackSelection* ss,
updateGroup();
updateCost();
- setText(2, QString("-- "));
+ setText(2, TQString("-- "));
setText(3, f->prettyName());
}
StackItem::StackItem(StackSelection* ss,
- QListView* parent, TraceCall* call)
- :QListViewItem(parent)
+ TQListView* parent, TraceCall* call)
+ :TQListViewItem(parent)
{
_view = ss;
_call = call;
@@ -62,7 +62,7 @@ StackItem::StackItem(StackSelection* ss,
void StackItem::updateGroup()
{
- QColor c = Configuration::functionColor(_view->groupType(),
+ TQColor c = Configuration::functionColor(_view->groupType(),
_function);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -78,13 +78,13 @@ void StackItem::updateCost()
double total = _call->called()->data()->subCost(ct);
if (total == 0.0) {
setText(0, "-");
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _call->prettySubCost(ct));
@@ -100,13 +100,13 @@ void StackItem::updateCost()
total = _call->called()->data()->subCost(ct2);
if (total == 0.0) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _call->prettySubCost(ct2));
diff --git a/kcachegrind/kcachegrind/stackitem.h b/kcachegrind/kcachegrind/stackitem.h
index 7a1dafeb..1701f010 100644
--- a/kcachegrind/kcachegrind/stackitem.h
+++ b/kcachegrind/kcachegrind/stackitem.h
@@ -24,7 +24,7 @@
#ifndef STACKITEM_H
#define STACKITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class StackSelection;
@@ -36,8 +36,8 @@ class StackItem: public QListViewItem
{
public:
// for top
- StackItem(StackSelection* ss, QListView* parent, TraceFunction* f);
- StackItem(StackSelection* ss, QListView* parent, TraceCall* c);
+ StackItem(StackSelection* ss, TQListView* parent, TraceFunction* f);
+ StackItem(StackSelection* ss, TQListView* parent, TraceCall* c);
TraceFunction* function() { return _function; }
TraceCall* call() { return _call; }
diff --git a/kcachegrind/kcachegrind/stackselection.cpp b/kcachegrind/kcachegrind/stackselection.cpp
index 5ace7d57..1080b860 100644
--- a/kcachegrind/kcachegrind/stackselection.cpp
+++ b/kcachegrind/kcachegrind/stackselection.cpp
@@ -22,12 +22,12 @@
* to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
#include <kdebug.h>
@@ -35,7 +35,7 @@
#include "stackselection.h"
#include "stackitem.h"
-StackSelection::StackSelection( QWidget* parent, const char* name)
+StackSelection::StackSelection( TQWidget* parent, const char* name)
: StackSelectionBase(parent, name)
{
_data = 0;
@@ -48,7 +48,7 @@ StackSelection::StackSelection( QWidget* parent, const char* name)
stackList->setSorting(-1);
stackList->setAllColumnsShowFocus(true);
- stackList->setResizeMode(QListView::LastColumn);
+ stackList->setResizeMode(TQListView::LastColumn);
stackList->setColumnAlignment(0, Qt::AlignRight);
stackList->setColumnAlignment(1, Qt::AlignRight);
stackList->setColumnAlignment(2, Qt::AlignRight);
@@ -57,8 +57,8 @@ StackSelection::StackSelection( QWidget* parent, const char* name)
stackList->setColumnWidth(1, 0);
stackList->setColumnWidth(2, 50);
- connect(stackList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(stackSelected(QListViewItem*)));
+ connect(stackList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(stackSelected(TQListViewItem*)));
}
StackSelection::~StackSelection()
@@ -108,7 +108,7 @@ void StackSelection::rebuildStackList()
TraceFunction* top = item->stack()->top();
if (!top) return;
- stackList->setColumnWidthMode(1, QListView::Maximum);
+ stackList->setColumnWidthMode(1, TQListView::Maximum);
TraceCallList l = item->stack()->calls();
TraceCall* call;
@@ -118,7 +118,7 @@ void StackSelection::rebuildStackList()
new StackItem(this, stackList, top);
// select current function
- QListViewItem* i = stackList->firstChild();
+ TQListViewItem* i = stackList->firstChild();
for (;i;i=i->nextSibling())
if (((StackItem*)i)->function() == item->function())
break;
@@ -130,12 +130,12 @@ void StackSelection::rebuildStackList()
}
if (!_costType2) {
- stackList->setColumnWidthMode(1, QListView::Manual);
+ stackList->setColumnWidthMode(1, TQListView::Manual);
stackList->setColumnWidth(1, 0);
}
}
-void StackSelection::stackSelected(QListViewItem* i)
+void StackSelection::stackSelected(TQListViewItem* i)
{
if (!i) return;
@@ -178,7 +178,7 @@ void StackSelection::browserDown()
void StackSelection::refresh()
{
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
}
@@ -192,7 +192,7 @@ void StackSelection::setCostType(TraceCostType* ct)
if (_costType)
stackList->setColumnText(0, _costType->name());
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
}
@@ -203,16 +203,16 @@ void StackSelection::setCostType2(TraceCostType* ct)
_costType2 = ct;
stackList->setColumnWidth(1, 50);
- stackList->setColumnWidthMode(1, QListView::Maximum);
+ stackList->setColumnWidthMode(1, TQListView::Maximum);
if (_costType2)
stackList->setColumnText(1, _costType2->name());
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
if (!_costType2) {
- stackList->setColumnWidthMode(1, QListView::Manual);
+ stackList->setColumnWidthMode(1, TQListView::Manual);
stackList->setColumnWidth(1, 0);
}
}
@@ -222,7 +222,7 @@ void StackSelection::setGroupType(TraceItem::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateGroup();
}
diff --git a/kcachegrind/kcachegrind/stackselection.h b/kcachegrind/kcachegrind/stackselection.h
index aa74a178..5d34c7ac 100644
--- a/kcachegrind/kcachegrind/stackselection.h
+++ b/kcachegrind/kcachegrind/stackselection.h
@@ -38,7 +38,7 @@ class StackSelection : public StackSelectionBase
Q_OBJECT
public:
- StackSelection( QWidget* parent = 0, const char* name = 0);
+ StackSelection( TQWidget* parent = 0, const char* name = 0);
~StackSelection();
TraceData* data() const { return _data; }
@@ -57,7 +57,7 @@ public slots:
void setCostType2(TraceCostType*);
void setGroupType(TraceItem::CostType);
- void stackSelected( QListViewItem* );
+ void stackSelected( TQListViewItem* );
void browserBack();
void browserForward();
void browserUp();
@@ -70,7 +70,7 @@ private:
TraceData* _data;
StackBrowser* _browser;
- QListViewItem* _item;
+ TQListViewItem* _item;
TraceFunction* _function;
TraceCostType* _costType;
TraceCostType* _costType2;
diff --git a/kcachegrind/kcachegrind/subcost.cpp b/kcachegrind/kcachegrind/subcost.cpp
index cf87f7f0..7b5034e3 100644
--- a/kcachegrind/kcachegrind/subcost.cpp
+++ b/kcachegrind/kcachegrind/subcost.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include "subcost.h"
@@ -40,19 +40,19 @@ bool SubCost::set(const char** ps)
return true;
}
-QString SubCost::pretty()
+TQString SubCost::pretty()
{
unsigned long long n = v;
- if (n==0) return QString(" 0");
+ if (n==0) return TQString(" 0");
int i = 0;
- QString res = "";
+ TQString res = "";
while (n) {
if ((i>0) && !(i%3)) res = " " + res;
i++;
- res = QChar('0'+int(n%10)) + res;
+ res = TQChar('0'+int(n%10)) + res;
n /= 10;
}
res = " " + res;
diff --git a/kcachegrind/kcachegrind/subcost.h b/kcachegrind/kcachegrind/subcost.h
index ab4ac9bc..81692808 100644
--- a/kcachegrind/kcachegrind/subcost.h
+++ b/kcachegrind/kcachegrind/subcost.h
@@ -55,10 +55,10 @@ class SubCost
bool operator>(const SubCost& s) const { return v > s.v; }
/**
- * Convert SubCost value into a QString,
+ * Convert SubCost value into a TQString,
* spaced every 3 digits.
*/
- QString pretty();
+ TQString pretty();
uint64 v;
};
diff --git a/kcachegrind/kcachegrind/tabview.cpp b/kcachegrind/kcachegrind/tabview.cpp
index 1b1da7b1..318920b6 100644
--- a/kcachegrind/kcachegrind/tabview.cpp
+++ b/kcachegrind/kcachegrind/tabview.cpp
@@ -21,12 +21,12 @@
* two tab widgets, separated by a splitter
*/
-#include <qobjectlist.h>
-#include <qsplitter.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqobjectlist.h>
+#include <tqsplitter.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
@@ -43,21 +43,21 @@
// TabBar
-TabBar::TabBar(TabView* v, QTabWidget* parent, const char *name)
- : QTabBar(parent, name)
+TabBar::TabBar(TabView* v, TQTabWidget* parent, const char *name)
+ : TQTabBar(parent, name)
{
_tabWidget = parent;
_tabView = v;
}
-void TabBar::mousePressEvent(QMouseEvent *e)
+void TabBar::mousePressEvent(TQMouseEvent *e)
{
if (e->button() == RightButton) {
- QTab *tab = selectTab( e->pos() );
- QWidget* page;
+ TQTab *tab = selectTab( e->pos() );
+ TQWidget* page;
page = tab ? _tabWidget->page( indexOf( tab->identifier() ) ) :0;
- QPopupMenu popup, popup1, popup2, popup3;
+ TQPopupMenu popup, popup1, popup2, popup3;
if (page) {
TraceItemView::Position p = _tabView->tabPosition(page);
if (p != TraceItemView::Top) {
@@ -106,7 +106,7 @@ void TabBar::mousePressEvent(QMouseEvent *e)
if (r>=100 && r<110) _tabView->moveTab(0, p, true);
}
- QTabBar::mousePressEvent( e );
+ TQTabBar::mousePressEvent( e );
}
@@ -114,13 +114,13 @@ void TabBar::mousePressEvent(QMouseEvent *e)
// Splitter
//
-Splitter::Splitter(Orientation o, QWidget* parent, const char* name)
- : QSplitter(o, parent, name)
+Splitter::Splitter(Orientation o, TQWidget* parent, const char* name)
+ : TQSplitter(o, parent, name)
{}
-void Splitter::moveEvent(QMoveEvent* e)
+void Splitter::moveEvent(TQMoveEvent* e)
{
- QSplitter::moveEvent(e);
+ TQSplitter::moveEvent(e);
if (0) qDebug("Splitter %s: Move", name());
checkVisiblity();
@@ -128,9 +128,9 @@ void Splitter::moveEvent(QMoveEvent* e)
void Splitter::checkVisiblity()
{
- const QObjectList *l = children();
- QObjectListIt it( *l );
- QObject *obj;
+ const TQObjectList *l = children();
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
if (obj->isA("Splitter")) ((Splitter*)obj)->checkVisiblity();
@@ -145,9 +145,9 @@ void Splitter::checkVisiblity()
// TabWidget
//
-TabWidget::TabWidget(TabView* v, QWidget* parent,
+TabWidget::TabWidget(TabView* v, TQWidget* parent,
const char* name, WFlags f)
- : QTabWidget(parent, name, f)
+ : TQTabWidget(parent, name, f)
{
_hasVisibleRect = false;
setTabBar(new TabBar(v, this));
@@ -170,9 +170,9 @@ void TabWidget::checkVisibility()
}
}
-void TabWidget::resizeEvent(QResizeEvent *e)
+void TabWidget::resizeEvent(TQResizeEvent *e)
{
- QTabWidget::resizeEvent(e);
+ TQTabWidget::resizeEvent(e);
if (0) qDebug("TabWidget %s:\n Resize from (%d/%d) to (%d/%d)",
name(),
e->oldSize().width(), e->oldSize().height(),
@@ -180,25 +180,25 @@ void TabWidget::resizeEvent(QResizeEvent *e)
checkVisibility();
}
-void TabWidget::showEvent(QShowEvent* e)
+void TabWidget::showEvent(TQShowEvent* e)
{
- QTabWidget::showEvent(e);
+ TQTabWidget::showEvent(e);
if (0) qDebug("TabWidget %s: Show", name());
checkVisibility();
}
-void TabWidget::hideEvent(QHideEvent* e)
+void TabWidget::hideEvent(TQHideEvent* e)
{
- QTabWidget::hideEvent(e);
+ TQTabWidget::hideEvent(e);
if (0) qDebug("TabWidget %s: Hide", name());
checkVisibility();
}
-void TabWidget::moveEvent(QMoveEvent* e)
+void TabWidget::moveEvent(TQMoveEvent* e)
{
- QTabWidget::moveEvent(e);
+ TQTabWidget::moveEvent(e);
if (0) qDebug("TabWidget %s: Move", name());
checkVisibility();
@@ -229,51 +229,51 @@ void TabWidget::moveEvent(QMoveEvent* e)
*/
TabView::TabView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QWidget(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name), TraceItemView(parentView)
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_isCollapsed = true;
- QVBoxLayout* vbox = new QVBoxLayout( this, 6, 6);
+ TQVBoxLayout* vbox = new TQVBoxLayout( this, 6, 6);
_nameLabel = new KSqueezedTextLabel( this, "nameLabel" );
_nameLabel->setText(i18n("(No profile data file loaded)"));
vbox->addWidget( _nameLabel );
- _mainSplitter = new QSplitter(Qt::Horizontal, this);
+ _mainSplitter = new TQSplitter(Qt::Horizontal, this);
_leftSplitter = new Splitter(Qt::Vertical, _mainSplitter, "Left");
vbox->addWidget( _mainSplitter );
_rightTW = new TabWidget(this, _mainSplitter, "Right");
- connect(_rightTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_rightTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ connect(_rightTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_rightTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_topTW = new TabWidget(this, _leftSplitter, "Top");
- connect(_topTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_topTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ connect(_topTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_topTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_bottomSplitter = new Splitter(Qt::Horizontal,
_leftSplitter, "Bottom");
_leftTW = new TabWidget(this, _bottomSplitter, "Left");
- _leftTW->setTabPosition(QTabWidget::Bottom);
- connect(_leftTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_leftTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ _leftTW->setTabPosition(TQTabWidget::Bottom);
+ connect(_leftTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_leftTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_bottomTW = new TabWidget(this, _bottomSplitter, "Bottom");
- _bottomTW->setTabPosition(QTabWidget::Bottom);
- connect(_bottomTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_bottomTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ _bottomTW->setTabPosition(TQTabWidget::Bottom);
+ connect(_bottomTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_bottomTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
// default positions...
@@ -321,7 +321,7 @@ TabView::TabView(TraceItemView* parentView,
updateVisibility();
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
void TabView::setData(TraceData* d)
@@ -333,7 +333,7 @@ void TabView::setData(TraceData* d)
v->setData(d);
}
-TraceItemView* TabView::addTab(QString label, TraceItemView* view)
+TraceItemView* TabView::addTab(TQString label, TraceItemView* view)
{
view->setTitle(label);
_tabs.append(view);
@@ -352,7 +352,7 @@ void TabView::addBottom(TraceItemView* view)
_bottomTW->insertTab(view->widget(), view->title());
}
-TraceItemView::Position TabView::tabPosition(QWidget* w)
+TraceItemView::Position TabView::tabPosition(TQWidget* w)
{
TraceItemView* v;
for (v=_tabs.first();v;v=_tabs.next())
@@ -415,7 +415,7 @@ void TabView::updateVisibility()
if (0) qDebug("TabView::updateVisiblity t %d, b %d, l %d, r %d",
t, b, l, r);
- QValueList<int> s;
+ TQValueList<int> s;
s.append(100);
@@ -496,7 +496,7 @@ TabWidget* TabView::tabWidget(Position p)
return 0;
}
-void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
+void TabView::moveTab(TQWidget* w, Position p, bool wholeArea)
{
TraceItemView *v;
Position origPos = Hidden;
@@ -513,7 +513,7 @@ void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
from = tabWidget(origPos);
to = tabWidget(p);
- QPtrList<TraceItemView> tabs;
+ TQPtrList<TraceItemView> tabs;
for (v=_tabs.first();v;v=_tabs.next())
if ((v->position() == origPos) &&
(wholeArea || (v->widget() == w))) tabs.append(v);
@@ -548,7 +548,7 @@ void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
}
-QString TabView::whatsThis() const
+TQString TabView::whatsThis() const
{
return i18n( "<b>Information Tabs</b>"
"<p>This widget shows information for the "
@@ -580,29 +580,29 @@ QString TabView::whatsThis() const
void TabView::installFocusFilters()
{
- QObjectList *l = queryList("QWidget");
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList("TQWidget");
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- if ( ((QWidget*)obj)->isFocusEnabled() )
+ if ( ((TQWidget*)obj)->isFocusEnabled() )
obj->installEventFilter(this);
}
delete l;
}
-bool TabView::eventFilter(QObject* o, QEvent* e)
+bool TabView::eventFilter(TQObject* o, TQEvent* e)
{
- if (e->type() == QEvent::FocusIn) {
- _lastFocus = o->isWidgetType() ? (QWidget*) o : 0;
+ if (e->type() == TQEvent::FocusIn) {
+ _lastFocus = o->isWidgetType() ? (TQWidget*) o : 0;
setActive(_lastFocus != 0);
}
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
-void TabView::mousePressEvent(QMouseEvent*)
+void TabView::mousePressEvent(TQMouseEvent*)
{
if (_lastFocus)
_lastFocus->setFocus();
@@ -614,7 +614,7 @@ void TabView::setActive(bool a)
if (a == _active) return;
_active = a;
- QFont nameLabel_font( _nameLabel->font() );
+ TQFont nameLabel_font( _nameLabel->font() );
nameLabel_font.setBold(a);
_nameLabel->setFont( nameLabel_font );
@@ -636,7 +636,7 @@ void TabView::doUpdate(int changeType)
// invoke tabChanged, which mangles with the lists, too
bool canShow;
TraceItemView *v;
- QPtrListIterator<TraceItemView> it( _tabs );
+ TQPtrListIterator<TraceItemView> it( _tabs );
while ( (v=it.current()) != 0) {
++it;
@@ -668,7 +668,7 @@ void TabView::doUpdate(int changeType)
}
-void TabView::tabChanged(QWidget* w)
+void TabView::tabChanged(TQWidget* w)
{
TraceItemView *v;
for (v=_tabs.first();v;v=_tabs.next())
@@ -683,9 +683,9 @@ void TabView::visibleRectChangedSlot(TabWidget* tw)
if (tw->hasVisibleRect()) doUpdate(0);
}
-void TabView::resizeEvent(QResizeEvent* e)
+void TabView::resizeEvent(TQResizeEvent* e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
bool collapsed = (e->size().width()<=1) || (e->size().height()<=1);
if (_isCollapsed != collapsed) {
@@ -710,7 +710,7 @@ void TabView::selected(TraceItemView*, TraceItem* s)
void TabView::readViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
if (0) qDebug("%s::readConfig(%s%s)", name(),
@@ -722,15 +722,15 @@ void TabView::readViewConfig(KConfig* c,
_leftSplitter->setSizes(g->readIntListEntry("LeftSizes"));
_bottomSplitter->setSizes(g->readIntListEntry("BottomSizes"));
- QString activeT = g->readEntry("ActiveTop", "CallerView");
- QString activeB = g->readEntry("ActiveBottom", "CalleeView");
- QString activeL = g->readEntry("ActiveLeft", "");
- QString activeR = g->readEntry("ActiveRight", "");
+ TQString activeT = g->readEntry("ActiveTop", "CallerView");
+ TQString activeB = g->readEntry("ActiveBottom", "CalleeView");
+ TQString activeL = g->readEntry("ActiveLeft", "");
+ TQString activeR = g->readEntry("ActiveRight", "");
- QStringList topTabs = g->readListEntry("TopTabs");
- QStringList bottomTabs = g->readListEntry("BottomTabs");
- QStringList leftTabs = g->readListEntry("LeftTabs");
- QStringList rightTabs = g->readListEntry("RightTabs");
+ TQStringList topTabs = g->readListEntry("TopTabs");
+ TQStringList bottomTabs = g->readListEntry("BottomTabs");
+ TQStringList leftTabs = g->readListEntry("LeftTabs");
+ TQStringList rightTabs = g->readListEntry("RightTabs");
if (topTabs.isEmpty() && bottomTabs.isEmpty() &&
rightTabs.isEmpty() && leftTabs.isEmpty()) {
@@ -746,11 +746,11 @@ void TabView::readViewConfig(KConfig* c,
moveTab(0, TraceItemView::Top, true);
TraceItemView *v;
- QPtrListIterator<TraceItemView> it( _tabs );
+ TQPtrListIterator<TraceItemView> it( _tabs );
while ( (v=it.current()) != 0) {
++it;
- QString n = QString(v->widget()->name());
+ TQString n = TQString(v->widget()->name());
if (topTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Top);
if (n == activeT) activeTop = v;
@@ -770,7 +770,7 @@ void TabView::readViewConfig(KConfig* c,
else moveTab(v->widget(), Hidden);
if (withOptions)
- v->readViewConfig(c, QString("%1-%2")
+ v->readViewConfig(c, TQString("%1-%2")
.arg(prefix).arg(v->widget()->name()),
postfix, true);
}
@@ -779,10 +779,10 @@ void TabView::readViewConfig(KConfig* c,
if (activeLeft) _leftTW->showPage(activeLeft->widget());
if (activeRight) _rightTW->showPage(activeRight->widget());
- QString activeType = g->readEntry("ActiveItemType", "");
- QString activeName = g->readEntry("ActiveItemName", "");
- QString selectedType = g->readEntry("SelectedItemType", "");
- QString selectedName = g->readEntry("SelectedItemName", "");
+ TQString activeType = g->readEntry("ActiveItemType", "");
+ TQString activeName = g->readEntry("ActiveItemName", "");
+ TQString selectedType = g->readEntry("SelectedItemType", "");
+ TQString selectedName = g->readEntry("SelectedItemName", "");
delete g;
if (!_data) return;
@@ -807,7 +807,7 @@ void TabView::readViewConfig(KConfig* c,
}
void TabView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -816,28 +816,28 @@ void TabView::saveViewConfig(KConfig* c,
g.writeEntry("LeftSizes", _leftSplitter->sizes());
g.writeEntry("BottomSizes", _bottomSplitter->sizes());
- QString a;
+ TQString a;
if ((_topTW->count()>0) &&
(_topTW->isTabEnabled(_topTW->currentPage())))
- a = QString(_topTW->currentPage()->name());
+ a = TQString(_topTW->currentPage()->name());
g.writeEntry("ActiveTop", a);
a.setLength(0);
if ((_bottomTW->count()>0) &&
(_bottomTW->isTabEnabled(_bottomTW->currentPage())))
- a = QString(_bottomTW->currentPage()->name());
+ a = TQString(_bottomTW->currentPage()->name());
g.writeEntry("ActiveBottom", a);
a.setLength(0);
if ((_leftTW->count()>0) &&
(_leftTW->isTabEnabled(_leftTW->currentPage())))
- a = QString(_leftTW->currentPage()->name());
+ a = TQString(_leftTW->currentPage()->name());
g.writeEntry("ActiveLeft", a);
a.setLength(0);
if ((_rightTW->count()>0) &&
(_rightTW->isTabEnabled(_rightTW->currentPage())))
- a = QString(_rightTW->currentPage()->name());
+ a = TQString(_rightTW->currentPage()->name());
g.writeEntry("ActiveRight", a);
if (withOptions)
@@ -852,24 +852,24 @@ void TabView::saveViewConfig(KConfig* c,
}
}
- QStringList topList, bottomList, leftList, rightList;
+ TQStringList topList, bottomList, leftList, rightList;
TraceItemView *v;
for (v=_tabs.first();v;v=_tabs.next()) {
switch(v->position()) {
case TraceItemView::Top:
- topList << QString(v->widget()->name());
+ topList << TQString(v->widget()->name());
break;
case TraceItemView::Bottom:
- bottomList << QString(v->widget()->name());
+ bottomList << TQString(v->widget()->name());
break;
case TraceItemView::Left:
- leftList << QString(v->widget()->name());
+ leftList << TQString(v->widget()->name());
break;
case TraceItemView::Right:
- rightList << QString(v->widget()->name());
+ rightList << TQString(v->widget()->name());
break;
default: break;
@@ -883,7 +883,7 @@ void TabView::saveViewConfig(KConfig* c,
if (withOptions)
for (v=_tabs.first();v;v=_tabs.next())
- v->saveViewConfig(c, QString("%1-%2").arg(prefix)
+ v->saveViewConfig(c, TQString("%1-%2").arg(prefix)
.arg(v->widget()->name()), postfix, true);
}
diff --git a/kcachegrind/kcachegrind/tabview.h b/kcachegrind/kcachegrind/tabview.h
index a9ca5e31..d48c891d 100644
--- a/kcachegrind/kcachegrind/tabview.h
+++ b/kcachegrind/kcachegrind/tabview.h
@@ -24,10 +24,10 @@
#ifndef TABVIEW_H
#define TABVIEW_H
-#include <qptrlist.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
#include <ksqueezedtextlabel.h>
#include "traceitemview.h"
@@ -35,19 +35,19 @@ class QSplitter;
class TabView;
/**
- * Subclass of QTabBar to enable context menu on tabs
+ * Subclass of TQTabBar to enable context menu on tabs
*/
class TabBar : public QTabBar
{
Q_OBJECT
public:
- TabBar(TabView*, QTabWidget* parent, const char *name = 0);
+ TabBar(TabView*, TQTabWidget* parent, const char *name = 0);
protected:
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
private:
- QTabWidget* _tabWidget;
+ TQTabWidget* _tabWidget;
TabView* _tabView;
};
@@ -63,18 +63,18 @@ class Splitter: public QSplitter
Q_OBJECT
public:
- Splitter(Orientation o, QWidget* parent = 0, const char* name = 0);
+ Splitter(Orientation o, TQWidget* parent = 0, const char* name = 0);
void checkVisiblity();
protected:
- void moveEvent(QMoveEvent *);
+ void moveEvent(TQMoveEvent *);
};
/**
* Own TabView:
- * - A QTabWidget able to track its visible rect via resizeEvents.
- * This is needed to track if this widget is collapsed in a QSplitter.
+ * - A TQTabWidget able to track its visible rect via resizeEvents.
+ * This is needed to track if this widget is collapsed in a TQSplitter.
* - Use own TabBar for context menu
*/
class TabWidget: public QTabWidget
@@ -83,7 +83,7 @@ class TabWidget: public QTabWidget
public:
- TabWidget(TabView*, QWidget* parent = 0,
+ TabWidget(TabView*, TQWidget* parent = 0,
const char* name = 0, WFlags f = 0);
bool hasVisibleRect() { return _hasVisibleRect; }
@@ -93,10 +93,10 @@ signals:
void visibleRectChanged(TabWidget*);
protected:
- void resizeEvent(QResizeEvent *);
- void showEvent(QShowEvent *);
- void hideEvent(QHideEvent *);
- void moveEvent(QMoveEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void showEvent(TQShowEvent *);
+ void hideEvent(TQHideEvent *);
+ void moveEvent(TQMoveEvent *);
private:
bool _hasVisibleRect;
@@ -104,17 +104,17 @@ private:
-class TabView : public QWidget, public TraceItemView
+class TabView : public TQWidget, public TraceItemView
{
Q_OBJECT
public:
TabView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const ;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const ;
void setData(TraceData*);
bool isViewVisible() const { return !_isCollapsed; }
void selected(TraceItemView*, TraceItem*);
@@ -125,29 +125,29 @@ public:
* Rearrange tabs
* if <w> == 0, move hidden tabs
*/
- void moveTab(QWidget* w, Position, bool wholeArea = false);
+ void moveTab(TQWidget* w, Position, bool wholeArea = false);
- Position tabPosition(QWidget*);
+ Position tabPosition(TQWidget*);
int visibleTabs();
int visibleAreas();
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
public slots:
- void tabChanged(QWidget*);
+ void tabChanged(TQWidget*);
void visibleRectChangedSlot(TabWidget*);
signals:
void activated(TabView*);
protected:
- void resizeEvent(QResizeEvent *);
- bool eventFilter(QObject*, QEvent*);
- void mousePressEvent(QMouseEvent*);
+ void resizeEvent(TQResizeEvent *);
+ bool eventFilter(TQObject*, TQEvent*);
+ void mousePressEvent(TQMouseEvent*);
private:
- TraceItemView* addTab(QString, TraceItemView*);
+ TraceItemView* addTab(TQString, TraceItemView*);
void addTop(TraceItemView*);
void addBottom(TraceItemView*);
TabWidget* tabWidget(Position);
@@ -159,11 +159,11 @@ private:
bool _isCollapsed;
KSqueezedTextLabel* _nameLabel;
- QSplitter *_mainSplitter, *_leftSplitter, *_bottomSplitter;
+ TQSplitter *_mainSplitter, *_leftSplitter, *_bottomSplitter;
TabWidget *_topTW, *_leftTW, *_bottomTW, *_rightTW;
- QPtrList<TraceItemView> _tabs;
+ TQPtrList<TraceItemView> _tabs;
- QWidget* _lastFocus;
+ TQWidget* _lastFocus;
bool _active;
};
diff --git a/kcachegrind/kcachegrind/toplevel.cpp b/kcachegrind/kcachegrind/toplevel.cpp
index 8bb2835c..4749f604 100644
--- a/kcachegrind/kcachegrind/toplevel.cpp
+++ b/kcachegrind/kcachegrind/toplevel.cpp
@@ -25,19 +25,19 @@
#include <stdlib.h> // for system()
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qlineedit.h>
-#include <qtextstream.h>
-#include <qsizepolicy.h>
-#include <qprogressbar.h>
-#include <qfile.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqtextstream.h>
+#include <tqsizepolicy.h>
+#include <tqprogressbar.h>
+#include <tqfile.h>
// With Qt 3.1, we can disallow user interaction with long tasks.
-// This needs QEventLoop. Otherwise, QApplication::processEvents is used.
+// This needs TQEventLoop. Otherwise, TQApplication::processEvents is used.
#if (QT_VERSION-0 >= 0x030100)
-#include <qeventloop.h>
+#include <tqeventloop.h>
#endif
#include <kapplication.h>
@@ -87,24 +87,24 @@ TopLevel::TopLevel(const char *name)
_stackDockShown->setChecked(!_stackDock->isHidden());
_functionDockShown->setChecked(!_functionDock->isHidden());
- connect(_partDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(partVisibilityChanged(bool)));
- connect(_stackDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(stackVisibilityChanged(bool)));
- connect(_functionDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(functionVisibilityChanged(bool)));
+ connect(_partDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(partVisibilityChanged(bool)));
+ connect(_stackDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(stackVisibilityChanged(bool)));
+ connect(_functionDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(functionVisibilityChanged(bool)));
#if ENABLE_DUMPDOCK
_dumpDockShown->setChecked(!_dumpDock->isHidden());
- connect(_dumpDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(dumpVisibilityChanged(bool)));
+ connect(_dumpDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(dumpVisibilityChanged(bool)));
#endif
_statusbar = statusBar();
- _statusLabel = new QLabel(_statusbar);
+ _statusLabel = new TQLabel(_statusbar);
#if 0
// how to do avoid main window resizing on large statusbar label?
- QSizePolicy p(QSizePolicy::Fixed, QSizePolicy::Expanding);
+ TQSizePolicy p(TQSizePolicy::Fixed, TQSizePolicy::Expanding);
_statusLabel->setSizePolicy(p);
_statusbar->setSizePolicy(p);
#endif
@@ -135,11 +135,11 @@ TopLevel::TopLevel(const char *name)
setAutoSaveSettings();
// restore current state settings (not configuration options)
- restoreCurrentState(QString::null);
+ restoreCurrentState(TQString::null);
// if this is the first toplevel, show tip of day
if (memberList->count() == 1)
- QTimer::singleShot( 200, this, SLOT(slotShowTipOnStart()) );
+ TQTimer::singleShot( 200, this, TQT_SLOT(slotShowTipOnStart()) );
}
void TopLevel::init()
@@ -178,23 +178,23 @@ void TopLevel::setupPartSelection(PartSelection* ps)
{
// setup connections from the part selection widget
- connect(ps, SIGNAL(activePartsChanged(const TracePartList&)),
- this, SLOT(activePartsChangedSlot(const TracePartList&)));
- connect(ps, SIGNAL(groupChanged(TraceCostItem*)),
- this, SLOT(setGroupDelayed(TraceCostItem*)));
- connect(ps, SIGNAL(functionChanged(TraceItem*)),
- this, SLOT(setTraceItemDelayed(TraceItem*)));
+ connect(ps, TQT_SIGNAL(activePartsChanged(const TracePartList&)),
+ this, TQT_SLOT(activePartsChangedSlot(const TracePartList&)));
+ connect(ps, TQT_SIGNAL(groupChanged(TraceCostItem*)),
+ this, TQT_SLOT(setGroupDelayed(TraceCostItem*)));
+ connect(ps, TQT_SIGNAL(functionChanged(TraceItem*)),
+ this, TQT_SLOT(setTraceItemDelayed(TraceItem*)));
- connect(ps, SIGNAL(goBack()),
- _stackSelection, SLOT(browserBack()));
+ connect(ps, TQT_SIGNAL(goBack()),
+ _stackSelection, TQT_SLOT(browserBack()));
- connect(ps, SIGNAL(partsHideSelected()),
- this, SLOT(partsHideSelectedSlotDelayed()));
- connect(ps, SIGNAL(partsUnhideAll()),
- this, SLOT(partsUnhideAllSlotDelayed()));
+ connect(ps, TQT_SIGNAL(partsHideSelected()),
+ this, TQT_SLOT(partsHideSelectedSlotDelayed()));
+ connect(ps, TQT_SIGNAL(partsUnhideAll()),
+ this, TQT_SLOT(partsUnhideAllSlotDelayed()));
- connect(ps, SIGNAL(showMessage(const QString&, int)),
- _statusbar, SLOT(message(const QString&, int)));
+ connect(ps, TQT_SIGNAL(showMessage(const TQString&, int)),
+ _statusbar, TQT_SLOT(message(const TQString&, int)));
}
/**
@@ -204,22 +204,22 @@ void TopLevel::setupPartSelection(PartSelection* ps)
* No positions are saved. These is done automatically for
* KToolbar, and manually in queryExit() for QT docks.
*/
-void TopLevel::saveCurrentState(QString postfix)
+void TopLevel::saveCurrentState(TQString postfix)
{
KConfig* kconfig = KGlobal::config();
- QCString pf = postfix.ascii();
+ TQCString pf = postfix.ascii();
- KConfigGroup psConfig(kconfig, QCString("PartOverview")+pf);
+ KConfigGroup psConfig(kconfig, TQCString("PartOverview")+pf);
_partSelection->saveVisualisationConfig(&psConfig);
- KConfigGroup stateConfig(kconfig, QCString("CurrentState")+pf);
+ KConfigGroup stateConfig(kconfig, TQCString("CurrentState")+pf);
stateConfig.writeEntry("CostType",
- _costType ? _costType->name() : QString("?"));
+ _costType ? _costType->name() : TQString("?"));
stateConfig.writeEntry("CostType2",
- _costType2 ? _costType2->name() : QString("?"));
+ _costType2 ? _costType2->name() : TQString("?"));
stateConfig.writeEntry("GroupType", TraceItem::typeName(_groupType));
- _multiView->saveViewConfig(kconfig, QString("MainView"), postfix, true);
+ _multiView->saveViewConfig(kconfig, TQString("MainView"), postfix, true);
}
/**
@@ -228,25 +228,25 @@ void TopLevel::saveCurrentState(QString postfix)
*/
void TopLevel::saveTraceSettings()
{
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
- pConfig.writeEntry(QString("CostType%1").arg(key),
- _costType ? _costType->name() : QString("?"));
- pConfig.writeEntry(QString("CostType2%1").arg(key),
- _costType2 ? _costType2->name() : QString("?"));
- pConfig.writeEntry(QString("GroupType%1").arg(key),
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
+ pConfig.writeEntry(TQString("CostType%1").arg(key),
+ _costType ? _costType->name() : TQString("?"));
+ pConfig.writeEntry(TQString("CostType2%1").arg(key),
+ _costType2 ? _costType2->name() : TQString("?"));
+ pConfig.writeEntry(TQString("GroupType%1").arg(key),
TraceItem::typeName(_groupType));
if (!_data) return;
- KConfigGroup aConfig(KGlobal::config(), QCString("Layouts"));
- aConfig.writeEntry(QString("Count%1").arg(key), _layoutCount);
- aConfig.writeEntry(QString("Current%1").arg(key), _layoutCurrent);
+ KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts"));
+ aConfig.writeEntry(TQString("Count%1").arg(key), _layoutCount);
+ aConfig.writeEntry(TQString("Current%1").arg(key), _layoutCurrent);
saveCurrentState(key);
- pConfig.writeEntry(QString("Group%1").arg(key),
- _group ? _group->name() : QString::null);
+ pConfig.writeEntry(TQString("Group%1").arg(key),
+ _group ? _group->name() : TQString::null);
}
/**
@@ -256,19 +256,19 @@ void TopLevel::saveTraceSettings()
* This does NOT restore any positions. This is done automatically for
* KToolbar, and manually in the createDocks() for QT docks..
*/
-void TopLevel::restoreCurrentState(QString postfix)
+void TopLevel::restoreCurrentState(TQString postfix)
{
KConfig* kconfig = KGlobal::config();
- QStringList gList = kconfig->groupList();
- QCString pf = postfix.ascii();
+ TQStringList gList = kconfig->groupList();
+ TQCString pf = postfix.ascii();
// dock properties (not position, this should be have done before)
- QCString group = QCString("PartOverview");
+ TQCString group = TQCString("PartOverview");
if (gList.contains(group+pf)) group += pf;
KConfigGroup psConfig(kconfig, group);
_partSelection->readVisualisationConfig(&psConfig);
- _multiView->readViewConfig(kconfig, QString("MainView"), postfix, true);
+ _multiView->readViewConfig(kconfig, TQString("MainView"), postfix, true);
_taSplit->setChecked(_multiView->childCount()>1);
_taSplitDir->setEnabled(_multiView->childCount()>1);
_taSplitDir->setChecked(_multiView->orientation() == Qt::Horizontal);
@@ -277,14 +277,14 @@ void TopLevel::restoreCurrentState(QString postfix)
void TopLevel::createDocks()
{
- _partDock = new QDockWindow(QDockWindow::InDock, this);
+ _partDock = new TQDockWindow(TQDockWindow::InDock, this);
_partDock->setCaption(i18n("Parts Overview"));
- _partDock->setCloseMode( QDockWindow::Always );
+ _partDock->setCloseMode( TQDockWindow::Always );
_partSelection = new PartSelection(_partDock, "partSelection");
_partDock->setWidget(_partSelection);
_partDock->setResizeEnabled(true);
_partDock->setFixedExtentWidth(200);
- QWhatsThis::add( _partSelection, i18n(
+ TQWhatsThis::add( _partSelection, i18n(
"<b>The Parts Overview</b>"
"<p>A trace consists of multiple trace parts when "
"there are several profile data files from one profile run. "
@@ -308,15 +308,15 @@ void TopLevel::createDocks()
"This is split up into smaller rectangles to show the costs of its "
"callees.</li></ul></p>"));
- _stackDock = new QDockWindow(QDockWindow::InDock, this);
+ _stackDock = new TQDockWindow(TQDockWindow::InDock, this);
_stackDock->setResizeEnabled(true);
// Why is the caption only correct with a close button?
- _stackDock->setCloseMode( QDockWindow::Always );
+ _stackDock->setCloseMode( TQDockWindow::Always );
_stackSelection = new StackSelection(_stackDock, "stackSelection");
_stackDock->setWidget(_stackSelection);
_stackDock->setFixedExtentWidth(200);
_stackDock->setCaption(i18n("Top Cost Call Stack"));
- QWhatsThis::add( _stackSelection, i18n(
+ TQWhatsThis::add( _stackSelection, i18n(
"<b>The Top Cost Call Stack</b>"
"<p>This is a purely fictional 'most probable' call stack. "
"It is built up by starting with the current selected "
@@ -326,12 +326,12 @@ void TopLevel::createDocks()
"cost used for all calls from the function in the line "
"above.</p>"));
- connect(_stackSelection, SIGNAL(functionSelected(TraceItem*)),
- this, SLOT(setTraceItemDelayed(TraceItem*)));
+ connect(_stackSelection, TQT_SIGNAL(functionSelected(TraceItem*)),
+ this, TQT_SLOT(setTraceItemDelayed(TraceItem*)));
- _functionDock = new QDockWindow(QDockWindow::InDock, this);
+ _functionDock = new TQDockWindow(TQDockWindow::InDock, this);
_functionDock->setCaption(i18n("Flat Profile"));
- _functionDock->setCloseMode( QDockWindow::Always );
+ _functionDock->setCloseMode( TQDockWindow::Always );
_functionSelection = new FunctionSelection(this, _functionDock,
"functionSelection");
_functionSelection->setTopLevel(this);
@@ -339,7 +339,7 @@ void TopLevel::createDocks()
_functionDock->setWidget(_functionSelection);
_functionDock->setResizeEnabled(true);
_functionDock->setFixedExtentWidth(200);
- QWhatsThis::add( _functionSelection, i18n(
+ TQWhatsThis::add( _functionSelection, i18n(
"<b>The Flat Profile</b>"
"<p>The flat profile contains a group and a function "
"selection list. The group list contains all groups "
@@ -353,9 +353,9 @@ void TopLevel::createDocks()
"costs less than 1% are hidden on default.</p>"));
#if ENABLE_DUMPDOCK
- _dumpDock = new QDockWindow(QDockWindow::InDock, this);
+ _dumpDock = new TQDockWindow(TQDockWindow::InDock, this);
_dumpDock->setCaption(i18n("Profile Dumps"));
- _dumpDock->setCloseMode( QDockWindow::Always );
+ _dumpDock->setCloseMode( TQDockWindow::Always );
_dumpSelection = new DumpSelection(this, _dumpDock,
"dumpSelection");
_dumpSelection->setTopLevel(this);
@@ -363,7 +363,7 @@ void TopLevel::createDocks()
_dumpDock->setWidget(_dumpSelection);
_dumpDock->setResizeEnabled(true);
_dumpDock->setFixedExtentWidth(200);
- QWhatsThis::add( _dumpSelection, i18n(
+ TQWhatsThis::add( _dumpSelection, i18n(
"<b>Profile Dumps</b>"
"<p>This dockable shows in the top part the list of "
"loadable profile dumps in all subdirectories of: "
@@ -393,8 +393,8 @@ void TopLevel::createDocks()
#endif
// Restore QT Dock positions...
- KConfigGroup dockConfig(KGlobal::config(), QCString("Docks"));
- QString str = dockConfig.readEntry("Position", QString::null);
+ KConfigGroup dockConfig(KGlobal::config(), TQCString("Docks"));
+ TQString str = dockConfig.readEntry("Position", TQString::null);
if (0) qDebug("Docks/Position: '%s'", str.ascii());
if (str.isEmpty()) {
// default positions
@@ -408,7 +408,7 @@ void TopLevel::createDocks()
#endif
}
else {
- QTextStream ts( &str, IO_ReadOnly );
+ TQTextStream ts( &str, IO_ReadOnly );
ts >> *this;
}
_forcePartDock = dockConfig.readBoolEntry("ForcePartDockVisible", false);
@@ -420,8 +420,8 @@ void TopLevel::createDocks()
setAppropriate(_dumpDock, true);
setAppropriate(_functionDock, true);
- connect( _partDock, SIGNAL(contextMenuRequested(const QPoint &)),
- this, SLOT(showDockMenu(const QPoint &)));
+ connect( _partDock, TQT_SIGNAL(contextMenuRequested(const TQPoint &)),
+ this, TQT_SLOT(showDockMenu(const TQPoint &)));
#endif
}
@@ -439,7 +439,7 @@ void TopLevel::saveProperties(KConfig* c)
void TopLevel::readProperties(KConfig* c)
{
- QString traceName = c->readEntry("TraceName");
+ TQString traceName = c->readEntry("TraceName");
if (!traceName.isEmpty()) {
TraceData* d = new TraceData(this);
d->load(traceName);
@@ -449,19 +449,19 @@ void TopLevel::readProperties(KConfig* c)
void TopLevel::createLayoutActions()
{
- QString hint;
+ TQString hint;
KAction* action;
action = new KAction( i18n( "&Duplicate" ),
KShortcut(KKey("Ctrl+Plus")),
- this, SLOT(layoutDuplicate()),
+ this, TQT_SLOT(layoutDuplicate()),
actionCollection(), "layout_duplicate" );
hint = i18n("<b>Duplicate Current Layout</b>"
"<p>Make a copy of the current layout.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Remove" ), KShortcut(),
- this, SLOT(layoutRemove()),
+ this, TQT_SLOT(layoutRemove()),
actionCollection(), "layout_remove" );
hint = i18n("<b>Remove Current Layout</b>"
"<p>Delete current layout and make the previous active.</p>");
@@ -469,26 +469,26 @@ void TopLevel::createLayoutActions()
action = new KAction( i18n( "&Go to Next" ),
KShortcut(KKey("Ctrl+Right")),
- this, SLOT(layoutNext()),
+ this, TQT_SLOT(layoutNext()),
actionCollection(), "layout_next" );
hint = i18n("Go to Next Layout");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Go to Previous" ),
KShortcut(KKey("Ctrl+Left")),
- this, SLOT(layoutPrevious()),
+ this, TQT_SLOT(layoutPrevious()),
actionCollection(), "layout_previous" );
hint = i18n("Go to Previous Layout");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Restore to Default" ), KShortcut(),
- this, SLOT(layoutRestore()),
+ this, TQT_SLOT(layoutRestore()),
actionCollection(), "layout_restore" );
hint = i18n("Restore Layouts to Default");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Save as Default" ), KShortcut(),
- this, SLOT(layoutSave()),
+ this, TQT_SLOT(layoutSave()),
actionCollection(), "layout_save" );
hint = i18n("Save Layouts as Default");
action->setWhatsThis( hint );
@@ -497,15 +497,15 @@ void TopLevel::createLayoutActions()
// TODO: split this up...
void TopLevel::createMiscActions()
{
- QString hint;
+ TQString hint;
KAction* action;
- action = KStdAction::openNew(this, SLOT(newWindow()), actionCollection());
+ action = KStdAction::openNew(this, TQT_SLOT(newWindow()), actionCollection());
hint = i18n("<b>New</b><p>Open new empty KCachegrind window.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Add..." ), KShortcut(),
- this, SLOT(addTrace()),
+ this, TQT_SLOT(addTrace()),
actionCollection(), "file_add" );
hint = i18n("<b>Add Profile Data</b>"
"<p>This opens an additional profile data file in the current window.</p>");
@@ -518,13 +518,13 @@ void TopLevel::createMiscActions()
#else
KStdAccel::key(KStdAccel::Reload),
#endif
- this, SLOT( reload() ), actionCollection(), "reload" );
+ this, TQT_SLOT( reload() ), actionCollection(), "reload" );
hint = i18n("<b>Reload Profile Data</b>"
"<p>This loads any new created parts, too.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Export Graph" ), KShortcut(),
- this, SLOT(exportGraph()),
+ this, TQT_SLOT(exportGraph()),
actionCollection(), "export" );
hint = i18n("<b>Export Call Graph</b>"
@@ -540,7 +540,7 @@ void TopLevel::createMiscActions()
#else
KStdAccel::key(KStdAccel::Redo),
#endif
- this, SLOT( forceTrace() ),
+ this, TQT_SLOT( forceTrace() ),
actionCollection(), "dump" );
hint = i18n("<b>Force Dump</b>"
"<p>This forces a dump for a Callgrind profile run "
@@ -566,20 +566,20 @@ void TopLevel::createMiscActions()
"of the program.</p>");
_taDump->setWhatsThis( hint );
- action = KStdAction::open(this, SLOT(loadTrace()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(loadTrace()), actionCollection());
hint = i18n("<b>Open Profile Data</b>"
"<p>This opens a profile data file, with possible multiple parts</p>");
action->setToolTip( hint );
action->setWhatsThis( hint );
- _openRecent = KStdAction::openRecent(this, SLOT(loadTrace(const KURL&)),
+ _openRecent = KStdAction::openRecent(this, TQT_SLOT(loadTrace(const KURL&)),
actionCollection());
KStdAction::showStatusbar(this,
- SLOT(toggleStatusBar()), actionCollection());
+ TQT_SLOT(toggleStatusBar()), actionCollection());
_partDockShown = new KToggleAction(i18n("Parts Overview"), KShortcut(),
- this, SLOT(togglePartDock()),
+ this, TQT_SLOT(togglePartDock()),
actionCollection(),
"settings_show_partdock");
@@ -588,7 +588,7 @@ void TopLevel::createMiscActions()
_partDockShown->setWhatsThis( hint );
_stackDockShown = new KToggleAction(i18n("Call Stack"), KShortcut(),
- this, SLOT(toggleStackDock()),
+ this, TQT_SLOT(toggleStackDock()),
actionCollection(),
"settings_show_stackdock");
@@ -597,7 +597,7 @@ void TopLevel::createMiscActions()
_stackDockShown->setWhatsThis( hint );
_functionDockShown = new KToggleAction(i18n("Function Profile"), KShortcut(),
- this, SLOT(toggleFunctionDock()),
+ this, TQT_SLOT(toggleFunctionDock()),
actionCollection(),
"settings_show_profiledock");
@@ -607,7 +607,7 @@ void TopLevel::createMiscActions()
#if ENABLE_DUMPDOCK
_dumpDockShown = new KToggleAction(i18n("Profile Dumps"), KShortcut(),
- this, SLOT(toggleDumpDock()),
+ this, TQT_SLOT(toggleDumpDock()),
actionCollection(),
"settings_show_dumpdock");
@@ -618,7 +618,7 @@ void TopLevel::createMiscActions()
_taPercentage = new KToggleAction(i18n("Show Relative Costs"), "percent",
KShortcut(),
- this, SLOT(togglePercentage()),
+ this, TQT_SLOT(togglePercentage()),
actionCollection(),
"view_percentage");
#if KDE_VERSION >= 0x030290
@@ -632,7 +632,7 @@ void TopLevel::createMiscActions()
_taExpanded = new KToggleAction(i18n("Percentage Relative to Parent"), "move",
KShortcut(),
- this, SLOT(toggleExpanded()),
+ this, TQT_SLOT(toggleExpanded()),
actionCollection(),
"view_expanded");
@@ -657,7 +657,7 @@ void TopLevel::createMiscActions()
_taCycles = new KToggleAction( i18n( "Do Cycle Detection" ), "undo",
KShortcut(),
- this, SLOT( toggleCycles() ), actionCollection(),
+ this, TQT_SLOT( toggleCycles() ), actionCollection(),
"view_cycles" );
#if KDE_VERSION >= 0x030290
// for KDE 3.3: show another text instead of a checkmark
@@ -678,25 +678,25 @@ void TopLevel::createMiscActions()
"is the option to switch this off.");
_taCycles->setWhatsThis( hint );
- KStdAction::quit(this, SLOT(close()), actionCollection());
- KStdAction::preferences(this, SLOT(configure()), actionCollection());
- KStdAction::keyBindings(this, SLOT(configureKeys()), actionCollection());
- KStdAction::configureToolbars(this,SLOT(configureToolbars()),
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection());
+ KStdAction::configureToolbars(this,TQT_SLOT(configureToolbars()),
actionCollection());
#if 0
- action = KStdAction::back(_stackSelection, SLOT(browserBack()),
+ action = KStdAction::back(_stackSelection, TQT_SLOT(browserBack()),
actionCollection());
hint = i18n("Go back in function selection history");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::forward(_stackSelection, SLOT(browserForward()),
+ action = KStdAction::forward(_stackSelection, TQT_SLOT(browserForward()),
actionCollection());
hint = i18n("Go forward in function selection history");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::up(_stackSelection, SLOT(browserUp()),
+ action = KStdAction::up(_stackSelection, TQT_SLOT(browserUp()),
actionCollection());
hint = i18n("<b>Go Up</b>"
"<p>Go to last selected caller of current function. "
@@ -706,12 +706,12 @@ void TopLevel::createMiscActions()
#else
_paUp = new KToolBarPopupAction( i18n( "&Up" ), "up",
ALT+Key_Up,
- _stackSelection, SLOT( browserUp() ),
+ _stackSelection, TQT_SLOT( browserUp() ),
actionCollection(), "go_up" );
- connect( _paUp->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( upAboutToShow() ) );
- connect( _paUp->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( upActivated( int ) ) );
+ connect( _paUp->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( upAboutToShow() ) );
+ connect( _paUp->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( upActivated( int ) ) );
hint = i18n("<b>Go Up</b>"
"<p>Go to last selected caller of current function. "
"If no caller was visited, use that with highest cost.</p>");
@@ -720,24 +720,24 @@ void TopLevel::createMiscActions()
QPair< KGuiItem, KGuiItem > backForward = KStdGuiItem::backAndForward();
_paBack = new KToolBarPopupAction( backForward.first, ALT+Key_Left,
- _stackSelection, SLOT(browserBack()),
+ _stackSelection, TQT_SLOT(browserBack()),
actionCollection(), "go_back" );
- connect( _paBack->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( backAboutToShow() ) );
- connect( _paBack->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( backActivated( int ) ) );
+ connect( _paBack->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( backAboutToShow() ) );
+ connect( _paBack->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( backActivated( int ) ) );
hint = i18n("Go back in function selection history");
_paBack->setToolTip( hint );
_paBack->setWhatsThis( hint );
_paForward = new KToolBarPopupAction( backForward.second, ALT+Key_Right,
_stackSelection,
- SLOT(browserForward()),
+ TQT_SLOT(browserForward()),
actionCollection(), "go_forward" );
- connect( _paForward->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( forwardAboutToShow() ) );
- connect( _paForward->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( forwardActivated( int ) ) );
+ connect( _paForward->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( forwardAboutToShow() ) );
+ connect( _paForward->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( forwardActivated( int ) ) );
hint = i18n("Go forward in function selection history");
_paForward->setToolTip( hint );
_paForward->setWhatsThis( hint );
@@ -752,8 +752,8 @@ void TopLevel::createMiscActions()
// cost types are dependent on loaded data, thus KSelectAction
// is filled in setData()
- connect( _saCost, SIGNAL(activated(const QString&)),
- this, SLOT(costTypeSelected(const QString&)));
+ connect( _saCost, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(costTypeSelected(const TQString&)));
_saCost2 = new KSelectAction( i18n("Secondary Event Type"), KShortcut(),
actionCollection(), "view_cost_type2");
@@ -762,8 +762,8 @@ void TopLevel::createMiscActions()
_saCost2->setToolTip( hint );
_saCost2->setWhatsThis( hint );
- connect( _saCost2, SIGNAL(activated(const QString&)),
- this, SLOT(costType2Selected(const QString&)));
+ connect( _saCost2, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(costType2Selected(const TQString&)));
saGroup = new KSelectAction( i18n("Grouping"), KShortcut(),
actionCollection(), "view_group_type");
@@ -772,7 +772,7 @@ void TopLevel::createMiscActions()
saGroup->setToolTip( hint );
saGroup->setWhatsThis( hint );
- QStringList args;
+ TQStringList args;
args << i18n("(No Grouping)")
<< TraceCost::i18nTypeName(TraceItem::Object)
@@ -781,11 +781,11 @@ void TopLevel::createMiscActions()
<< TraceCost::i18nTypeName(TraceItem::FunctionCycle);
saGroup->setItems(args);
- connect( saGroup, SIGNAL(activated(int)),
- this, SLOT(groupTypeSelected(int)));
+ connect( saGroup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(groupTypeSelected(int)));
_taSplit = new KToggleAction(i18n("Split"), "view_left_right", KShortcut(),
- this, SLOT(splitSlot()),
+ this, TQT_SLOT(splitSlot()),
actionCollection(), "view_split");
hint = i18n("Show two information panels");
@@ -794,7 +794,7 @@ void TopLevel::createMiscActions()
_taSplitDir = new KToggleAction(i18n("Split Horizontal"),
"view_left_right", KShortcut(),
- this, SLOT(splitDirSlot()),
+ this, TQT_SLOT(splitDirSlot()),
actionCollection(), "view_split_dir");
hint = i18n("Change Split Orientation when main window is split.");
@@ -803,11 +803,11 @@ void TopLevel::createMiscActions()
// copied from KMail...
#if KDE_VERSION >= 308 // KDE 3.1
- KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() );
+ KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() );
#else
(void) new KAction( KGuiItem( i18n("Tip of the &Day..."), "idea",
i18n("Show \"Tip of the Day\"") ),
- 0, this, SLOT(slotShowTip()),
+ 0, this, TQT_SLOT(slotShowTip()),
actionCollection(), "help_show_tip" );
#endif
}
@@ -1020,7 +1020,7 @@ void TopLevel::loadTrace(const KURL& url)
if (url.isEmpty()) return;
// network transparancy
- QString tmpFile;
+ TQString tmpFile;
#if KDE_VERSION > 0x030190
// for KDE 3.2: KIO::NetAccess::download with 2 args is deprecated
if(KIO::NetAccess::download( url, tmpFile, this )) {
@@ -1035,7 +1035,7 @@ void TopLevel::loadTrace(const KURL& url)
}
}
-void TopLevel::loadTrace(QString file)
+void TopLevel::loadTrace(TQString file)
{
if (file.isEmpty()) return;
@@ -1057,7 +1057,7 @@ void TopLevel::loadTrace(QString file)
void TopLevel::addTrace()
{
- KURL url = KFileDialog::getOpenURL(QString::null,
+ KURL url = KFileDialog::getOpenURL(TQString::null,
i18n("cachegrind.out* callgrind.out*|Callgrind Profile Data\n*|All Files"),
this,
i18n("Add Callgrind Profile Data"));
@@ -1069,7 +1069,7 @@ void TopLevel::addTrace(const KURL& url)
if (url.isEmpty()) return;
// network transparancy
- QString tmpFile;
+ TQString tmpFile;
#if KDE_VERSION > 0x030190
// for KDE 3.2: KIO::NetAccess::download with 2 args is deprecated
if(KIO::NetAccess::download( url, tmpFile, this )) {
@@ -1084,7 +1084,7 @@ void TopLevel::addTrace(const KURL& url)
}
}
-void TopLevel::addTrace(QString file)
+void TopLevel::addTrace(TQString file)
{
if (file.isEmpty()) return;
@@ -1104,10 +1104,10 @@ void TopLevel::addTrace(QString file)
-void TopLevel::loadDelayed(QString file)
+void TopLevel::loadDelayed(TQString file)
{
_loadTraceDelayed = file;
- QTimer::singleShot(0, this, SLOT(loadTraceDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadTraceDelayed()));
}
void TopLevel::loadTraceDelayed()
@@ -1115,13 +1115,13 @@ void TopLevel::loadTraceDelayed()
if (_loadTraceDelayed.isEmpty()) return;
loadTrace(_loadTraceDelayed);
- _loadTraceDelayed = QString::null;
+ _loadTraceDelayed = TQString::null;
}
void TopLevel::reload()
{
- QString trace;
+ TQString trace;
if (!_data || _data->parts().count()==0)
trace = "."; // open first trace found in dir
else
@@ -1137,17 +1137,17 @@ void TopLevel::exportGraph()
{
if (!_data || !_function) return;
- QString n = QString("callgraph.dot");
+ TQString n = TQString("callgraph.dot");
GraphExporter ge(_data, _function, _costType, _groupType, n);
ge.writeDot();
- QString cmd = QString("(dot %1 -Tps > %2.ps; kghostview %3.ps)&")
+ TQString cmd = TQString("(dot %1 -Tps > %2.ps; kghostview %3.ps)&")
.arg(n).arg(n).arg(n);
- system(QFile::encodeName( cmd ));
+ system(TQFile::encodeName( cmd ));
}
-bool TopLevel::setCostType(QString s)
+bool TopLevel::setCostType(TQString s)
{
TraceCostType* ct;
@@ -1159,7 +1159,7 @@ bool TopLevel::setCostType(QString s)
return setCostType(ct);
}
-bool TopLevel::setCostType2(QString s)
+bool TopLevel::setCostType2(TQString s)
{
TraceCostType* ct;
@@ -1169,7 +1169,7 @@ bool TopLevel::setCostType2(QString s)
return setCostType2(ct);
}
-void TopLevel::costTypeSelected(const QString& s)
+void TopLevel::costTypeSelected(const TQString& s)
{
TraceCostType* ct;
@@ -1177,7 +1177,7 @@ void TopLevel::costTypeSelected(const QString& s)
setCostType(ct);
}
-void TopLevel::costType2Selected(const QString& s)
+void TopLevel::costType2Selected(const TQString& s)
{
TraceCostType* ct;
@@ -1192,8 +1192,8 @@ bool TopLevel::setCostType(TraceCostType* ct)
if (ct) {
int idx=0;
- QStringList l = _saCost->items();
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
+ TQStringList l = _saCost->items();
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
if (*it == ct->longName())
_saCost->setCurrentItem(idx);
}
@@ -1218,11 +1218,11 @@ bool TopLevel::setCostType2(TraceCostType* ct)
if (_costType2 == ct) return false;
_costType2 = ct;
- QString longName = ct ? ct->longName() : i18n("(Hidden)");
+ TQString longName = ct ? ct->longName() : i18n("(Hidden)");
int idx=0;
- QStringList l = _saCost2->items();
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
+ TQStringList l = _saCost2->items();
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
if (*it == longName)
_saCost2->setCurrentItem(idx);
}
@@ -1254,7 +1254,7 @@ void TopLevel::groupTypeSelected(int cg)
}
}
-bool TopLevel::setGroupType(QString s)
+bool TopLevel::setGroupType(TQString s)
{
TraceItem::CostType gt;
@@ -1308,7 +1308,7 @@ bool TopLevel::setGroupType(TraceItem::CostType gt)
return true;
}
-bool TopLevel::setGroup(QString s)
+bool TopLevel::setGroup(TQString s)
{
return true;
TraceCostItem* ci = _functionSelection->group(s);
@@ -1335,7 +1335,7 @@ bool TopLevel::setGroup(TraceCostItem* g)
return true;
}
-bool TopLevel::setFunction(QString s)
+bool TopLevel::setFunction(TQString s)
{
if (!_data) return false;
@@ -1386,13 +1386,13 @@ bool TopLevel::setFunction(TraceFunction* f)
void TopLevel::setCostTypeDelayed(TraceCostType* ct)
{
_costTypeDelayed = ct;
- QTimer::singleShot (0, this, SLOT(setCostTypeDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setCostTypeDelayed()));
}
void TopLevel::setCostType2Delayed(TraceCostType* ct)
{
_costType2Delayed = ct;
- QTimer::singleShot (0, this, SLOT(setCostType2Delayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setCostType2Delayed()));
}
void TopLevel::setCostTypeDelayed()
@@ -1408,7 +1408,7 @@ void TopLevel::setCostType2Delayed()
void TopLevel::setGroupTypeDelayed(TraceItem::CostType gt)
{
_groupTypeDelayed = gt;
- QTimer::singleShot (0, this, SLOT(setGroupTypeDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setGroupTypeDelayed()));
}
void TopLevel::setGroupTypeDelayed()
@@ -1425,7 +1425,7 @@ void TopLevel::setGroupDelayed(TraceCostItem* g)
#endif
_groupDelayed = g;
- QTimer::singleShot (0, this, SLOT(setGroupDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setGroupDelayed()));
}
void TopLevel::setGroupDelayed()
@@ -1436,7 +1436,7 @@ void TopLevel::setGroupDelayed()
void TopLevel::setDirectionDelayed(TraceItemView::Direction d)
{
_directionDelayed = d;
- QTimer::singleShot (0, this, SLOT(setDirectionDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setDirectionDelayed()));
}
void TopLevel::setDirectionDelayed()
@@ -1484,7 +1484,7 @@ void TopLevel::setTraceItemDelayed(TraceItem* i)
_lastSender ? _lastSender->name() :"0" );
#endif
- QTimer::singleShot (0, this, SLOT(setTraceItemDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setTraceItemDelayed()));
}
void TopLevel::setTraceItemDelayed()
@@ -1553,7 +1553,7 @@ void TopLevel::setData(TraceData* data)
_data = data;
// fill cost type list
- QStringList types;
+ TQStringList types;
if (_data) {
/* add all supported virtual types */
@@ -1591,7 +1591,7 @@ void TopLevel::setData(TraceData* data)
restoreTraceSettings();
- QString caption;
+ TQString caption;
if (_data) {
caption = _data->traceName();
if (!_data->command().isEmpty())
@@ -1611,15 +1611,15 @@ void TopLevel::setData(TraceData* data)
updateStatusBar();
}
-void TopLevel::addCostMenu(QPopupMenu* popup, bool withCost2)
+void TopLevel::addCostMenu(TQPopupMenu* popup, bool withCost2)
{
if (_data) {
- QPopupMenu *popup1 = new QPopupMenu(popup);
- QPopupMenu *popup2 = 0;
+ TQPopupMenu *popup1 = new TQPopupMenu(popup);
+ TQPopupMenu *popup2 = 0;
popup1->setCheckable(true);
if (withCost2) {
- popup2 = new QPopupMenu(popup);
+ popup2 = new TQPopupMenu(popup);
popup2->setCheckable(true);
if (_costType2) {
@@ -1649,18 +1649,18 @@ void TopLevel::addCostMenu(QPopupMenu* popup, bool withCost2)
}
}
popup->insertItem(i18n("Primary Event Type"), popup1);
- connect(popup1,SIGNAL(activated(int)),this,SLOT(setCostType(int)));
+ connect(popup1,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setCostType(int)));
if (popup2) {
popup->insertItem(i18n("Secondary Event Type"), popup2);
- connect(popup2,SIGNAL(activated(int)),this,SLOT(setCostType2(int)));
+ connect(popup2,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setCostType2(int)));
}
}
if (_showPercentage)
popup->insertItem(i18n("Show Absolute Cost"),
- this, SLOT(setAbsoluteCost()));
+ this, TQT_SLOT(setAbsoluteCost()));
else
popup->insertItem(i18n("Show Relative Cost"),
- this, SLOT(setRelativeCost()));
+ this, TQT_SLOT(setRelativeCost()));
}
bool TopLevel::setCostType(int id)
@@ -1687,11 +1687,11 @@ bool TopLevel::setCostType2(int id)
return setCostType2(ct);
}
-void TopLevel::addGoMenu(QPopupMenu* popup)
+void TopLevel::addGoMenu(TQPopupMenu* popup)
{
- popup->insertItem(i18n("Go Back"), this, SLOT(goBack()));
- popup->insertItem(i18n("Go Forward"), this, SLOT(goForward()));
- popup->insertItem(i18n("Go Up"), this, SLOT(goUp()));
+ popup->insertItem(i18n("Go Back"), this, TQT_SLOT(goBack()));
+ popup->insertItem(i18n("Go Forward"), this, TQT_SLOT(goForward()));
+ popup->insertItem(i18n("Go Up"), this, TQT_SLOT(goUp()));
}
void TopLevel::goBack()
@@ -1709,30 +1709,30 @@ void TopLevel::goUp()
setDirectionDelayed(TraceItemView::Up);
}
-QString TopLevel::traceKey()
+TQString TopLevel::traceKey()
{
- if (!_data || _data->command().isEmpty()) return QString::null;
+ if (!_data || _data->command().isEmpty()) return TQString::null;
- QString name = _data->command();
- QString key;
+ TQString name = _data->command();
+ TQString key;
for (unsigned int l=0;l<name.length();l++)
if (name[l].isLetterOrNumber()) key += name[l];
- return QString("-") + key;
+ return TQString("-") + key;
}
void TopLevel::restoreTraceTypes()
{
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup cConfig(KGlobal::config(), QCString("CurrentState"));
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
+ KConfigGroup cConfig(KGlobal::config(), TQCString("CurrentState"));
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
- QString groupType, costType, costType2;
- groupType = pConfig.readEntry(QString("GroupType%1").arg(key));
- costType = pConfig.readEntry(QString("CostType%1").arg(key));
- costType2 = pConfig.readEntry(QString("CostType2%1").arg(key));
+ TQString groupType, costType, costType2;
+ groupType = pConfig.readEntry(TQString("GroupType%1").arg(key));
+ costType = pConfig.readEntry(TQString("CostType%1").arg(key));
+ costType2 = pConfig.readEntry(TQString("CostType2%1").arg(key));
if (groupType.isEmpty()) groupType = cConfig.readEntry("GroupType");
if (costType.isEmpty()) costType = cConfig.readEntry("CostType");
@@ -1746,9 +1746,9 @@ void TopLevel::restoreTraceTypes()
if (!_costType && !_saCost->items().isEmpty())
costTypeSelected(_saCost->items().first());
- KConfigGroup aConfig(KGlobal::config(), QCString("Layouts"));
- _layoutCount = aConfig.readNumEntry(QString("Count%1").arg(key), 0);
- _layoutCurrent = aConfig.readNumEntry(QString("Current%1").arg(key), 0);
+ KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts"));
+ _layoutCount = aConfig.readNumEntry(TQString("Count%1").arg(key), 0);
+ _layoutCurrent = aConfig.readNumEntry(TQString("Current%1").arg(key), 0);
if (_layoutCount == 0) layoutRestore();
updateLayoutActions();
}
@@ -1763,10 +1763,10 @@ void TopLevel::restoreTraceSettings()
{
if (!_data) return;
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
- QString group = pConfig.readEntry(QString("Group%1").arg(key));
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
+ TQString group = pConfig.readEntry(TQString("Group%1").arg(key));
if (!group.isEmpty()) setGroup(group);
restoreCurrentState(key);
@@ -1787,7 +1787,7 @@ void TopLevel::layoutDuplicate()
{
// save current and allocate a new slot
_multiView->saveViewConfig(KGlobal::config(),
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
traceKey(), false);
_layoutCurrent = _layoutCount;
_layoutCount++;
@@ -1805,7 +1805,7 @@ void TopLevel::layoutRemove()
if (_layoutCurrent == from) { _layoutCurrent--; from--; }
// restore from last and decrement count
_multiView->readViewConfig(KGlobal::config(),
- QString("Layout%1-MainView").arg(from),
+ TQString("Layout%1-MainView").arg(from),
traceKey(), false);
_layoutCount--;
@@ -1817,16 +1817,16 @@ void TopLevel::layoutNext()
if (_layoutCount <2) return;
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
_layoutCurrent++;
if (_layoutCurrent == _layoutCount) _layoutCurrent = 0;
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
if (0) kdDebug() << "TopLevel::layoutNext: current "
@@ -1838,16 +1838,16 @@ void TopLevel::layoutPrevious()
if (_layoutCount <2) return;
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
_layoutCurrent--;
if (_layoutCurrent <0) _layoutCurrent = _layoutCount-1;
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
if (0) kdDebug() << "TopLevel::layoutPrevious: current "
@@ -1857,26 +1857,26 @@ void TopLevel::layoutPrevious()
void TopLevel::layoutSave()
{
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
for(int i=0;i<_layoutCount;i++) {
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(i),
+ TQString("Layout%1-MainView").arg(i),
key, false);
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(i),
- QString(), false);
+ TQString("Layout%1-MainView").arg(i),
+ TQString(), false);
}
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
- KConfigGroup aConfig(config, QCString("Layouts"));
+ KConfigGroup aConfig(config, TQCString("Layouts"));
aConfig.writeEntry("DefaultCount", _layoutCount);
aConfig.writeEntry("DefaultCurrent", _layoutCurrent);
}
@@ -1884,7 +1884,7 @@ void TopLevel::layoutSave()
void TopLevel::layoutRestore()
{
KConfig* config = KGlobal::config();
- KConfigGroup aConfig(config, QCString("Layouts"));
+ KConfigGroup aConfig(config, TQCString("Layouts"));
_layoutCount = aConfig.readNumEntry("DefaultCount", 0);
_layoutCurrent = aConfig.readNumEntry("DefaultCurrent", 0);
if (_layoutCount == 0) {
@@ -1892,18 +1892,18 @@ void TopLevel::layoutRestore()
return;
}
- QString key = traceKey();
+ TQString key = traceKey();
for(int i=0;i<_layoutCount;i++) {
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(i),
- QString(), false);
+ TQString("Layout%1-MainView").arg(i),
+ TQString(), false);
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(i),
+ TQString("Layout%1-MainView").arg(i),
key, false);
}
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
updateLayoutActions();
@@ -1934,7 +1934,7 @@ void TopLevel::updateStatusBar()
return;
}
- QString status = QString("%1 [%2] - ")
+ TQString status = TQString("%1 [%2] - ")
.arg(_data->shortTraceName())
.arg(_data->activePartRange());
@@ -1956,7 +1956,7 @@ void TopLevel::updateStatusBar()
/* Not working... should give group of selected function
if (_groupType != TraceItem::Function) {
- status += QString(" - %1 '%2'")
+ status += TQString(" - %1 '%2'")
.arg(TraceItem::i18nTypeName(_groupType))
.arg(_group ? _group->prettyName() : i18n("(None)"));
}
@@ -1991,7 +1991,7 @@ bool TopLevel::queryExit()
Configuration::setShowCycles(_showCycles);
Configuration::saveOptions(KGlobal::config());
- saveCurrentState(QString::null);
+ saveCurrentState(TQString::null);
// save QT dock positions...
@@ -1999,9 +1999,9 @@ bool TopLevel::queryExit()
// Its already stored.
delete toolBar();
- KConfigGroup dockConfig(KGlobal::config(), QCString("Docks"));
- QString str;
- QTextStream ts( &str, IO_WriteOnly );
+ KConfigGroup dockConfig(KGlobal::config(), TQCString("Docks"));
+ TQString str;
+ TQTextStream ts( &str, IO_WriteOnly );
ts << *this;
#if 1
dockConfig.writeEntry("Position", str);
@@ -2071,7 +2071,7 @@ void TopLevel::slotShowTipOnStart() {
}
void TopLevel::slotShowTip() {
- KTipDialog::showTip( this, QString::null, true );
+ KTipDialog::showTip( this, TQString::null, true );
}
void TopLevel::dummySlot()
@@ -2103,7 +2103,7 @@ void TopLevel::activePartsChangedSlot(const TracePartList& list)
void TopLevel::partsHideSelectedSlotDelayed()
{
- QTimer::singleShot( 0, this, SLOT(partsHideSelectedSlot()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(partsHideSelectedSlot()) );
}
// this puts selected parts into hidden list,
@@ -2136,7 +2136,7 @@ void TopLevel::partsHideSelectedSlot()
void TopLevel::partsUnhideAllSlotDelayed()
{
- QTimer::singleShot( 0, this, SLOT(partsUnhideAllSlot()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(partsUnhideAllSlot()) );
}
// this unhides all hidden parts. Does NOT change selection
@@ -2157,14 +2157,14 @@ void TopLevel::forceTrace()
// qDebug("forceTrace");
// Needs Callgrind now...
- QFile cmd("callgrind.cmd");
+ TQFile cmd("callgrind.cmd");
if (!cmd.exists()) {
cmd.open(IO_WriteOnly);
cmd.writeBlock("DUMP\n", 5);
cmd.close();
}
if (_taDump->isChecked())
- QTimer::singleShot( 1000, this, SLOT(forceTraceReload()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) );
else {
// cancel request
cmd.remove();
@@ -2176,10 +2176,10 @@ void TopLevel::forceTraceReload()
{
// qDebug("forceTraceReload");
- QFile cmd("callgrind.cmd");
+ TQFile cmd("callgrind.cmd");
if (cmd.exists()) {
if (_taDump->isChecked())
- QTimer::singleShot( 1000, this, SLOT(forceTraceReload()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) );
return;
}
_taDump->setChecked(false);
@@ -2188,7 +2188,7 @@ void TopLevel::forceTraceReload()
void TopLevel::forwardAboutToShow()
{
- QPopupMenu *popup = _paForward->popupMenu();
+ TQPopupMenu *popup = _paForward->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2211,7 +2211,7 @@ void TopLevel::forwardAboutToShow()
f = hi->function();
if (!f) break;
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2224,7 +2224,7 @@ void TopLevel::forwardAboutToShow()
void TopLevel::backAboutToShow()
{
- QPopupMenu *popup = _paBack->popupMenu();
+ TQPopupMenu *popup = _paBack->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2247,7 +2247,7 @@ void TopLevel::backAboutToShow()
f = hi->function();
if (!f) break;
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2260,7 +2260,7 @@ void TopLevel::backAboutToShow()
void TopLevel::upAboutToShow()
{
- QPopupMenu *popup = _paUp->popupMenu();
+ TQPopupMenu *popup = _paUp->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2279,7 +2279,7 @@ void TopLevel::upAboutToShow()
int count = 1;
while (count<Configuration::maxSymbolCount() && f) {
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2339,13 +2339,13 @@ void TopLevel::upActivated(int id)
}
-void TopLevel::showMessage(const QString& msg, int ms)
+void TopLevel::showMessage(const TQString& msg, int ms)
{
if (_statusbar)
_statusbar->message(msg, ms);
}
-void TopLevel::showStatus(QString msg, int progress)
+void TopLevel::showStatus(TQString msg, int progress)
{
static bool msgUpdateNeeded = true;
@@ -2371,7 +2371,7 @@ void TopLevel::showStatus(QString msg, int progress)
if (_progressStart.elapsed() < 500) return;
if (!_progressBar) {
- _progressBar = new QProgressBar(_statusbar);
+ _progressBar = new TQProgressBar(_statusbar);
_progressBar->setMaximumSize(200, _statusbar->height()-4);
_statusbar->addWidget(_progressBar, 1, true);
_progressBar->show();
@@ -2388,8 +2388,8 @@ void TopLevel::showStatus(QString msg, int progress)
// let the progress bar update itself
#if (QT_VERSION-0 >= 0x030100)
- QEventLoop* l = qApp->eventLoop();
- if (l) l->processEvents(QEventLoop::ExcludeUserInput);
+ TQEventLoop* l = qApp->eventLoop();
+ if (l) l->processEvents(TQEventLoop::ExcludeUserInput);
#else
// for Qt 3.0.x. This allows user input and thus potentially races
qApp->processEvents();
diff --git a/kcachegrind/kcachegrind/toplevel.h b/kcachegrind/kcachegrind/toplevel.h
index a1a4f0ae..c8614f84 100644
--- a/kcachegrind/kcachegrind/toplevel.h
+++ b/kcachegrind/kcachegrind/toplevel.h
@@ -23,7 +23,7 @@
#ifndef TOPLEVEL_H
#define TOPLEVEL_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <dcopobject.h>
#include <kmainwindow.h>
@@ -81,20 +81,20 @@ public:
bool showCycles() const { return _showCycles; }
/* convenience functions for often used context menu items */
- void addCostMenu(QPopupMenu*,bool);
- void addGoMenu(QPopupMenu*);
+ void addCostMenu(TQPopupMenu*,bool);
+ void addGoMenu(TQPopupMenu*);
public slots:
void newTrace();
void loadTrace();
void loadTrace(const KURL&);
- void loadTrace(QString);
+ void loadTrace(TQString);
void addTrace();
void addTrace(const KURL&);
- void addTrace(QString);
+ void addTrace(TQString);
// for quick showing the main window...
- void loadDelayed(QString);
+ void loadDelayed(TQString);
void reload();
void exportGraph();
@@ -113,8 +113,8 @@ public slots:
void updateLayoutActions();
void updateStatusBar();
- void costTypeSelected(const QString&);
- void costType2Selected(const QString&);
+ void costTypeSelected(const TQString&);
+ void costType2Selected(const TQString&);
void groupTypeSelected(int);
void splitSlot();
void splitDirSlot();
@@ -148,16 +148,16 @@ public slots:
bool setCostType(TraceCostType*);
bool setCostType2(TraceCostType*);
- bool setCostType(QString);
- bool setCostType2(QString);
+ bool setCostType(TQString);
+ bool setCostType2(TQString);
bool setCostType(int);
bool setCostType2(int);
bool setGroupType(TraceItem::CostType);
- bool setGroupType(QString);
+ bool setGroupType(TQString);
bool setGroup(TraceCostItem*);
- bool setGroup(QString);
+ bool setGroup(TQString);
bool setFunction(TraceFunction*);
- bool setFunction(QString);
+ bool setFunction(TQString);
void activePartsChangedSlot(const TracePartList& list);
void partsHideSelectedSlot();
void partsUnhideAllSlot();
@@ -195,8 +195,8 @@ public slots:
void slotShowTip();
// progress in status bar, empty message disables progress display
- void showStatus(QString msg, int progress);
- void showMessage(const QString&, int msec);
+ void showStatus(TQString msg, int progress);
+ void showMessage(const TQString&, int msec);
private:
void init();
@@ -204,15 +204,15 @@ private:
void createMiscActions();
void setupMainWidget(MainWidget*);
void setupPartSelection(PartSelection*);
- void restoreCurrentState(QString postfix);
- void saveCurrentState(QString postfix);
+ void restoreCurrentState(TQString postfix);
+ void saveCurrentState(TQString postfix);
void saveTraceSettings();
- QString traceKey();
+ TQString traceKey();
void restoreTraceTypes();
void restoreTraceSettings();
KStatusBar* _statusbar;
- QLabel* _statusLabel;
+ TQLabel* _statusLabel;
KRecentFilesAction* _openRecent;
bool _twoMainWidgets;
Orientation _spOrientation;
@@ -222,9 +222,9 @@ private:
DumpSelection* _dumpSelection;
PartSelection* _partSelection;
StackSelection* _stackSelection;
- QLineEdit* queryLineEdit;
+ TQLineEdit* queryLineEdit;
- QDockWindow *_partDock, *_stackDock, *_functionDock, *_dumpDock;
+ TQDockWindow *_partDock, *_stackDock, *_functionDock, *_dumpDock;
bool _forcePartDock;
KSelectAction *_saCost, *_saCost2, *saGroup;
@@ -235,7 +235,7 @@ private:
KToolBarPopupAction *_paForward, *_paBack, *_paUp;
TraceFunction* _function;
- const QObject* _lastSender;
+ const TQObject* _lastSender;
// trace data shown in this window
TraceData* _data;
@@ -259,13 +259,13 @@ private:
TraceItem::CostType _groupTypeDelayed;
TraceCostItem* _groupDelayed;
TraceItem* _traceItemDelayed;
- QString _loadTraceDelayed;
+ TQString _loadTraceDelayed;
TraceItemView::Direction _directionDelayed;
// for status progress display
- QString _progressMsg;
- QTime _progressStart;
- QProgressBar* _progressBar;
+ TQString _progressMsg;
+ TQTime _progressStart;
+ TQProgressBar* _progressBar;
// toplevel configuration options
bool _showPercentage, _showExpanded, _showCycles;
diff --git a/kcachegrind/kcachegrind/tracedata.cpp b/kcachegrind/kcachegrind/tracedata.cpp
index 5b2101dc..4e6a625c 100644
--- a/kcachegrind/kcachegrind/tracedata.cpp
+++ b/kcachegrind/kcachegrind/tracedata.cpp
@@ -19,10 +19,10 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -70,32 +70,32 @@ int Addr::set(const char *s)
}
-QString Addr::toString() const
+TQString Addr::toString() const
{
- if (_v == 0) return QString("0");
+ if (_v == 0) return TQString("0");
uint64 n = _v;
- QString hex;
+ TQString hex;
#if (QT_VERSION-0 >= 0x030200)
hex.reserve(16);
#endif
while(n>0) {
int d = (n & 15);
- hex = QChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
+ hex = TQChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
n /= 16;
}
return hex;
}
-QString Addr::pretty() const
+TQString Addr::pretty() const
{
- if (_v == 0) return QString("0");
+ if (_v == 0) return TQString("0");
uint64 n = _v;
int p = 0;
- QString hex;
+ TQString hex;
#if (QT_VERSION-0 >= 0x030200)
hex.reserve(20);
#endif
@@ -103,7 +103,7 @@ QString Addr::pretty() const
while(n>0) {
int d = (n & 15);
if ((p>0) && ((p%4)==0)) hex = " " + hex;
- hex = QChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
+ hex = TQChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
n /= 16;
p++;
}
@@ -121,8 +121,8 @@ bool Addr::isInRange(Addr a, int distance)
//---------------------------------------------------
// TraceItem
-QString* TraceItem::_typeName = 0;
-QString* TraceItem::_i18nTypeName = 0;
+TQString* TraceItem::_typeName = 0;
+TQString* TraceItem::_i18nTypeName = 0;
TraceItem::TraceItem()
{
@@ -146,13 +146,13 @@ void TraceItem::cleanup()
}
}
-QString TraceItem::typeName(CostType t)
+TQString TraceItem::typeName(CostType t)
{
if (!_typeName) {
- _typeName = new QString [MaxCostType+1];
- QString* strs = _typeName;
+ _typeName = new TQString [MaxCostType+1];
+ TQString* strs = _typeName;
for(int i=0;i<=MaxCostType;i++)
- strs[i] = QString("?");
+ strs[i] = TQString("?");
strs[Item] = I18N_NOOP("Abstract Item");
strs[Cost] = I18N_NOOP("Cost Item");
@@ -187,7 +187,7 @@ QString TraceItem::typeName(CostType t)
return _typeName[t];
}
-TraceItem::CostType TraceItem::costType(QString s)
+TraceItem::CostType TraceItem::costType(TQString s)
{
// This is the default cost Type
if (s.isEmpty()) return Function;
@@ -202,10 +202,10 @@ TraceItem::CostType TraceItem::costType(QString s)
}
// all strings of typeName() are translatable because of I18N_NOOP there
-QString TraceItem::i18nTypeName(CostType t)
+TQString TraceItem::i18nTypeName(CostType t)
{
if (!_i18nTypeName) {
- _i18nTypeName = new QString [MaxCostType+1];
+ _i18nTypeName = new TQString [MaxCostType+1];
for(int i=0;i<=MaxCostType;i++)
_i18nTypeName[i] = i18n(typeName((CostType)i).utf8().data());
}
@@ -213,7 +213,7 @@ QString TraceItem::i18nTypeName(CostType t)
return _i18nTypeName[t];
}
-TraceItem::CostType TraceItem::i18nCostType(QString s)
+TraceItem::CostType TraceItem::i18nCostType(TQString s)
{
// This is the default cost Type
if (s.isEmpty()) return Function;
@@ -234,12 +234,12 @@ void TraceItem::clear()
}
-QString TraceItem::costString(TraceCostMapping*)
+TQString TraceItem::costString(TraceCostMapping*)
{
- return QString("(no cost)");
+ return TQString("(no cost)");
}
-QString TraceItem::name() const
+TQString TraceItem::name() const
{
if (part()) {
return i18n("%1 from %2")
@@ -253,22 +253,22 @@ QString TraceItem::name() const
return i18n("(unknown)");
}
-QString TraceItem::prettyName() const
+TQString TraceItem::prettyName() const
{
if (name().isEmpty()) return i18n("(unknown)");
return name();
}
-QString TraceItem::fullName() const
+TQString TraceItem::fullName() const
{
- return QString("%1 %2")
+ return TQString("%1 %2")
.arg(typeName(type())).arg(prettyName());
}
-QString TraceItem::toString()
+TQString TraceItem::toString()
{
- return QString("%1\n [%3]").arg(fullName()).arg(costString(0));
+ return TQString("%1\n [%3]").arg(fullName()).arg(costString(0));
}
void TraceItem::invalidate()
@@ -678,9 +678,9 @@ TraceCost TraceCost::diff(TraceCost* item)
return res;
}
-QString TraceCost::costString(TraceCostMapping* m)
+TQString TraceCost::costString(TraceCostMapping* m)
{
- QString res;
+ TQString res;
if (_dirty) update();
@@ -733,7 +733,7 @@ SubCost TraceCost::subCost(TraceCostType* t)
return _cachedCost;
}
-QString TraceCost::prettySubCost(TraceCostType* t)
+TQString TraceCost::prettySubCost(TraceCostType* t)
{
return subCost(t).pretty();
}
@@ -766,11 +766,11 @@ SubCost TraceJumpCost::followedCount()
return _followedCount;
}
-QString TraceJumpCost::costString(TraceCostMapping*)
+TQString TraceJumpCost::costString(TraceCostMapping*)
{
if (_dirty) update();
- return QString("%1/%2")
+ return TQString("%1/%2")
.arg(_followedCount.pretty())
.arg(_executedCount.pretty());
}
@@ -793,9 +793,9 @@ void TraceJumpCost::addCost(TraceJumpCost* item)
//---------------------------------------------------
// TraceCostType
-QPtrList<TraceCostType>* TraceCostType::_knownTypes = 0;
+TQPtrList<TraceCostType>* TraceCostType::_knownTypes = 0;
-TraceCostType::TraceCostType(QString name, QString longName, QString formula)
+TraceCostType::TraceCostType(TQString name, TQString longName, TQString formula)
{
_name = name;
_longName = longName;
@@ -809,7 +809,7 @@ TraceCostType::TraceCostType(QString name, QString longName, QString formula)
_coefficient[i] = 0;
}
-void TraceCostType::setFormula(QString formula)
+void TraceCostType::setFormula(TQString formula)
{
_formula = formula;
_realIndex = TraceCost::InvalidIndex;
@@ -830,7 +830,7 @@ void TraceCostType::setRealIndex(int i)
i=TraceCost::InvalidIndex;
_realIndex = i;
- _formula = QString::null;
+ _formula = TQString::null;
}
// checks for existing types and sets coefficients
@@ -852,10 +852,10 @@ bool TraceCostType::parseFormula()
for (int i=0; i<TraceCost::MaxRealIndex;i++)
_coefficient[i] = 0;
- QRegExp rx( "((?:\\+|\\-)?)\\s*(\\d*)\\s*\\*?\\s*(\\w+)" );
+ TQRegExp rx( "((?:\\+|\\-)?)\\s*(\\d*)\\s*\\*?\\s*(\\w+)" );
int factor, pos;
- QString costName;
+ TQString costName;
TraceCostType* costType;
pos = 0;
@@ -896,9 +896,9 @@ bool TraceCostType::parseFormula()
return true;
}
-QString TraceCostType::parsedFormula()
+TQString TraceCostType::parsedFormula()
{
- QString res;
+ TQString res;
if (!parseFormula()) return res;
@@ -911,13 +911,13 @@ QString TraceCostType::parsedFormula()
if (c>0) res += "+ ";
}
if (c<0) { res += "- "; c = -c; }
- res += QString::number(c);
+ res += TQString::number(c);
TraceCostType* t = _mapping->type(i);
if (!t) continue;
if (!t->name().isEmpty())
- res += QString(" * %1").arg(t->name());
+ res += TQString(" * %1").arg(t->name());
}
return res;
@@ -963,7 +963,7 @@ int TraceCostType::histCost(TraceCost* c, double total, double* hist)
-TraceCostType* TraceCostType::knownRealType(QString n)
+TraceCostType* TraceCostType::knownRealType(TQString n)
{
if (!_knownTypes) return 0;
@@ -977,7 +977,7 @@ TraceCostType* TraceCostType::knownRealType(QString n)
return 0;
}
-TraceCostType* TraceCostType::knownVirtualType(QString n)
+TraceCostType* TraceCostType::knownVirtualType(TQString n)
{
if (!_knownTypes) return 0;
@@ -999,7 +999,7 @@ void TraceCostType::add(TraceCostType* t)
t->setMapping(0);
if (!_knownTypes)
- _knownTypes = new QPtrList<TraceCostType>;
+ _knownTypes = new TQPtrList<TraceCostType>;
/* Already known? */
TraceCostType* kt;
@@ -1028,7 +1028,7 @@ int TraceCostType::knownTypeCount()
return _knownTypes->count();
}
-bool TraceCostType::remove(QString n)
+bool TraceCostType::remove(TQString n)
{
if (!_knownTypes) return false;
@@ -1051,9 +1051,9 @@ TraceCostType* TraceCostType::knownType(int i)
return _knownTypes->at(i);
}
-QColor TraceCostType::color()
+TQColor TraceCostType::color()
{
- if (!_mapping) return QColor();
+ if (!_mapping) return TQColor();
return _mapping->realColors()[_realIndex];
}
@@ -1078,7 +1078,7 @@ TraceCostMapping::~TraceCostMapping()
if (_virtual[i]) delete _virtual[i];
}
-TraceSubMapping* TraceCostMapping::subMapping(QString types, bool create)
+TraceSubMapping* TraceCostMapping::subMapping(TQString types, bool create)
{
// first check if there's enough space in the mapping
int newCount = 0;
@@ -1126,7 +1126,7 @@ TraceSubMapping* TraceCostMapping::subMapping(QString types, bool create)
}
-int TraceCostMapping::addReal(QString t)
+int TraceCostMapping::addReal(TQString t)
{
int index = realIndex(t);
if (index>=0) return index;
@@ -1227,7 +1227,7 @@ TraceCostType* TraceCostMapping::type(int t)
return 0;
}
-TraceCostType* TraceCostMapping::type(QString name)
+TraceCostType* TraceCostMapping::type(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1240,7 +1240,7 @@ TraceCostType* TraceCostMapping::type(QString name)
return 0;
}
-TraceCostType* TraceCostMapping::typeForLong(QString name)
+TraceCostType* TraceCostMapping::typeForLong(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->longName() == name))
@@ -1254,7 +1254,7 @@ TraceCostType* TraceCostMapping::typeForLong(QString name)
}
-int TraceCostMapping::realIndex(QString name)
+int TraceCostMapping::realIndex(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1263,7 +1263,7 @@ int TraceCostMapping::realIndex(QString name)
return TraceCost::InvalidIndex;
}
-int TraceCostMapping::index(QString name)
+int TraceCostMapping::index(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1322,7 +1322,7 @@ void TraceSubMapping::clear()
}
}
-bool TraceSubMapping::append(QString type, bool create)
+bool TraceSubMapping::append(TQString type, bool create)
{
if (!_mapping) return false;
int index = create ? _mapping->addReal(type) : _mapping->realIndex(type);
@@ -1363,14 +1363,14 @@ TraceCallCost::~TraceCallCost()
{}
-QString TraceCallCost::costString(TraceCostMapping* m)
+TQString TraceCallCost::costString(TraceCostMapping* m)
{
- return QString("%1, Calls %2")
+ return TQString("%1, Calls %2")
.arg(TraceCost::costString(m))
.arg(_callCount.pretty());
}
-QString TraceCallCost::prettyCallCount()
+TQString TraceCallCost::prettyCallCount()
{
return _callCount.pretty();
}
@@ -1405,9 +1405,9 @@ TraceInclusiveCost::TraceInclusiveCost()
TraceInclusiveCost::~TraceInclusiveCost()
{}
-QString TraceInclusiveCost::costString(TraceCostMapping* m)
+TQString TraceInclusiveCost::costString(TraceCostMapping* m)
{
- return QString("%1, Inclusive %2")
+ return TQString("%1, Inclusive %2")
.arg(TraceCost::costString(m))
.arg(_inclusive.costString(m));
}
@@ -1885,24 +1885,24 @@ TracePartFunction::TracePartFunction(TraceFunction* function,
TracePartFunction::~TracePartFunction()
{}
-QString TracePartFunction::prettyCalledCount()
+TQString TracePartFunction::prettyCalledCount()
{
return _calledCount.pretty();
}
-QString TracePartFunction::prettyCallingCount()
+TQString TracePartFunction::prettyCallingCount()
{
return _callingCount.pretty();
}
-QString TracePartFunction::costString(TraceCostMapping* m)
+TQString TracePartFunction::costString(TraceCostMapping* m)
{
update();
- QString res = TraceInclusiveCost::costString(m);
- res += QString(", called from %1: %2")
+ TQString res = TraceInclusiveCost::costString(m);
+ res += TQString(", called from %1: %2")
.arg(_calledContexts).arg(prettyCalledCount());
- res += QString(", calling from %1: %2")
+ res += TQString(", calling from %1: %2")
.arg(_callingContexts).arg(prettyCallingCount());
return res;
@@ -2137,10 +2137,10 @@ TracePartClass::TracePartClass(TraceClass* cls)
TracePartClass::~TracePartClass()
{}
-QString TracePartClass::prettyName() const
+TQString TracePartClass::prettyName() const
{
- return QString("%1 from %2")
- .arg( _dep->name().isEmpty() ? QString("(global)") : _dep->name())
+ return TQString("%1 from %2")
+ .arg( _dep->name().isEmpty() ? TQString("(global)") : _dep->name())
.arg(part()->name());
}
@@ -2234,9 +2234,9 @@ void TraceInstrJump::update()
#endif
}
-QString TraceInstrJump::name() const
+TQString TraceInstrJump::name() const
{
- return QString("jump at 0x%1 to 0x%2")
+ return TQString("jump at 0x%1 to 0x%2")
.arg(_instrFrom->addr().toString())
.arg(_instrTo->addr().toString());
}
@@ -2317,9 +2317,9 @@ TracePartLineJump* TraceLineJump::partLineJump(TracePart* part)
}
-QString TraceLineJump::name() const
+TQString TraceLineJump::name() const
{
- return QString("jump at %1 to %2")
+ return TQString("jump at %1 to %2")
.arg(_lineFrom->prettyName())
.arg(_lineTo->prettyName());
}
@@ -2397,9 +2397,9 @@ TracePartInstrCall* TraceInstrCall::partInstrCall(TracePart* part,
}
-QString TraceInstrCall::name() const
+TQString TraceInstrCall::name() const
{
- return QString("%1 at %2").arg(_call->name()).arg(_instr->name());
+ return TQString("%1 at %2").arg(_call->name()).arg(_instr->name());
}
@@ -2433,9 +2433,9 @@ TracePartLineCall* TraceLineCall::partLineCall(TracePart* part,
}
-QString TraceLineCall::name() const
+TQString TraceLineCall::name() const
{
- return QString("%1 at %2").arg(_call->name()).arg(_line->name());
+ return TQString("%1 at %2").arg(_call->name()).arg(_line->name());
}
@@ -2529,9 +2529,9 @@ void TraceCall::invalidateDynamicCost()
}
-QString TraceCall::name() const
+TQString TraceCall::name() const
{
- return QString("%1 => %2")
+ return TQString("%1 => %2")
.arg(_caller->name())
.arg(_called->name());
}
@@ -2582,7 +2582,7 @@ TraceFunction* TraceCall::called(bool skipCycle) const
return _called;
}
-QString TraceCall::callerName(bool skipCycle) const
+TQString TraceCall::callerName(bool skipCycle) const
{
if (!_caller) return i18n("(no caller)");
@@ -2590,7 +2590,7 @@ QString TraceCall::callerName(bool skipCycle) const
// if this call goes into a cycle, add the entry function
TraceFunctionCycle* c = _called->cycle();
if (c && _caller && (_caller->cycle() != c)) {
- QString via = _called->prettyName();
+ TQString via = _called->prettyName();
return i18n("%1 via %2").arg(_caller->prettyName()).arg(via);
}
}
@@ -2598,7 +2598,7 @@ QString TraceCall::callerName(bool skipCycle) const
return _caller->prettyName();
}
-QString TraceCall::calledName(bool skipCycle) const
+TQString TraceCall::calledName(bool skipCycle) const
{
if (!_called) return i18n("(no callee)");
@@ -2608,7 +2608,7 @@ QString TraceCall::calledName(bool skipCycle) const
if (c && _caller && (_caller->cycle() != c)) {
// HACK to get rid of cycle postfix...
_called->setCycle(0);
- QString via = _called->prettyName();
+ TQString via = _called->prettyName();
_called->setCycle(c);
return i18n("%1 via %2").arg(c->name()).arg(via);
}
@@ -2706,14 +2706,14 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall)
}
-QString TraceInstr::name() const
+TQString TraceInstr::name() const
{
- return QString("0x%1").arg(_addr.toString());
+ return TQString("0x%1").arg(_addr.toString());
}
-QString TraceInstr::prettyName() const
+TQString TraceInstr::prettyName() const
{
- return QString("0x%1").arg(_addr.toString());
+ return TQString("0x%1").arg(_addr.toString());
}
@@ -2821,19 +2821,19 @@ void TraceLine::addLineCall(TraceLineCall* lineCall)
}
-QString TraceLine::name() const
+TQString TraceLine::name() const
{
- QString fileShortName = _sourceFile->file()->shortName();
+ TQString fileShortName = _sourceFile->file()->shortName();
if (fileShortName.isEmpty())
return i18n("(unknown)");
- return QString("%1:%2")
+ return TQString("%1:%2")
.arg(fileShortName).arg(_lineno);
}
-QString TraceLine::prettyName() const
+TQString TraceLine::prettyName() const
{
- return QString("%1 [%2]")
+ return TQString("%1 [%2]")
.arg(name()).arg(_sourceFile->function()->prettyName());
}
@@ -2871,9 +2871,9 @@ TraceFunctionSource::~TraceFunctionSource()
if (_line0) delete _line0;
}
-QString TraceFunctionSource::name() const
+TQString TraceFunctionSource::name() const
{
- return QString("%1 for %2").arg(_file->name()).arg(_function->name());
+ return TQString("%1 for %2").arg(_file->name()).arg(_function->name());
}
uint TraceFunctionSource::firstLineno()
@@ -3221,7 +3221,7 @@ TraceAssoziation* TraceFunction::assoziation(int rtti)
// helper for prettyName
-bool TraceFunction::isUniquePrefix(QString prefix) const
+bool TraceFunction::isUniquePrefix(TQString prefix) const
{
TraceFunctionMap::ConstIterator it, it2;
it = it2 = _myMapIterator;
@@ -3237,9 +3237,9 @@ bool TraceFunction::isUniquePrefix(QString prefix) const
}
-QString TraceFunction::prettyName() const
+TQString TraceFunction::prettyName() const
{
- QString res = _name;
+ TQString res = _name;
if (_name.isEmpty())
return i18n("(unknown)");
@@ -3258,9 +3258,9 @@ QString TraceFunction::prettyName() const
// cycle members
if (_cycle) {
if (_cycle != this)
- res = QString("%1 <cycle %2>").arg(res).arg(_cycle->cycleNo());
+ res = TQString("%1 <cycle %2>").arg(res).arg(_cycle->cycleNo());
else
- res = QString("<cycle %2>").arg(_cycle->cycleNo());
+ res = TQString("<cycle %2>").arg(_cycle->cycleNo());
}
@@ -3270,9 +3270,9 @@ QString TraceFunction::prettyName() const
/*
* Returns location string: ELF object and source file(s).
*/
-QString TraceFunction::location(int maxFiles) const
+TQString TraceFunction::location(int maxFiles) const
{
- QString loc;
+ TQString loc;
// add object file with address range
if (_object) {
@@ -3283,9 +3283,9 @@ QString TraceFunction::location(int maxFiles) const
uint to = lastAddress();
if (from != 0 && to != 0) {
if (from == to)
- loc += QString(" (0x%1)").arg(to, 0, 16);
+ loc += TQString(" (0x%1)").arg(to, 0, 16);
else
- loc += QString(" (0x%1-0x%2)").arg(from, 0, 16).arg(to, 0, 16);
+ loc += TQString(" (0x%1-0x%2)").arg(from, 0, 16).arg(to, 0, 16);
}
#endif
}
@@ -3314,9 +3314,9 @@ QString TraceFunction::location(int maxFiles) const
to = sourceFile->lastLineno();
if (from != 0 && to != 0) {
if (from == to)
- loc += QString(" (%1)").arg(to);
+ loc += TQString(" (%1)").arg(to);
else
- loc += QString(" (%1-%2)").arg(from).arg(to);
+ loc += TQString(" (%1-%2)").arg(from).arg(to);
}
#endif
}
@@ -3325,37 +3325,37 @@ QString TraceFunction::location(int maxFiles) const
}
// pretty version is allowed to mangle the string...
-QString TraceFunction::prettyLocation(int maxFiles) const
+TQString TraceFunction::prettyLocation(int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return i18n("(unknown)");
return l;
}
-void TraceFunction::addPrettyLocation(QString& s, int maxFiles) const
+void TraceFunction::addPrettyLocation(TQString& s, int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return;
- s += QString(" (%1)").arg(l);
+ s += TQString(" (%1)").arg(l);
}
-QString TraceFunction::prettyNameWithLocation(int maxFiles) const
+TQString TraceFunction::prettyNameWithLocation(int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return prettyName();
- return QString("%1 (%2)").arg(prettyName()).arg(l);
+ return TQString("%1 (%2)").arg(prettyName()).arg(l);
}
-QString TraceFunction::info() const
+TQString TraceFunction::info() const
{
- QString l = location();
+ TQString l = location();
if (l.isEmpty())
- return QString("Function %1").arg(name());
+ return TQString("Function %1").arg(name());
- return QString("Function %1 (location %2)")
+ return TQString("Function %1 (location %2)")
.arg(name()).arg(l);
}
@@ -3549,12 +3549,12 @@ int TraceFunction::callingContexts()
return _callingContexts;
}
-QString TraceFunction::prettyCalledCount()
+TQString TraceFunction::prettyCalledCount()
{
return _calledCount.pretty();
}
-QString TraceFunction::prettyCallingCount()
+TQString TraceFunction::prettyCallingCount()
{
return _callingCount.pretty();
}
@@ -3715,7 +3715,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s D%02d > %s (%d)",
- QString().fill(' ', d).ascii(), d, prettyName().ascii(), pNo+1);
+ TQString().fill(' ', d).ascii(), d, prettyName().ascii(), pNo+1);
@@ -3749,7 +3749,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s Cum. %s, Max Caller %s, cut limit %s",
- QString().fill(' ', d).ascii(),
+ TQString().fill(' ', d).ascii(),
inclusive()->subCost(0).pretty().ascii(),
base.pretty().ascii(),
cutLimit.pretty().ascii());
@@ -3762,7 +3762,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
// cycle cut heuristic
if (calling->subCost(0) < cutLimit) {
if (0) qDebug("%s Cut call to %s (cum. %s)",
- QString().fill(' ', d).ascii(),
+ TQString().fill(' ', d).ascii(),
called->prettyName().ascii(),
calling->subCost(0).pretty().ascii());
@@ -3782,13 +3782,13 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s D%02d - %s (%d)",
- QString().fill(' ', d+1).ascii(), d+1,
+ TQString().fill(' ', d+1).ascii(), d+1,
called->prettyName().ascii(), called->_cycleLow);
}
else {
if (0)
qDebug("%s D%02d - %s (%d) [Not on stack]",
- QString().fill(' ', d+1).ascii(), d+1,
+ TQString().fill(' ', d+1).ascii(), d+1,
called->prettyName().ascii(), called->_cycleLow);
}
}
@@ -3821,7 +3821,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
}
if (0)
qDebug("%s D%02d < %s (%d)",
- QString().fill(' ', d).ascii(), d,
+ TQString().fill(' ', d).ascii(), d,
prettyName().ascii(), _cycleLow);
}
@@ -3955,7 +3955,7 @@ TraceFunctionCycle::TraceFunctionCycle(TraceFunction* f, int n)
_cycle = this;
setPosition(f->data());
- setName(QString("<cycle %1>").arg(n));
+ setName(TQString("<cycle %1>").arg(n));
// reset to attributes of base function
setFile(_base->file());
@@ -4019,10 +4019,10 @@ TraceClass::TraceClass()
TraceClass::~TraceClass()
{}
-QString TraceClass::prettyName() const
+TQString TraceClass::prettyName() const
{
if (_name.isEmpty())
- return QString("(global)");
+ return TQString("(global)");
return _name;
}
@@ -4129,7 +4129,7 @@ void TraceFile::addSourceFile(TraceFunctionSource* sourceFile)
-void TraceFile::setDirectory(const QString& dir)
+void TraceFile::setDirectory(const TQString& dir)
{
if (dir.endsWith("/"))
_dir = dir.left(dir.length()-1);
@@ -4137,7 +4137,7 @@ void TraceFile::setDirectory(const QString& dir)
_dir = dir;
}
-QString TraceFile::directory()
+TQString TraceFile::directory()
{
if (!_dir.isEmpty()) return _dir;
@@ -4145,14 +4145,14 @@ QString TraceFile::directory()
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
- if (lastIndex==0) return QString::null;
+ if (lastIndex==0) return TQString::null;
// without ending "/"
return _name.left(lastIndex-1);
}
-QString TraceFile::shortName() const
+TQString TraceFile::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.find("/", lastIndex)) >=0)
@@ -4161,9 +4161,9 @@ QString TraceFile::shortName() const
return _name.mid(lastIndex);
}
-QString TraceFile::prettyName() const
+TQString TraceFile::prettyName() const
{
- QString sn = shortName();
+ TQString sn = shortName();
if (sn.isEmpty())
return i18n("(unknown)");
@@ -4171,7 +4171,7 @@ QString TraceFile::prettyName() const
return sn;
}
-QString TraceFile::prettyLongName() const
+TQString TraceFile::prettyLongName() const
{
if (_name.isEmpty())
return i18n("(unknown)");
@@ -4225,7 +4225,7 @@ void TraceObject::addFunction(TraceFunction* function)
}
// strip path
-void TraceObject::setName(const QString& name)
+void TraceObject::setName(const TQString& name)
{
_name = name;
@@ -4236,7 +4236,7 @@ void TraceObject::setName(const QString& name)
_shortName = _name.mid(lastIndex);
}
-QString TraceObject::prettyName() const
+TQString TraceObject::prettyName() const
{
if (_shortName.isEmpty())
return i18n("(unknown)");
@@ -4247,7 +4247,7 @@ QString TraceObject::prettyName() const
//---------------------------------------------------
// TracePart
-TracePart::TracePart(TraceData* data, QFile* file)
+TracePart::TracePart(TraceData* data, TQFile* file)
{
setPosition(data);
@@ -4291,7 +4291,7 @@ void TracePart::setProcessID(int pid)
// strip path
-QString TracePart::shortName() const
+TQString TracePart::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.find("/", lastIndex)) >=0)
@@ -4300,11 +4300,11 @@ QString TracePart::shortName() const
return _name.mid(lastIndex);
}
-QString TracePart::prettyName() const
+TQString TracePart::prettyName() const
{
- QString name = QString("%1.%2").arg(_pid).arg(_number);
+ TQString name = TQString("%1.%2").arg(_pid).arg(_number);
if (data()->maxThreadID()>1)
- name += QString("-%3").arg(_tid);
+ name += TQString("-%3").arg(_tid);
return name;
}
@@ -4338,9 +4338,9 @@ int TracePartList::compareItems ( Item item1, Item item2 )
(p1->threadID() - p2->threadID());
}
-QString TracePartList::names() const
+TQString TracePartList::names() const
{
- QString res;
+ TQString res;
TracePart* p;
TracePartList l = *this;
for (p=l.first();p;p=l.next()) {
@@ -4364,7 +4364,7 @@ TraceData::TraceData(TopLevel* top)
init();
}
-TraceData::TraceData(const QString& base)
+TraceData::TraceData(const TQString& base)
{
_topLevel = 0;
init();
@@ -4390,7 +4390,7 @@ TraceData::~TraceData()
if (_dynPool) delete _dynPool;
}
-QString TraceData::shortTraceName() const
+TQString TraceData::shortTraceName() const
{
int lastIndex = 0, index;
while ( (index=_traceName.find("/", lastIndex)) >=0)
@@ -4422,30 +4422,30 @@ DynPool* TraceData::dynPool()
* - <base> is a directory: Load first profile data file available
* - <base> is a file name without part/thread suffixes
*/
-void TraceData::load(const QString& base)
+void TraceData::load(const TQString& base)
{
bool baseExisting = true;
_traceName = base;
- QFileInfo finfo(base);
- QString file = finfo.fileName();
- QDir dir = finfo.dir();
+ TQFileInfo finfo(base);
+ TQString file = finfo.fileName();
+ TQDir dir = finfo.dir();
if (!finfo.exists()) {
baseExisting = false;
}
else if (finfo.isDir()) {
// search for first profile data file in directory
- dir = QDir(base);
+ dir = TQDir(base);
- QStringList prefixList;
+ TQStringList prefixList;
prefixList << "callgrind.out" << "cachegrind.out";
- for ( QStringList::Iterator it = prefixList.begin();
+ for ( TQStringList::Iterator it = prefixList.begin();
it != prefixList.end(); ++it ) {
file = *it;
// search for ".pid"
- QStringList strList = dir.entryList(file+".*", QDir::Files);
+ TQStringList strList = dir.entryList(file+".*", TQDir::Files);
if (strList.count()>0) {
int l = file.length();
file = strList.first();
@@ -4459,11 +4459,11 @@ void TraceData::load(const QString& base)
_traceName = dir.path() + "/" + file;
}
- QStringList strList;
- strList += dir.entryList(file+".*", QDir::Files);
- strList += dir.entryList(file+"-*", QDir::Files);
+ TQStringList strList;
+ strList += dir.entryList(file+".*", TQDir::Files);
+ strList += dir.entryList(file+"-*", TQDir::Files);
- baseExisting = QFile::exists(_traceName);
+ baseExisting = TQFile::exists(_traceName);
if (baseExisting)
strList << file;
@@ -4484,7 +4484,7 @@ void TraceData::load(const QString& base)
f *= 10;
}
- QStringList::Iterator it;
+ TQStringList::Iterator it;
unsigned int maxNumber = 0;
for (it = strList.begin(); it != strList.end(); ++it ) {
TracePart* p = addPart( dir.path(), *it );
@@ -4494,7 +4494,7 @@ void TraceData::load(const QString& base)
continue;
}
- const QString& str = *it;
+ const TQString& str = *it;
unsigned int pos = file.length();
// try to guess part number from file name
@@ -4535,24 +4535,24 @@ void TraceData::load(const QString& base)
updateFunctionCycles();
// clear loading messages from status bar
- if (_topLevel) _topLevel->showStatus(QString::null, 0);
+ if (_topLevel) _topLevel->showStatus(TQString::null, 0);
}
-TracePart* TraceData::addPart(const QString& dir, const QString& name)
+TracePart* TraceData::addPart(const TQString& dir, const TQString& name)
{
- QString filename = QString("%1/%2").arg(dir).arg(name);
+ TQString filename = TQString("%1/%2").arg(dir).arg(name);
#if TRACE_DEBUG
qDebug("TraceData::addPart('%s')", filename.ascii());
#endif
- QFile* file = new QFile(filename);
+ TQFile* file = new TQFile(filename);
Loader* l = Loader::matchingLoader(file);
if (!l) return 0;
if (_topLevel)
- _topLevel->connect(l, SIGNAL(updateStatus(QString, int)),
- SLOT(showStatus(QString, int)));
+ _topLevel->connect(l, TQT_SIGNAL(updateStatus(TQString, int)),
+ TQT_SLOT(showStatus(TQString, int)));
TracePart* part = new TracePart(this, file);
@@ -4615,7 +4615,7 @@ bool TraceData::activateAll(bool active)
}
-TracePart* TraceData::part(QString& name)
+TracePart* TraceData::part(TQString& name)
{
TracePart* part;
for (part=_parts.first();part;part=_parts.next())
@@ -4624,9 +4624,9 @@ TracePart* TraceData::part(QString& name)
return 0;
}
-QString TraceData::activePartRange()
+TQString TraceData::activePartRange()
{
- QString res;
+ TQString res;
int r1=-1, r2=-1, count=1;
TracePart* part;
for (part=_parts.first();part;part=_parts.next(), count++)
@@ -4635,15 +4635,15 @@ QString TraceData::activePartRange()
else if (r2 == count-1) { r2 = count; }
else {
if (!res.isEmpty()) res += ";";
- if (r1==r2) res += QString::number(r1);
- else res += QString("%1-%2").arg(r1).arg(r2);
+ if (r1==r2) res += TQString::number(r1);
+ else res += TQString("%1-%2").arg(r1).arg(r2);
r1 = r2 = count;
}
}
if (r1>=0) {
if (!res.isEmpty()) res += ";";
- if (r1==r2) res += QString::number(r1);
- else res += QString("%1-%2").arg(r1).arg(r2);
+ if (r1==r2) res += TQString::number(r1);
+ else res += TQString("%1-%2").arg(r1).arg(r2);
}
return res;
@@ -4679,7 +4679,7 @@ void TraceData::invalidateDynamicCost()
}
-TraceObject* TraceData::object(const QString& name)
+TraceObject* TraceData::object(const TQString& name)
{
TraceObject& o = _objectMap[name];
if (!o.data()) {
@@ -4696,7 +4696,7 @@ TraceObject* TraceData::object(const QString& name)
}
-TraceFile* TraceData::file(const QString& name)
+TraceFile* TraceData::file(const TQString& name)
{
TraceFile& f = _fileMap[name];
if (!f.data()) {
@@ -4714,7 +4714,7 @@ TraceFile* TraceData::file(const QString& name)
// usually only called by function()
-TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
+TraceClass* TraceData::cls(const TQString& fnName, TQString& shortName)
{
int lastIndex = 0, index, pIndex;
@@ -4733,7 +4733,7 @@ TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
lastIndex = index+2;
}
- QString clsName = (lastIndex < 3) ? QString::null :
+ TQString clsName = (lastIndex < 3) ? TQString::null :
fnName.left(lastIndex-2);
shortName = fnName.mid(lastIndex);
@@ -4753,11 +4753,11 @@ TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
// name is inclusive class/namespace prefix
-TraceFunction* TraceData::function(const QString& name,
+TraceFunction* TraceData::function(const TQString& name,
TraceFile* file, TraceObject* object)
{
// strip class name
- QString shortName;
+ TQString shortName;
TraceClass* c = cls(name, shortName);
if (!file || !object || !c) {
@@ -4767,7 +4767,7 @@ TraceFunction* TraceData::function(const QString& name,
// Don't use file in key: A function can go over many files
// (inlined parts), but still is ONE function.
- QString key = name + object->shortName();
+ TQString key = name + object->shortName();
TraceFunctionMap::Iterator it;
it = _functionMap.find(key);
@@ -4801,7 +4801,7 @@ TraceFunctionMap::Iterator TraceData::functionIterator(TraceFunction* f)
{
// IMPORTANT: build as SAME key as used in function() above !!
- QString key;
+ TQString key;
if (f->cls()) key = f->cls()->name() + "::";
key += f->name();
@@ -4846,7 +4846,7 @@ void TraceData::update()
_dirty = false;
}
-TraceCost* TraceData::search(TraceItem::CostType t, QString name,
+TraceCost* TraceData::search(TraceItem::CostType t, TQString name,
TraceCostType* ct, TraceCost* parent)
{
TraceCost* result = 0;
@@ -5018,7 +5018,7 @@ void TraceData::updateFunctionCycles()
#if 0
int fCount = _functionMap.size(), fNo = 0, progress=0, p;
- QString msg = i18n("Recalculating Function Cycles...");
+ TQString msg = i18n("Recalculating Function Cycles...");
if (_topLevel) _topLevel->showStatus(msg,0);
#endif
@@ -5051,7 +5051,7 @@ void TraceData::updateFunctionCycles()
invalidateDynamicCost();
#if 0
- if (0) if (_topLevel) _topLevel->showStatus(QString::null,0);
+ if (0) if (_topLevel) _topLevel->showStatus(TQString::null,0);
#endif
}
diff --git a/kcachegrind/kcachegrind/tracedata.h b/kcachegrind/kcachegrind/tracedata.h
index fd9f802f..a238ba64 100644
--- a/kcachegrind/kcachegrind/tracedata.h
+++ b/kcachegrind/kcachegrind/tracedata.h
@@ -25,12 +25,12 @@
#ifndef TRACEDATA_H
#define TRACEDATA_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqcolor.h>
#include "subcost.h"
#include "utils.h"
@@ -161,35 +161,35 @@ class TraceFile;
class TracePart;
class TraceData;
-typedef QPtrList<TraceCost> TraceCostList;
-typedef QPtrList<TraceJumpCost> TraceJumpCostList;
-typedef QPtrList<TraceCallCost> TraceCallCostList;
-typedef QPtrList<TraceInclusiveCost> TraceInclusiveCostList;
-
-typedef QPtrList<TracePartCall> TracePartCallList;
-typedef QPtrList<TracePartInstr> TracePartInstrList;
-typedef QPtrList<TracePartLine> TracePartLineList;
-typedef QPtrList<TracePartLineRegion> TracePartLineRegionList;
-typedef QPtrList<TracePartFunction> TracePartFunctionList;
-typedef QPtrList<TracePartInstrCall> TracePartInstrCallList;
-typedef QPtrList<TracePartLineCall> TracePartLineCallList;
-
-
-typedef QPtrList<TraceInstr> TraceInstrList;
-typedef QPtrList<TraceLine> TraceLineList;
-typedef QPtrList<TraceInstrCall> TraceInstrCallList;
-typedef QPtrList<TraceLineCall> TraceLineCallList;
-typedef QPtrList<TraceCall> TraceCallList;
-typedef QPtrList<TraceFile> TraceFileList;
-typedef QPtrList<TraceLineRegion> TraceLineRegionList;
-typedef QPtrList<TraceFunctionSource> TraceFunctionSourceList;
-typedef QPtrList<TraceFunction> TraceFunctionList;
-typedef QPtrList<TraceFunctionCycle> TraceFunctionCycleList;
-typedef QMap<QString, TraceObject> TraceObjectMap;
-typedef QMap<QString, TraceClass> TraceClassMap;
-typedef QMap<QString, TraceFile> TraceFileMap;
-typedef QMap<QString, TraceFunction> TraceFunctionMap;
-typedef QMap<uint, TraceLine> TraceLineMap;
+typedef TQPtrList<TraceCost> TraceCostList;
+typedef TQPtrList<TraceJumpCost> TraceJumpCostList;
+typedef TQPtrList<TraceCallCost> TraceCallCostList;
+typedef TQPtrList<TraceInclusiveCost> TraceInclusiveCostList;
+
+typedef TQPtrList<TracePartCall> TracePartCallList;
+typedef TQPtrList<TracePartInstr> TracePartInstrList;
+typedef TQPtrList<TracePartLine> TracePartLineList;
+typedef TQPtrList<TracePartLineRegion> TracePartLineRegionList;
+typedef TQPtrList<TracePartFunction> TracePartFunctionList;
+typedef TQPtrList<TracePartInstrCall> TracePartInstrCallList;
+typedef TQPtrList<TracePartLineCall> TracePartLineCallList;
+
+
+typedef TQPtrList<TraceInstr> TraceInstrList;
+typedef TQPtrList<TraceLine> TraceLineList;
+typedef TQPtrList<TraceInstrCall> TraceInstrCallList;
+typedef TQPtrList<TraceLineCall> TraceLineCallList;
+typedef TQPtrList<TraceCall> TraceCallList;
+typedef TQPtrList<TraceFile> TraceFileList;
+typedef TQPtrList<TraceLineRegion> TraceLineRegionList;
+typedef TQPtrList<TraceFunctionSource> TraceFunctionSourceList;
+typedef TQPtrList<TraceFunction> TraceFunctionList;
+typedef TQPtrList<TraceFunctionCycle> TraceFunctionCycleList;
+typedef TQMap<TQString, TraceObject> TraceObjectMap;
+typedef TQMap<TQString, TraceClass> TraceClassMap;
+typedef TQMap<TQString, TraceFile> TraceFileMap;
+typedef TQMap<TQString, TraceFunction> TraceFunctionMap;
+typedef TQMap<uint, TraceLine> TraceLineMap;
/**
@@ -207,9 +207,9 @@ class Addr
// and return number of interpreted chars.
int set(const char *s);
bool set(FixString& s);
- QString toString() const;
+ TQString toString() const;
// similar to toString(), but adds a space every 4 digits
- QString pretty() const;
+ TQString pretty() const;
// returns true if this address is in [a-distance;a+distance]
bool isInRange(Addr a, int distance);
@@ -228,7 +228,7 @@ class Addr
uint64 _v;
};
-typedef QMap<Addr, TraceInstr> TraceInstrMap;
+typedef TQMap<Addr, TraceInstr> TraceInstrMap;
/**
@@ -261,39 +261,39 @@ public:
virtual CostType type() const { return Item; }
// conversion of item type to locale independent string (e.g. for config)
- static QString typeName(CostType);
- static CostType costType(QString);
+ static TQString typeName(CostType);
+ static CostType costType(TQString);
// the versions below should be used for user visible strings, as
// these use localisation settings
- static QString i18nTypeName(CostType);
- static CostType i18nCostType(QString);
+ static TQString i18nTypeName(CostType);
+ static CostType i18nCostType(TQString);
// clean up some static data
static void cleanup();
/**
* Returns dynamic name info (without type)
*/
- virtual QString name() const;
+ virtual TQString name() const;
/**
* Same as name, but sometimes nicer for humans :-)
*/
- virtual QString prettyName() const;
+ virtual TQString prettyName() const;
/**
* Returns text of all cost metrics
*/
- virtual QString costString(TraceCostMapping*);
+ virtual TQString costString(TraceCostMapping*);
/**
* Returns type name + dynamic name
*/
- QString fullName() const;
+ TQString fullName() const;
/**
* Returns full name + cost text
*/
- QString toString();
+ TQString toString();
/**
* Set all cost counters to zero
@@ -342,7 +342,7 @@ public:
TraceItem* _dep;
private:
- static QString *_typeName, *_i18nTypeName;
+ static TQString *_typeName, *_i18nTypeName;
};
@@ -368,7 +368,7 @@ public:
virtual ~TraceCost();
virtual CostType type() const { return Cost; }
- virtual QString costString(TraceCostMapping*);
+ virtual TQString costString(TraceCostMapping*);
virtual void clear();
@@ -403,7 +403,7 @@ public:
/** Returns a cost attribute converted to a string
* (with space after every 3 digits)
*/
- QString prettySubCost(TraceCostType*);
+ TQString prettySubCost(TraceCostType*);
protected:
virtual void update();
@@ -442,30 +442,30 @@ public:
* <longName> is a long localized string, e.g. "L1 Read Miss"
* <formula> uses short names to reference other types
*/
- TraceCostType(QString name,
- QString longName = QString::null,
- QString formula = QString::null);
+ TraceCostType(TQString name,
+ TQString longName = TQString::null,
+ TQString formula = TQString::null);
- void setName(QString n) { _name = n; }
- void setLongName(QString n) { _longName = n; }
+ void setName(TQString n) { _name = n; }
+ void setLongName(TQString n) { _longName = n; }
void setMapping(TraceCostMapping* m);
- void setFormula(QString);
+ void setFormula(TQString);
// default arg is for specifying a real type, but index unknown
void setRealIndex(int r = TraceCost::MaxRealIndex);
- const QString& name() { return _name; }
- const QString& longName() { return _longName; }
- const QString& formula() { return _formula; }
+ const TQString& name() { return _name; }
+ const TQString& longName() { return _longName; }
+ const TQString& formula() { return _formula; }
TraceCostMapping* mapping() { return _mapping; }
int realIndex() { return _realIndex; }
bool isReal() { return _formula.isEmpty(); }
- QColor color();
+ TQColor color();
/*
* returns true if all cost type names can be resolved in formula
*/
bool parseFormula();
- QString parsedFormula();
+ TQString parsedFormula();
SubCost subCost(TraceCost*);
@@ -478,23 +478,23 @@ public:
// application wide known types, referenced by short name
// next 2 functions return a new type object instance
- static TraceCostType* knownRealType(QString);
- static TraceCostType* knownVirtualType(QString);
+ static TraceCostType* knownRealType(TQString);
+ static TraceCostType* knownVirtualType(TQString);
static void add(TraceCostType*);
- static bool remove(QString);
+ static bool remove(TQString);
static int knownTypeCount();
static TraceCostType* knownType(int);
private:
- QString _name, _longName, _formula;
+ TQString _name, _longName, _formula;
TraceCostMapping* _mapping;
bool _parsed, _inParsing;
// index MaxRealIndex is for constant addition
int _coefficient[MaxRealIndexValue];
int _realIndex;
- static QPtrList<TraceCostType>* _knownTypes;
+ static TQPtrList<TraceCostType>* _knownTypes;
};
@@ -515,10 +515,10 @@ public:
* Defines a sub mapping with a list of real types
* If <create> is false, checks if this is a existing sub mapping.
*/
- TraceSubMapping* subMapping(QString types, bool create = true);
+ TraceSubMapping* subMapping(TQString types, bool create = true);
// "knows" about some real types
- int addReal(QString);
+ int addReal(TQString);
int add(TraceCostType*);
bool remove(TraceCostType*);
int realCount() { return _realCount; }
@@ -527,11 +527,11 @@ public:
TraceCostType* type(int);
TraceCostType* realType(int);
TraceCostType* virtualType(int);
- TraceCostType* type(QString);
- TraceCostType* typeForLong(QString);
- int realIndex(QString);
- int index(QString);
- QColor* realColors() { return _realColor; }
+ TraceCostType* type(TQString);
+ TraceCostType* typeForLong(TQString);
+ int realIndex(TQString);
+ int index(TQString);
+ TQColor* realColors() { return _realColor; }
/**
* Adds all known virtual types that can be parsed
@@ -541,7 +541,7 @@ public:
private:
// we support only a fixed number of real and virtual types
TraceCostType* _real[MaxRealIndexValue];
- QColor _realColor[MaxRealIndexValue];
+ TQColor _realColor[MaxRealIndexValue];
TraceCostType* _virtual[MaxRealIndexValue];
int _realCount, _virtualCount;
};
@@ -565,7 +565,7 @@ class TraceSubMapping
public:
TraceSubMapping(TraceCostMapping*);
- bool append(QString, bool create=true);
+ bool append(TQString, bool create=true);
bool append(int);
void clear();
@@ -611,7 +611,7 @@ class TraceJumpCost: public TraceItem
virtual ~TraceJumpCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
void addCost(TraceJumpCost*);
@@ -638,12 +638,12 @@ class TraceCallCost: public TraceCost
virtual ~TraceCallCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
// additional cost metric
SubCost callCount();
- QString prettyCallCount();
+ TQString prettyCallCount();
void addCallCount(SubCost c);
protected:
@@ -661,7 +661,7 @@ class TraceInclusiveCost: public TraceCost
virtual ~TraceInclusiveCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
// additional cost metric
@@ -963,7 +963,7 @@ public:
virtual CostType type() const { return PartFunction; }
virtual void update();
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
void addPartInstr(TracePartInstr*);
void addPartLine(TracePartLine*);
@@ -991,8 +991,8 @@ public:
// additional cost metrics
SubCost calledCount();
SubCost callingCount();
- QString prettyCalledCount();
- QString prettyCallingCount();
+ TQString prettyCalledCount();
+ TQString prettyCallingCount();
int calledContexts();
int callingContexts();
@@ -1026,7 +1026,7 @@ public:
virtual ~TracePartClass();
virtual CostType type() const { return PartClass; }
- QString prettyName() const;
+ TQString prettyName() const;
TraceClass* cls() { return (TraceClass*)_dep; }
void addPartFunction(TracePartFunction* f) { addDep(f); }
@@ -1073,28 +1073,28 @@ public:
class TracePart: public TraceListCost
{
public:
- TracePart(TraceData*, QFile* file);
+ TracePart(TraceData*, TQFile* file);
virtual ~TracePart();
virtual CostType type() const { return Part; }
virtual TracePart* part() { return this; }
virtual const TracePart* part() const { return this; }
- QString shortName() const;
- QString prettyName() const;
- QFile* file() const { return _file; }
- QString name() const { return _name; }
- QString description() const { return _descr; }
- QString trigger() const { return _trigger; }
- QString timeframe() const { return _timeframe; }
- QString version() const { return _version; }
+ TQString shortName() const;
+ TQString prettyName() const;
+ TQFile* file() const { return _file; }
+ TQString name() const { return _name; }
+ TQString description() const { return _descr; }
+ TQString trigger() const { return _trigger; }
+ TQString timeframe() const { return _timeframe; }
+ TQString version() const { return _version; }
int partNumber() { return _number; }
int threadID() { return _tid; }
int processID() { return _pid; }
- void setDescription(const QString& d) { _descr = d; }
- void setTrigger(const QString& t) { _trigger = t; }
- void setTimeframe(const QString& t) { _timeframe = t; }
- void setVersion(const QString& v) { _version = v; }
+ void setDescription(const TQString& d) { _descr = d; }
+ void setTrigger(const TQString& t) { _trigger = t; }
+ void setTimeframe(const TQString& t) { _timeframe = t; }
+ void setVersion(const TQString& v) { _version = v; }
void setPartNumber(int n);
void setThreadID(int t);
void setProcessID(int p);
@@ -1108,12 +1108,12 @@ public:
bool isActive() { return _active; }
private:
- QFile* _file;
- QString _name;
- QString _descr;
- QString _trigger;
- QString _timeframe;
- QString _version;
+ TQFile* _file;
+ TQString _name;
+ TQString _descr;
+ TQString _trigger;
+ TQString _timeframe;
+ TQString _version;
int _number, _tid, _pid;
@@ -1127,10 +1127,10 @@ private:
};
-class TracePartList: public QPtrList<TracePart>
+class TracePartList: public TQPtrList<TracePart>
{
public:
- QString names() const;
+ TQString names() const;
protected:
int compareItems ( Item item1, Item item2 );
};
@@ -1153,7 +1153,7 @@ public:
virtual ~TraceInstrJump();
virtual CostType type() const { return InstrJump; }
- virtual QString name() const;
+ virtual TQString name() const;
virtual void update();
@@ -1171,7 +1171,7 @@ public:
TracePartInstrJump* _first;
};
-class TraceInstrJumpList: public QPtrList<TraceInstrJump>
+class TraceInstrJumpList: public TQPtrList<TraceInstrJump>
{
public:
TraceInstrJumpList() { _sortLow = true; }
@@ -1196,7 +1196,7 @@ class TraceLineJump: public TraceJumpListCost
virtual ~TraceLineJump();
virtual CostType type() const { return LineJump; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceLine* lineFrom() const { return _lineFrom; }
TraceLine* lineTo() const { return _lineTo; }
@@ -1214,7 +1214,7 @@ class TraceLineJump: public TraceJumpListCost
};
-class TraceLineJumpList: public QPtrList<TraceLineJump>
+class TraceLineJumpList: public TQPtrList<TraceLineJump>
{
public:
TraceLineJumpList() { _sortLow = true; }
@@ -1238,7 +1238,7 @@ class TraceInstrCall: public TraceCallListCost
virtual ~TraceInstrCall();
virtual CostType type() const { return InstrCall; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceInstr* instr() const { return _instr; }
TraceCall* call() const { return _call; }
@@ -1265,7 +1265,7 @@ class TraceLineCall: public TraceCallListCost
virtual ~TraceLineCall();
virtual CostType type() const { return LineCall; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceLine* line() const { return _line; }
TraceCall* call() const { return _call; }
@@ -1293,7 +1293,7 @@ class TraceCall: public TraceCallListCost
virtual ~TraceCall();
virtual CostType type() const { return Call; }
- virtual QString name() const;
+ virtual TQString name() const;
// calls a function itself?
bool isRecursion() { return _caller == _called; }
@@ -1313,8 +1313,8 @@ class TraceCall: public TraceCallListCost
TraceFunction* caller(bool skipCycle=false) const;
TraceFunction* called(bool skipCycle=false) const;
- QString callerName(bool skipCycle=false) const;
- QString calledName(bool skipCycle=false) const;
+ TQString callerName(bool skipCycle=false) const;
+ TQString calledName(bool skipCycle=false) const;
const TraceLineCallList& lineCalls() const { return _lineCalls; }
const TraceInstrCallList& instrCalls() const { return _instrCalls; }
@@ -1346,8 +1346,8 @@ class TraceInstr: public TraceListCost
virtual ~TraceInstr();
virtual CostType type() const { return Instr; }
- virtual QString name() const;
- QString prettyName() const;
+ virtual TQString name() const;
+ TQString prettyName() const;
bool isValid() { return _addr != Addr(0); }
@@ -1395,8 +1395,8 @@ public:
virtual ~TraceLine();
virtual CostType type() const { return Line; }
- virtual QString name() const;
- QString prettyName() const;
+ virtual TQString name() const;
+ TQString prettyName() const;
// factories
TracePartLine* partLine(TracePart* part,
@@ -1440,14 +1440,14 @@ class TraceCostItem: public TraceInclusiveListCost
TraceCostItem();
virtual ~TraceCostItem();
- virtual QString name() const { return _name; }
- virtual void setName(const QString& name) { _name = name; }
+ virtual TQString name() const { return _name; }
+ virtual void setName(const TQString& name) { _name = name; }
protected:
bool onlyActiveParts() { return true; }
protected:
- QString _name;
+ TQString _name;
};
@@ -1457,7 +1457,7 @@ class TraceCostItem: public TraceInclusiveListCost
class TraceLineRegion: public TraceInclusiveListCost
{
public:
- TraceLineRegion(uint from, uint to, QString name);
+ TraceLineRegion(uint from, uint to, TQString name);
virtual ~TraceLineRegion();
virtual CostType type() const { return LineRegion; }
@@ -1465,14 +1465,14 @@ public:
uint from() const { return _from; }
uint to() const { return _to; }
- QString name() const { return _name; }
+ TQString name() const { return _name; }
// factories
TracePartLine* partLineRegion(TracePart* part,
TracePartFunction* partFunction);
private:
uint _from, _to;
- QString _name;
+ TQString _name;
};
@@ -1491,7 +1491,7 @@ public:
virtual ~TraceFunctionSource();
virtual CostType type() const { return FunctionSource; }
- virtual QString name() const;
+ virtual TQString name() const;
// reimplementation for dependency map
virtual void update();
@@ -1506,7 +1506,7 @@ public:
/* factories */
TraceLine* line(uint lineno, bool createNew = true);
- TraceLineRegion* region(uint from, uint to, QString name,
+ TraceLineRegion* region(uint from, uint to, TQString name,
bool createNew = true);
private:
@@ -1569,8 +1569,8 @@ class TraceAssoziation
bool _valid;
};
-typedef QPtrList<TraceAssoziation> TraceAssoziationList;
-typedef QMap<TraceFunction*, TraceCall*> TraceCallMap;
+typedef TQPtrList<TraceAssoziation> TraceAssoziationList;
+typedef TQMap<TraceFunction*, TraceCall*> TraceCallMap;
/**
* A traced function
@@ -1583,7 +1583,7 @@ class TraceFunction: public TraceCostItem
{
public:
TraceFunction();
- TraceFunction(TraceData* data, const QString& name,
+ TraceFunction(TraceData* data, const TQString& name,
TraceClass* cls, TraceFile* file, TraceObject* object);
virtual ~TraceFunction();
@@ -1609,14 +1609,14 @@ class TraceFunction: public TraceCostItem
* A function can have a lot of code from different sources (inlined);
* maxItems limits this list. Default is full list
*/
- QString location(int maxFiles = 0) const;
+ TQString location(int maxFiles = 0) const;
- QString prettyName() const;
- QString prettyLocation(int maxFiles = 0) const;
- QString prettyNameWithLocation(int maxFiles = 1) const;
- void addPrettyLocation(QString&, int maxFiles = 1) const;
+ TQString prettyName() const;
+ TQString prettyLocation(int maxFiles = 0) const;
+ TQString prettyNameWithLocation(int maxFiles = 1) const;
+ void addPrettyLocation(TQString&, int maxFiles = 1) const;
// type + name + location
- QString info() const;
+ TQString info() const;
TraceClass* cls() const { return _cls; }
TraceFile* file() const { return _file; }
@@ -1636,8 +1636,8 @@ class TraceFunction: public TraceCostItem
// cost metrics
SubCost calledCount();
SubCost callingCount();
- QString prettyCalledCount();
- QString prettyCallingCount();
+ TQString prettyCalledCount();
+ TQString prettyCallingCount();
int calledContexts();
int callingContexts();
@@ -1669,7 +1669,7 @@ class TraceFunction: public TraceCostItem
TraceFunctionCycle* _cycle;
private:
- bool isUniquePrefix(QString) const;
+ bool isUniquePrefix(TQString) const;
TraceFunctionMap::Iterator _myMapIterator;
TraceClass* _cls;
@@ -1692,7 +1692,7 @@ class TraceFunction: public TraceCostItem
int _calledContexts, _callingContexts;
};
-typedef QMap<TraceFunction*,int> TraceFunctionSet;
+typedef TQMap<TraceFunction*,int> TraceFunctionSet;
/**
* A cycle of recursive calling functions.
@@ -1739,7 +1739,7 @@ class TraceClass: public TraceCostItem
virtual ~TraceClass();
virtual CostType type() const { return Class; }
- virtual QString prettyName() const;
+ virtual TQString prettyName() const;
void addFunction(TraceFunction*);
const TraceFunctionList& functions() const { return _functions; }
@@ -1763,17 +1763,17 @@ class TraceFile: public TraceCostItem
virtual ~TraceFile();
virtual CostType type() const { return File; }
- void setDirectory(const QString& dir);
- void resetDirectory() { _dir = QString::null; }
- QString directory();
+ void setDirectory(const TQString& dir);
+ void resetDirectory() { _dir = TQString::null; }
+ TQString directory();
void addFunction(TraceFunction*);
void addSourceFile(TraceFunctionSource*);
// without path
- QString shortName() const;
- QString prettyName() const;
- QString prettyLongName() const;
+ TQString shortName() const;
+ TQString prettyName() const;
+ TQString prettyLongName() const;
const TraceFunctionList& functions() const { return _functions; }
const TraceFunctionSourceList& sourceFiles() const
{ return _sourceFiles; }
@@ -1784,7 +1784,7 @@ class TraceFile: public TraceCostItem
private:
TraceFunctionList _functions;
TraceFunctionSourceList _sourceFiles;
- QString _dir;
+ TQString _dir;
};
@@ -1802,9 +1802,9 @@ class TraceObject: public TraceCostItem
void addFunction(TraceFunction*);
- virtual void setName(const QString& name);
- QString shortName() const { return _shortName; }
- QString prettyName() const;
+ virtual void setName(const TQString& name);
+ TQString shortName() const { return _shortName; }
+ TQString prettyName() const;
const TraceFunctionList& functions() const { return _functions; }
// part factory
@@ -1812,7 +1812,7 @@ class TraceObject: public TraceCostItem
private:
TraceFunctionList _functions;
- QString _shortName;
+ TQString _shortName;
};
@@ -1826,7 +1826,7 @@ class TraceData: public TraceCost
{
public:
TraceData(TopLevel* top = 0);
- TraceData(const QString& base);
+ TraceData(const TQString& base);
virtual ~TraceData();
virtual CostType type() const { return Data; }
@@ -1838,7 +1838,7 @@ class TraceData: public TraceCost
*
* This adjusts the TraceCostMapping according to given cost types
*/
- void load(const QString&);
+ void load(const TQString&);
/** returns true if something changed. These do NOT
* invalidate the dynamic costs on a activation change,
@@ -1852,14 +1852,14 @@ class TraceData: public TraceCost
bool activateAll(bool active=true);
TracePartList parts() const { return _parts; }
- TracePart* part(QString& name);
+ TracePart* part(TQString& name);
// with path
- QString traceName() const { return _traceName; }
+ TQString traceName() const { return _traceName; }
// without path
- QString shortTraceName() const;
- QString activePartRange();
+ TQString shortTraceName() const;
+ TQString activePartRange();
TraceCostMapping* mapping() { return &_mapping; }
@@ -1868,11 +1868,11 @@ class TraceData: public TraceCost
DynPool* dynPool();
// factories for object/file/class/function/line instances
- TraceObject* object(const QString& name);
- TraceFile* file(const QString& name);
- TraceClass* cls(const QString& fnName, QString& shortName);
+ TraceObject* object(const TQString& name);
+ TraceFile* file(const TQString& name);
+ TraceClass* cls(const TQString& fnName, TQString& shortName);
// function creation involves class creation if needed
- TraceFunction* function(const QString& name, TraceFile*, TraceObject*);
+ TraceFunction* function(const TQString& name, TraceFile*, TraceObject*);
// factory for function cycles
TraceFunctionCycle* functionCycle(TraceFunction*);
@@ -1884,7 +1884,7 @@ class TraceData: public TraceCost
* For Function, a parent of type Obj/File/Class can be given, but
* isn't needed.
*/
- TraceCost* search(TraceItem::CostType, QString,
+ TraceCost* search(TraceItem::CostType, TQString,
TraceCostType* ct = 0, TraceCost* parent = 0);
// for pretty function names without signature if unique...
@@ -1901,8 +1901,8 @@ class TraceData: public TraceCost
TraceCost* callMax() { return &_callMax; }
- void setCommand(const QString& command) { _command = command; }
- QString command() const { return _command; }
+ void setCommand(const TQString& command) { _command = command; }
+ TQString command() const { return _command; }
TraceCost* totals() { return &_totals; }
void setMaxThreadID(int tid) { _maxThreadID = tid; }
int maxThreadID() const { return _maxThreadID; }
@@ -1927,7 +1927,7 @@ class TraceData: public TraceCost
private:
void init();
// add trace part: events from one trace file
- TracePart* addPart(const QString& dir, const QString& file);
+ TracePart* addPart(const TQString& dir, const TQString& file);
// for progress bar callbacks
TopLevel* _topLevel;
@@ -1949,8 +1949,8 @@ class TraceData: public TraceCost
TraceClassMap _classMap;
TraceFileMap _fileMap;
TraceFunctionMap _functionMap;
- QString _command;
- QString _traceName;
+ TQString _command;
+ TQString _traceName;
// Max of all costs of calls: This allows to see if the incl. cost can
// be hidden for a cost type, as it's always the same as self cost
diff --git a/kcachegrind/kcachegrind/traceitemview.cpp b/kcachegrind/kcachegrind/traceitemview.cpp
index 990d2d0e..d11f02b6 100644
--- a/kcachegrind/kcachegrind/traceitemview.cpp
+++ b/kcachegrind/kcachegrind/traceitemview.cpp
@@ -20,7 +20,7 @@
* Trace Item View
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ TraceItemView::TraceItemView(TraceItemView* parentView, TopLevel* top)
_pos = Hidden;
}
-QString TraceItemView::whatsThis() const
+TQString TraceItemView::whatsThis() const
{
return i18n("No description available");
}
@@ -59,19 +59,19 @@ void TraceItemView::select(TraceItem* i)
}
KConfigGroup* TraceItemView::configGroup(KConfig* c,
- QString group, QString post)
+ TQString group, TQString post)
{
- QStringList gList = c->groupList();
+ TQStringList gList = c->groupList();
if (gList.contains((group+post).ascii()) ) group += post;
return new KConfigGroup(c, group);
}
void TraceItemView::writeConfigEntry(KConfigBase* c, const char* pKey,
- QString value, const char* def, bool bNLS)
+ TQString value, const char* def, bool bNLS)
{
if (!c) return;
if ((value.isEmpty() && ((def == 0) || (*def == 0))) ||
- (value == QString(def)))
+ (value == TQString(def)))
c->deleteEntry(pKey);
else
c->writeEntry(pKey, value, true, false, bNLS);
@@ -107,15 +107,15 @@ void TraceItemView::writeConfigEntry(KConfigBase* c, const char* pKey,
c->writeEntry(pKey, value);
}
-void TraceItemView::readViewConfig(KConfig*, QString, QString, bool)
+void TraceItemView::readViewConfig(KConfig*, TQString, TQString, bool)
{}
#if 1
-void TraceItemView::saveViewConfig(KConfig*, QString, QString, bool)
+void TraceItemView::saveViewConfig(KConfig*, TQString, TQString, bool)
{}
#else
void TraceItemView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
// write a dummy config entry to see missing virtual functions
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -168,7 +168,7 @@ bool TraceItemView::set(int changeType, TraceData* d,
bool TraceItemView::isViewVisible()
{
- QWidget* w = widget();
+ TQWidget* w = widget();
if (w)
return w->isVisible();
return false;
@@ -432,12 +432,12 @@ void TraceItemView::activated(Direction d)
if (_topLevel) _topLevel->setDirectionDelayed(d);
}
-void TraceItemView::addCostMenu(QPopupMenu* p, bool withCost2)
+void TraceItemView::addCostMenu(TQPopupMenu* p, bool withCost2)
{
if (_topLevel) _topLevel->addCostMenu(p, withCost2);
}
-void TraceItemView::addGoMenu(QPopupMenu* p)
+void TraceItemView::addGoMenu(TQPopupMenu* p)
{
if (_topLevel) _topLevel->addGoMenu(p);
}
diff --git a/kcachegrind/kcachegrind/traceitemview.h b/kcachegrind/kcachegrind/traceitemview.h
index d860072a..d42de924 100644
--- a/kcachegrind/kcachegrind/traceitemview.h
+++ b/kcachegrind/kcachegrind/traceitemview.h
@@ -72,10 +72,10 @@ public:
TraceItemView(TraceItemView* parentView, TopLevel* top = 0);
virtual ~TraceItemView() {}
- virtual QString whatsThis() const;
+ virtual TQString whatsThis() const;
- static KConfigGroup* configGroup(KConfig*, QString prefix, QString postfix);
- static void writeConfigEntry(KConfigBase*, const char* pKey, QString value,
+ static KConfigGroup* configGroup(KConfig*, TQString prefix, TQString postfix);
+ static void writeConfigEntry(KConfigBase*, const char* pKey, TQString value,
const char* def, bool bNLS = false);
static void writeConfigEntry(KConfigBase*, const char* pKey,
int value, int def);
@@ -83,9 +83,9 @@ public:
bool value, bool def);
static void writeConfigEntry(KConfigBase*, const char* pKey,
double value, double def);
- virtual void readViewConfig(KConfig*, QString prefix, QString postfix,
+ virtual void readViewConfig(KConfig*, TQString prefix, TQString postfix,
bool withOptions);
- virtual void saveViewConfig(KConfig*, QString prefix, QString postfix,
+ virtual void saveViewConfig(KConfig*, TQString prefix, TQString postfix,
bool withOptions);
// Immediate remove all references to old data, and set the new.
@@ -142,12 +142,12 @@ public:
void setPosition(Position p) { _pos = p; }
Position position() const { return _pos; }
- void setTitle(QString t) { _title = t; }
- QString title() const { return _title; }
+ void setTitle(TQString t) { _title = t; }
+ TQString title() const { return _title; }
// We depend on derived class to be a widget.
// Force overiding by making this abstract.
- virtual QWidget* widget() = 0;
+ virtual TQWidget* widget() = 0;
/**
* This function is called when a new item should become active.
@@ -161,8 +161,8 @@ public:
virtual TraceItem* canShow(TraceItem* i) { return i; }
/* convenience functions for often used context menu items */
- void addCostMenu(QPopupMenu*,bool withCost2 = true);
- void addGoMenu(QPopupMenu*);
+ void addCostMenu(TQPopupMenu*,bool withCost2 = true);
+ void addGoMenu(TQPopupMenu*);
protected:
// helpers to call selected()/activated() of parentView
@@ -197,7 +197,7 @@ private:
TraceCostType *_newCostType, *_newCostType2;
TraceItem::CostType _newGroupType;
- QString _title;
+ TQString _title;
int _status;
bool _inUpdate;
Position _pos;
diff --git a/kcachegrind/kcachegrind/treemap.cpp b/kcachegrind/kcachegrind/treemap.cpp
index 3ccc34f9..fe01c796 100644
--- a/kcachegrind/kcachegrind/treemap.cpp
+++ b/kcachegrind/kcachegrind/treemap.cpp
@@ -18,16 +18,16 @@
/*
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*/
#include <math.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
@@ -56,7 +56,7 @@ StoredDrawParams::StoredDrawParams()
// field array has size 0
}
-StoredDrawParams::StoredDrawParams(QColor c,
+StoredDrawParams::StoredDrawParams(TQColor c,
bool selected, bool current)
{
_backColor = c;
@@ -70,18 +70,18 @@ StoredDrawParams::StoredDrawParams(QColor c,
// field array has size 0
}
-QString StoredDrawParams::text(int f) const
+TQString StoredDrawParams::text(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QString::null;
+ return TQString::null;
return _field[f].text;
}
-QPixmap StoredDrawParams::pixmap(int f) const
+TQPixmap StoredDrawParams::pixmap(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QPixmap();
+ return TQPixmap();
return _field[f].pix;
}
@@ -102,10 +102,10 @@ int StoredDrawParams::maxLines(int f) const
return _field[f].maxLines;
}
-const QFont& StoredDrawParams::font() const
+const TQFont& StoredDrawParams::font() const
{
- static QFont* f = 0;
- if (!f) f = new QFont(QApplication::font());
+ static TQFont* f = 0;
+ if (!f) f = new TQFont(TQApplication::font());
return *f;
}
@@ -125,7 +125,7 @@ void StoredDrawParams::ensureField(int f)
}
-void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
+void StoredDrawParams::setField(int f, const TQString& t, TQPixmap pm,
Position p, int maxLines)
{
if (f<0 || f>=MAX_FIELD) return;
@@ -137,7 +137,7 @@ void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
_field[f].maxLines = maxLines;
}
-void StoredDrawParams::setText(int f, const QString& t)
+void StoredDrawParams::setText(int f, const TQString& t)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -145,7 +145,7 @@ void StoredDrawParams::setText(int f, const QString& t)
_field[f].text = t;
}
-void StoredDrawParams::setPixmap(int f, const QPixmap& pm)
+void StoredDrawParams::setPixmap(int f, const TQPixmap& pm)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -175,7 +175,7 @@ void StoredDrawParams::setMaxLines(int f, int m)
// RectDrawing
//
-RectDrawing::RectDrawing(QRect r)
+RectDrawing::RectDrawing(TQRect r)
{
_fm = 0;
_dp = 0;
@@ -204,7 +204,7 @@ void RectDrawing::setDrawParams(DrawParams* dp)
_dp = dp;
}
-void RectDrawing::setRect(QRect r)
+void RectDrawing::setRect(TQRect r)
{
_rect = r;
@@ -218,7 +218,7 @@ void RectDrawing::setRect(QRect r)
_fontHeight = 0;
}
-QRect RectDrawing::remainingRect(DrawParams* dp)
+TQRect RectDrawing::remainingRect(DrawParams* dp)
{
if (!dp) dp = drawParams();
@@ -243,20 +243,20 @@ QRect RectDrawing::remainingRect(DrawParams* dp)
}
-void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
+void RectDrawing::drawBack(TQPainter* p, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (_rect.width()<=0 || _rect.height()<=0) return;
- QRect r = _rect;
- QColor normal = dp->backColor();
+ TQRect r = _rect;
+ TQColor normal = dp->backColor();
if (dp->selected()) normal = normal.light();
bool isCurrent = dp->current();
if (dp->drawFrame() || isCurrent) {
// 3D raised/sunken frame effect...
- QColor high = normal.light();
- QColor low = normal.dark();
+ TQColor high = normal.light();
+ TQColor low = normal.dark();
p->setPen( isCurrent ? low:high);
p->drawLine(r.left(), r.top(), r.right(), r.top());
p->drawLine(r.left(), r.top(), r.left(), r.bottom());
@@ -272,7 +272,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
bool goDark = qGray(normal.rgb())>128;
int rBase, gBase, bBase;
normal.rgb(&rBase, &gBase, &bBase);
- p->setBrush(QBrush::NoBrush);
+ p->setBrush(TQBrush::NoBrush);
// shade parameters:
int d = 7;
@@ -293,7 +293,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
int gDiff = goDark ? -gBase/d : (255-gBase)/d;
int bDiff = goDark ? -bBase/d : (255-bBase)/d;
- QColor shadeColor;
+ TQColor shadeColor;
while (factor<.95) {
shadeColor.setRgb((int)(rBase+factor*rDiff+.5),
(int)(gBase+factor*gDiff+.5),
@@ -332,22 +332,22 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
}
// fill inside
- p->setPen(QPen::NoPen);
+ p->setPen(TQPen::NoPen);
p->setBrush(normal);
p->drawRect(r);
}
-bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
+bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (!_fm) {
- _fm = new QFontMetrics(dp->font());
+ _fm = new TQFontMetrics(dp->font());
_fontHeight = _fm->height();
}
- QRect r = _rect;
+ TQRect r = _rect;
if (0) kdDebug(90100) << "DrawField: Rect " << r.x() << "/" << r.y()
<< " - " << r.width() << "x" << r.height() << endl;
@@ -487,9 +487,9 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
// get text and pixmap now, only if we need to, because it is possible
// that they are calculated on demand (and this can take some time)
- QString name = dp->text(f);
+ TQString name = dp->text(f);
if (name.isEmpty()) return 0;
- QPixmap pix = dp->pixmap(f);
+ TQPixmap pix = dp->pixmap(f);
// check if pixmap can be drawn
int pixW = pix.width();
@@ -551,14 +551,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
* If the text is to be written at the bottom, we start with the
* end of the string (so everything is reverted)
*/
- QString remaining;
+ TQString remaining;
int origLines = lines;
while (lines>0) {
if (w>width && lines>1) {
int lastBreakPos = name.length(), lastWidth = w;
int len = name.length();
- QChar::Category caOld, ca;
+ TQChar::Category caOld, ca;
if (!isBottom) {
// start with comparing categories of last 2 chars
@@ -568,8 +568,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
ca = name[len-1].category();
if (ca != caOld) {
// "Aa" has no break between...
- if (ca == QChar::Letter_Uppercase &&
- caOld == QChar::Letter_Lowercase) {
+ if (ca == TQChar::Letter_Uppercase &&
+ caOld == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -583,7 +583,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.mid(lastBreakPos);
// remove space on break point
- if (name[lastBreakPos-1].category() == QChar::Separator_Space)
+ if (name[lastBreakPos-1].category() == TQChar::Separator_Space)
name = name.left(lastBreakPos-1);
else
name = name.left(lastBreakPos);
@@ -597,8 +597,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
if (ca != caOld) {
// "Aa" has no break between...
- if (caOld == QChar::Letter_Uppercase &&
- ca == QChar::Letter_Lowercase) {
+ if (caOld == TQChar::Letter_Uppercase &&
+ ca == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -612,14 +612,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.left(l-lastBreakPos);
// remove space on break point
- if (name[l-lastBreakPos].category() == QChar::Separator_Space)
+ if (name[l-lastBreakPos].category() == TQChar::Separator_Space)
name = name.right(lastBreakPos-1);
else
name = name.right(lastBreakPos);
}
}
else
- remaining = QString::null;
+ remaining = TQString::null;
/* truncate and add ... if needed */
if (w>width) {
@@ -779,8 +779,8 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value)
TreeMapItem::TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2,
- QString text3, QString text4)
+ TQString text1, TQString text2,
+ TQString text3, TQString text4)
{
_value = value;
_parent = parent;
@@ -864,13 +864,13 @@ void TreeMapItem::refresh()
}
-QStringList TreeMapItem::path(int textNo) const
+TQStringList TreeMapItem::path(int textNo) const
{
- QStringList list(text(textNo));
+ TQStringList list(text(textNo));
TreeMapItem* i = _parent;
while (i) {
- QString text = i->text(textNo);
+ TQString text = i->text(textNo);
if (!text.isEmpty())
list.prepend(i->text(textNo));
i = i->_parent;
@@ -937,7 +937,7 @@ DrawParams::Position TreeMapItem::position(int f) const
}
// use widget font
-const QFont& TreeMapItem::font() const
+const TQFont& TreeMapItem::font() const
{
return _widget->currentFont();
}
@@ -1016,7 +1016,7 @@ TreeMapItemList* TreeMapItem::children()
void TreeMapItem::clearItemRect()
{
- _rect = QRect();
+ _rect = TQRect();
clearFreeRects();
}
@@ -1025,13 +1025,13 @@ void TreeMapItem::clearFreeRects()
if (_freeRects) _freeRects->clear();
}
-void TreeMapItem::addFreeRect(const QRect& r)
+void TreeMapItem::addFreeRect(const TQRect& r)
{
// don't add invalid rects
if ((r.width() < 1) || (r.height() < 1)) return;
if (!_freeRects) {
- _freeRects = new QPtrList<QRect>;
+ _freeRects = new TQPtrList<TQRect>;
_freeRects->setAutoDelete(true);
}
@@ -1039,9 +1039,9 @@ void TreeMapItem::addFreeRect(const QRect& r)
<< r.x() << "/" << r.y() << "-"
<< r.width() << "x" << r.height() << ")" << endl;
- QRect* last = _freeRects->last();
+ TQRect* last = _freeRects->last();
if (!last) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1063,7 +1063,7 @@ void TreeMapItem::addFreeRect(const QRect& r)
}
if (!replaced) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1078,13 +1078,13 @@ void TreeMapItem::addFreeRect(const QRect& r)
class TreeMapTip: public QToolTip
{
public:
- TreeMapTip( QWidget* p ):QToolTip(p) {}
+ TreeMapTip( TQWidget* p ):TQToolTip(p) {}
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
};
-void TreeMapTip::maybeTip( const QPoint& pos )
+void TreeMapTip::maybeTip( const TQPoint& pos )
{
if ( !parentWidget()->inherits( "TreeMapWidget" ) )
return;
@@ -1092,9 +1092,9 @@ void TreeMapTip::maybeTip( const QPoint& pos )
TreeMapWidget* p = (TreeMapWidget*)parentWidget();
TreeMapItem* i;
i = p->item(pos.x(), pos.y());
- QPtrList<QRect>* rList = i ? i->freeRects() : 0;
+ TQPtrList<TQRect>* rList = i ? i->freeRects() : 0;
if (rList) {
- QRect* r;
+ TQRect* r;
for(r=rList->first();r;r=rList->next())
if (r->contains(pos))
tip(*r, p->tipString(i));
@@ -1106,8 +1106,8 @@ void TreeMapTip::maybeTip( const QPoint& pos )
// TreeMapWidget
TreeMapWidget::TreeMapWidget(TreeMapItem* base,
- QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
_base = base;
_base->setWidget(this);
@@ -1148,7 +1148,7 @@ TreeMapWidget::TreeMapWidget(TreeMapItem* base,
_needsRefresh = _base;
setBackgroundMode(Qt::NoBackground);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_tip = new TreeMapTip(this);
}
@@ -1158,7 +1158,7 @@ TreeMapWidget::~TreeMapWidget()
delete _tip;
}
-const QFont& TreeMapWidget::currentFont() const
+const TQFont& TreeMapWidget::currentFont() const
{
return _font;
}
@@ -1176,7 +1176,7 @@ TreeMapItem::SplitMode TreeMapWidget::splitMode() const
return _splitMode;
}
-bool TreeMapWidget::setSplitMode(QString mode)
+bool TreeMapWidget::setSplitMode(TQString mode)
{
if (mode == "Bisection") setSplitMode(TreeMapItem::Bisection);
else if (mode == "Columns") setSplitMode(TreeMapItem::Columns);
@@ -1192,9 +1192,9 @@ bool TreeMapWidget::setSplitMode(QString mode)
return true;
}
-QString TreeMapWidget::splitModeString() const
+TQString TreeMapWidget::splitModeString() const
{
- QString mode;
+ TQString mode;
switch(splitMode()) {
case TreeMapItem::Bisection: mode = "Bisection"; break;
case TreeMapItem::Columns: mode = "Columns"; break;
@@ -1276,14 +1276,14 @@ void TreeMapWidget::setMaxDrawingDepth(int d)
redraw();
}
-QString TreeMapWidget::defaultFieldType(int f) const
+TQString TreeMapWidget::defaultFieldType(int f) const
{
return i18n("Text %1").arg(f+1);
}
-QString TreeMapWidget::defaultFieldStop(int) const
+TQString TreeMapWidget::defaultFieldStop(int) const
{
- return QString();
+ return TQString();
}
bool TreeMapWidget::defaultFieldVisible(int f) const
@@ -1328,7 +1328,7 @@ bool TreeMapWidget::resizeAttr(int size)
return true;
}
-void TreeMapWidget::setFieldType(int f, QString type)
+void TreeMapWidget::setFieldType(int f, TQString type)
{
if (((int)_attr.size() < f+1) &&
(type == defaultFieldType(f))) return;
@@ -1337,13 +1337,13 @@ void TreeMapWidget::setFieldType(int f, QString type)
// no need to redraw: the type string is not visible in the TreeMap
}
-QString TreeMapWidget::fieldType(int f) const
+TQString TreeMapWidget::fieldType(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldType(f);
return _attr[f].type;
}
-void TreeMapWidget::setFieldStop(int f, QString stop)
+void TreeMapWidget::setFieldStop(int f, TQString stop)
{
if (((int)_attr.size() < f+1) &&
(stop == defaultFieldStop(f))) return;
@@ -1353,7 +1353,7 @@ void TreeMapWidget::setFieldStop(int f, QString stop)
}
}
-QString TreeMapWidget::fieldStop(int f) const
+TQString TreeMapWidget::fieldStop(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldStop(f);
return _attr[f].stop;
@@ -1416,7 +1416,7 @@ DrawParams::Position TreeMapWidget::fieldPosition(int f) const
return _attr[f].pos;
}
-void TreeMapWidget::setFieldPosition(int f, QString pos)
+void TreeMapWidget::setFieldPosition(int f, TQString pos)
{
if (pos == "TopLeft")
setFieldPosition(f, DrawParams::TopLeft);
@@ -1434,17 +1434,17 @@ void TreeMapWidget::setFieldPosition(int f, QString pos)
setFieldPosition(f, DrawParams::Default);
}
-QString TreeMapWidget::fieldPositionString(int f) const
+TQString TreeMapWidget::fieldPositionString(int f) const
{
TreeMapItem::Position pos = fieldPosition(f);
- if (pos == DrawParams::TopLeft) return QString("TopLeft");
- if (pos == DrawParams::TopCenter) return QString("TopCenter");
- if (pos == DrawParams::TopRight) return QString("TopRight");
- if (pos == DrawParams::BottomLeft) return QString("BottomLeft");
- if (pos == DrawParams::BottomCenter) return QString("BottomCenter");
- if (pos == DrawParams::BottomRight) return QString("BottomRight");
- if (pos == DrawParams::Default) return QString("Default");
- return QString("unknown");
+ if (pos == DrawParams::TopLeft) return TQString("TopLeft");
+ if (pos == DrawParams::TopCenter) return TQString("TopCenter");
+ if (pos == DrawParams::TopRight) return TQString("TopRight");
+ if (pos == DrawParams::BottomLeft) return TQString("BottomLeft");
+ if (pos == DrawParams::BottomCenter) return TQString("BottomCenter");
+ if (pos == DrawParams::BottomRight) return TQString("BottomRight");
+ if (pos == DrawParams::Default) return TQString("Default");
+ return TQString("unknown");
}
void TreeMapWidget::setMinimalArea(int area)
@@ -1479,9 +1479,9 @@ void TreeMapWidget::deletingItem(TreeMapItem* i)
}
-QString TreeMapWidget::tipString(TreeMapItem* i) const
+TQString TreeMapWidget::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
while (i) {
if (!i->text(0).isEmpty()) {
@@ -1598,7 +1598,7 @@ void TreeMapWidget::setSelected(TreeMapItem* item, bool selected)
redraw(changed);
if (0) kdDebug(90100) << (selected ? "S":"Des") << "elected Item "
- << (item ? item->path(0).join("") : QString("(null)"))
+ << (item ? item->path(0).join("") : TQString("(null)"))
<< " (depth " << (item ? item->depth() : -1)
<< ")" << endl;
}
@@ -1790,16 +1790,16 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1,
return changed;
}
-void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
+void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl;
- if ( receivers( SIGNAL(contextMenuRequested(TreeMapItem*, const QPoint &)) ) )
+ if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) )
e->accept();
- if ( e->reason() == QContextMenuEvent::Keyboard ) {
- QRect r = (_current) ? _current->itemRect() : _base->itemRect();
- QPoint p = QPoint(r.left() + r.width()/2, r.top() + r.height()/2);
+ if ( e->reason() == TQContextMenuEvent::Keyboard ) {
+ TQRect r = (_current) ? _current->itemRect() : _base->itemRect();
+ TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2);
emit contextMenuRequested(_current, p);
}
else {
@@ -1809,7 +1809,7 @@ void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
}
-void TreeMapWidget::mousePressEvent( QMouseEvent* e )
+void TreeMapWidget::mousePressEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mousePressEvent" << endl;
@@ -1877,7 +1877,7 @@ void TreeMapWidget::mousePressEvent( QMouseEvent* e )
}
}
-void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
+void TreeMapWidget::mouseMoveEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mouseMoveEvent" << endl;
@@ -1920,7 +1920,7 @@ void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
redraw(changed);
}
-void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
+void TreeMapWidget::mouseReleaseEvent( TQMouseEvent* )
{
//kdDebug(90100) << "TreeMapWidget::mouseReleaseEvent" << endl;
@@ -1950,7 +1950,7 @@ void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
}
-void TreeMapWidget::mouseDoubleClickEvent( QMouseEvent* e )
+void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e )
{
TreeMapItem* over = item(e->x(), e->y());
@@ -1969,7 +1969,7 @@ int nextVisible(TreeMapItem* i)
while (idx < (int)p->children()->count()-1) {
idx++;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1987,7 +1987,7 @@ int prevVisible(TreeMapItem* i)
while (idx > 0) {
idx--;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1997,7 +1997,7 @@ int prevVisible(TreeMapItem* i)
-void TreeMapWidget::keyPressEvent( QKeyEvent* e )
+void TreeMapWidget::keyPressEvent( TQKeyEvent* e )
{
if (e->key() == Key_Escape && _pressed) {
@@ -2111,24 +2111,24 @@ void TreeMapWidget::keyPressEvent( QKeyEvent* e )
}
}
-void TreeMapWidget::fontChange( const QFont& )
+void TreeMapWidget::fontChange( const TQFont& )
{
redraw();
}
-void TreeMapWidget::resizeEvent( QResizeEvent * )
+void TreeMapWidget::resizeEvent( TQResizeEvent * )
{
// this automatically redraws (as size is changed)
drawTreeMap();
}
-void TreeMapWidget::paintEvent( QPaintEvent * )
+void TreeMapWidget::paintEvent( TQPaintEvent * )
{
drawTreeMap();
}
-void TreeMapWidget::showEvent( QShowEvent * )
+void TreeMapWidget::showEvent( TQShowEvent * )
{
// refresh only if needed
drawTreeMap();
@@ -2151,14 +2151,14 @@ void TreeMapWidget::drawTreeMap()
if (_needsRefresh == _base) {
// redraw whole widget
- _pixmap = QPixmap(size());
+ _pixmap = TQPixmap(size());
_pixmap.fill(backgroundColor());
}
- QPainter p(&_pixmap);
+ TQPainter p(&_pixmap);
if (_needsRefresh == _base) {
p.setPen(black);
- p.drawRect(QRect(2, 2, QWidget::width()-4, QWidget::height()-4));
- _base->setItemRect(QRect(3, 3, QWidget::width()-6, QWidget::height()-6));
+ p.drawRect(TQRect(2, 2, TQWidget::width()-4, TQWidget::height()-4));
+ _base->setItemRect(TQRect(3, 3, TQWidget::width()-6, TQWidget::height()-6));
}
else {
// only subitem
@@ -2174,12 +2174,12 @@ void TreeMapWidget::drawTreeMap()
}
bitBlt( this, 0, 0, &_pixmap, 0, 0,
- QWidget::width(), QWidget::height(), CopyROP, true);
+ TQWidget::width(), TQWidget::height(), CopyROP, true);
if (hasFocus()) {
- QPainter p(this);
- style().drawPrimitive( QStyle::PE_FocusRect, &p,
- QRect(0, 0, QWidget::width(), QWidget::height()),
+ TQPainter p(this);
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p,
+ TQRect(0, 0, TQWidget::width(), TQWidget::height()),
colorGroup() );
}
}
@@ -2203,7 +2203,7 @@ void TreeMapWidget::redraw(TreeMapItem* i)
}
}
-void TreeMapWidget::drawItem(QPainter* p,
+void TreeMapWidget::drawItem(TQPainter* p,
TreeMapItem* item)
{
bool isSelected = false;
@@ -2235,7 +2235,7 @@ void TreeMapWidget::drawItem(QPainter* p,
}
-bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
+bool TreeMapWidget::horizontal(TreeMapItem* i, const TQRect& r)
{
switch(i->splitMode()) {
case TreeMapItem::HAlternate:
@@ -2256,7 +2256,7 @@ bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
/**
* Draw TreeMapItems recursive, starting from item
*/
-void TreeMapWidget::drawItems(QPainter* p,
+void TreeMapWidget::drawItems(TQPainter* p,
TreeMapItem* item)
{
if (DEBUG_DRAWING)
@@ -2269,9 +2269,9 @@ void TreeMapWidget::drawItems(QPainter* p,
drawItem(p, item);
item->clearFreeRects();
- QRect origRect = item->itemRect();
+ TQRect origRect = item->itemRect();
int bw = item->borderWidth();
- QRect r = QRect(origRect.x()+bw, origRect.y()+bw,
+ TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw,
origRect.width()-2*bw, origRect.height()-2*bw);
TreeMapItemList* list = item->children();
@@ -2295,7 +2295,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// stop drawing if stopAtText is reached
if (!stopDrawing)
for (int no=0;no<(int)_attr.size();no++) {
- QString stopAt = fieldStop(no);
+ TQString stopAt = fieldStop(no);
if (!stopAt.isEmpty() && (item->text(no) == stopAt)) {
stopDrawing = true;
break;
@@ -2349,7 +2349,7 @@ void TreeMapWidget::drawItems(QPainter* p,
<< i->value() << endl;
}
- QRect orig = r;
+ TQRect orig = r;
// if we have space for text...
if ((r.height() >= _fontHeight) && (r.width() >= _fontHeight)) {
@@ -2366,12 +2366,12 @@ void TreeMapWidget::drawItems(QPainter* p,
if (orig.x() == r.x()) {
// Strings on top
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width(), orig.height()-r.height()));
}
else {
// Strings on the left
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width()-r.width(), orig.height()));
}
@@ -2418,7 +2418,7 @@ void TreeMapWidget::drawItems(QPainter* p,
self / user_sum + .5);
if (self_length > 0) {
// take space for self cost
- QRect sr = r;
+ TQRect sr = r;
if (rotate) {
sr.setWidth( self_length );
r.setRect(r.x()+sr.width(), r.y(), r.width()-sr.width(), r.height());
@@ -2479,7 +2479,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), nextPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), nextPos, r.height());
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2530,7 +2530,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), nextPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), nextPos);
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2567,7 +2567,7 @@ void TreeMapWidget::drawItems(QPainter* p,
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r)
{
p->setBrush(Qt::Dense4Pattern);
p->setPen(Qt::NoPen);
@@ -2576,7 +2576,7 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack)
{
if (DEBUG_DRAWING)
@@ -2606,8 +2606,8 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
}
// returns false if rect gets to small
-bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
- QRect& r, double user_sum,
+bool TreeMapWidget::drawItemArray(TQPainter* p, TreeMapItem* item,
+ TQRect& r, double user_sum,
TreeMapItemListIterator it, int len,
bool goBack)
{
@@ -2647,14 +2647,14 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
if (r.width() > r.height()) {
int halfPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), halfPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), halfPos, r.height());
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x()+halfPos, r.y(), r.width()-halfPos, r.height());
}
else {
int halfPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), halfPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), halfPos);
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x(), r.y()+halfPos, r.width(), r.height()-halfPos);
@@ -2723,7 +2723,7 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
return false;
}
- QRect currRect = r;
+ TQRect currRect = r;
if (hor)
currRect.setWidth(nextPos);
@@ -2798,13 +2798,13 @@ void TreeMapWidget::splitActivated(int id)
}
-void TreeMapWidget::addSplitDirectionItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addSplitDirectionItems(TQPopupMenu* popup, int id)
{
_splitID = id;
popup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(splitActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(splitActivated(int)));
popup->insertItem(i18n("Recursive Bisection"), id);
popup->insertItem(i18n("Columns"), id+1);
@@ -2853,21 +2853,21 @@ void TreeMapWidget::visualizationActivated(int id)
else if ((id%10) == 8) setFieldPosition(f, DrawParams::BottomRight);
}
-void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id)
{
_visID = id;
popup->setCheckable(true);
- QPopupMenu* bpopup = new QPopupMenu();
+ TQPopupMenu* bpopup = new TQPopupMenu();
bpopup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
- connect(bpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
+ connect(bpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
- QPopupMenu* spopup = new QPopupMenu();
+ TQPopupMenu* spopup = new TQPopupMenu();
addSplitDirectionItems(spopup, id+100);
popup->insertItem(i18n("Nesting"), spopup, id);
@@ -2893,10 +2893,10 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
popup->insertSeparator();
int f;
- QPopupMenu* tpopup;
+ TQPopupMenu* tpopup;
id += 20;
for (f=0;f<(int)_attr.size();f++, id+=10) {
- tpopup = new QPopupMenu();
+ tpopup = new TQPopupMenu();
tpopup->setCheckable(true);
popup->insertItem(_attr[f].type, tpopup, id);
tpopup->insertItem(i18n("Visible"), id+1);
@@ -2925,8 +2925,8 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
tpopup->setItemChecked(id+7,_attr[f].pos == DrawParams::BottomCenter);
tpopup->setItemChecked(id+8,_attr[f].pos == DrawParams::BottomRight);
- connect(tpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(tpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
}
}
@@ -2942,7 +2942,7 @@ void TreeMapWidget::selectionActivated(int id)
setSelected(i, true);
}
-void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
+void TreeMapWidget::addSelectionItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
if (!i) return;
@@ -2950,11 +2950,11 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
_selectionID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(selectionActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(selectionActivated(int)));
while (i) {
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id++);
i = i->parent();
@@ -2963,7 +2963,7 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
void TreeMapWidget::fieldStopActivated(int id)
{
- if (id == _fieldStopID) setFieldStop(0, QString::null);
+ if (id == _fieldStopID) setFieldStop(0, TQString::null);
else {
TreeMapItem* i = _menuItem;
id -= _fieldStopID+1;
@@ -2976,13 +2976,13 @@ void TreeMapWidget::fieldStopActivated(int id)
}
}
-void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
+void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_fieldStopID = id;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(fieldStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(fieldStopActivated(int)));
popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id);
popup->setItemChecked(id, fieldStop(0).isEmpty());
@@ -2993,7 +2993,7 @@ void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
while (i) {
id++;
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id);
if (fieldStop(0) == i->text(0)) {
@@ -3025,14 +3025,14 @@ void TreeMapWidget::areaStopActivated(int id)
else if (id == _areaStopID+6) setMinimalArea(minimalArea()/2);
}
-void TreeMapWidget::addAreaStopItems(QPopupMenu* popup,
+void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_areaStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(areaStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(areaStopActivated(int)));
bool foundArea = false;
@@ -3087,14 +3087,14 @@ void TreeMapWidget::depthStopActivated(int id)
else if (id == _depthStopID+3) setMaxDrawingDepth(maxDrawingDepth()+1);
}
-void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
+void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_depthStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(depthStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(depthStopActivated(int)));
bool foundDepth = false;
@@ -3132,7 +3132,7 @@ void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
* Option saving/restoring
*/
-void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix)
{
config->writeEntry(prefix+"Nesting", splitModeString());
config->writeEntry(prefix+"AllowRotation", allowRotation());
@@ -3145,23 +3145,23 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
int f, fCount = _attr.size();
config->writeEntry(prefix+"FieldCount", fCount);
for (f=0;f<fCount;f++) {
- config->writeEntry(QString(prefix+"FieldVisible%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f),
_attr[f].visible);
- config->writeEntry(QString(prefix+"FieldForced%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldForced%1").arg(f),
_attr[f].forced);
- config->writeEntry(QString(prefix+"FieldStop%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldStop%1").arg(f),
_attr[f].stop);
- config->writeEntry(QString(prefix+"FieldPosition%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f),
fieldPositionString(f));
}
}
-void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix)
{
bool enabled;
int num;
- QString str;
+ TQString str;
str = config->readEntry(prefix+"Nesting");
if (!str.isEmpty()) setSplitMode(str);
@@ -3195,18 +3195,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
int f;
for (f=0;f<num;f++) {
- str = QString(prefix+"FieldVisible%1").arg(f);
+ str = TQString(prefix+"FieldVisible%1").arg(f);
if (config->hasKey(str))
setFieldVisible(f, config->readBoolEntry(str));
- str = QString(prefix+"FieldForced%1").arg(f);
+ str = TQString(prefix+"FieldForced%1").arg(f);
if (config->hasKey(str))
setFieldForced(f, config->readBoolEntry(str));
- str = config->readEntry(QString(prefix+"FieldStop%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f));
setFieldStop(f, str);
- str = config->readEntry(QString(prefix+"FieldPosition%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f));
if (!str.isEmpty()) setFieldPosition(f, str);
}
}
diff --git a/kcachegrind/kcachegrind/treemap.h b/kcachegrind/kcachegrind/treemap.h
index 4bb0b4cd..5508d8fd 100644
--- a/kcachegrind/kcachegrind/treemap.h
+++ b/kcachegrind/kcachegrind/treemap.h
@@ -18,7 +18,7 @@
/**
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*
* This file defines the following classes:
* DrawParams, RectDrawing, TreeMapItem, TreeMapWidget
@@ -30,14 +30,14 @@
#ifndef TREEMAP_H
#define TREEMAP_H
-#include <qstring.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qcolor.h>
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqcolor.h>
+#include <tqapplication.h>
+#include <tqstringlist.h>
class QPopupMenu;
class TreeMapTip;
@@ -74,15 +74,15 @@ public:
// no constructor as this is an abstract class
virtual ~DrawParams() {}
- virtual QString text(int) const = 0;
- virtual QPixmap pixmap(int) const = 0;
+ virtual TQString text(int) const = 0;
+ virtual TQPixmap pixmap(int) const = 0;
virtual Position position(int) const = 0;
// 0: no limit, negative: leave at least -maxLines() free
virtual int maxLines(int) const { return 0; }
virtual int fieldCount() const { return 0; }
- virtual QColor backColor() const { return Qt::white; }
- virtual const QFont& font() const = 0;
+ virtual TQColor backColor() const { return Qt::white; }
+ virtual const TQFont& font() const = 0;
virtual bool selected() const { return false; }
virtual bool current() const { return false; }
@@ -99,33 +99,33 @@ class StoredDrawParams: public DrawParams
{
public:
StoredDrawParams();
- StoredDrawParams(QColor c,
+ StoredDrawParams(TQColor c,
bool selected = false, bool current = false);
// getters
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
Position position(int) const;
int maxLines(int) const;
int fieldCount() const { return _field.size(); }
- QColor backColor() const { return _backColor; }
+ TQColor backColor() const { return _backColor; }
bool selected() const { return _selected; }
bool current() const { return _current; }
bool shaded() const { return _shaded; }
bool rotated() const { return _rotated; }
bool drawFrame() const { return _drawFrame; }
- const QFont& font() const;
+ const TQFont& font() const;
// attribute setters
- void setField(int f, const QString& t, QPixmap pm = QPixmap(),
+ void setField(int f, const TQString& t, TQPixmap pm = TQPixmap(),
Position p = Default, int maxLines = 0);
- void setText(int f, const QString&);
- void setPixmap(int f, const QPixmap&);
+ void setText(int f, const TQString&);
+ void setPixmap(int f, const TQPixmap&);
void setPosition(int f, Position);
void setMaxLines(int f, int);
- void setBackColor(const QColor& c) { _backColor = c; }
+ void setBackColor(const TQColor& c) { _backColor = c; }
void setSelected(bool b) { _selected = b; }
void setCurrent(bool b) { _current = b; }
void setShaded(bool b) { _shaded = b; }
@@ -133,7 +133,7 @@ public:
void drawFrame(bool b) { _drawFrame = b; }
protected:
- QColor _backColor;
+ TQColor _backColor;
bool _selected :1;
bool _current :1;
bool _shaded :1;
@@ -145,13 +145,13 @@ private:
void ensureField(int f);
struct Field {
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Position pos;
int maxLines;
};
- QValueVector<Field> _field;
+ TQValueVector<Field> _field;
};
@@ -167,7 +167,7 @@ private:
class RectDrawing
{
public:
- RectDrawing(QRect);
+ RectDrawing(TQRect);
~RectDrawing();
// The default DrawParams object used.
@@ -175,33 +175,33 @@ public:
// we take control over the given object (i.e. delete at destruction)
void setDrawParams(DrawParams*);
- // draw on a given QPainter, use this class as info provider per default
- void drawBack(QPainter*, DrawParams* dp = 0);
+ // draw on a given TQPainter, use this class as info provider per default
+ void drawBack(TQPainter*, DrawParams* dp = 0);
/* Draw field at position() from pixmap()/text() with maxLines().
* Returns true if something was drawn
*/
- bool drawField(QPainter*, int f, DrawParams* dp = 0);
+ bool drawField(TQPainter*, int f, DrawParams* dp = 0);
// resets rectangle for free space
- void setRect(QRect);
+ void setRect(TQRect);
// Returns the rectangle area still free of text/pixmaps after
// a number of drawText() calls.
- QRect remainingRect(DrawParams* dp = 0);
+ TQRect remainingRect(DrawParams* dp = 0);
private:
int _usedTopLeft, _usedTopCenter, _usedTopRight;
int _usedBottomLeft, _usedBottomCenter, _usedBottomRight;
- QRect _rect;
+ TQRect _rect;
// temporary
int _fontHeight;
- QFontMetrics* _fm;
+ TQFontMetrics* _fm;
DrawParams* _dp;
};
-class TreeMapItemList: public QPtrList<TreeMapItem>
+class TreeMapItemList: public TQPtrList<TreeMapItem>
{
public:
TreeMapItem* commonParent();
@@ -209,7 +209,7 @@ protected:
int compareItems ( Item item1, Item item2 );
};
-typedef QPtrListIterator<TreeMapItem> TreeMapItemListIterator;
+typedef TQPtrListIterator<TreeMapItem> TreeMapItemListIterator;
/**
@@ -246,8 +246,8 @@ public:
TreeMapItem(TreeMapItem* parent = 0, double value = 1.0 );
TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2 = QString::null,
- QString text3 = QString::null, QString text4 = QString::null);
+ TQString text1, TQString text2 = TQString::null,
+ TQString text3 = TQString::null, TQString text4 = TQString::null);
virtual ~TreeMapItem();
bool isChildOf(TreeMapItem*);
@@ -279,7 +279,7 @@ public:
* Returns a list of text strings of specified text number,
* from root up to this item.
*/
- QStringList path(int) const;
+ TQStringList path(int) const;
/**
* Depth of this item. This is the distance to root.
@@ -295,9 +295,9 @@ public:
* Temporary rectangle used for drawing this item the last time.
* This is internally used to map from a point to an item.
*/
- void setItemRect(const QRect& r) { _rect = r; }
+ void setItemRect(const TQRect& r) { _rect = r; }
void clearItemRect();
- const QRect& itemRect() const { return _rect; }
+ const TQRect& itemRect() const { return _rect; }
int width() const { return _rect.width(); }
int height() const { return _rect.height(); }
@@ -306,8 +306,8 @@ public:
* Used internally to enable tooltip.
*/
void clearFreeRects();
- QPtrList<QRect>* freeRects() const { return _freeRects; }
- void addFreeRect(const QRect& r);
+ TQPtrList<TQRect>* freeRects() const { return _freeRects; }
+ void addFreeRect(const TQRect& r);
/**
* Temporary child item index of the child that was current() recently.
@@ -330,7 +330,7 @@ public:
virtual double value() const;
// replace "Default" position with setting from TreeMapWidget
virtual Position position(int) const;
- virtual const QFont& font() const;
+ virtual const TQFont& font() const;
virtual bool isMarked(int) const;
virtual int borderWidth() const;
@@ -380,8 +380,8 @@ private:
bool _sortAscending;
// temporary layout
- QRect _rect;
- QPtrList<QRect>* _freeRects;
+ TQRect _rect;
+ TQPtrList<TQRect>* _freeRects;
int _depth;
// temporary self value (when using level skipping)
@@ -408,7 +408,7 @@ public:
enum SelectionMode { Single, Multi, Extended, NoSelection };
/* The widget becomes owner of the base item */
- TreeMapWidget(TreeMapItem* base, QWidget* parent=0, const char* name=0);
+ TreeMapWidget(TreeMapItem* base, TQWidget* parent=0, const char* name=0);
~TreeMapWidget();
/**
@@ -419,7 +419,7 @@ public:
/**
* Returns a reference to the current widget font.
*/
- const QFont& currentFont() const;
+ const TQFont& currentFont() const;
/**
* Returns the area item at position x/y, independent from any
@@ -501,8 +501,8 @@ public:
void setSplitMode(TreeMapItem::SplitMode m);
TreeMapItem::SplitMode splitMode() const;
// returns true if string was recognized
- bool setSplitMode(QString);
- QString splitModeString() const;
+ bool setSplitMode(TQString);
+ TQString splitModeString() const;
/*
@@ -557,8 +557,8 @@ public:
int minimalArea() const { return _minimalArea; }
/* defaults for text attributes */
- QString defaultFieldType(int) const;
- QString defaultFieldStop(int) const;
+ TQString defaultFieldType(int) const;
+ TQString defaultFieldStop(int) const;
bool defaultFieldVisible(int) const;
bool defaultFieldForced(int) const;
DrawParams::Position defaultFieldPosition(int) const;
@@ -568,14 +568,14 @@ public:
* This is important for the visualization menu generated
* with visualizationMenu()
*/
- void setFieldType(int, QString);
- QString fieldType(int) const;
+ void setFieldType(int, TQString);
+ TQString fieldType(int) const;
/**
* Stop drawing at item with name
*/
- void setFieldStop(int, QString);
- QString fieldStop(int) const;
+ void setFieldStop(int, TQString);
+ TQString fieldStop(int) const;
/**
* Should the text with number textNo be visible?
@@ -598,8 +598,8 @@ public:
*/
void setFieldPosition(int, DrawParams::Position);
DrawParams::Position fieldPosition(int) const;
- void setFieldPosition(int, QString);
- QString fieldPositionString(int) const;
+ void setFieldPosition(int, TQString);
+ TQString fieldPositionString(int) const;
/**
* Do we allow the texts to be rotated by 90 degrees for better fitting?
@@ -613,8 +613,8 @@ public:
/**
* Save/restore options.
*/
- void saveOptions(KConfigGroup*, QString prefix = QString::null);
- void restoreOptions(KConfigGroup*, QString prefix = QString::null);
+ void saveOptions(KConfigGroup*, TQString prefix = TQString::null);
+ void restoreOptions(KConfigGroup*, TQString prefix = TQString::null);
/**
* These functions populate given popup menus.
@@ -622,12 +622,12 @@ public:
*
* The int is the menu id where to start for the items (100 IDs reserved).
*/
- void addSplitDirectionItems(QPopupMenu*, int);
- void addSelectionItems(QPopupMenu*, int, TreeMapItem*);
- void addFieldStopItems(QPopupMenu*, int, TreeMapItem*);
- void addAreaStopItems(QPopupMenu*, int, TreeMapItem*);
- void addDepthStopItems(QPopupMenu*, int, TreeMapItem*);
- void addVisualizationItems(QPopupMenu*, int);
+ void addSplitDirectionItems(TQPopupMenu*, int);
+ void addSelectionItems(TQPopupMenu*, int, TreeMapItem*);
+ void addFieldStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addAreaStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addDepthStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addVisualizationItems(TQPopupMenu*, int);
TreeMapWidget* widget() { return this; }
TreeMapItem* current() const { return _current; }
@@ -640,7 +640,7 @@ public:
* Return tooltip string to show for a item (can be rich text)
* Default implementation gives lines with "text0 (text1)" going to root.
*/
- virtual QString tipString(TreeMapItem* i) const;
+ virtual TQString tipString(TreeMapItem* i) const;
/**
* Redraws an item with all children.
@@ -681,20 +681,20 @@ signals:
void clicked(TreeMapItem*);
void returnPressed(TreeMapItem*);
void doubleClicked(TreeMapItem*);
- void rightButtonPressed(TreeMapItem*, const QPoint &);
- void contextMenuRequested(TreeMapItem*, const QPoint &);
+ void rightButtonPressed(TreeMapItem*, const TQPoint &);
+ void contextMenuRequested(TreeMapItem*, const TQPoint &);
protected:
- void mousePressEvent( QMouseEvent * );
- void contextMenuEvent( QContextMenuEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mouseDoubleClickEvent( QMouseEvent * );
- void keyPressEvent( QKeyEvent* );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
- void showEvent( QShowEvent * );
- void fontChange( const QFont& );
+ void mousePressEvent( TQMouseEvent * );
+ void contextMenuEvent( TQContextMenuEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void keyPressEvent( TQKeyEvent* );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
+ void showEvent( TQShowEvent * );
+ void fontChange( const TQFont& );
private:
TreeMapItemList diff(TreeMapItemList&, TreeMapItemList&);
@@ -704,13 +704,13 @@ private:
TreeMapItem* i2, bool selected);
bool isTmpSelected(TreeMapItem* i);
- void drawItem(QPainter* p, TreeMapItem*);
- void drawItems(QPainter* p, TreeMapItem*);
- bool horizontal(TreeMapItem* i, const QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r,
+ void drawItem(TQPainter* p, TreeMapItem*);
+ void drawItems(TQPainter* p, TreeMapItem*);
+ bool horizontal(TreeMapItem* i, const TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack);
- bool drawItemArray(QPainter* p, TreeMapItem*, QRect& r, double,
+ bool drawItemArray(TQPainter* p, TreeMapItem*, TQRect& r, double,
TreeMapItemListIterator it, int len, bool);
bool resizeAttr(int);
@@ -721,11 +721,11 @@ private:
// attributes for field, per textNo
struct FieldAttr {
- QString type, stop;
+ TQString type, stop;
bool visible, forced;
DrawParams::Position pos;
};
- QValueVector<FieldAttr> _attr;
+ TQValueVector<FieldAttr> _attr;
SelectionMode _selectionMode;
TreeMapItem::SplitMode _splitMode;
@@ -748,11 +748,11 @@ private:
bool _inShiftDrag, _inControlDrag;
// temporary widget font metrics while drawing
- QFont _font;
+ TQFont _font;
int _fontHeight;
// back buffer pixmap
- QPixmap _pixmap;
+ TQPixmap _pixmap;
};
#endif
diff --git a/kcachegrind/kcachegrind/utils.cpp b/kcachegrind/kcachegrind/utils.cpp
index 0401a47e..65c7e347 100644
--- a/kcachegrind/kcachegrind/utils.cpp
+++ b/kcachegrind/kcachegrind/utils.cpp
@@ -29,7 +29,7 @@
#include <sys/mman.h>
#endif
-#include <qfile.h>
+#include <tqfile.h>
#include <errno.h>
#include "utils.h"
@@ -171,7 +171,7 @@ bool FixString::stripName(FixString& s)
if (_len==0) return false;
// first char has to be a letter or "_"
- if (!QChar(*_str).isLetter() && (*_str != '_')) return false;
+ if (!TQChar(*_str).isLetter() && (*_str != '_')) return false;
int newLen = 1;
const char* newStr = _str;
@@ -180,7 +180,7 @@ bool FixString::stripName(FixString& s)
_len--;
while(_len>0) {
- if (!QChar(*_str).isLetterOrNumber()
+ if (!TQChar(*_str).isLetterOrNumber()
&& (*_str != '_')) break;
newLen++;
@@ -343,7 +343,7 @@ bool FixString::stripInt64(int64& v, bool stripSpaces)
// class FixFile
-FixFile::FixFile(QFile* file)
+FixFile::FixFile(TQFile* file)
{
if (!file) {
_len = 0;
@@ -354,7 +354,7 @@ FixFile::FixFile(QFile* file)
_filename = file->name();
if (!file->isOpen() && !file->open( IO_ReadOnly ) ) {
- qWarning( "%s: %s", (const char*) QFile::encodeName(_filename),
+ qWarning( "%s: %s", (const char*) TQFile::encodeName(_filename),
strerror( errno ) );
_len = 0;
_currentLeft = 0;
diff --git a/kcachegrind/kcachegrind/utils.h b/kcachegrind/kcachegrind/utils.h
index 259a508e..d02ffceb 100644
--- a/kcachegrind/kcachegrind/utils.h
+++ b/kcachegrind/kcachegrind/utils.h
@@ -23,7 +23,7 @@
#ifndef UTILS_H
#define UTILS_H
-#include <qstring.h>
+#include <tqstring.h>
class QFile;
@@ -85,8 +85,8 @@ class FixString {
bool stripUInt64(uint64&, bool stripSpaces = true);
bool stripInt64(int64&, bool stripSpaces = true);
- operator QString() const
- { return QString::fromLatin1(_str,_len); }
+ operator TQString() const
+ { return TQString::fromLatin1(_str,_len); }
private:
const char* _str;
@@ -100,7 +100,7 @@ class FixString {
class FixFile {
public:
- FixFile(QFile*);
+ FixFile(TQFile*);
~FixFile();
/**
@@ -115,10 +115,10 @@ class FixFile {
private:
char *_base, *_current;
- QByteArray _data;
+ TQByteArray _data;
unsigned _len, _currentLeft;
bool _used_mmap, _openError;
- QString _filename;
+ TQString _filename;
};
diff --git a/kdeaccounts-plugin/kdeaccountsformat.cpp b/kdeaccounts-plugin/kdeaccountsformat.cpp
index d445e311..fc9f2cb3 100644
--- a/kdeaccounts-plugin/kdeaccountsformat.cpp
+++ b/kdeaccounts-plugin/kdeaccountsformat.cpp
@@ -1,7 +1,7 @@
#include "kdeaccountsformat.h"
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#include <kabc/addressbook.h>
#include <kabc/addressee.h>
@@ -22,21 +22,21 @@ extern "C"
bool KDEAccountsFormat::loadAll( KABC::AddressBook *book,
KABC::Resource *resource,
- QFile *file )
+ TQFile *file )
{
if ( !book || !file ) // eh?
return false;
- QString uuid = "KDEAccountsEntry.";
+ TQString uuid = "KDEAccountsEntry.";
int id = 0;
- QByteArray array = file->readAll();
+ TQByteArray array = file->readAll();
file->close();
- QByteArray::ConstIterator it = array.begin();
- QByteArray::ConstIterator end = array.end();
- QByteArray::ConstIterator startLine;
- QString line;
+ TQByteArray::ConstIterator it = array.begin();
+ TQByteArray::ConstIterator end = array.end();
+ TQByteArray::ConstIterator startLine;
+ TQString line;
char eol = '\n';
char delim = ' ';
@@ -48,11 +48,11 @@ bool KDEAccountsFormat::loadAll( KABC::AddressBook *book,
{ } // find eol
uint length = it - startLine;
- line = QString::fromUtf8( startLine, length ).simplifyWhiteSpace();
+ line = TQString::fromUtf8( startLine, length ).simplifyWhiteSpace();
- QString nickName;
- QString name;
- QString email;
+ TQString nickName;
+ TQString name;
+ TQString email;
int firstSpace = line.find( delim );
if ( firstSpace > 0 )
@@ -76,7 +76,7 @@ bool KDEAccountsFormat::loadAll( KABC::AddressBook *book,
address.setOrganization("KDE Project");
address.insertCategory("KDE Developer");
address.insertEmail( email );
- address.setUid( uuid + QString::number( id++ ));
+ address.setUid( uuid + TQString::number( id++ ));
address.setResource( resource );
book->insertAddressee( address );
diff --git a/kdeaccounts-plugin/kdeaccountsformat.h b/kdeaccounts-plugin/kdeaccountsformat.h
index 6eb07c7c..3e12d30d 100644
--- a/kdeaccounts-plugin/kdeaccountsformat.h
+++ b/kdeaccounts-plugin/kdeaccountsformat.h
@@ -23,22 +23,22 @@ public:
~KDEAccountsFormat() {}
virtual bool loadAll( KABC::AddressBook *,
- KABC::Resource *resource, QFile *file );
+ KABC::Resource *resource, TQFile *file );
- virtual bool load( KABC::Addressee&, QFile *)
+ virtual bool load( KABC::Addressee&, TQFile *)
{
qDebug("*** KDE Accounts format: load single entry not supported.");
return false;
}
- virtual void save( const KABC::Addressee&, QFile *)
+ virtual void save( const KABC::Addressee&, TQFile *)
{
qDebug("*** KDE Accounts format: save not supported.");
}
- virtual void saveAll( KABC::AddressBook *, KABC::Resource *, QFile *)
+ virtual void saveAll( KABC::AddressBook *, KABC::Resource *, TQFile *)
{
qDebug("*** KDE Accounts format: save not supported.");
}
- virtual bool checkFormat( QFile *file ) const
+ virtual bool checkFormat( TQFile *file ) const
{
if ( file->name().endsWith( "/accounts" ) )
return true; // lame, but works for me :)
diff --git a/kfile-plugins/c++/kfile_cpp.cpp b/kfile-plugins/c++/kfile_cpp.cpp
index 9ca4560b..0840ab7f 100644
--- a/kfile-plugins/c++/kfile_cpp.cpp
+++ b/kfile-plugins/c++/kfile_cpp.cpp
@@ -24,15 +24,15 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
typedef KGenericFactory<KCppPlugin> CppFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_cpp, CppFactory("kfile_cpp"))
-KCppPlugin::KCppPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KCppPlugin::KCppPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
kdDebug(7034) << "c++ plugin\n";
@@ -40,7 +40,7 @@ KCppPlugin::KCppPlugin(QObject *parent, const char *name,
makeMimeTypeInfo("text/x-chdr");
}
-void KCppPlugin::makeMimeTypeInfo(const QString& mimetype)
+void KCppPlugin::makeMimeTypeInfo(const TQString& mimetype)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( mimetype );
@@ -48,25 +48,25 @@ void KCppPlugin::makeMimeTypeInfo(const QString& mimetype)
addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Lines", i18n("Lines"), QVariant::Int);
+ item = addItemInfo(group, "Lines", i18n("Lines"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Code", i18n("Code"), QVariant::Int);
+ item = addItemInfo(group, "Code", i18n("Code"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::Int);
+ item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Blank", i18n("Blank"), QVariant::Int);
+ item = addItemInfo(group, "Blank", i18n("Blank"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Strings", i18n("Strings"), QVariant::Int);
+ item = addItemInfo(group, "Strings", i18n("Strings"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "i18n Strings", i18n("i18n Strings"), QVariant::Int);
+ item = addItemInfo(group, "i18n Strings", i18n("i18n Strings"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Included Files", i18n("Included Files"), QVariant::Int);
+ item = addItemInfo(group, "Included Files", i18n("Included Files"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
}
bool KCppPlugin::readInfo( KFileMetaInfo& info, uint )
{
- QFile f(info.path());
+ TQFile f(info.path());
if (!f.open(IO_ReadOnly))
return false;
@@ -80,9 +80,9 @@ bool KCppPlugin::readInfo( KFileMetaInfo& info, uint )
bool inComment = false;
- QString line;
+ TQString line;
- QTextStream stream( &f );
+ TQTextStream stream( &f );
while (!stream.eof())
{
line = stream.readLine();
@@ -99,15 +99,15 @@ bool KCppPlugin::readInfo( KFileMetaInfo& info, uint )
if (!inComment)
{
codeLines++;
- if (line.contains(QRegExp("^\\s*#\\s*include"))) Includes++;
+ if (line.contains(TQRegExp("^\\s*#\\s*include"))) Includes++;
int pos = line.find("//");
if (pos>=0) commentLines++;
// truncate the comment - we don't want to count strings in it
line.truncate(pos);
- Strings+=line.contains(QRegExp("\".*\""));
- Stringsi18n+=line.contains(QRegExp("(?:i18n|I18N_NOOP)\\s*\\("));
+ Strings+=line.contains(TQRegExp("\".*\""));
+ Stringsi18n+=line.contains(TQRegExp("(?:i18n|I18N_NOOP)\\s*\\("));
}
else
commentLines++;
diff --git a/kfile-plugins/c++/kfile_cpp.h b/kfile-plugins/c++/kfile_cpp.h
index c4388278..29497ae8 100644
--- a/kfile-plugins/c++/kfile_cpp.h
+++ b/kfile-plugins/c++/kfile_cpp.h
@@ -30,11 +30,11 @@ class KCppPlugin: public KFilePlugin
Q_OBJECT
public:
- KCppPlugin(QObject *parent, const char *name, const QStringList& args);
+ KCppPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- void makeMimeTypeInfo(const QString& mimetype);
+ void makeMimeTypeInfo(const TQString& mimetype);
};
#endif
diff --git a/kfile-plugins/diff/kfile_diff.cpp b/kfile-plugins/diff/kfile_diff.cpp
index 0f2fa02d..957d0574 100644
--- a/kfile-plugins/diff/kfile_diff.cpp
+++ b/kfile-plugins/diff/kfile_diff.cpp
@@ -27,12 +27,12 @@
** Added support for Subversion diffs, September 11, 2003 Otto Bruggeman
*/
-#include <qcstring.h>
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qvalidator.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -44,8 +44,8 @@
K_EXPORT_COMPONENT_FACTORY(kfile_diff, KGenericFactory<KDiffPlugin>("kfile_diff"))
-KDiffPlugin::KDiffPlugin(QObject *parent, const char *name,
- const QStringList &preferredItems)
+KDiffPlugin::KDiffPlugin(TQObject *parent, const char *name,
+ const TQStringList &preferredItems)
: KFilePlugin(parent, name, preferredItems)
{
kdDebug(7034) << "diff plugin" << endl;
@@ -54,15 +54,15 @@ KDiffPlugin::KDiffPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::GroupInfo* group;
group = addGroupInfo( info, "General", i18n( "General" ) );
- addItemInfo( group, "Files", i18n( "Files" ), QVariant::UInt );
- addItemInfo( group, "First", i18n( "First File" ), QVariant::String );
- addItemInfo( group, "Format", i18n( "Format" ), QVariant::String );
- addItemInfo( group, "DiffProgram", i18n( "Diff Program" ), QVariant::String );
- addItemInfo( group, "Hunks", i18n( "Hunks" ), QVariant::UInt );
+ addItemInfo( group, "Files", i18n( "Files" ), TQVariant::UInt );
+ addItemInfo( group, "First", i18n( "First File" ), TQVariant::String );
+ addItemInfo( group, "Format", i18n( "Format" ), TQVariant::String );
+ addItemInfo( group, "DiffProgram", i18n( "Diff Program" ), TQVariant::String );
+ addItemInfo( group, "Hunks", i18n( "Hunks" ), TQVariant::UInt );
group = addGroupInfo( info, "Statistics", i18n( "Statistics" ) );
- addItemInfo( group, "Insert", i18n( "Insertions" ), QVariant::UInt );
- addItemInfo( group, "Modify", i18n( "Changes" ), QVariant::UInt );
- addItemInfo( group, "Delete", i18n( "Deletions" ), QVariant::UInt );
+ addItemInfo( group, "Insert", i18n( "Insertions" ), TQVariant::UInt );
+ addItemInfo( group, "Modify", i18n( "Changes" ), TQVariant::UInt );
+ addItemInfo( group, "Delete", i18n( "Deletions" ), TQVariant::UInt );
}
bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
@@ -75,12 +75,12 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
KFileMetaInfoGroup group;
- QFile file( info.path() );
- QStringList lines;
+ TQFile file( info.path() );
+ TQStringList lines;
if( file.open( IO_ReadOnly ) )
{
- QTextStream stream( &file );
+ TQTextStream stream( &file );
while (!stream.eof())
{
lines.append( stream.readLine() );
@@ -88,8 +88,8 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
file.close();
}
- QString format;
- QString program;
+ TQString format;
+ TQString program;
enum KDiffPlugin::Format diffFormat;
enum KDiffPlugin::DiffProgram diffProgram;
@@ -114,9 +114,9 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
determineDiffInfo( lines, diffFormat, &numberOfFiles, &numberOfHunks, &numberOfAdditions, &numberOfChanges, &numberOfDeletions );
}
- QString filename;
- QRegExp firstFile( "^Index: (.*)" );
- QStringList::ConstIterator it = lines.begin();
+ TQString filename;
+ TQRegExp firstFile( "^Index: (.*)" );
+ TQStringList::ConstIterator it = lines.begin();
it = lines.begin();
while ( it != lines.end() )
@@ -196,39 +196,39 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what )
return dataSet;
}
-enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const QStringList lines ) const
+enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const TQStringList lines ) const
{
- QString line;
+ TQString line;
if ( lines.count() == 0 )
{
return KDiffPlugin::Empty;
}
- QStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator it = lines.begin();
while ( it != lines.end() )
{
line = (*it);
- if ( line.find( QRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 )
+ if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 )
{
return KDiffPlugin::Normal;
}
- else if ( line.find( QRegExp( "^--- " ), 0 ) == 0 )
+ else if ( line.find( TQRegExp( "^--- " ), 0 ) == 0 )
{
// unified has first a '^--- ' line, then a '^+++ ' line
return KDiffPlugin::Unified;
}
- else if ( line.find( QRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 )
+ else if ( line.find( TQRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 )
{
// context has first a '^*** ' line, then a '^--- ' line
return KDiffPlugin::Context;
}
- else if ( line.find( QRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 )
+ else if ( line.find( TQRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 )
{
return KDiffPlugin::RCS;
}
- else if ( line.find( QRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 )
+ else if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 )
{
return KDiffPlugin::Ed;
}
@@ -237,17 +237,17 @@ enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const QStringList lin
return KDiffPlugin::Unknown;
}
-enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const QStringList lines ) const
+enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const TQStringList lines ) const
{
if ( lines.count() == 0 )
{
return KDiffPlugin::Undeterminable;
}
- QStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator it = lines.begin();
// very crude, might need some more refining
- QRegExp diffRE( "^diff .*" );
- QRegExp p4sRE("^==== ");
+ TQRegExp diffRE( "^diff .*" );
+ TQRegExp p4sRE("^==== ");
bool indexFound = false;
@@ -271,9 +271,9 @@ enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const QStringLi
return KDiffPlugin::Undeterminable;
}
-const QString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffFormat ) const
+const TQString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffFormat ) const
{
- QString format;
+ TQString format;
switch( diffFormat )
{
case KDiffPlugin::Context:
@@ -303,9 +303,9 @@ const QString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffF
return format;
}
-const QString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const
+const TQString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const
{
- QString program;
+ TQString program;
switch( diffProgram )
{
@@ -331,7 +331,7 @@ const QString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram
return program;
}
-void KDiffPlugin::determineDiffInfo( const QStringList lines,
+void KDiffPlugin::determineDiffInfo( const TQStringList lines,
enum KDiffPlugin::Format diffFormat,
int* numberOfFiles,
int* numberOfHunks,
@@ -339,20 +339,20 @@ void KDiffPlugin::determineDiffInfo( const QStringList lines,
int* numberOfChanges,
int* numberOfDeletions )
{
- QString line;
+ TQString line;
- QRegExp edAdd( "([0-9]+)(|,([0-9]+))a" );
- QRegExp edDel( "([0-9]+)(|,([0-9]+))d" );
- QRegExp edMod( "([0-9]+)(|,([0-9]+))c" );
+ TQRegExp edAdd( "([0-9]+)(|,([0-9]+))a" );
+ TQRegExp edDel( "([0-9]+)(|,([0-9]+))d" );
+ TQRegExp edMod( "([0-9]+)(|,([0-9]+))c" );
- QRegExp normalAdd( "[0-9]+a([0-9]+)(|,([0-9]+))" );
- QRegExp normalDel( "([0-9]+)(|,([0-9]+))d(|[0-9]+)" );
- QRegExp normalMod( "([0-9]+)(|,([0-9]+))c([0-9]+)(|,([0-9]+))" );
+ TQRegExp normalAdd( "[0-9]+a([0-9]+)(|,([0-9]+))" );
+ TQRegExp normalDel( "([0-9]+)(|,([0-9]+))d(|[0-9]+)" );
+ TQRegExp normalMod( "([0-9]+)(|,([0-9]+))c([0-9]+)(|,([0-9]+))" );
- QRegExp rcsAdd( "a[0-9]+ ([0-9]+)" );
- QRegExp rcsDel( "d[0-9]+ ([0-9]+)" );
+ TQRegExp rcsAdd( "a[0-9]+ ([0-9]+)" );
+ TQRegExp rcsDel( "d[0-9]+ ([0-9]+)" );
- QStringList::ConstIterator it = lines.begin();
+ TQStringList::ConstIterator it = lines.begin();
switch( diffFormat )
{
diff --git a/kfile-plugins/diff/kfile_diff.h b/kfile-plugins/diff/kfile_diff.h
index d32e176c..b395c5da 100644
--- a/kfile-plugins/diff/kfile_diff.h
+++ b/kfile-plugins/diff/kfile_diff.h
@@ -27,8 +27,8 @@ class KDiffPlugin: public KFilePlugin
Q_OBJECT
public:
- KDiffPlugin( QObject *parent, const char *name,
- const QStringList& preferredItems );
+ KDiffPlugin( TQObject *parent, const char *name,
+ const TQStringList& preferredItems );
virtual bool readInfo( KFileMetaInfo& info, uint what );
@@ -38,12 +38,12 @@ public:
enum DiffProgram { CVSDiff, Diff, Diff3, Perforce, SubVersion, Undeterminable }; // cant use Unknown again :(
private:
- enum Format determineDiffFormat ( const QStringList lines ) const;
- enum DiffProgram determineDiffProgram ( const QStringList lines ) const;
- const QString determineI18nedFormat ( enum KDiffPlugin::Format diffFormat ) const;
- const QString determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const;
+ enum Format determineDiffFormat ( const TQStringList lines ) const;
+ enum DiffProgram determineDiffProgram ( const TQStringList lines ) const;
+ const TQString determineI18nedFormat ( enum KDiffPlugin::Format diffFormat ) const;
+ const TQString determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const;
// yes ugly, it's better to use a struct or classmembers to pass these parameters around
- void determineDiffInfo ( const QStringList lines,
+ void determineDiffInfo ( const TQStringList lines,
enum KDiffPlugin::Format diffFormat, int* numberOfFiles,
int* numberOfHunks, int* numberOfAdditions,
int* numberOfChanges, int* numberOfDeletions );
diff --git a/kfile-plugins/ts/kfile_ts.cpp b/kfile-plugins/ts/kfile_ts.cpp
index 3d84bb67..0d6f5dc1 100644
--- a/kfile-plugins/ts/kfile_ts.cpp
+++ b/kfile-plugins/ts/kfile_ts.cpp
@@ -22,20 +22,20 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
typedef KGenericFactory<KTsPlugin> TsFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_ts, TsFactory("kfile_ts"))
-KTsPlugin::KTsPlugin(QObject *parent, const char *name,
- const QStringList &args) : KFilePlugin(parent, name, args)
+KTsPlugin::KTsPlugin(TQObject *parent, const char *name,
+ const TQStringList &args) : KFilePlugin(parent, name, args)
{
makeMimeTypeInfo( "application/x-linguist" );
}
-void KTsPlugin::makeMimeTypeInfo(const QString& mimeType)
+void KTsPlugin::makeMimeTypeInfo(const TQString& mimeType)
{
KFileMimeTypeInfo* info = addMimeTypeInfo(mimeType);
@@ -43,18 +43,18 @@ void KTsPlugin::makeMimeTypeInfo(const QString& mimeType)
addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Messages", i18n("Messages"), QVariant::Int);
+ item = addItemInfo(group, "Messages", i18n("Messages"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Translated", i18n("Translated"), QVariant::Int);
+ item = addItemInfo(group, "Translated", i18n("Translated"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Untranslated", i18n("Untranslated"), QVariant::Int);
+ item = addItemInfo(group, "Untranslated", i18n("Untranslated"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Obsolete", i18n("Obsolete"), QVariant::Int);
+ item = addItemInfo(group, "Obsolete", i18n("Obsolete"), TQVariant::Int);
}
bool KTsPlugin::readInfo(KFileMetaInfo& info, uint)
{
- QFile f(info.path());
+ TQFile f(info.path());
if (!f.open(IO_ReadOnly))
return false;
@@ -62,8 +62,8 @@ bool KTsPlugin::readInfo(KFileMetaInfo& info, uint)
int untranslated = 0;
int obsolete = 0;
- QTextStream stream( &f );
- QString line = stream.readLine();
+ TQTextStream stream( &f );
+ TQString line = stream.readLine();
// is it really a linguist file?
if (!line.contains("<!DOCTYPE TS>", false))
diff --git a/kfile-plugins/ts/kfile_ts.h b/kfile-plugins/ts/kfile_ts.h
index 8bf73293..4515422e 100644
--- a/kfile-plugins/ts/kfile_ts.h
+++ b/kfile-plugins/ts/kfile_ts.h
@@ -29,11 +29,11 @@ class KTsPlugin: public KFilePlugin
Q_OBJECT
public:
- KTsPlugin(QObject *parent, const char *name, const QStringList& args);
+ KTsPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- void makeMimeTypeInfo(const QString& mimeType);
+ void makeMimeTypeInfo(const TQString& mimeType);
};
#endif
diff --git a/kioslave/svn/ksvnd/commitdlg.ui.h b/kioslave/svn/ksvnd/commitdlg.ui.h
index 3e1994ad..317476a5 100644
--- a/kioslave/svn/ksvnd/commitdlg.ui.h
+++ b/kioslave/svn/ksvnd/commitdlg.ui.h
@@ -18,13 +18,13 @@
*/
-void CommitDlg::setLog( const QString & comment )
+void CommitDlg::setLog( const TQString & comment )
{
listMessage->setText(comment);
}
-QString CommitDlg::logMessage() const
+TQString CommitDlg::logMessage() const
{
return textMessage->text();
}
diff --git a/kioslave/svn/ksvnd/ksvnd.cpp b/kioslave/svn/ksvnd/ksvnd.cpp
index 7442ee95..5da4d9d9 100644
--- a/kioslave/svn/ksvnd/ksvnd.cpp
+++ b/kioslave/svn/ksvnd/ksvnd.cpp
@@ -22,8 +22,8 @@
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "config.h"
@@ -31,33 +31,33 @@
#include "commitdlg.h"
extern "C" {
- KDE_EXPORT KDEDModule *create_ksvnd(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_ksvnd(const TQCString &name) {
return new KSvnd(name);
}
}
-KSvnd::KSvnd(const QCString &name)
+KSvnd::KSvnd(const TQCString &name)
: KDEDModule(name) {
}
KSvnd::~KSvnd() {
}
-QString KSvnd::commitDialog(QString modifiedFiles) {
+TQString KSvnd::commitDialog(TQString modifiedFiles) {
CommitDlg commitDlg;
commitDlg.setLog( modifiedFiles );
int result = commitDlg.exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
return commitDlg.logMessage();
} else
- return QString::null;
+ return TQString::null;
}
bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return true;
} else if ( !bdir.exists() ) {
if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -68,10 +68,10 @@ bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && !QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return true;
} else if ( !bdir.exists() ) {
if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -82,10 +82,10 @@ bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && !QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return false;
} else if ( !bdir.exists() ) {
if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -96,10 +96,10 @@ bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return false;
} else if ( !bdir.exists() ) {
if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -109,11 +109,11 @@ bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) {
return true;
}
-bool KSvnd::isFileInSvnEntries ( const QString filename, const QString entfile ) {
- QFile file( entfile );
+bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) {
+ TQFile file( entfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine().simplifyWhiteSpace();
if ( line == "name=\""+ filename + "\"" ) {
@@ -126,11 +126,11 @@ bool KSvnd::isFileInSvnEntries ( const QString filename, const QString entfile )
return false;
}
-bool KSvnd::isFileInExternals ( const QString filename, const QString propfile ) {
- QFile file( propfile );
+bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) {
+ TQFile file( propfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QStringList line;
+ TQTextStream stream( &file );
+ TQStringList line;
while ( !stream.atEnd() )
line << stream.readLine().simplifyWhiteSpace();
for ( uint i = 0 ; i < line.count(); i++ ) {
@@ -159,38 +159,38 @@ bool KSvnd::isFileInExternals ( const QString filename, const QString propfile )
bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) {
bool result = true; //one negative match is enough
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
//exception for .svn dirs
if ( ( *it ).path(-1).endsWith( "/.svn" ) )
return true;
//if is a directory check whether it contains a .svn/entries file
- QDir dir( ( *it ).path() );
+ TQDir dir( ( *it ).path() );
if ( dir.exists() ) { //it's a dir
- if ( !QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
result = false;
}
//else check if ./.svn/entries exists
- if ( !QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+ if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) )
result = false;
}
return result;
}
bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
//skip .svn dirs
if ( ( *it ).path(-1).endsWith( "/.svn" ) )
continue;
//if is a directory check whether it contains a .svn/entries file
- QDir dir( ( *it ).path() );
+ TQDir dir( ( *it ).path() );
if ( dir.exists() ) { //it's a dir
- if ( QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
return true;
}
//else check if ./.svn/entries exists
- if ( QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) )
return true;
}
return false;
@@ -199,7 +199,7 @@ bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) {
int KSvnd::getStatus( const KURL::List& list ) {
int result = 0;
uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0;
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
if ( isFolder ( ( *it ) ) ) {
folders++;
} else {
@@ -208,13 +208,13 @@ int KSvnd::getStatus( const KURL::List& list ) {
if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy
parentsentries++;
} else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all)
- if ( QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
subdirhavesvn++;
if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) {
external++;
}
}
- if ( ( isFolder( ( *it ) ) && QFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || QFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ?
+ if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ?
parentshavesvn++;
}
if ( files > 0 )
@@ -250,12 +250,12 @@ int KSvnd::getStatus( const KURL::List& list ) {
}
bool KSvnd::isFolder( const KURL& url ) {
- QDir d( url.path() );
+ TQDir d( url.path() );
return d.exists();
}
-QStringList KSvnd::getActionMenu ( const KURL::List &list ) {
- QStringList result;
+TQStringList KSvnd::getActionMenu ( const KURL::List &list ) {
+ TQStringList result;
int listStatus = getStatus( list );
if ( !(listStatus & SomeAreInParentsEntries) &&
@@ -304,8 +304,8 @@ QStringList KSvnd::getActionMenu ( const KURL::List &list ) {
return result;
}
-QStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
- QStringList result;
+TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
+ TQStringList result;
int listStatus = getStatus( list );
@@ -321,28 +321,28 @@ QStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
}
#if 0
-void KSvnd::notify(const QString& path, int action, int kind, const QString& mime_type, int content_state, int prop_state, long int revision, const QString& userstring) {
+void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) {
kdDebug(7128) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl;
- QByteArray params;
+ TQByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring;
- emitDCOPSignal( "subversionNotify(QString,int,int,QString,int,int,long int,QString)", params );
+ emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params );
}
-void KSvnd::status(const QString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) {
+void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) {
kdDebug(7128) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " "
<< repos_text_status << " " << repos_prop_status << " " << rev << endl;
- QByteArray params;
+ TQByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev;
- emitDCOPSignal( "subversionStatus(QString,int,int,int,int,long int)", params );
+ emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params );
}
-void KSvnd::popupMessage( const QString& message ) {
+void KSvnd::popupMessage( const TQString& message ) {
kdDebug(7128) << "KDED/Subversion : popupMessage" << message << endl;
KMessageBox::information(0, message, i18n( "Subversion" ) );
}
diff --git a/kioslave/svn/ksvnd/ksvnd.h b/kioslave/svn/ksvnd/ksvnd.h
index 1dd304c8..edb1073e 100644
--- a/kioslave/svn/ksvnd/ksvnd.h
+++ b/kioslave/svn/ksvnd/ksvnd.h
@@ -24,7 +24,7 @@
#include <dcopclient.h>
#include <kdedmodule.h>
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KSvnd : public KDEDModule
{
@@ -34,34 +34,34 @@ class KSvnd : public KDEDModule
//note: InSVN means parent is added. InRepos means itself is added
enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 };
public:
- KSvnd(const QCString &);
+ KSvnd(const TQCString &);
~KSvnd();
k_dcop:
// void addAuthInfo(KIO::AuthInfo, long);
- QString commitDialog(QString);
+ TQString commitDialog(TQString);
bool anyNotValidWorkingCopy( const KURL::List& wclist );
bool anyValidWorkingCopy( const KURL::List& wclist );
bool AreAnyFilesNotInSvn( const KURL::List& wclist );
bool AreAnyFilesInSvn( const KURL::List& wclist );
bool AreAllFilesNotInSvn( const KURL::List& wclist );
bool AreAllFilesInSvn( const KURL::List& wclist );
- QStringList getActionMenu ( const KURL::List& list );
- QStringList getTopLevelActionMenu ( const KURL::List &list );
-// void notify(const QString&, int ,int, const QString& , int , int, long int, const QString&);
-// void status(const QString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status ,long int rev);
-// void popupMessage( const QString& message );
+ TQStringList getActionMenu ( const KURL::List& list );
+ TQStringList getTopLevelActionMenu ( const KURL::List &list );
+// void notify(const TQString&, int ,int, const TQString& , int , int, long int, const TQString&);
+// void status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status ,long int rev);
+// void popupMessage( const TQString& message );
k_dcop_signals:
//emitted whenever something happens using subversion ;)
-// void subversionNotify(const QString&, int ,int, const QString& , int , int, long int, const QString&);
-// void subversionStatus(const QString&,int,int,int,int,long int);
+// void subversionNotify(const TQString&, int ,int, const TQString& , int , int, long int, const TQString&);
+// void subversionStatus(const TQString&,int,int,int,int,long int);
public slots:
protected:
- bool isFileInSvnEntries ( const QString filename, const QString entfile );
- bool isFileInExternals ( const QString filename, const QString propfile );
+ bool isFileInSvnEntries ( const TQString filename, const TQString entfile );
+ bool isFileInExternals ( const TQString filename, const TQString propfile );
bool isFolder( const KURL& url );
int getStatus( const KURL::List& list );
};
diff --git a/kioslave/svn/svn.cpp b/kioslave/svn/svn.cpp
index f2afd61f..b7341df0 100644
--- a/kioslave/svn/svn.cpp
+++ b/kioslave/svn/svn.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qsocket.h>
-#include <qdatetime.h>
-#include <qbitarray.h>
+#include <tqcstring.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
+#include <tqbitarray.h>
#include <stdlib.h>
#include <math.h>
@@ -39,7 +39,7 @@
#include <kurl.h>
#include <ksock.h>
#include <dcopclient.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <subversion-1/svn_sorts.h>
#include <subversion-1/svn_path.h>
@@ -48,7 +48,7 @@
#include <subversion-1/svn_time.h>
#include <kmimetype.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "svn.h"
#include <apr_portable.h>
@@ -111,7 +111,7 @@ compare_items_as_paths (const svn_sort__item_t*a, const svn_sort__item_t*b) {
return svn_path_compare_paths ((const char *)a->key, (const char *)b->key);
}
-kio_svnProtocol::kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket)
+kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("kio_svn", pool_socket, app_socket) {
kdDebug(7128) << "kio_svnProtocol::kio_svnProtocol()" << endl;
@@ -231,7 +231,7 @@ void kio_svnProtocol::recordCurrentURL(const KURL& url) {
void kio_svnProtocol::get(const KURL& url ){
kdDebug(7128) << "kio_svn::get(const KURL& url)" << endl ;
- QString remoteServer = url.host();
+ TQString remoteServer = url.host();
infoMessage(i18n("Looking for %1...").arg( remoteServer ) );
apr_pool_t *subpool = svn_pool_create (pool);
@@ -240,7 +240,7 @@ void kio_svnProtocol::get(const KURL& url ){
bt->string_stream = svn_stream_create(bt,subpool);
svn_stream_set_write(bt->string_stream,write_to_string);
- QString target = makeSvnURL( url );
+ TQString target = makeSvnURL( url );
kdDebug(7128) << "SvnURL: " << target << endl;
recordCurrentURL( KURL( target ) );
@@ -249,7 +249,7 @@ void kio_svnProtocol::get(const KURL& url ){
svn_opt_revision_t endrev;
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
- QString revstr = target.mid( idx+5 );
+ TQString revstr = target.mid( idx+5 );
#if 0
kdDebug(7128) << "revision string found " << revstr << endl;
if ( revstr == "HEAD" ) {
@@ -278,7 +278,7 @@ void kio_svnProtocol::get(const KURL& url ){
}
// Send the mimeType as soon as it is known
- QByteArray *cp = new QByteArray();
+ TQByteArray *cp = new TQByteArray();
cp->setRawData( bt->target_string->data, bt->target_string->len );
KMimeType::Ptr mt = KMimeType::findByContent(*cp);
kdDebug(7128) << "KMimeType returned : " << mt->name() << endl;
@@ -289,7 +289,7 @@ void kio_svnProtocol::get(const KURL& url ){
//send data
data(*cp);
- data(QByteArray()); // empty array means we're done sending the data
+ data(TQByteArray()); // empty array means we're done sending the data
finished();
svn_pool_destroy (subpool);
}
@@ -302,7 +302,7 @@ void kio_svnProtocol::stat(const KURL & url){
svn_node_kind_t kind;
apr_pool_t *subpool = svn_pool_create (pool);
- QString target = makeSvnURL( url);
+ TQString target = makeSvnURL( url);
kdDebug(7128) << "SvnURL: " << target << endl;
recordCurrentURL( KURL( target ) );
@@ -311,7 +311,7 @@ void kio_svnProtocol::stat(const KURL & url){
svn_opt_revision_t endrev;
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
- QString revstr = target.mid( idx+5 );
+ TQString revstr = target.mid( idx+5 );
#if 0
kdDebug(7128) << "revision string found " << revstr << endl;
if ( revstr == "HEAD" ) {
@@ -407,7 +407,7 @@ void kio_svnProtocol::listDir(const KURL& url){
apr_pool_t *subpool = svn_pool_create (pool);
apr_hash_t *dirents;
- QString target = makeSvnURL( url);
+ TQString target = makeSvnURL( url);
kdDebug(7128) << "SvnURL: " << target << endl;
recordCurrentURL( KURL( target ) );
@@ -416,7 +416,7 @@ void kio_svnProtocol::listDir(const KURL& url){
svn_opt_revision_t endrev;
int idx = target.findRev( "?rev=" );
if ( idx != -1 ) {
- QString revstr = target.mid( idx+5 );
+ TQString revstr = target.mid( idx+5 );
svn_opt_parse_revision( &rev, &endrev, revstr.utf8(), subpool );
#if 0
kdDebug(7128) << "revision string found " << revstr << endl;
@@ -476,7 +476,7 @@ void kio_svnProtocol::listDir(const KURL& url){
if (dirent->last_author)
svn_utf_cstring_from_utf8 (&native_author, dirent->last_author, subpool);
- if ( createUDSEntry(QString( native_entryname ), QString( native_author ), dirent->size,
+ if ( createUDSEntry(TQString( native_entryname ), TQString( native_author ), dirent->size,
dirent->kind==svn_node_dir ? true : false, 0, entry) )
listEntry( entry, false );
}
@@ -486,7 +486,7 @@ void kio_svnProtocol::listDir(const KURL& url){
svn_pool_destroy (subpool);
}
-bool kio_svnProtocol::createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) {
+bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) {
kdDebug(7128) << "MTime : " << ( long )mtime << endl;
kdDebug(7128) << "UDS filename : " << filename << endl;
UDSAtom atom;
@@ -523,8 +523,8 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions
KURL ndest = dest;
nsrc.setProtocol( chooseProtocol( src.protocol() ) );
ndest.setProtocol( chooseProtocol( dest.protocol() ) );
- QString srcsvn = nsrc.url();
- QString destsvn = ndest.url();
+ TQString srcsvn = nsrc.url();
+ TQString destsvn = ndest.url();
recordCurrentURL( nsrc );
@@ -532,7 +532,7 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions
svn_opt_revision_t rev;
int idx = srcsvn.findRev( "?rev=" );
if ( idx != -1 ) {
- QString revstr = srcsvn.mid( idx+5 );
+ TQString revstr = srcsvn.mid( idx+5 );
kdDebug(7128) << "revision string found " << revstr << endl;
if ( revstr == "HEAD" ) {
rev.kind = svn_opt_revision_head;
@@ -571,7 +571,7 @@ void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) {
KURL::List::const_iterator it = list.begin(), end = list.end();
for ( ; it != end; ++it ) {
- QString cur = makeSvnURL( *it );
+ TQString cur = makeSvnURL( *it );
kdDebug( 7128 ) << "kio_svnProtocol::mkdir raw url for subversion : " << cur << endl;
const char *_target = apr_pstrdup( subpool, svn_path_canonicalize( apr_pstrdup( subpool, cur.utf8() ), subpool ) );
(*(( const char ** )apr_array_push(( apr_array_header_t* )targets)) ) = _target;
@@ -593,7 +593,7 @@ void kio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) {
apr_pool_t *subpool = svn_pool_create (pool);
svn_client_commit_info_t *commit_info = NULL;
- QString target = makeSvnURL( url);
+ TQString target = makeSvnURL( url);
kdDebug(7128) << "SvnURL: " << target << endl;
recordCurrentURL( KURL( target ) );
@@ -616,7 +616,7 @@ void kio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) {
apr_pool_t *subpool = svn_pool_create (pool);
svn_client_commit_info_t *commit_info = NULL;
- QString target = makeSvnURL(url);
+ TQString target = makeSvnURL(url);
kdDebug(7128) << "SvnURL: " << target << endl;
recordCurrentURL( KURL( target ) );
@@ -643,8 +643,8 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
KURL ndest = dest;
nsrc.setProtocol( chooseProtocol( src.protocol() ) );
ndest.setProtocol( chooseProtocol( dest.protocol() ) );
- QString srcsvn = nsrc.url();
- QString destsvn = ndest.url();
+ TQString srcsvn = nsrc.url();
+ TQString destsvn = ndest.url();
recordCurrentURL( nsrc );
@@ -652,7 +652,7 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
svn_opt_revision_t rev;
int idx = srcsvn.findRev( "?rev=" );
if ( idx != -1 ) {
- QString revstr = srcsvn.mid( idx+5 );
+ TQString revstr = srcsvn.mid( idx+5 );
kdDebug(7128) << "revision string found " << revstr << endl;
if ( revstr == "HEAD" ) {
rev.kind = svn_opt_revision_head;
@@ -679,10 +679,10 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite
svn_pool_destroy (subpool);
}
-void kio_svnProtocol::special( const QByteArray& data ) {
+void kio_svnProtocol::special( const TQByteArray& data ) {
kdDebug(7128) << "kio_svnProtocol::special" << endl;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
int tmp;
stream >> tmp;
@@ -693,7 +693,7 @@ void kio_svnProtocol::special( const QByteArray& data ) {
{
KURL repository, wc;
int revnumber;
- QString revkind;
+ TQString revkind;
stream >> repository;
stream >> wc;
stream >> revnumber;
@@ -706,7 +706,7 @@ void kio_svnProtocol::special( const QByteArray& data ) {
{
KURL wc;
int revnumber;
- QString revkind;
+ TQString revkind;
stream >> wc;
stream >> revnumber;
stream >> revkind;
@@ -730,7 +730,7 @@ void kio_svnProtocol::special( const QByteArray& data ) {
{
kdDebug(7128) << "kio_svnProtocol LOG" << endl;
int revstart, revend;
- QString revkindstart, revkindend;
+ TQString revkindstart, revkindend;
KURL::List targets;
stream >> revstart;
stream >> revkindstart;
@@ -820,7 +820,7 @@ void kio_svnProtocol::special( const QByteArray& data ) {
KURL wc,url;
bool recurse;
int revnumber;
- QString revkind;
+ TQString revkind;
stream >> wc;
stream >> url;
stream >> recurse;
@@ -835,7 +835,7 @@ void kio_svnProtocol::special( const QByteArray& data ) {
KURL url1,url2;
int rev1, rev2;
bool recurse;
- QString revkind1, revkind2;
+ TQString revkind1, revkind2;
stream >> url1;
stream >> url2;
stream >> rev1;
@@ -855,16 +855,16 @@ void kio_svnProtocol::special( const QByteArray& data ) {
}
}
-void kio_svnProtocol::popupMessage( const QString& message ) {
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+void kio_svnProtocol::popupMessage( const TQString& message ) {
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << message;
- if ( !dcopClient()->send( "kded","ksvnd","popupMessage(QString)", params ) )
+ if ( !dcopClient()->send( "kded","ksvnd","popupMessage(TQString)", params ) )
kdWarning() << "Communication with KDED:KSvnd failed" << endl;
}
-void kio_svnProtocol::svn_log( int revstart, const QString& revkindstart, int revend, const QString& revkindend, const KURL::List& targets ) {
+void kio_svnProtocol::svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets ) {
kdDebug(7128) << "kio_svn::log : " << targets << " from revision " << revstart << " or " << revkindstart << " to "
" revision " << revend << " or " << revkindend
<< endl;
@@ -880,7 +880,7 @@ void kio_svnProtocol::svn_log( int revstart, const QString& revkindstart, int re
svn_pool_destroy (subpool);
}
-svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const QString& revkind, apr_pool_t *pool ) {
+svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const TQString& revkind, apr_pool_t *pool ) {
svn_opt_revision_t result,endrev;
if ( revision != -1 ) {
@@ -896,7 +896,7 @@ svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const QString&
return result;
}
-void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const QString& revkind1,const QString& revkind2,bool recurse) {
+void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const TQString& revkind1,const TQString& revkind2,bool recurse) {
kdDebug(7128) << "kio_svn::diff : " << url1.path() << " at revision " << rev1 << " or " << revkind1 << " with "
<< url2.path() << " at revision " << rev2 << " or " << revkind2
<< endl ;
@@ -909,8 +909,8 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int
nurl1.setProtocol( chooseProtocol( url1.protocol() ) ); //svn+https -> https for eg
nurl2.setProtocol( chooseProtocol( url2.protocol() ) );
recordCurrentURL( nurl1 );
- QString source = makeSvnURL( nurl1 );
- QString target = makeSvnURL( nurl2 );
+ TQString source = makeSvnURL( nurl1 );
+ TQString target = makeSvnURL( nurl2 );
const char *path1 = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool );
const char *path2 = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool );
@@ -937,20 +937,20 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int
if ( err )
error( KIO::ERR_SLAVE_DEFINED, err->message );
//read the content of the outfile now
- QStringList tmp;
+ TQStringList tmp;
apr_file_close(outfile);
- QFile file(templ);
+ TQFile file(templ);
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine();
tmp << line;
}
file.close();
}
- for ( QStringList::Iterator itt = tmp.begin(); itt != tmp.end(); itt++ ) {
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "diffresult", ( *itt ) );
+ for ( TQStringList::Iterator itt = tmp.begin(); itt != tmp.end(); itt++ ) {
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "diffresult", ( *itt ) );
m_counter++;
}
//delete temp file
@@ -960,7 +960,7 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int
svn_pool_destroy (subpool);
}
-void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const QString& revkind, bool recurse) {
+void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const TQString& revkind, bool recurse) {
kdDebug(7128) << "kio_svn::switch : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
apr_pool_t *subpool = svn_pool_create (pool);
@@ -970,8 +970,8 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb
nurl.setProtocol( chooseProtocol( repos.protocol() ) );
dest.setProtocol( "file" );
recordCurrentURL( nurl );
- QString source = dest.path();
- QString target = makeSvnURL( repos );
+ TQString source = dest.path();
+ TQString target = makeSvnURL( repos );
const char *path = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool );
const char *url = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool );
@@ -987,13 +987,13 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb
svn_pool_destroy (subpool);
}
-void kio_svnProtocol::update( const KURL& wc, int revnumber, const QString& revkind ) {
+void kio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& revkind ) {
kdDebug(7128) << "kio_svn::update : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
apr_pool_t *subpool = svn_pool_create (pool);
KURL dest = wc;
dest.setProtocol( "file" );
- QString target = dest.path();
+ TQString target = dest.path();
recordCurrentURL( dest );
svn_opt_revision_t rev = createRevision( revnumber, revkind, subpool );
@@ -1020,8 +1020,8 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
dest.setProtocol( "file" );
recordCurrentURL( nurl );
dest.cleanPath( true ); // remove doubled '/'
- QString source = dest.path(-1);
- QString target = makeSvnURL( repos );
+ TQString source = dest.path(-1);
+ TQString target = makeSvnURL( repos );
const char *path = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool );
const char *url = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool );
@@ -1035,7 +1035,7 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) {
svn_pool_destroy (subpool);
}
-void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const QString& revkind ) {
+void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind ) {
kdDebug(7128) << "kio_svn::checkout : " << repos.url() << " into " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ;
apr_pool_t *subpool = svn_pool_create (pool);
@@ -1043,9 +1043,9 @@ void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber
KURL dest = wc;
nurl.setProtocol( chooseProtocol( repos.protocol() ) );
dest.setProtocol( "file" );
- QString target = makeSvnURL( repos );
+ TQString target = makeSvnURL( repos );
recordCurrentURL( nurl );
- QString dpath = dest.path();
+ TQString dpath = dest.path();
//find the requested revision
svn_opt_revision_t rev = createRevision( revnumber, revkind, subpool );
@@ -1068,7 +1068,7 @@ void kio_svnProtocol::commit(const KURL::List& wc) {
apr_array_header_t *targets = apr_array_make(subpool, 1+wc.count(), sizeof(const char *));
- for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
KURL nurl = *it;
nurl.setProtocol( "file" );
recordCurrentURL( nurl );
@@ -1081,21 +1081,21 @@ void kio_svnProtocol::commit(const KURL::List& wc) {
error( KIO::ERR_SLAVE_DEFINED, err->message );
if ( commit_info ) {
- for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
KURL nurl = *it;
nurl.setProtocol( "file" );
- QString userstring = i18n ( "Nothing to commit." );
+ TQString userstring = i18n ( "Nothing to commit." );
if ( SVN_IS_VALID_REVNUM( commit_info->revision ) )
userstring = i18n( "Committed revision %1." ).arg(commit_info->revision);
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "path", nurl.path() );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "action", "0" );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "kind", "0" );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "mime_t", "" );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "content", "0" );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "prop", "0" );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "rev" , QString::number( commit_info->revision ) );
- setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "string", userstring );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "path", nurl.path() );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "action", "0" );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "kind", "0" );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "mime_t", "" );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "content", "0" );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "prop", "0" );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "rev" , TQString::number( commit_info->revision ) );
+ setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "string", userstring );
m_counter++;
}
}
@@ -1112,7 +1112,7 @@ void kio_svnProtocol::add(const KURL& wc) {
KURL nurl = wc;
nurl.setProtocol( "file" );
- QString target = nurl.url();
+ TQString target = nurl.url();
recordCurrentURL( nurl );
initNotifier(false, false, false, subpool);
@@ -1133,7 +1133,7 @@ void kio_svnProtocol::wc_delete(const KURL::List& wc) {
apr_array_header_t *targets = apr_array_make(subpool, 1+wc.count(), sizeof(const char *));
- for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
KURL nurl = *it;
nurl.setProtocol( "file" );
recordCurrentURL( nurl );
@@ -1158,7 +1158,7 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) {
apr_array_header_t *targets = apr_array_make(subpool, 1 + wc.count(), sizeof(const char *));
- for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) {
KURL nurl = *it;
nurl.setProtocol( "file" );
recordCurrentURL( nurl );
@@ -1174,7 +1174,7 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) {
svn_pool_destroy (subpool);
}
-void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const QString& revkind) {
+void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const TQString& revkind) {
kdDebug(7128) << "kio_svnProtocol::status() : " << wc.url() << endl;
apr_pool_t *subpool = svn_pool_create (pool);
@@ -1200,11 +1200,11 @@ void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurs
//change the proto and remove trailing /
//remove double / also
-QString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
- QString kproto = url.protocol();
+TQString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
+ TQString kproto = url.protocol();
KURL tpURL = url;
tpURL.cleanPath( true );
- QString svnUrl;
+ TQString svnUrl;
if ( kproto == "svn+http" ) {
kdDebug(7128) << "http:/ " << url.url() << endl;
tpURL.setProtocol("http");
@@ -1241,12 +1241,12 @@ QString kio_svnProtocol::makeSvnURL ( const KURL& url ) const {
return tpURL.url(-1);
}
-QString kio_svnProtocol::chooseProtocol ( const QString& kproto ) const {
- if ( kproto == "svn+http" ) return QString( "http" );
- else if ( kproto == "svn+https" ) return QString( "https" );
- else if ( kproto == "svn+ssh" ) return QString( "svn+ssh" );
- else if ( kproto == "svn" ) return QString( "svn" );
- else if ( kproto == "svn+file" ) return QString( "file" );
+TQString kio_svnProtocol::chooseProtocol ( const TQString& kproto ) const {
+ if ( kproto == "svn+http" ) return TQString( "http" );
+ else if ( kproto == "svn+https" ) return TQString( "https" );
+ else if ( kproto == "svn+ssh" ) return TQString( "svn+ssh" );
+ else if ( kproto == "svn" ) return TQString( "svn" );
+ else if ( kproto == "svn+file" ) return TQString( "file" );
return kproto;
}
@@ -1270,16 +1270,16 @@ svn_error_t *kio_svnProtocol::clientCertPasswdPrompt(svn_auth_cred_ssl_client_ce
}
svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char **/*file*/, apr_array_header_t *commit_items, void *baton, apr_pool_t *pool ) {
- QCString replyType;
- QByteArray params;
- QByteArray reply;
- QString result;
- QStringList slist;
+ TQCString replyType;
+ TQByteArray params;
+ TQByteArray reply;
+ TQString result;
+ TQStringList slist;
kio_svnProtocol *p = ( kio_svnProtocol* )baton;
svn_stringbuf_t *message = NULL;
for (int i = 0; i < commit_items->nelts; i++) {
- QString list;
+ TQString list;
svn_client_commit_item_t *item = ((svn_client_commit_item_t **) commit_items->elts)[i];
const char *path = item->path;
char text_mod = '_', prop_mod = ' ';
@@ -1312,20 +1312,20 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char
slist << list;
}
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << slist.join("\n");
- if ( !p->dcopClient()->call( "kded","ksvnd","commitDialog(QString)", params, replyType, reply ) ) {
+ if ( !p->dcopClient()->call( "kded","ksvnd","commitDialog(TQString)", params, replyType, reply ) ) {
kdWarning() << "Communication with KDED:KSvnd failed" << endl;
return SVN_NO_ERROR;
}
- if ( replyType != "QString" ) {
+ if ( replyType != "TQString" ) {
kdWarning() << "Unexpected reply type" << endl;
return SVN_NO_ERROR;
}
- QDataStream stream2 ( reply, IO_ReadOnly );
+ TQDataStream stream2 ( reply, IO_ReadOnly );
stream2 >> result;
if ( result.isNull() ) { //cancelled
@@ -1342,7 +1342,7 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char
void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision) {
kdDebug(7128) << "NOTIFY : " << path << " updated at revision " << revision << " action : " << action << ", kind : " << kind << " , content_state : " << content_state << ", prop_state : " << prop_state << endl;
- QString userstring;
+ TQString userstring;
struct notify_baton *nb = ( struct notify_baton* ) baton;
//// Convert notification to a user readable string
@@ -1418,7 +1418,7 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action
|| content_state == svn_wc_notify_state_unknown)
&& (prop_state == svn_wc_notify_state_unchanged
|| prop_state == svn_wc_notify_state_unknown)))
- userstring += QString( " " ) + path;
+ userstring += TQString( " " ) + path;
}
break;
}
@@ -1518,14 +1518,14 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action
kio_svnProtocol *p = ( kio_svnProtocol* )nb->master;
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , QString::fromUtf8( path ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "action", QString::number( action ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "kind", QString::number( kind ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "mime_t", QString::fromUtf8( mime_type ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "content", QString::number( content_state ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", QString::number( prop_state ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", QString::number( revision ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "string", userstring );
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , TQString::fromUtf8( path ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "action", TQString::number( action ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "kind", TQString::number( kind ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "mime_t", TQString::fromUtf8( mime_type ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "content", TQString::number( content_state ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", TQString::number( prop_state ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", TQString::number( revision ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "string", userstring );
p->incCounter();
}
@@ -1536,19 +1536,19 @@ void kio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *sta
<< ", repos prop status : " << status->repos_prop_status
<< endl;
- QByteArray params;
+ TQByteArray params;
kio_svnProtocol *p = ( kio_svnProtocol* )baton;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
long int rev = status->entry ? status->entry->revision : 0;
- stream << QString::fromUtf8( path ) << status->text_status << status->prop_status << status->repos_text_status << status->repos_prop_status << rev;
-
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "path", QString::fromUtf8( path ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "text", QString::number( status->text_status ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", QString::number( status->prop_status ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "reptxt", QString::number( status->repos_text_status ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "repprop", QString::number( status->repos_prop_status ));
- p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", QString::number( rev ));
+ stream << TQString::fromUtf8( path ) << status->text_status << status->prop_status << status->repos_text_status << status->repos_prop_status << rev;
+
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path", TQString::fromUtf8( path ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "text", TQString::number( status->text_status ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", TQString::number( status->prop_status ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "reptxt", TQString::number( status->repos_text_status ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "repprop", TQString::number( status->repos_prop_status ));
+ p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", TQString::number( rev ));
p->incCounter();
}
diff --git a/kioslave/svn/svn.h b/kioslave/svn/svn.h
index 3738ad17..7f85ae4b 100644
--- a/kioslave/svn/svn.h
+++ b/kioslave/svn/svn.h
@@ -20,8 +20,8 @@
#ifndef _svn_H_
#define _svn_H_
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kio/global.h>
@@ -31,7 +31,7 @@
#include <subversion-1/svn_client.h>
#include <subversion-1/svn_config.h>
#include <sys/stat.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <subversion-1/svn_wc.h>
class QCString;
@@ -67,9 +67,9 @@ typedef struct notify_baton {
class kio_svnProtocol : public KIO::SlaveBase
{
public:
- kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket);
+ kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~kio_svnProtocol();
- virtual void special( const QByteArray& data );
+ virtual void special( const TQByteArray& data );
virtual void get(const KURL& url);
virtual void listDir(const KURL& url);
virtual void stat(const KURL& url);
@@ -78,20 +78,20 @@ class kio_svnProtocol : public KIO::SlaveBase
virtual void del( const KURL& url, bool isfile );
virtual void copy(const KURL & src, const KURL& dest, int permissions, bool overwrite);
virtual void rename(const KURL& src, const KURL& dest, bool overwrite);
- void checkout( const KURL& repos, const KURL& wc, int revnumber, const QString& revkind );
+ void checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind );
void import( const KURL& repos, const KURL& wc );
- void svn_switch( const KURL& wc, const KURL& url, int revnumber, const QString& revkind, bool recurse);
- void svn_log( int revstart, const QString& revkindstart, int revend, const QString& revkindend, const KURL::List& targets );
- void svn_diff( const KURL& url1, const KURL& url2, int rev1, int rev2, const QString& revkind1, const QString& revkind2, bool recurse);
+ void svn_switch( const KURL& wc, const KURL& url, int revnumber, const TQString& revkind, bool recurse);
+ void svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets );
+ void svn_diff( const KURL& url1, const KURL& url2, int rev1, int rev2, const TQString& revkind1, const TQString& revkind2, bool recurse);
//TODO fix with svn 1.2 : support a KURL::List -> svn_client_update2()
- void update( const KURL& wc, int revnumber, const QString& revkind );
+ void update( const KURL& wc, int revnumber, const TQString& revkind );
void commit( const KURL::List& wc );
void add( const KURL& wc );
//these work using the working copy
void wc_resolve( const KURL& wc, bool recurse = true );
void wc_delete( const KURL::List& wc );
void wc_revert( const KURL::List& wc );
- void wc_status(const KURL& wc, bool checkRepos=false, bool fullRecurse=true, bool getAll=true, int revnumber=-1, const QString& revkind="HEAD");
+ void wc_status(const KURL& wc, bool checkRepos=false, bool fullRecurse=true, bool getAll=true, int revnumber=-1, const TQString& revkind="HEAD");
static svn_error_t* checkAuth(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t may_save, apr_pool_t *pool);
static svn_error_t *trustSSLPrompt(svn_auth_cred_ssl_server_trust_t **cred_p, void *, const char *realm, apr_uint32_t failures, const svn_auth_ssl_server_cert_info_t *cert_info, svn_boolean_t may_save, apr_pool_t *pool);
@@ -101,23 +101,23 @@ class kio_svnProtocol : public KIO::SlaveBase
static void notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision);
static void status(void *baton, const char *path, svn_wc_status_t *status);
- QString chooseProtocol ( const QString& kproto ) const;
- QString makeSvnURL ( const KURL& url ) const;
+ TQString chooseProtocol ( const TQString& kproto ) const;
+ TQString makeSvnURL ( const KURL& url ) const;
void initNotifier(bool is_checkout, bool is_export, bool suppress_final_line, apr_pool_t *spool);
void recordCurrentURL(const KURL& url);
- void popupMessage( const QString& message );
+ void popupMessage( const TQString& message );
int counter() { return m_counter; }
void incCounter() { m_counter++; }
- svn_opt_revision_t createRevision( int revision, const QString& revkind, apr_pool_t *pool );
+ svn_opt_revision_t createRevision( int revision, const TQString& revkind, apr_pool_t *pool );
KURL myURL;
svn_client_ctx_t *ctx;
KIO::AuthInfo info;
enum SVN_METHOD {
- SVN_CHECKOUT=1, //KURL repository, KURL workingcopy, int revnumber=-1, QString revkind(HEAD, ...) //revnumber==-1 => use of revkind
- SVN_UPDATE=2, // KURL wc (svn:///tmp/test, int revnumber=-1, QString revkind(HEAD, ...) // revnumber==-1 => use of revkind
+ SVN_CHECKOUT=1, //KURL repository, KURL workingcopy, int revnumber=-1, TQString revkind(HEAD, ...) //revnumber==-1 => use of revkind
+ SVN_UPDATE=2, // KURL wc (svn:///tmp/test, int revnumber=-1, TQString revkind(HEAD, ...) // revnumber==-1 => use of revkind
SVN_COMMIT=3,
SVN_LOG=4,
SVN_IMPORT=5,
@@ -132,7 +132,7 @@ class kio_svnProtocol : public KIO::SlaveBase
};
private:
- bool createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry);
+ bool createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry);
apr_pool_t *pool;
int m_counter;
};
diff --git a/kioslave/svn/svnhelper/kio_svn_helper.cpp b/kioslave/svn/svnhelper/kio_svn_helper.cpp
index d38eee3c..e58fb410 100644
--- a/kioslave/svn/svnhelper/kio_svn_helper.cpp
+++ b/kioslave/svn/svnhelper/kio_svn_helper.cpp
@@ -25,11 +25,11 @@
#include <dcopclient.h>
#include <kdebug.h>
#include <kglobal.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kio/netaccess.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kmessagebox.h>
#include "kio_svn_helper.h"
@@ -37,14 +37,14 @@
#include "subversionswitch.h"
#include "subversiondiff.h"
#include <kurlrequester.h>
-#include <qspinbox.h>
+#include <tqspinbox.h>
#include <kprocess.h>
#include <ktempfile.h>
-#include <qtextstream.h>
-#include <qtextedit.h>
+#include <tqtextstream.h>
+#include <tqtextedit.h>
#include <kstandarddirs.h>
-#include <qtextbrowser.h>
-#include <qtextcodec.h>
+#include <tqtextbrowser.h>
+#include <tqtextcodec.h>
SvnHelper::SvnHelper():KApplication() {
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -59,68 +59,68 @@ SvnHelper::SvnHelper():KApplication() {
kdDebug(7128) << "update " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
//FIXME when 1.2 is out (move the loop inside kio_svn's ::update)
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 2;
int rev = -1;
kdDebug(7128) << "updating : " << (*it).prettyURL() << endl;
- s << cmd << *it << rev << QString( "HEAD" );
+ s << cmd << *it << rev << TQString( "HEAD" );
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
}
} else if (args->isSet("c")) {
kdDebug(7128) << "commit " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 3;
s<<cmd;
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
kdDebug(7128) << "commiting : " << (*it).prettyURL() << endl;
s << *it;
}
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
} else if (args->isSet("a")) {
kdDebug(7128) << "add " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 6;
kdDebug(7128) << "adding : " << (*it).prettyURL() << endl;
s << cmd << *it;
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
}
} else if (args->isSet("D")) {
kdDebug(7128) << "diff " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 13;
kdDebug(7128) << "diffing : " << (*it).prettyURL() << endl;
int rev1=-1;
int rev2=-1;
- QString revkind1 = "BASE";
- QString revkind2 = "WORKING";
+ TQString revkind1 = "BASE";
+ TQString revkind2 = "WORKING";
s << cmd << *it << *it << rev1 << revkind1 << rev2 << revkind2 << true ;
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
if ( diffresult.count() > 0 ) {
//check kompare is available
if ( !KStandardDirs::findExe( "kompare" ).isNull() ) {
KTempFile *tmp = new KTempFile;
tmp->setAutoDelete(true);
- QTextStream *stream = tmp->textStream();
- stream->setCodec( QTextCodec::codecForName( "utf8" ) );
- for ( QStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) {
+ TQTextStream *stream = tmp->textStream();
+ stream->setCodec( TQTextCodec::codecForName( "utf8" ) );
+ for ( TQStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) {
( *stream ) << ( *it2 ) << "\n";
}
tmp->close();
@@ -129,10 +129,10 @@ SvnHelper::SvnHelper():KApplication() {
p->start();
} else { //else do it with message box
Subversion_Diff df;
- for ( QStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) {
+ for ( TQStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) {
df.text->append( *it2 );
}
- QFont f = df.font();
+ TQFont f = df.font();
f.setFixedPitch( true );
df.text->setFont( f );
df.exec();
@@ -143,29 +143,29 @@ SvnHelper::SvnHelper():KApplication() {
} else if (args->isSet("d")) {
kdDebug(7128) << "delete " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 7;
s<<cmd;
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
kdDebug(7128) << "deleting : " << (*it).prettyURL() << endl;
s << *it;
}
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
} else if (args->isSet("s")) {
kdDebug(7128) << "switch " << list << endl;
SubversionSwitch d;
int result = d.exec();
- if ( result == QDialog::Accepted ) {
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ if ( result == TQDialog::Accepted ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
kdDebug(7128) << "switching : " << (*it).prettyURL() << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int revnumber = -1;
- QString revkind = "HEAD";
+ TQString revkind = "HEAD";
if ( d.revision->value() != 0 ) {
revnumber = d.revision->value();
revkind = "";
@@ -179,36 +179,36 @@ SvnHelper::SvnHelper():KApplication() {
s << revnumber;
s << revkind;
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
}
}
} else if (args->isSet("r")) {
kdDebug(7128) << "revert " << list << endl;
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 8;
s<<cmd;
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
kdDebug(7128) << "reverting : " << (*it).prettyURL() << endl;
s << *it;
}
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
} else if (args->isSet("C")) {
kdDebug(7128) << "checkout " << list << endl;
SubversionCheckout d;
int result = d.exec();
- if ( result == QDialog::Accepted ) {
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ if ( result == TQDialog::Accepted ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 1;
int rev = -1;
- QString revkind = "HEAD";
+ TQString revkind = "HEAD";
if ( d.revision->value() != 0 ) {
rev = d.revision->value();
revkind = "";
@@ -220,14 +220,14 @@ SvnHelper::SvnHelper():KApplication() {
s << revkind;
kdDebug(7128) << "checkouting : " << d.url->url() << " into " << (*it).prettyURL() << " at rev : " << rev << " or " << revkind << endl;
KIO::SimpleJob * job = KIO::special(servURL, parms, true);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::NetAccess::synchronousRun( job, 0 );
}
}
} else {
KMessageBox::sorry(0, "Sorry, request not recognised. Perhaps not implemented yet?", "Feature Not Implemented");
}
- QTimer::singleShot( 0, this, SLOT( finished() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( finished() ) );
}
void SvnHelper::slotResult( KIO::Job* job ) {
@@ -235,11 +235,11 @@ void SvnHelper::slotResult( KIO::Job* job ) {
job->showErrorDialog( );
KIO::MetaData ma = job->metaData();
- QValueList<QString> keys = ma.keys();
+ TQValueList<TQString> keys = ma.keys();
qHeapSort( keys );
- QValueList<QString>::Iterator begin = keys.begin(), end = keys.end(), it;
+ TQValueList<TQString>::Iterator begin = keys.begin(), end = keys.end(), it;
- QStringList message;
+ TQStringList message;
for ( it = begin; it != end; ++it ) {
// kdDebug(7128) << "METADATA helper : " << *it << ":" << ma[ *it ] << endl;
if ( ( *it ).endsWith( "string" ) ) {
diff --git a/kioslave/svn/svnhelper/kio_svn_helper.h b/kioslave/svn/svnhelper/kio_svn_helper.h
index ad2872b5..7f4eb626 100644
--- a/kioslave/svn/svnhelper/kio_svn_helper.h
+++ b/kioslave/svn/svnhelper/kio_svn_helper.h
@@ -23,7 +23,7 @@
#include <kapplication.h>
#include <kio/job.h>
#include <kwinmodule.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class SvnHelper:public KApplication {
Q_OBJECT
@@ -35,7 +35,7 @@ private slots:
void slotResult( KIO::Job *);
private:
WId m_id;
- QStringList diffresult; //for diff commands ;)
+ TQStringList diffresult; //for diff commands ;)
};
#endif
diff --git a/kmtrace/demangle.cpp b/kmtrace/demangle.cpp
index 81bcff90..8c10c4a2 100644
--- a/kmtrace/demangle.cpp
+++ b/kmtrace/demangle.cpp
@@ -1,12 +1,12 @@
-#include <qintdict.h>
+#include <tqintdict.h>
#include <stdio.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qtextstream.h>
-#include <qsortedlist.h>
-#include <qfile.h>
-#include <qtl.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqtextstream.h>
+#include <tqsortedlist.h>
+#include <tqfile.h>
+#include <tqtl.h>
+#include <tqvaluelist.h>
#include <stdlib.h>
#include <ktempfile.h>
#include <kinstance.h>
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
while(!feof(stdin))
{
fgets(buf, 1024, stdin);
- QCString line = buf;
+ TQCString line = buf;
line = line.stripWhiteSpace();
char *res = cplus_demangle(line.data(), DMGL_PARAMS | DMGL_AUTO | DMGL_ANSI );
if (res)
diff --git a/kmtrace/kmtrace.cpp b/kmtrace/kmtrace.cpp
index 82055e43..413a0ad4 100644
--- a/kmtrace/kmtrace.cpp
+++ b/kmtrace/kmtrace.cpp
@@ -1,12 +1,12 @@
-#include <qintdict.h>
+#include <tqintdict.h>
#include <stdio.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qtextstream.h>
-#include <qsortedlist.h>
-#include <qfile.h>
-#include <qtl.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqtextstream.h>
+#include <tqsortedlist.h>
+#include <tqfile.h>
+#include <tqtl.h>
+#include <tqvaluelist.h>
#include <stdlib.h>
#include <ktempfile.h>
#include <kinstance.h>
@@ -48,11 +48,11 @@ struct Entry {
bool operator<(const Entry &e) { return total_size > e.total_size; }
};
-QIntDict<Entry> *entryDict = 0;
-QIntDict<char> *symbolDict = 0;
-QIntDict<char> *formatDict = 0;
-QSortedList<Entry> *entryList = 0;
-QStrList *excludes = 0;
+TQIntDict<Entry> *entryDict = 0;
+TQIntDict<char> *symbolDict = 0;
+TQIntDict<char> *formatDict = 0;
+TQSortedList<Entry> *entryList = 0;
+TQStrList *excludes = 0;
const char * const unknown = "<unknown>";
const char * const excluded = "<excluded>";
@@ -66,7 +66,7 @@ int totalBytes = 0;
int maxBytes;
int fromHex(const char *str);
-void parseLine(const QCString &_line, char operation);
+void parseLine(const TQCString &_line, char operation);
void dumpBlocks();
int fromHex(const char *str)
@@ -77,7 +77,7 @@ int fromHex(const char *str)
}
// [address0][address1] .... [address] + base size
-void parseLine(const QCString &_line, char operation)
+void parseLine(const TQCString &_line, char operation)
{
char *line= (char *) _line.data();
const char *cols[200];
@@ -147,7 +147,7 @@ void parseLine(const QCString &_line, char operation)
void sortBlocks()
{
- QIntDictIterator<Entry> it(*entryDict);
+ TQIntDictIterator<Entry> it(*entryDict);
for(;it.current(); ++it)
{
Entry *entry = it.current();
@@ -164,8 +164,8 @@ void sortBlocks()
void collectDupes()
{
- QIntDict<Entry> dupeDict;
- QIntDictIterator<Entry> it(*entryDict);
+ TQIntDict<Entry> dupeDict;
+ TQIntDictIterator<Entry> it(*entryDict);
for(;it.current();)
{
Entry *entry = it.current();
@@ -249,25 +249,25 @@ void lookupUnknownSymbols(const char *appname)
inputFile.setAutoDelete(true);
outputFile.setAutoDelete(true);
FILE *fInputFile = inputFile.fstream();
- QIntDict<char> oldDict = *symbolDict;
- QIntDictIterator<char> it(oldDict);
+ TQIntDict<char> oldDict = *symbolDict;
+ TQIntDictIterator<char> it(oldDict);
for(;it.current(); ++it)
{
fprintf(fInputFile, "%08lx\n", it.currentKey());
}
inputFile.close();
- QCString command;
+ TQCString command;
command.sprintf("addr2line -e %s -f -C -s < %s > %s", appname,
- QFile::encodeName(KProcess::quote(inputFile.name())).data(),
- QFile::encodeName(KProcess::quote(outputFile.name())).data());
+ TQFile::encodeName(KProcess::quote(inputFile.name())).data(),
+ TQFile::encodeName(KProcess::quote(outputFile.name())).data());
system(command.data());
- fInputFile = fopen(QFile::encodeName(outputFile.name()), "r");
+ fInputFile = fopen(TQFile::encodeName(outputFile.name()), "r");
if (!fInputFile)
{
fprintf(stderr, "Error opening temp file.\n");
return;
}
- QIntDictIterator<char> it2(oldDict);
+ TQIntDictIterator<char> it2(oldDict);
char buffer1[1024];
char buffer2[1024];
for(;it2.current(); ++it2)
@@ -282,7 +282,7 @@ void lookupUnknownSymbols(const char *appname)
if (!fgets(buffer2, 1023, fInputFile)) continue;
buffer1[strlen(buffer1)-1]=0;
buffer2[strlen(buffer2)-1]=0;
- QCString symbol;
+ TQCString symbol;
symbol.sprintf("%s(%s)", buffer2, buffer1);
if(*buffer1 != '?')
symbolDict->replace(it2.currentKey(),qstrdup(symbol.data()));
@@ -310,7 +310,7 @@ const char *lookupAddress(int addr)
{
char *str = formatDict->find(addr);
if (str) return str;
- QCString s = symbolDict->find(addr);
+ TQCString s = symbolDict->find(addr);
if (s.isEmpty())
{
fprintf(stderr, "Error!\n");
@@ -324,7 +324,7 @@ fprintf(stderr, "Error!\n");
end = s.findRev(')');
if ((start > 0) && (end > start))
{
- QCString symbol = s.mid(start+1, end-start-1);
+ TQCString symbol = s.mid(start+1, end-start-1);
char *res = 0;
if (symbol.find(')') == -1)
res = cplus_demangle(symbol.data(), DMGL_PARAMS | DMGL_AUTO | DMGL_ANSI );
@@ -390,7 +390,7 @@ struct TreeEntry
int address; // backtrace
int total_size;
int total_count;
- typedef QValueList < TreeEntry > TreeList;
+ typedef TQValueList < TreeEntry > TreeList;
TreeList *subentries () const;
mutable TreeList *_subentries;
TreeEntry (int adr = 0, int size = 0, int count = 0, TreeList * sub = NULL );
@@ -398,7 +398,7 @@ struct TreeEntry
bool operator < (const TreeEntry &) const;
};
-typedef QValueList < TreeEntry > TreeList;
+typedef TQValueList < TreeEntry > TreeList;
inline TreeEntry::TreeEntry (int adr, int size, int count, TreeList * sub)
: address (adr), total_size (size), total_count (count), _subentries (sub)
@@ -523,7 +523,7 @@ void dumpTree (FILE * file)
dumpTree (*it, 0, indent, file);
}
-void createTree (const QCString & treefile, int threshold, int maxdepth)
+void createTree (const TQCString & treefile, int threshold, int maxdepth)
{
FILE * file = fopen (treefile, "w");
if (file == NULL)
@@ -593,12 +593,12 @@ int main(int argc, char *argv[])
else
logfile = "ktrace.out";
- QCString exe = args->getOption("exe");
- QCString exclude;
+ TQCString exe = args->getOption("exe");
+ TQCString exclude;
excludes = new QStrList;
- exclude = QFile::encodeName(locate("data", "kmtrace/kde.excludes"));
+ exclude = TQFile::encodeName(locate("data", "kmtrace/kde.excludes"));
if(!exclude.isEmpty())
readExcludeFile(exclude);
@@ -616,13 +616,13 @@ int main(int argc, char *argv[])
exit(1);
}
- entryDict = new QIntDict<Entry>(9973);
- symbolDict = new QIntDict<char>(9973);
- formatDict = new QIntDict<char>(9973);
- entryList = new QSortedList<Entry>;
+ entryDict = new TQIntDict<Entry>(9973);
+ symbolDict = new TQIntDict<char>(9973);
+ formatDict = new TQIntDict<char>(9973);
+ entryList = new TQSortedList<Entry>;
fprintf(stderr, "Running\n");
- QCString line;
+ TQCString line;
char line2[1024];
while(!feof(stream))
{
@@ -636,7 +636,7 @@ int main(int argc, char *argv[])
}
else if (line2[0] == '#')
{
- QCString app(line2+1);
+ TQCString app(line2+1);
if(exe.isEmpty())
{
exe = app.stripWhiteSpace();
@@ -673,7 +673,7 @@ int main(int argc, char *argv[])
{
line2[0] = '-';
// First part of realloc (free)
- QCString reline = line + ' ' + line2;
+ TQCString reline = line + ' ' + line2;
parseLine(reline, '-');
}
else if (line2[0] == '>')
@@ -709,7 +709,7 @@ int main(int argc, char *argv[])
lookupUnknownSymbols(exe);
fprintf(stderr, "Printing...\n");
dumpBlocks();
- QCString treeFile = args->getOption ("tree");
+ TQCString treeFile = args->getOption ("tree");
if (!treeFile.isEmpty ())
{
fprintf (stderr, "Creating allocation tree...\n");
diff --git a/kmtrace/match.cpp b/kmtrace/match.cpp
index 2a9c74b4..afa83bc1 100644
--- a/kmtrace/match.cpp
+++ b/kmtrace/match.cpp
@@ -1,12 +1,12 @@
-#include <qintdict.h>
+#include <tqintdict.h>
#include <stdio.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qtextstream.h>
-#include <qsortedlist.h>
-#include <qfile.h>
-#include <qtl.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqtextstream.h>
+#include <tqsortedlist.h>
+#include <tqfile.h>
+#include <tqtl.h>
+#include <tqvaluelist.h>
#include <stdlib.h>
#include <ktempfile.h>
#include <kinstance.h>
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
}
int i = 1;
- QDict<int> dict(20011);
+ TQDict<int> dict(20011);
FILE *map_file = fopen(argv[1], "r");
if (!map_file)
@@ -39,8 +39,8 @@ int main(int argc, char **argv)
while(!feof(map_file))
{
fgets(buf, 1024, map_file);
- QString line = QString::fromLatin1(buf).stripWhiteSpace();
- QStringList split = QStringList::split(' ', line);
+ TQString line = TQString::fromLatin1(buf).stripWhiteSpace();
+ TQStringList split = TQStringList::split(' ', line);
if (split.count() <= 1)
return 1;
@@ -61,7 +61,7 @@ int main(int argc, char **argv)
while(!feof(call_file))
{
fgets(buf, 1024, call_file);
- QString line = QString::fromLatin1(buf).stripWhiteSpace();
+ TQString line = TQString::fromLatin1(buf).stripWhiteSpace();
if (dict.find(line))
{
qWarning("%s", line.latin1());
diff --git a/kompare/interfaces/kompareinterface.cpp b/kompare/interfaces/kompareinterface.cpp
index 1522bad0..c8ff71bf 100644
--- a/kompare/interfaces/kompareinterface.cpp
+++ b/kompare/interfaces/kompareinterface.cpp
@@ -53,7 +53,7 @@ KompareInterface& KompareInterface::operator=( const KompareInterface& ki )
return *this;
}
-void KompareInterface::setEncoding( const QString& encoding )
+void KompareInterface::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
}
diff --git a/kompare/interfaces/kompareinterface.h b/kompare/interfaces/kompareinterface.h
index b9c0fcda..37fabe9f 100644
--- a/kompare/interfaces/kompareinterface.h
+++ b/kompare/interfaces/kompareinterface.h
@@ -4,8 +4,8 @@
#ifndef _KOMPARE_INTERFACE_H
#define _KOMPARE_INTERFACE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdemacros.h>
class KConfig;
@@ -32,7 +32,7 @@ public:
/**
* Open and parse the supplied diff output
*/
- virtual bool openDiff( const QString& diffOutput ) = 0;
+ virtual bool openDiff( const TQString& diffOutput ) = 0;
/**
* Open and parse the diff3 file at url.
@@ -42,7 +42,7 @@ public:
/**
* Open and parse the supplied diff3 output
*/
- virtual bool openDiff3( const QString& diff3Output ) = 0;
+ virtual bool openDiff3( const TQString& diff3Output ) = 0;
/**
* Compare, with diff, source with destination, can also be used if you dont
@@ -80,7 +80,7 @@ public:
/**
* This will set the encoding to use for all files that are read or for the diffoutput
*/
- virtual void setEncoding( const QString& encoding );
+ virtual void setEncoding( const TQString& encoding );
public:
/**
@@ -99,7 +99,7 @@ public:
protected:
// Add all variables to the KompareInterfacePrivate class and access them through the kip pointer
KompareInterfacePrivate* kip;
- QString m_encoding;
+ TQString m_encoding;
};
#endif /* _KOMPARE_INTERFACE_H */
diff --git a/kompare/kompare_shell.cpp b/kompare/kompare_shell.cpp
index 3840e272..66bf89d2 100644
--- a/kompare/kompare_shell.cpp
+++ b/kompare/kompare_shell.cpp
@@ -61,14 +61,14 @@ KompareShell::KompareShell()
setupStatusBar();
KTrader::OfferList offers = KTrader::self()->query( "text/x-diff",
- "Kompare/ViewPart", QString::null, QString::null );
+ "Kompare/ViewPart", TQString::null, TQString::null );
#ifdef NDEBUG
for( int i = 0; i < offers.count(); i++ )
{
kdDebug(8102) << "One kservicetype checked..." << endl;
KService::Ptr ptr2 = *(offers.at( i ));
- QStringList list = ptr2->serviceTypes();
- for ( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
+ TQStringList list = ptr2->serviceTypes();
+ for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 )
kdDebug(8102) << *it2 << endl;
}
#endif
@@ -108,7 +108,7 @@ KompareShell::KompareShell()
}
offers.clear();
- offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", QString::null );
+ offers = KTrader::self()->query( "text/x-diff", "KParts/ReadOnlyPart", "'Kompare/NavigationPart' in ServiceTypes", TQString::null );
if ( offers.count() == 0 )
{
KMessageBox::error(this, i18n( "Could not find our KompareNavigationPart." ) );
@@ -140,21 +140,21 @@ KompareShell::KompareShell()
}
// Hook up the inter part communication
- connect( m_viewPart, SIGNAL( modelsChanged(const Diff2::DiffModelList*) ),
- m_navTreePart, SLOT( slotModelsChanged( const Diff2::DiffModelList*) ) );
+ connect( m_viewPart, TQT_SIGNAL( modelsChanged(const Diff2::DiffModelList*) ),
+ m_navTreePart, TQT_SLOT( slotModelsChanged( const Diff2::DiffModelList*) ) );
- connect( m_viewPart, SIGNAL( kompareInfo(Kompare::Info*) ),
- m_navTreePart, SLOT( slotKompareInfo(Kompare::Info*) ) );
+ connect( m_viewPart, TQT_SIGNAL( kompareInfo(Kompare::Info*) ),
+ m_navTreePart, TQT_SLOT( slotKompareInfo(Kompare::Info*) ) );
- connect( m_navTreePart, SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ),
- m_viewPart, SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ) );
- connect( m_viewPart, SIGNAL( setSelection(const Diff2::DiffModel*, const Diff2::Difference*) ),
- m_navTreePart, SLOT( slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*) ) );
+ connect( m_navTreePart, TQT_SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ),
+ m_viewPart, TQT_SIGNAL( selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*) ) );
+ connect( m_viewPart, TQT_SIGNAL( setSelection(const Diff2::DiffModel*, const Diff2::Difference*) ),
+ m_navTreePart, TQT_SLOT( slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*) ) );
- connect( m_navTreePart, SIGNAL( selectionChanged(const Diff2::Difference*) ),
- m_viewPart, SIGNAL( selectionChanged(const Diff2::Difference*) ) );
- connect( m_viewPart, SIGNAL( setSelection(const Diff2::Difference*) ),
- m_navTreePart, SLOT( slotSetSelection(const Diff2::Difference*) ) );
+ connect( m_navTreePart, TQT_SIGNAL( selectionChanged(const Diff2::Difference*) ),
+ m_viewPart, TQT_SIGNAL( selectionChanged(const Diff2::Difference*) ) );
+ connect( m_viewPart, TQT_SIGNAL( setSelection(const Diff2::Difference*) ),
+ m_navTreePart, TQT_SLOT( slotSetSelection(const Diff2::Difference*) ) );
// This is the interpart interface, it is signal and slot based so no "real" nterface here
// All you have to do is connect the parts from your application.
@@ -162,18 +162,18 @@ KompareShell::KompareShell()
// from the method with the same name in KompareModelList.
// There is currently no applying possible from the navtreepart to the viewpart
- connect( m_viewPart, SIGNAL(applyDifference(bool)),
- m_navTreePart, SLOT(slotApplyDifference(bool)) );
- connect( m_viewPart, SIGNAL(applyAllDifferences(bool)),
- m_navTreePart, SLOT(slotApplyAllDifferences(bool)) );
- connect( m_viewPart, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- m_navTreePart, SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyDifference(bool)),
+ m_navTreePart, TQT_SLOT(slotApplyDifference(bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyAllDifferences(bool)),
+ m_navTreePart, TQT_SLOT(slotApplyAllDifferences(bool)) );
+ connect( m_viewPart, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ m_navTreePart, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
// Hook up the KomparePart -> KompareShell communication
- connect( m_viewPart, SIGNAL( setStatusBarModelInfo( int, int, int, int, int ) ),
- this, SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) );
- connect( m_viewPart, SIGNAL( setStatusBarText(const QString&) ),
- this, SLOT( slotSetStatusBarText(const QString&) ) );
+ connect( m_viewPart, TQT_SIGNAL( setStatusBarModelInfo( int, int, int, int, int ) ),
+ this, TQT_SLOT( slotUpdateStatusBar( int, int, int, int, int ) ) );
+ connect( m_viewPart, TQT_SIGNAL( setStatusBarText(const TQString&) ),
+ this, TQT_SLOT( slotSetStatusBarText(const TQString&) ) );
// Read basic main-view settings, and set to autosave
setAutoSaveSettings( "General Options" );
@@ -198,11 +198,11 @@ void KompareShell::openDiff(const KURL& url)
void KompareShell::openStdin()
{
kdDebug(8102) << "Using stdin to read the diff" << endl;
- QFile file;
+ TQFile file;
file.open( IO_ReadOnly, stdin );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
- QString diff = stream.read();
+ TQString diff = stream.read();
file.close();
@@ -228,26 +228,26 @@ void KompareShell::blend( const KURL& url1, const KURL& diff )
void KompareShell::setupActions()
{
- KAction* open = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
+ KAction* open = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
open->setText( i18n( "&Open Diff..." ) );
new KAction( i18n("&Compare Files..."), "fileopen", Qt::CTRL + Qt::Key_C,
- this, SLOT(slotFileCompareFiles()),
+ this, TQT_SLOT(slotFileCompareFiles()),
actionCollection(), "file_compare_files" );
new KAction( i18n("&Blend URL with Diff..."), "fileblend", Qt::CTRL + Qt::Key_B,
- this, SLOT(slotFileBlendURLAndDiff()),
+ this, TQT_SLOT(slotFileBlendURLAndDiff()),
actionCollection(), "file_blend_url" );
- KStdAction::quit( this, SLOT( slotFileClose() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( slotFileClose() ), actionCollection() );
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,90)
createStandardStatusBarAction();
#endif
setStandardToolBarMenuEnabled(true);
- m_showTextView = new KToggleAction( i18n("Show T&ext View"), 0, this, SLOT(slotShowTextView()),
+ m_showTextView = new KToggleAction( i18n("Show T&ext View"), 0, this, TQT_SLOT(slotShowTextView()),
actionCollection(), "options_show_text_view" );
m_showTextView->setCheckedState(i18n("Hide T&ext View"));
- 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 KompareShell::setupStatusBar()
@@ -265,8 +265,8 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int
{
kdDebug(8102) << "KompareShell::updateStatusBar()" << endl;
- QString fileStr;
- QString diffStr;
+ TQString fileStr;
+ TQString diffStr;
if ( modelIndex >= 0 )
fileStr = i18n( " %1 of %n file ", " %1 of %n files ", modelCount ).arg( modelIndex + 1 );
@@ -283,12 +283,12 @@ void KompareShell::slotUpdateStatusBar( int modelIndex, int differenceIndex, int
statusBar()->changeItem( diffStr, ID_N_OF_N_DIFFERENCES );
}
-void KompareShell::slotSetStatusBarText( const QString& text )
+void KompareShell::slotSetStatusBarText( const TQString& text )
{
m_generalLabel->setText( text );
}
-void KompareShell::setCaption( const QString& caption )
+void KompareShell::setCaption( const TQString& caption )
{
// kdDebug() << kdBacktrace();
KParts::DockMainWindow::setCaption( caption, m_viewPart->isModified() );
@@ -321,7 +321,7 @@ void KompareShell::readProperties(KConfig* config)
// the app is being restored. Read in here whatever you wrote
// in 'saveProperties'
- QString mode = config->readEntry( "Mode", "ComparingFiles" );
+ TQString mode = config->readEntry( "Mode", "ComparingFiles" );
if ( mode == "ComparingFiles" )
{
m_mode = Kompare::ComparingFiles;
@@ -352,7 +352,7 @@ void KompareShell::readProperties(KConfig* config)
void KompareShell::slotFileOpen()
{
// FIXME: use different filedialog which gets encoding
- KURL url = KFileDialog::getOpenURL( QString::null, "text/x-diff", this );
+ KURL url = KFileDialog::getOpenURL( TQString::null, "text/x-diff", this );
if( !url.isEmpty() ) {
KompareShell* shell = new KompareShell();
kapp->ref();
@@ -369,7 +369,7 @@ void KompareShell::slotFileBlendURLAndDiff()
dialog->setFirstGroupBoxTitle( i18n( "File/Folder" ) );
dialog->setSecondGroupBoxTitle( i18n( "Diff Output" ) );
- KGuiItem blendGuiItem( i18n( "Blend" ), QString::null, i18n( "Blend this file or folder with the diff output" ), i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
+ KGuiItem blendGuiItem( i18n( "Blend" ), TQString::null, i18n( "Blend this file or folder with the diff output" ), i18n( "If you have entered a file or folder name and a file that contains diff output in the fields in this dialog then this button will be enabled and pressing it will open kompare's main view where the output of the entered file or files from the folder are mixed with the diff output so you can then apply the difference(s) to a file or to the files. " ) );
dialog->setButtonOK( blendGuiItem );
dialog->setGroup( "Recent Blend Files" );
@@ -377,7 +377,7 @@ void KompareShell::slotFileBlendURLAndDiff()
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
// diff output can not be a directory
dialog->setSecondURLRequesterMode( KFile::File|KFile::ExistingOnly );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
{
m_sourceURL = dialog->getFirstURL();
m_destinationURL = dialog->getSecondURL();
@@ -398,7 +398,7 @@ void KompareShell::slotFileCompareFiles()
dialog->setFirstGroupBoxTitle( i18n( "Source" ) );
dialog->setSecondGroupBoxTitle( i18n( "Destination" ) );
- KGuiItem compareGuiItem( i18n( "Compare" ), QString::null, i18n( "Compare these files or folders" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
+ KGuiItem compareGuiItem( i18n( "Compare" ), TQString::null, i18n( "Compare these files or folders" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog->setButtonOK( compareGuiItem );
dialog->setGroup( "Recent Compare Files" );
@@ -406,7 +406,7 @@ void KompareShell::slotFileCompareFiles()
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
dialog->setSecondURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
- if ( dialog->exec() == QDialog::Accepted )
+ if ( dialog->exec() == TQDialog::Accepted )
{
m_sourceURL = dialog->getFirstURL();
m_destinationURL = dialog->getSecondURL();
@@ -438,22 +438,22 @@ void KompareShell::slotShowTextView()
// FIXME: proper error checking
m_textViewWidget = createDockWidget( i18n("Text View"), SmallIcon( "text") );
m_textViewPart = KParts::ComponentFactory::createPartInstanceFromQuery<KTextEditor::Document>(
- QString::fromLatin1("KTextEditor/Document"),
- QString::null, (QWidget*)this, 0, (QWidget*)this, 0, QStringList(), &errCode );
+ TQString::fromLatin1("KTextEditor/Document"),
+ TQString::null, (TQWidget*)this, 0, (TQWidget*)this, 0, TQStringList(), &errCode );
if ( m_textViewPart )
{
m_textView = m_textViewPart->createView( this, 0 );
- m_textViewWidget->setWidget( static_cast<QWidget*>(m_textView) );
+ m_textViewWidget->setWidget( static_cast<TQWidget*>(m_textView) );
m_textEditIface = editInterface( m_textViewPart );
- connect( m_viewPart, SIGNAL(diffString(const QString&)),
- this, SLOT(slotSetDiffString(const QString&)) );
+ connect( m_viewPart, TQT_SIGNAL(diffString(const TQString&)),
+ this, TQT_SLOT(slotSetDiffString(const TQString&)) );
}
}
m_textViewWidget->manualDock( m_mainViewDock, KDockWidget:: DockCenter );
}
-void KompareShell::slotSetDiffString( const QString& diffString )
+void KompareShell::slotSetDiffString( const TQString& diffString )
{
if ( m_textEditIface )
m_textEditIface->setText( diffString );
@@ -475,7 +475,7 @@ void KompareShell::optionsConfigureToolbars()
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(newToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
diff --git a/kompare/kompare_shell.h b/kompare/kompare_shell.h
index be3bb150..f1fd87d2 100644
--- a/kompare/kompare_shell.h
+++ b/kompare/kompare_shell.h
@@ -84,7 +84,7 @@ public:
public slots:
void slotUpdateStatusBar( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
- void setCaption( const QString& caption );
+ void setCaption( const TQString& caption );
/**
* This method only exists because i cant make main a frined of this class
@@ -108,7 +108,7 @@ protected:
void readProperties(KConfig *);
private slots:
- void slotSetStatusBarText( const QString& text );
+ void slotSetStatusBarText( const TQString& text );
void slotFileOpen();
void slotFileCompareFiles();
void slotFileBlendURLAndDiff();
@@ -116,7 +116,7 @@ private slots:
void slotFileClose();
void optionsConfigureKeys();
void optionsConfigureToolbars();
- void slotSetDiffString( const QString& diffString );
+ void slotSetDiffString( const TQString& diffString );
void newToolbarConfig();
private:
diff --git a/kompare/komparenavtreepart/komparenavtreepart.cpp b/kompare/komparenavtreepart/komparenavtreepart.cpp
index f2e10759..31b0388f 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.cpp
+++ b/kompare/komparenavtreepart/komparenavtreepart.cpp
@@ -37,7 +37,7 @@
using namespace Diff2;
-KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
+KompareNavTreePart::KompareNavTreePart( TQWidget* parent, const char* name )
: KParts::ReadOnlyPart( parent, name ),
m_splitter( 0 ),
m_modelList( 0 ),
@@ -53,7 +53,7 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_destination( "" ),
m_info( 0 )
{
- m_splitter = new QSplitter( Qt::Horizontal );
+ m_splitter = new TQSplitter( Qt::Horizontal );
setWidget( m_splitter );
@@ -82,14 +82,14 @@ KompareNavTreePart::KompareNavTreePart( QWidget* parent, const char* name )
m_changesList->setRootIsDecorated( false );
m_changesList->setSorting( 0, true );
- connect( m_srcDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotSrcDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_destDirTree, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotDestDirTreeSelectionChanged( QListViewItem* )) );
- connect( m_fileList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotFileListSelectionChanged( QListViewItem* )) );
- connect( m_changesList, SIGNAL(selectionChanged( QListViewItem* )),
- this, SLOT(slotChangesListSelectionChanged( QListViewItem* )) );
+ connect( m_srcDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotSrcDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_destDirTree, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotDestDirTreeSelectionChanged( TQListViewItem* )) );
+ connect( m_fileList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotFileListSelectionChanged( TQListViewItem* )) );
+ connect( m_changesList, TQT_SIGNAL(selectionChanged( TQListViewItem* )),
+ this, TQT_SLOT(slotChangesListSelectionChanged( TQListViewItem* )) );
}
KompareNavTreePart::~KompareNavTreePart()
@@ -140,8 +140,8 @@ void KompareNavTreePart::buildTreeInMemory()
return;
}
- QString srcBase;
- QString destBase;
+ TQString srcBase;
+ TQString destBase;
DiffModel* model;
model = m_modelList->first();
@@ -177,8 +177,8 @@ void KompareNavTreePart::buildTreeInMemory()
m_srcRootItem = new KDirLVI( m_srcDirTree, srcBase );
m_destRootItem = new KDirLVI( m_destDirTree, destBase );
- QString srcPath;
- QString destPath;
+ TQString srcPath;
+ TQString destPath;
// Create the tree from the models
DiffModelListConstIterator modelIt = m_modelList->begin();
@@ -204,11 +204,11 @@ void KompareNavTreePart::buildDirectoryTree()
// kdDebug(8105) << "BuildDirTree called" << endl;
}
-QString KompareNavTreePart::compareFromEndAndReturnSame(
- const QString& string1,
- const QString& string2 )
+TQString KompareNavTreePart::compareFromEndAndReturnSame(
+ const TQString& string1,
+ const TQString& string2 )
{
- QString result;
+ TQString result;
int srcLen = string1.length();
int destLen = string2.length();
@@ -323,13 +323,13 @@ void KompareNavTreePart::slotSetSelection( const Difference* diff )
}
}
-void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotSrcDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the sourceDirectoryTree with item = " << item << endl;
m_srcDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the dest tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_destRootItem->setSelected( path );
@@ -341,13 +341,13 @@ void KompareNavTreePart::slotSrcDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotDestDirTreeSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the destinationDirectoryTree with item = " << item << endl;
m_destDirTree->ensureItemVisible( item );
KDirLVI* dir = static_cast<KDirLVI*>(item);
// order the src tree view to set its selected item to the same as here
- QString path;
+ TQString path;
// We start with an empty path and after the call path contains the full path
path = dir->fullPath( path );
KDirLVI* selItem = m_srcRootItem->setSelected( path );
@@ -359,7 +359,7 @@ void KompareNavTreePart::slotDestDirTreeSelectionChanged( QListViewItem* item )
dir->fillFileList( m_fileList, &m_modelToFileItemDict );
}
-void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotFileListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the fileList with item = " << item << endl;
@@ -378,7 +378,7 @@ void KompareNavTreePart::slotFileListSelectionChanged( QListViewItem* item )
emit selectionChanged( m_selectedModel, m_selectedDifference );
}
-void KompareNavTreePart::slotChangesListSelectionChanged( QListViewItem* item )
+void KompareNavTreePart::slotChangesListSelectionChanged( TQListViewItem* item )
{
kdDebug(8105) << "Sent by the changesList" << endl;
@@ -397,7 +397,7 @@ void KompareNavTreePart::slotApplyDifference( bool /*apply*/ )
void KompareNavTreePart::slotApplyAllDifferences( bool /*apply*/ )
{
- QPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
+ TQPtrDictIterator<KChangeLVI> it( m_diffToChangeItemDict );
kdDebug() << "m_diffToChangeItemDict.count() = " << m_diffToChangeItemDict.count() << endl;
@@ -417,7 +417,7 @@ void KompareNavTreePart::slotApplyDifference( const Difference* diff, bool /*app
void KChangeLVI::setDifferenceText()
{
- QString text;
+ TQString text;
switch( m_difference->type() ) {
case Difference::Change:
// Shouldn't this simply be diff->sourceLineCount() ?
@@ -457,13 +457,13 @@ KChangeLVI::KChangeLVI( KListView* parent, Difference* diff ) : KListViewItem( p
{
m_difference = diff;
- setText( 0, QString::number( diff->sourceLineNumber() ) );
- setText( 1, QString::number( diff->destinationLineNumber() ) );
+ setText( 0, TQString::number( diff->sourceLineNumber() ) );
+ setText( 1, TQString::number( diff->destinationLineNumber() ) );
setDifferenceText();
}
-int KChangeLVI::compare( QListViewItem* item, int column, bool ascending ) const
+int KChangeLVI::compare( TQListViewItem* item, int column, bool ascending ) const
{
if ( ascending )
{
@@ -498,7 +498,7 @@ KFileLVI::KFileLVI( KListView* parent, DiffModel* model ) : KListViewItem( paren
setSelectable( true );
}
-void KFileLVI::fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict )
+void KFileLVI::fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict )
{
changesList->clear();
diffToChangeItemDict->clear();
@@ -519,7 +519,7 @@ KFileLVI::~KFileLVI()
{
}
-KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KListView* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KListView) constructor called with dir = " << dir << endl;
m_rootItem = true;
@@ -533,7 +533,7 @@ KDirLVI::KDirLVI( KListView* parent, QString& dir ) : KListViewItem( parent )
setText( 0, m_dirName );
}
-KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
+KDirLVI::KDirLVI( KDirLVI* parent, TQString& dir ) : KListViewItem( parent )
{
// kdDebug(8105) << "KDirLVI (KDirLVI) constructor called with dir = " << dir << endl;
m_rootItem = false;
@@ -545,7 +545,7 @@ KDirLVI::KDirLVI( KDirLVI* parent, QString& dir ) : KListViewItem( parent )
}
// addModel always removes it own path from the beginning
-void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict )
+void KDirLVI::addModel( TQString& path, DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict )
{
// kdDebug(8105) << "KDirLVI::addModel called with path = " << path << " from KDirLVI with m_dirName = " << m_dirName << endl;
@@ -565,7 +565,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
KDirLVI* child;
- QString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
+ TQString dir = path.mid( 0, path.find( "/", 0 ) + 1 );
child = findChild( dir );
if ( !child )
{
@@ -577,7 +577,7 @@ void KDirLVI::addModel( QString& path, DiffModel* model, QPtrDict<KDirLVI>* mode
child->addModel( path, model, modelToDirItemDict );
}
-KDirLVI* KDirLVI::findChild( QString dir )
+KDirLVI* KDirLVI::findChild( TQString dir )
{
// kdDebug(8105) << "KDirLVI::findChild called with dir = " << dir << endl;
KDirLVI* child;
@@ -592,7 +592,7 @@ KDirLVI* KDirLVI::findChild( QString dir )
return 0L;
}
-void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict )
+void KDirLVI::fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict )
{
fileList->clear();
@@ -607,7 +607,7 @@ void KDirLVI::fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFile
fileList->setSelected( fileList->firstChild(), true );
}
-QString KDirLVI::fullPath( QString& path )
+TQString KDirLVI::fullPath( TQString& path )
{
// if ( !path.isEmpty() )
// kdDebug(8105) << "KDirLVI::fullPath called with path = " << path << endl;
@@ -628,7 +628,7 @@ QString KDirLVI::fullPath( QString& path )
return path;
}
-KDirLVI* KDirLVI::setSelected( QString dir )
+KDirLVI* KDirLVI::setSelected( TQString dir )
{
// kdDebug(8105) << "KDirLVI::setSelected called with dir = " << dir << endl;
@@ -675,9 +675,9 @@ KompareNavTreePartFactory::~KompareNavTreePartFactory()
s_instance = 0L;
}
-KParts::Part* KompareNavTreePartFactory::createPartObject( QWidget* parentWidget, const char* widgetName,
- QObject* /*parent*/, const char* /*name*/,
- const char* /*classname*/, const QStringList & /*args*/ )
+KParts::Part* KompareNavTreePartFactory::createPartObject( TQWidget* parentWidget, const char* widgetName,
+ TQObject* /*parent*/, const char* /*name*/,
+ const char* /*classname*/, const TQStringList & /*args*/ )
{
// Create an instance of our Part
KompareNavTreePart* obj = new KompareNavTreePart( parentWidget, widgetName );
diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h
index e2563d63..a126cfe5 100644
--- a/kompare/komparenavtreepart/komparenavtreepart.h
+++ b/kompare/komparenavtreepart/komparenavtreepart.h
@@ -20,10 +20,10 @@
#ifndef KOMPARENAVTREEPART_H
#define KOMPARENAVTREEPART_H
-#include <qptrdict.h>
-#include <qptrlist.h>
-#include <qsplitter.h>
-#include <qlistview.h>
+#include <tqptrdict.h>
+#include <tqptrlist.h>
+#include <tqsplitter.h>
+#include <tqlistview.h>
#include <kparts/factory.h>
#include <kparts/part.h>
@@ -49,7 +49,7 @@ class KompareNavTreePart : public KParts::ReadOnlyPart
Q_OBJECT
public:
- KompareNavTreePart( QWidget* parent = 0L, const char* name = 0L );
+ KompareNavTreePart( TQWidget* parent = 0L, const char* name = 0L );
virtual ~KompareNavTreePart();
public:
@@ -66,10 +66,10 @@ signals:
void selectionChanged( const Diff2::Difference* diff );
private slots:
- void slotSrcDirTreeSelectionChanged ( QListViewItem* item );
- void slotDestDirTreeSelectionChanged( QListViewItem* item );
- void slotFileListSelectionChanged ( QListViewItem* item );
- void slotChangesListSelectionChanged( QListViewItem* item );
+ void slotSrcDirTreeSelectionChanged ( TQListViewItem* item );
+ void slotDestDirTreeSelectionChanged( TQListViewItem* item );
+ void slotFileListSelectionChanged ( TQListViewItem* item );
+ void slotChangesListSelectionChanged( TQListViewItem* item );
void slotApplyDifference( bool apply );
void slotApplyAllDifferences( bool apply );
@@ -84,22 +84,22 @@ private:
void buildDirectoryTree();
- QString compareFromEndAndReturnSame( const QString& string1, const QString& string2 );
- void addDirToTreeView( enum Kompare::Target, const QString& filename );
+ TQString compareFromEndAndReturnSame( const TQString& string1, const TQString& string2 );
+ void addDirToTreeView( enum Kompare::Target, const TQString& filename );
- KListViewItem* findDirInDirTree( const KListViewItem* parent, const QString& dir );
+ KListViewItem* findDirInDirTree( const KListViewItem* parent, const TQString& dir );
// KListViewItem* firstItem();
// KListViewItem* lastItem();
private:
- QSplitter* m_splitter;
+ TQSplitter* m_splitter;
const Diff2::DiffModelList* m_modelList;
- QPtrDict<KChangeLVI> m_diffToChangeItemDict;
- QPtrDict<KFileLVI> m_modelToFileItemDict;
- QPtrDict<KDirLVI> m_modelToSrcDirItemDict;
- QPtrDict<KDirLVI> m_modelToDestDirItemDict;
+ TQPtrDict<KChangeLVI> m_diffToChangeItemDict;
+ TQPtrDict<KFileLVI> m_modelToFileItemDict;
+ TQPtrDict<KDirLVI> m_modelToSrcDirItemDict;
+ TQPtrDict<KDirLVI> m_modelToDestDirItemDict;
KListView* m_srcDirTree;
KListView* m_destDirTree;
@@ -112,8 +112,8 @@ private:
const Diff2::DiffModel* m_selectedModel;
const Diff2::Difference* m_selectedDifference;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
struct Kompare::Info* m_info;
};
@@ -128,7 +128,7 @@ public:
~KChangeLVI();
public:
Diff2::Difference* difference() { return m_difference; };
- virtual int compare( QListViewItem* item, int column, bool ascending ) const;
+ virtual int compare( TQListViewItem* item, int column, bool ascending ) const;
void setDifferenceText();
private:
@@ -142,7 +142,7 @@ public:
~KFileLVI();
public:
Diff2::DiffModel* model() { return m_model; };
- void fillChangesList( KListView* changesList, QPtrDict<KChangeLVI>* diffToChangeItemDict );
+ void fillChangesList( KListView* changesList, TQPtrDict<KChangeLVI>* diffToChangeItemDict );
private:
Diff2::DiffModel* m_model;
};
@@ -150,21 +150,21 @@ private:
class KDirLVI : public KListViewItem
{
public:
- KDirLVI( KDirLVI* parent, QString& dir );
- KDirLVI( KListView* parent, QString& dir );
+ KDirLVI( KDirLVI* parent, TQString& dir );
+ KDirLVI( KListView* parent, TQString& dir );
~KDirLVI();
public:
- void addModel( QString& dir, Diff2::DiffModel* model, QPtrDict<KDirLVI>* modelToDirItemDict );
- QString& dirName() { return m_dirName; };
- QString fullPath( QString& path );
- KDirLVI* setSelected( QString dir );
- void fillFileList( KListView* fileList, QPtrDict<KFileLVI>* modelToFileItemDict );
+ void addModel( TQString& dir, Diff2::DiffModel* model, TQPtrDict<KDirLVI>* modelToDirItemDict );
+ TQString& dirName() { return m_dirName; };
+ TQString fullPath( TQString& path );
+ KDirLVI* setSelected( TQString dir );
+ void fillFileList( KListView* fileList, TQPtrDict<KFileLVI>* modelToFileItemDict );
bool isRootItem() { return m_rootItem; };
private:
- KDirLVI* findChild( QString dir );
+ KDirLVI* findChild( TQString dir );
private:
Diff2::DiffModelList m_modelList;
- QString m_dirName;
+ TQString m_dirName;
bool m_rootItem;
};
@@ -178,9 +178,9 @@ class KompareNavTreePartFactory : public KParts::Factory
public:
KompareNavTreePartFactory();
virtual ~KompareNavTreePartFactory();
- 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/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp
index d74945e6..bf15bb4d 100644
--- a/kompare/komparepart/kompare_part.cpp
+++ b/kompare/komparepart/kompare_part.cpp
@@ -21,8 +21,8 @@
#include "kompare_qsplitter.h" // make sure we get there first
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
#include <kaction.h>
#include <kapplication.h>
@@ -56,8 +56,8 @@ K_EXPORT_COMPONENT_FACTORY( libkomparepart, KomparePartFactory )
ViewSettings* KomparePart::m_viewSettings = 0L;
DiffSettings* KomparePart::m_diffSettings = 0L;
-KomparePart::KomparePart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/ ) :
+KomparePart::KomparePart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/ ) :
KParts::ReadWritePart(parent, name),
m_tempDiff( 0 ),
m_info()
@@ -76,64 +76,64 @@ KomparePart::KomparePart( QWidget *parentWidget, const char *widgetName,
// This creates the "Model creator" and connects the signals and slots
m_modelList = new Diff2::KompareModelList( m_diffSettings, m_info, this, "komparemodellist" );
- connect( m_modelList, SIGNAL(status( Kompare::Status )),
- this, SLOT(slotSetStatus( Kompare::Status )) );
- connect( m_modelList, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
- this, SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
- connect( m_modelList, SIGNAL(error( QString )),
- this, SLOT(slotShowError( QString )) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SLOT(updateActions()) );
- connect( m_modelList, SIGNAL(applyAllDifferences( bool )),
- this, SIGNAL(appliedChanged()) );
- connect( m_modelList, SIGNAL(applyDifference( bool )),
- this, SIGNAL(appliedChanged()) );
-
- connect( m_modelList, SIGNAL( setModified( bool ) ),
- this, SLOT( slotSetModified( bool ) ) );
+ connect( m_modelList, TQT_SIGNAL(status( Kompare::Status )),
+ this, TQT_SLOT(slotSetStatus( Kompare::Status )) );
+ connect( m_modelList, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )),
+ this, TQT_SIGNAL(setStatusBarModelInfo( int, int, int, int, int )) );
+ connect( m_modelList, TQT_SIGNAL(error( TQString )),
+ this, TQT_SLOT(slotShowError( TQString )) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SLOT(updateActions()) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference( bool )),
+ this, TQT_SIGNAL(appliedChanged()) );
+
+ connect( m_modelList, TQT_SIGNAL( setModified( bool ) ),
+ this, TQT_SLOT( slotSetModified( bool ) ) );
// This is the stuff to connect the "interface" of the kompare part to the model inside
- connect( m_modelList, SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
- this, SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- this, SIGNAL(setSelection(const Diff2::Difference*)) );
- connect( this, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- this, SIGNAL(applyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- this, SIGNAL(applyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- this, SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
+ connect( m_modelList, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)),
+ this, TQT_SIGNAL(modelsChanged(const Diff2::DiffModelList*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::DiffModel*, const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ this, TQT_SIGNAL(setSelection(const Diff2::Difference*)) );
+ connect( this, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ this, TQT_SIGNAL(applyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ this, TQT_SIGNAL(applyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ this, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)) );
// This creates the splitterwidget and connects the signals and slots
m_splitter = new KompareSplitter ( m_viewSettings, parentWidget, widgetName );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
-// connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
-// m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
- connect( m_modelList, SIGNAL(setSelection(const Diff2::Difference*)),
- m_splitter, SLOT(slotSetSelection(const Diff2::Difference*)) );
- connect( m_splitter, SIGNAL(selectionChanged(const Diff2::Difference*)),
- m_modelList, SLOT(slotSelectionChanged(const Diff2::Difference*)) );
-
- connect( m_modelList, SIGNAL(applyDifference(bool)),
- m_splitter, SLOT(slotApplyDifference(bool)) );
- connect( m_modelList, SIGNAL(applyAllDifferences(bool)),
- m_splitter, SLOT(slotApplyAllDifferences(bool)) );
- connect( m_modelList, SIGNAL(applyDifference(const Diff2::Difference*, bool)),
- m_splitter, SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
- connect( this, SIGNAL(configChanged()), m_splitter, SIGNAL(configChanged()) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::DiffModel*, const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::DiffModel*, const Diff2::Difference*)) );
+// connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*, const Diff2::Difference*)),
+// m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*, const Diff2::Difference*)) );
+ connect( m_modelList, TQT_SIGNAL(setSelection(const Diff2::Difference*)),
+ m_splitter, TQT_SLOT(slotSetSelection(const Diff2::Difference*)) );
+ connect( m_splitter, TQT_SIGNAL(selectionChanged(const Diff2::Difference*)),
+ m_modelList, TQT_SLOT(slotSelectionChanged(const Diff2::Difference*)) );
+
+ connect( m_modelList, TQT_SIGNAL(applyDifference(bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyAllDifferences(bool)),
+ m_splitter, TQT_SLOT(slotApplyAllDifferences(bool)) );
+ connect( m_modelList, TQT_SIGNAL(applyDifference(const Diff2::Difference*, bool)),
+ m_splitter, TQT_SLOT(slotApplyDifference(const Diff2::Difference*, bool)) );
+ connect( this, TQT_SIGNAL(configChanged()), m_splitter, TQT_SIGNAL(configChanged()) );
// notify the part that this is our internal widget
setWidget( m_splitter->parentWidget() );
@@ -163,19 +163,19 @@ void KomparePart::setupActions()
// create our actions
m_saveAll = new KAction( i18n("Save &All"), "save_all", 0,
- this, SLOT(saveAll()),
+ this, TQT_SLOT(saveAll()),
actionCollection(), "file_save_all" );
m_saveDiff = new KAction( i18n("Save .&diff..."), 0,
- this, SLOT(saveDiff()),
+ this, TQT_SLOT(saveDiff()),
actionCollection(), "file_save_diff" );
m_swap = new KAction( i18n( "Swap Source with Destination" ), 0,
- this, SLOT(slotSwap()),
+ this, TQT_SLOT(slotSwap()),
actionCollection(), "file_swap" );
m_diffStats = new KAction( i18n( "Show Statistics" ), 0,
- this, SLOT(slotShowDiffstats()),
+ this, TQT_SLOT(slotShowDiffstats()),
actionCollection(), "file_diffstats" );
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
}
void KomparePart::updateActions()
@@ -186,7 +186,7 @@ void KomparePart::updateActions()
m_diffStats->setEnabled( m_modelList->modelCount() > 0 );
}
-void KomparePart::setEncoding( const QString& encoding )
+void KomparePart::setEncoding( const TQString& encoding )
{
kdDebug() << "Encoding: " << encoding << endl;
m_modelList->setEncoding( encoding );
@@ -218,7 +218,7 @@ bool KomparePart::openDiff( const KURL& url )
return result;
}
-bool KomparePart::openDiff( const QString& diffOutput )
+bool KomparePart::openDiff( const TQString& diffOutput )
{
bool value = false;
@@ -245,7 +245,7 @@ bool KomparePart::openDiff3( const KURL& diff3Url )
return false;
}
-bool KomparePart::openDiff3( const QString& diff3Output )
+bool KomparePart::openDiff3( const TQString& diff3Output )
{
// FIXME: Implement this !!!
kdDebug(8103) << "Not implemented yet. diff3 output is: " << endl;
@@ -253,15 +253,15 @@ bool KomparePart::openDiff3( const QString& diff3Output )
return false;
}
-bool KomparePart::exists( const QString& url )
+bool KomparePart::exists( const TQString& url )
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
return fi.exists();
}
-const QString KomparePart::fetchURL( const KURL& url )
+const TQString KomparePart::fetchURL( const KURL& url )
{
- QString tempFileName( "" );
+ TQString tempFileName( "" );
if ( !url.isLocalFile() )
{
if ( ! KIO::NetAccess::download( url, tempFileName, widget() ) )
@@ -509,10 +509,10 @@ void KomparePart::slotSetStatus( enum Kompare::Status status )
void KomparePart::updateCaption()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -534,10 +534,10 @@ void KomparePart::updateCaption()
void KomparePart::updateStatus()
{
- QString source = m_info.source.prettyURL();
- QString destination = m_info.destination.prettyURL();
+ TQString source = m_info.source.prettyURL();
+ TQString destination = m_info.destination.prettyURL();
- QString text;
+ TQString text;
switch ( m_info.mode )
{
@@ -571,7 +571,7 @@ void KomparePart::updateStatus()
emit setStatusBarText( text );
}
-void KomparePart::slotShowError( QString error )
+void KomparePart::slotShowError( TQString error )
{
KMessageBox::error( widget(), error );
}
@@ -602,7 +602,7 @@ void KomparePart::slotSwap()
m_info.source = m_info.destination;
m_info.destination = url;
- QString string = m_info.localSource;
+ TQString string = m_info.localSource;
m_info.localSource = m_info.localDestination;
m_info.localDestination = string;
@@ -618,15 +618,15 @@ void KomparePart::slotShowDiffstats( void )
// Fetch all the args needed for komparestatsmessagebox
// oldfile, newfile, diffformat, noofhunks, noofdiffs
- QString oldFile;
- QString newFile;
- QString diffFormat;
+ TQString oldFile;
+ TQString newFile;
+ TQString diffFormat;
int filesInDiff;
int noOfHunks;
int noOfDiffs;
- oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : QString( "" );
- newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : QString( "" );
+ oldFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->sourceFile() : TQString( "" );
+ newFile = m_modelList->selectedModel() ? m_modelList->selectedModel()->destinationFile() : TQString( "" );
if ( m_modelList->selectedModel() )
{
@@ -666,7 +666,7 @@ void KomparePart::slotShowDiffstats( void )
KMessageBox::information( 0L, i18n(
"No diff file, or no 2 files have been diffed. "
"Therefore no stats are available."),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
else if ( m_modelList->modelCount() == 1 ) { // 1 file in diff, or 2 files compared
KMessageBox::information( 0L, i18n(
@@ -680,7 +680,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %5")
.arg(oldFile).arg(newFile).arg(diffFormat)
.arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
} else { // more than 1 file in diff, or 2 directories compared
KMessageBox::information( 0L, i18n(
"Statistics:\n"
@@ -695,7 +695,7 @@ void KomparePart::slotShowDiffstats( void )
"Number of differences: %6")
.arg(filesInDiff).arg(diffFormat).arg(oldFile)
.arg(newFile).arg(noOfHunks).arg(noOfDiffs),
- i18n("Diff Statistics"), QString::null, false );
+ i18n("Diff Statistics"), TQString::null, false );
}
}
@@ -742,7 +742,7 @@ void KomparePart::optionsPreferences()
// show preferences
KomparePrefDlg* pref = new KomparePrefDlg( m_viewSettings, m_diffSettings );
- connect( pref, SIGNAL(applyClicked()), this, SIGNAL(configChanged()) );
+ connect( pref, TQT_SIGNAL(applyClicked()), this, TQT_SIGNAL(configChanged()) );
if ( pref->exec() )
emit configChanged();
diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h
index 0a9716c3..b7b05ce8 100644
--- a/kompare/komparepart/kompare_part.h
+++ b/kompare/komparepart/kompare_part.h
@@ -64,8 +64,8 @@ public:
/**
* Default constructor
*/
- KomparePart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/);
+ KomparePart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/);
/**
* Destructor
@@ -96,13 +96,13 @@ public:
virtual bool openDiff( const KURL& diffUrl );
/** Added on request of Harald Fernengel */
- virtual bool openDiff( const QString& diffOutput );
+ virtual bool openDiff( const TQString& diffOutput );
/** Open and parse the diff3 file at diff3Url */
virtual bool openDiff3( const KURL& diff3URL );
/** Open and parse the file diff3Output with the output of diff3 */
- virtual bool openDiff3( const QString& diff3Output );
+ virtual bool openDiff3( const TQString& diff3Output );
/** Compare, with diff, source with destination */
virtual void compare( const KURL& sourceFile, const KURL& destinationFile );
@@ -123,7 +123,7 @@ public:
virtual void openDirAndDiff ( const KURL& dir, const KURL& diffFile );
/** Reimplementing this because this one knows more about the real part then the interface */
- virtual void setEncoding( const QString& encoding );
+ virtual void setEncoding( const TQString& encoding );
// This is the interpart interface, it is signal and slot based so no "real" interface here
// All you have to do is connect the parts from your application.
@@ -166,7 +166,7 @@ signals:
void diffURLChanged();
void kompareInfo( Kompare::Info* info );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
-// void setStatusBarText( const QString& text );
+// void setStatusBarText( const TQString& text );
protected:
/**
@@ -183,7 +183,7 @@ protected:
protected slots:
void slotSetStatus( Kompare::Status status );
- void slotShowError( QString error );
+ void slotShowError( TQString error );
void slotSwap();
void slotShowDiffstats();
@@ -195,9 +195,9 @@ protected slots:
private:
void cleanUpTemporaryFiles();
void setupActions();
- bool exists( const QString& url );
+ bool exists( const TQString& url );
bool isDirectory( const KURL& url );
- const QString fetchURL( const KURL& url );
+ const TQString fetchURL( const KURL& url );
private:
// Uhm why were these static again ???
diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h
index 1f1be49d..ca7f4bd1 100644
--- a/kompare/komparepart/kompare_qsplitter.h
+++ b/kompare/komparepart/kompare_qsplitter.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
**
-** Definition of QSplitter class
+** Definition of TQSplitter class
**
** Created : 980105
**
@@ -25,8 +25,8 @@
#define QSPLITTER_H
#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
+#include "tqframe.h"
+#include "tqvaluelist.h"
#endif // QT_H
#ifndef QT_NO_SPLITTER
@@ -43,14 +43,14 @@ public:
: opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
handleWidth( 0 ) { }
- QPtrList<QSplitterLayoutStruct> list;
+ TQPtrList<QSplitterLayoutStruct> list;
bool opaque : 8;
bool firstShow : 8;
bool childrenCollapsible : 8;
int handleWidth;
};
-class Q_EXPORT QSplitter : public QFrame
+class Q_EXPORT TQSplitter : public QFrame
{
Q_OBJECT
Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
@@ -62,9 +62,9 @@ public:
// ### Qt 4.0: remove Auto from public API
enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
- QSplitter( QWidget* parent = 0, const char* name = 0 );
- QSplitter( Orientation, QWidget* parent = 0, const char* name = 0 );
- ~QSplitter();
+ TQSplitter( TQWidget* parent = 0, const char* name = 0 );
+ TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
+ ~TQSplitter();
virtual void setOrientation( Orientation );
Orientation orientation() const { return orient; }
@@ -74,36 +74,36 @@ public:
void setChildrenCollapsible( bool );
bool childrenCollapsible() const;
- void setCollapsible( QWidget *w, bool );
- virtual void setResizeMode( QWidget *w, ResizeMode );
+ void setCollapsible( TQWidget *w, bool );
+ 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 ); }
- QSize sizeHint() const;
- QSize minimumSizeHint() const;
+ TQSize sizeHint() const;
+ TQSize minimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ TQValueList<int> sizes() const;
+ void setSizes( TQValueList<int> );
int handleWidth() const;
void setHandleWidth( int );
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 * );
@@ -120,23 +120,23 @@ public: // private (:
int adjustPos( int, int, int *, int *, int *, int * );
bool collapsible( QSplitterLayoutStruct * );
void processChildEvents();
- QSplitterLayoutStruct *findWidget( QWidget * );
- QSplitterLayoutStruct *addWidget( QWidget *, bool prepend = FALSE );
+ QSplitterLayoutStruct *findWidget( TQWidget * );
+ QSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = FALSE );
void recalcId();
void doMove( bool backwards, int pos, int id, int delta, bool upLeft,
bool mayCollapse );
- void setGeo( QWidget *w, int pos, int size, bool splitterMoved );
+ void setGeo( TQWidget *w, int pos, int size, bool splitterMoved );
int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize );
void updateHandles();
- inline QCOORD pick( const QPoint &p ) const
+ inline QCOORD pick( const TQPoint &p ) const
{ return orient == Horizontal ? p.x() : p.y(); }
- inline QCOORD pick( const QSize &s ) const
+ inline QCOORD pick( const TQSize &s ) const
{ return orient == Horizontal ? s.width() : s.height(); }
- inline QCOORD trans( const QPoint &p ) const
+ inline QCOORD trans( const TQPoint &p ) const
{ return orient == Vertical ? p.x() : p.y(); }
- inline QCOORD trans( const QSize &s ) const
+ inline QCOORD trans( const TQSize &s ) const
{ return orient == Vertical ? s.width() : s.height(); }
QSplitterPrivate *d;
@@ -146,20 +146,20 @@ public: // private (:
#ifndef QT_NO_TEXTSTREAM
// moc doesn't like these.
-// friend Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& );
-// friend Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& );
+// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
#endif
public:
#if defined(Q_DISABLE_COPY)
- QSplitter( const QSplitter & );
- QSplitter& operator=( const QSplitter & );
+ TQSplitter( const TQSplitter & );
+ TQSplitter& operator=( const TQSplitter & );
#endif
};
#ifndef QT_NO_TEXTSTREAM
-Q_EXPORT QTextStream& operator<<( QTextStream&, const QSplitter& );
-Q_EXPORT QTextStream& operator>>( QTextStream&, QSplitter& );
+Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
+Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
#endif
class QSplitterHandle : public QWidget
@@ -167,29 +167,29 @@ class QSplitterHandle : public QWidget
Q_OBJECT
public:
QSplitterHandle( Orientation o,
- QSplitter *parent, const char* name=0 );
+ TQSplitter *parent, const char* name=0 );
void setOrientation( Orientation o );
Orientation orientation() const { return orient; }
bool opaque() const { return s->opaqueResize(); }
- QSize sizeHint() const;
+ TQSize sizeHint() const;
int id() const { return myId; } // d->list.at(id())->wid == this
void setId( int i ) { myId = i; }
protected:
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
+ void paintEvent( TQPaintEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
public: // private (:
Orientation orient;
bool opaq;
int myId;
- QSplitter *s;
+ TQSplitter *s;
};
const uint Default = 2;
@@ -201,7 +201,7 @@ public:
uint isHandle : 1;
uint collapsible : 2;
uint resizeMode : 2;
- QWidget *wid;
+ TQWidget *wid;
QSplitterLayoutStruct()
: sizer( -1 ), collapsible( Default ) { }
diff --git a/kompare/komparepart/kompareconnectwidget.cpp b/kompare/komparepart/kompareconnectwidget.cpp
index eed8e99c..57185e5a 100644
--- a/kompare/komparepart/kompareconnectwidget.cpp
+++ b/kompare/komparepart/kompareconnectwidget.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -41,19 +41,19 @@ KompareConnectWidgetFrame::KompareConnectWidgetFrame( KompareListView* left,
ViewSettings* settings,
KompareSplitter* parent,
const char* name ) :
- QSplitterHandle(Horizontal, (QSplitter *)parent, name),
+ QSplitterHandle(Horizontal, (TQSplitter *)parent, name),
m_wid ( left, right, settings, this, name ),
m_label ( "", this ),
m_layout ( this )
{
- setSizePolicy ( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored) );
- m_wid.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) );
- m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ setSizePolicy ( TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Ignored) );
+ m_wid.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
m_label.setMargin(3);
- QFrame* bottomLine = new QFrame(this);
- bottomLine->setFrameShape(QFrame::HLine);
- bottomLine->setFrameShadow ( QFrame::Plain );
- bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ TQFrame* bottomLine = new TQFrame(this);
+ bottomLine->setFrameShape(TQFrame::HLine);
+ bottomLine->setFrameShadow ( TQFrame::Plain );
+ bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_layout.setSpacing(0);
m_layout.setMargin(0);
@@ -66,14 +66,14 @@ KompareConnectWidgetFrame::~KompareConnectWidgetFrame()
{
}
-QSize KompareConnectWidgetFrame::sizeHint() const
+TQSize KompareConnectWidgetFrame::sizeHint() const
{
- return QSize(50, style().pixelMetric( QStyle::PM_ScrollBarExtent ) );
+ return TQSize(50, style().pixelMetric( TQStyle::PM_ScrollBarExtent ) );
}
static int kMouseOffset;
-void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseMoveEvent( TQMouseEvent *e )
{
if ( !(e->state()&LeftButton) )
return;
@@ -84,14 +84,14 @@ void KompareConnectWidgetFrame::mouseMoveEvent( QMouseEvent *e )
((KompareSplitter*)s)->moveSplitter( pos, id() );
}
-void KompareConnectWidgetFrame::mousePressEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton )
kMouseOffset = s->pick( e->pos() );
QSplitterHandle::mousePressEvent(e);
}
-void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
+void KompareConnectWidgetFrame::mouseReleaseEvent( TQMouseEvent *e )
{
if ( !opaque() && e->button() == LeftButton ) {
QCOORD pos = s->pick( parentWidget()->mapFromGlobal(e->globalPos()) )
@@ -101,17 +101,17 @@ void KompareConnectWidgetFrame::mouseReleaseEvent( QMouseEvent *e )
}
KompareConnectWidget::KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, QWidget* parent, const char* name )
- : QWidget(parent, name),
+ ViewSettings* settings, TQWidget* parent, const char* name )
+ : TQWidget(parent, name),
m_settings( settings ),
m_leftView( left ),
m_rightView( right ),
m_selectedModel( 0 ),
m_selectedDifference( 0 )
{
-// connect( m_settings, SIGNAL( settingsChanged() ), this, SLOT( slotDelayedRepaint() ) );
+// connect( m_settings, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotDelayedRepaint() ) );
setBackgroundMode( NoBackground );
- setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
setFocusProxy( parent->parentWidget() );
}
@@ -139,7 +139,7 @@ void KompareConnectWidget::slotSetSelection( const DiffModel* model, const Diffe
void KompareConnectWidget::slotDelayedRepaint()
{
- QTimer::singleShot( 0, this, SLOT( repaint() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( repaint() ) );
}
void KompareConnectWidget::slotSetSelection( const Difference* diff )
@@ -152,13 +152,13 @@ void KompareConnectWidget::slotSetSelection( const Difference* diff )
slotDelayedRepaint();
}
-void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
+void KompareConnectWidget::paintEvent( TQPaintEvent* /* e */ )
{
// kdDebug(8106) << "KompareConnectWidget::paintEvent()" << endl;
- QPixmap pixbuf(size());
- QPainter paint(&pixbuf, this);
- QPainter* p = &paint;
+ TQPixmap pixbuf(size());
+ TQPainter paint(&pixbuf, this);
+ TQPainter* p = &paint;
p->fillRect( 0, 0, pixbuf.width(), pixbuf.height(), white.dark(110) );
@@ -181,14 +181,14 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
DifferenceListConstIterator diffIt = differences->at( first );
DifferenceListConstIterator dEnd = differences->at( last + 1 );
- QRect leftRect, rightRect;
+ TQRect leftRect, rightRect;
for ( int i = first; i <= last; ++diffIt, ++i )
{
Difference* diff = *diffIt;
bool selected = ( diff == m_selectedDifference );
- if ( QApplication::reverseLayout() )
+ if ( TQApplication::reverseLayout() )
{
leftRect = m_rightView->itemRect( i );
rightRect = m_leftView->itemRect( i );
@@ -211,10 +211,10 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
br = br <= 32767 ? br : 32767;
// kdDebug(8106) << "drawing: " << tl << " " << tr << " " << bl << " " << br << endl;
- QPointArray topBezier = makeTopBezier( tl, tr );
- QPointArray bottomBezier = makeBottomBezier( bl, br );
+ TQPointArray topBezier = makeTopBezier( tl, tr );
+ TQPointArray bottomBezier = makeBottomBezier( bl, br );
- QColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
+ TQColor color = m_settings->colorForDifferenceType( diff->type(), selected, diff->applied() ).dark(110);
p->setPen( color );
p->setBrush( color );
p->drawPolygon ( makeConnectPoly( topBezier, bottomBezier ) );
@@ -233,12 +233,12 @@ void KompareConnectWidget::paintEvent( QPaintEvent* /* e */ )
bitBlt(this, 0, 0, &pixbuf);
}
-QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
+TQPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( tl != tr )
{
@@ -252,12 +252,12 @@ QPointArray KompareConnectWidget::makeTopBezier( int tl, int tr )
}
}
-QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
+TQPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
{
int l = 0;
int r = width();
int o = (int)((double)r*0.4); // 40% of width
- QPointArray controlPoints;
+ TQPointArray controlPoints;
if ( bl != br )
{
@@ -271,9 +271,9 @@ QPointArray KompareConnectWidget::makeBottomBezier( int bl, int br )
}
}
-QPointArray KompareConnectWidget::makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier )
+TQPointArray KompareConnectWidget::makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier )
{
- QPointArray poly( topBezier.size() + bottomBezier.size() );
+ TQPointArray poly( topBezier.size() + bottomBezier.size() );
for( uint i = 0; i < topBezier.size(); i++ )
poly.setPoint( i, topBezier.point( i ) );
for( uint i = 0; i < bottomBezier.size(); i++ )
diff --git a/kompare/komparepart/kompareconnectwidget.h b/kompare/komparepart/kompareconnectwidget.h
index 96160c97..5287552f 100644
--- a/kompare/komparepart/kompareconnectwidget.h
+++ b/kompare/komparepart/kompareconnectwidget.h
@@ -23,7 +23,7 @@
#define KOMPARECONNECTWIDGET_H
#include "kompare_qsplitter.h"
-#include <qwidget.h>
+#include <tqwidget.h>
namespace Diff2 {
class DiffModel;
@@ -38,7 +38,7 @@ class KompareConnectWidget : public QWidget
public:
KompareConnectWidget( KompareListView* left, KompareListView* right,
- ViewSettings* settings, QWidget* parent, const char* name = 0 );
+ ViewSettings* settings, TQWidget* parent, const char* name = 0 );
~KompareConnectWidget();
public slots:
@@ -51,10 +51,10 @@ signals:
void selectionChanged(const Diff2::Difference* diff);
protected:
- void paintEvent( QPaintEvent* e );
- QPointArray makeTopBezier( int tl, int tr );
- QPointArray makeBottomBezier( int bl, int br );
- QPointArray makeConnectPoly( const QPointArray& topBezier, const QPointArray& bottomBezier );
+ void paintEvent( TQPaintEvent* e );
+ TQPointArray makeTopBezier( int tl, int tr );
+ TQPointArray makeBottomBezier( int bl, int br );
+ TQPointArray makeConnectPoly( const TQPointArray& topBezier, const TQPointArray& bottomBezier );
private:
ViewSettings* m_settings;
@@ -74,22 +74,22 @@ public:
ViewSettings* settings, KompareSplitter* parent, const char* name = 0 );
~KompareConnectWidgetFrame();
- QSize sizeHint() const;
+ TQSize sizeHint() const;
KompareConnectWidget* wid() { return &m_wid; }
protected:
// stop the parent QSplitterHandle painting
- void paintEvent( QPaintEvent* /* e */ ) { }
+ void paintEvent( TQPaintEvent* /* e */ ) { }
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
private:
KompareConnectWidget m_wid;
- QLabel m_label;
- QVBoxLayout m_layout;
+ TQLabel m_label;
+ TQVBoxLayout m_layout;
};
#endif
diff --git a/kompare/komparepart/komparelistview.cpp b/kompare/komparepart/komparelistview.cpp
index b86bdef9..7e3ee953 100644
--- a/kompare/komparepart/komparelistview.cpp
+++ b/kompare/komparepart/komparelistview.cpp
@@ -19,10 +19,10 @@
**
***************************************************************************/
-#include <qheader.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -49,17 +49,17 @@ KompareListViewFrame::KompareListViewFrame( bool isSource,
ViewSettings* settings,
KompareSplitter* parent,
const char* name ):
- QFrame ( parent, name ),
+ TQFrame ( parent, name ),
m_view ( isSource, settings, this, name ),
m_label ( isSource?"Source":"Dest", this ),
m_layout ( this )
{
- setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored) );
- m_label.setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
- QFrame *bottomLine = new QFrame(this);
- bottomLine->setFrameShape(QFrame::HLine);
- bottomLine->setFrameShadow ( QFrame::Plain );
- bottomLine->setSizePolicy ( QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Fixed) );
+ setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored) );
+ m_label.setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
+ TQFrame *bottomLine = new TQFrame(this);
+ bottomLine->setFrameShape(TQFrame::HLine);
+ bottomLine->setFrameShadow ( TQFrame::Plain );
+ bottomLine->setSizePolicy ( TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Fixed) );
bottomLine->setFixedHeight(1);
m_label.setMargin(3);
m_layout.setSpacing(0);
@@ -68,12 +68,12 @@ KompareListViewFrame::KompareListViewFrame( bool isSource,
m_layout.addWidget(bottomLine);
m_layout.addWidget(&m_view);
- connect( &m_view, SIGNAL(differenceClicked(const Diff2::Difference*)),
- parent, SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
+ connect( &m_view, TQT_SIGNAL(differenceClicked(const Diff2::Difference*)),
+ parent, TQT_SLOT(slotDifferenceClicked(const Diff2::Difference*)) );
- connect( parent, SIGNAL(scrollViewsToId(int)), &m_view, SLOT(scrollToId(int)) );
- connect( parent, SIGNAL(setXOffset(int)), &m_view, SLOT(setXOffset(int)) );
- connect( &m_view, SIGNAL(resized()), parent, SLOT(slotUpdateScrollBars()) );
+ connect( parent, TQT_SIGNAL(scrollViewsToId(int)), &m_view, TQT_SLOT(scrollToId(int)) );
+ connect( parent, TQT_SIGNAL(setXOffset(int)), &m_view, TQT_SLOT(setXOffset(int)) );
+ connect( &m_view, TQT_SIGNAL(resized()), parent, TQT_SLOT(slotUpdateScrollBars()) );
}
void KompareListViewFrame::slotSetModel( const DiffModel* model )
@@ -92,13 +92,13 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model )
m_label.setText( model->destinationFile() );
}
} else {
- m_label.setText( QString::null );
+ m_label.setText( TQString::null );
}
}
KompareListView::KompareListView( bool isSource,
ViewSettings* settings,
- QWidget* parent, const char* name ) :
+ TQWidget* parent, const char* name ) :
KListView( parent, name ),
m_isSource( isSource ),
m_settings( settings ),
@@ -119,10 +119,10 @@ KompareListView::KompareListView( bool isSource,
setColumnWidthMode( COL_LINE_NO, Maximum );
setColumnWidthMode( COL_MAIN, Maximum );
setResizeMode( LastColumn );
- setFrameStyle( QFrame::NoFrame );
- setVScrollBarMode( QScrollView::AlwaysOff );
- setHScrollBarMode( QScrollView::AlwaysOff );
- setFocusPolicy( QWidget::NoFocus );
+ setFrameStyle( TQFrame::NoFrame );
+ setVScrollBarMode( TQScrollView::AlwaysOff );
+ setHScrollBarMode( TQScrollView::AlwaysOff );
+ setFocusPolicy( TQWidget::NoFocus );
setFont( m_settings->m_font );
setSpaces( m_settings->m_tabToNumberOfSpaces );
setFocusProxy( parent->parentWidget() );
@@ -139,7 +139,7 @@ KompareListViewItem* KompareListView::itemAtIndex( int i )
int KompareListView::firstVisibleDifference()
{
- QListViewItem* item = itemAt( QPoint( 0, 0 ) );
+ TQListViewItem* item = itemAt( TQPoint( 0, 0 ) );
if( item == 0 )
{
@@ -161,7 +161,7 @@ int KompareListView::firstVisibleDifference()
int KompareListView::lastVisibleDifference()
{
- QListViewItem* item = itemAt( QPoint( 0, visibleHeight() - 1 ) );
+ TQListViewItem* item = itemAt( TQPoint( 0, visibleHeight() - 1 ) );
if( item == 0 )
{
@@ -182,14 +182,14 @@ int KompareListView::lastVisibleDifference()
return -1;
}
-QRect KompareListView::itemRect( int i )
+TQRect KompareListView::itemRect( int i )
{
- QListViewItem* item = itemAtIndex( i );
+ TQListViewItem* item = itemAtIndex( i );
int x = 0;
int y = itemPos( item );
int vx, vy;
contentsToViewport( x, y, vx, vy );
- return QRect( vx, vy, 0, item->totalHeight() );
+ return TQRect( vx, vy, 0, item->totalHeight() );
}
int KompareListView::minScrollId()
@@ -238,7 +238,7 @@ void KompareListView::scrollToId( int id )
int y = pos + (int)( r * (double)height ) - minScrollId();
// kdDebug(8104) << "scrollToID: " << endl;
// kdDebug(8104) << " id = " << id << endl;
-// kdDebug(8104) << " id after = " << ( item->nextSibling() ? QString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl;
+// kdDebug(8104) << " id after = " << ( item->nextSibling() ? TQString::number( ((KompareListViewItem*)item->nextSibling())->scrollId() ) : "no such sibling..." ) << endl;
// kdDebug(8104) << " pos = " << pos << endl;
// kdDebug(8104) << " itemId = " << itemId << endl;
// kdDebug(8104) << " r = " << r << endl;
@@ -354,9 +354,9 @@ void KompareListView::slotSetSelection( const DiffModel* model, const Difference
slotSetSelection( diff );
}
-void KompareListView::contentsMousePressEvent( QMouseEvent* e )
+void KompareListView::contentsMousePressEvent( TQMouseEvent* e )
{
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) );
if( !lineItem )
return;
@@ -366,9 +366,9 @@ void KompareListView::contentsMousePressEvent( QMouseEvent* e )
}
}
-void KompareListView::contentsMouseDoubleClickEvent( QMouseEvent* e )
+void KompareListView::contentsMouseDoubleClickEvent( TQMouseEvent* e )
{
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
KompareListViewLineItem* lineItem = dynamic_cast<KompareListViewLineItem*>( itemAt( vp ) );
if ( !lineItem )
return;
@@ -387,7 +387,7 @@ void KompareListView::slotApplyDifference( bool apply )
void KompareListView::slotApplyAllDifferences( bool apply )
{
- QPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict );
+ TQPtrDictIterator<KompareListViewDiffItem> it ( m_itemDict );
for( ; it.current(); ++it )
it.current()->applyDifference( apply );
repaint();
@@ -408,12 +408,12 @@ void KompareListView::setSpaces( int spaces )
triggerUpdate();
}
-void KompareListView::wheelEvent( QWheelEvent* e )
+void KompareListView::wheelEvent( TQWheelEvent* e )
{
e->ignore(); // we want the parent to catch wheel events
}
-void KompareListView::resizeEvent( QResizeEvent* e )
+void KompareListView::resizeEvent( TQResizeEvent* e )
{
KListView::resizeEvent(e);
emit resized();
@@ -421,27 +421,27 @@ void KompareListView::resizeEvent( QResizeEvent* e )
}
KompareListViewItem::KompareListViewItem( KompareListView* parent )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
KompareListViewItem::KompareListViewItem( KompareListView* parent, KompareListViewItem* after )
- : QListViewItem( parent, after ),
+ : TQListViewItem( parent, after ),
m_scrollId( after->scrollId() + after->maxHeight() )
{
// kdDebug(8104) << "Created KompareListViewItem with scroll id " << m_scrollId << endl;
}
KompareListViewItem::KompareListViewItem( KompareListViewItem* parent )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
}
KompareListViewItem::KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* /*after*/ )
- : QListViewItem( parent ),
+ : TQListViewItem( parent ),
m_scrollId( 0 )
{
}
@@ -451,7 +451,7 @@ KompareListView* KompareListViewItem::kompareListView() const
return (KompareListView*)listView();
}
-void KompareListViewItem::paintFocus( QPainter* /* p */, const QColorGroup& /* cg */, const QRect& /* r */ )
+void KompareListViewItem::paintFocus( TQPainter* /* p */, const TQColorGroup& /* cg */, const TQRect& /* r */ )
{
// Don't paint anything
}
@@ -516,7 +516,7 @@ void KompareListViewDiffItem::setSelected( bool b )
{
kdDebug(8104) << "KompareListViewDiffItem::setSelected( " << b << " )" << endl;
KompareListViewItem::setSelected( b );
- QListViewItem* item = m_sourceItem->isVisible() ?
+ TQListViewItem* item = m_sourceItem->isVisible() ?
m_sourceItem->firstChild() :
m_destItem->firstChild();
while( item && item->isVisible() ) {
@@ -578,7 +578,7 @@ DifferenceString* KompareListViewLineContainerItem::lineAt( int i ) const
KompareListViewLineItem::KompareListViewLineItem( KompareListViewLineContainerItem* parent, int line, DifferenceString* text )
: KompareListViewItem( parent )
{
- setText( COL_LINE_NO, QString::number( line ) );
+ setText( COL_LINE_NO, TQString::number( line ) );
setText( COL_MAIN, text->string() );
m_text = text;
}
@@ -589,9 +589,9 @@ void KompareListViewLineItem::setup()
setHeight( listView()->fontMetrics().lineSpacing() );
}
-void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void KompareListViewLineItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
- QColor bg = cg.base();
+ TQColor bg = cg.base();
p->fillRect( 0, 0, width, height(), bg );
if ( diffItemParent()->difference()->type() == Difference::Unchanged )
{
@@ -625,17 +625,17 @@ void KompareListViewLineItem::paintCell( QPainter * p, const QColorGroup & cg, i
}
}
-void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int align )
+void KompareListViewLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int align )
{
if ( column == COL_MAIN )
{
- QString textChunk;
+ TQString textChunk;
int offset = listView()->itemMargin();
unsigned int prevValue = 0;
int chunkWidth;
- QBrush changeBrush( bg, Dense3Pattern );
- QBrush normalBrush( bg, SolidPattern );
- QBrush brush;
+ TQBrush changeBrush( bg, Dense3Pattern );
+ TQBrush normalBrush( bg, SolidPattern );
+ TQBrush brush;
if ( m_text->string().isEmpty() )
{
@@ -658,11 +658,11 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
// kdDebug(8104) << "c->offset() = " << c->offset() << endl;
// kdDebug(8104) << "prevValue = " << prevValue << endl;
- textChunk.replace( QChar('\t'), kompareListView()->spaces() );
+ textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
prevValue = m->offset();
if ( m->type() == Marker::End )
{
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( true );
p->setFont( font );
// p->setPen( Qt::blue );
@@ -670,7 +670,7 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
}
else
{
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( false );
p->setFont( font );
// p->setPen( Qt::black );
@@ -688,9 +688,9 @@ void KompareListViewLineItem::paintText( QPainter* p, const QColor& bg, int colu
{
// Still have to draw some string without changes
textChunk = m_text->string().mid( prevValue, kMax( ( unsigned int )1, m_text->string().length() - prevValue ) );
- textChunk.replace( QChar('\t'), kompareListView()->spaces() );
+ textChunk.replace( TQChar('\t'), kompareListView()->spaces() );
// kdDebug(8104) << "TextChunk = \"" << textChunk << "\"" << endl;
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setBold( false );
p->setFont( font );
chunkWidth = p->fontMetrics().width( textChunk );
@@ -728,11 +728,11 @@ void KompareListViewBlankLineItem::setup()
setHeight( BLANK_LINE_HEIGHT );
}
-void KompareListViewBlankLineItem::paintText( QPainter* p, const QColor& bg, int column, int width, int )
+void KompareListViewBlankLineItem::paintText( TQPainter* p, const TQColor& bg, int column, int width, int )
{
if ( column == COL_MAIN )
{
- QBrush normalBrush( bg, SolidPattern );
+ TQBrush normalBrush( bg, SolidPattern );
p->fillRect( 0, 0, width, height(), normalBrush );
}
}
@@ -771,7 +771,7 @@ void KompareListViewHunkItem::setup()
setHeight( maxHeight() );
}
-void KompareListViewHunkItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+void KompareListViewHunkItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
p->fillRect( 0, 0, width, height(), cg.mid() );
if( column == COL_MAIN ) {
diff --git a/kompare/komparepart/komparelistview.h b/kompare/komparepart/komparelistview.h
index 26a6dacb..d617fafd 100644
--- a/kompare/komparepart/komparelistview.h
+++ b/kompare/komparepart/komparelistview.h
@@ -22,10 +22,10 @@
#ifndef KOMPARELISTVIEW_H
#define KOMPARELISTVIEW_H
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klistview.h>
@@ -48,13 +48,13 @@ class KompareListView : public KListView
Q_OBJECT
public:
- KompareListView( bool isSource, ViewSettings* settings, QWidget* parent, const char* name = 0 );
+ KompareListView( bool isSource, ViewSettings* settings, TQWidget* parent, const char* name = 0 );
virtual ~KompareListView();
KompareListViewItem* itemAtIndex( int i );
int firstVisibleDifference();
int lastVisibleDifference();
- QRect itemRect( int i );
+ TQRect itemRect( int i );
int minScrollId();
int maxScrollId();
int contentsWidth();
@@ -64,7 +64,7 @@ public:
void setSelectedDifference( const Diff2::Difference* diff, bool scroll );
- const QString& spaces() const { return m_spaces; };
+ const TQString& spaces() const { return m_spaces; };
void setSpaces( int spaces );
public slots:
@@ -83,23 +83,23 @@ signals:
void resized();
protected:
- void wheelEvent( QWheelEvent* e );
- void resizeEvent( QResizeEvent* e );
- void contentsMousePressEvent ( QMouseEvent * e );
- void contentsMouseDoubleClickEvent ( QMouseEvent* );
- void contentsMouseReleaseEvent ( QMouseEvent * ) {};
- void contentsMouseMoveEvent ( QMouseEvent * ) {};
+ void wheelEvent( TQWheelEvent* e );
+ void resizeEvent( TQResizeEvent* e );
+ void contentsMousePressEvent ( TQMouseEvent * e );
+ void contentsMouseDoubleClickEvent ( TQMouseEvent* );
+ void contentsMouseReleaseEvent ( TQMouseEvent * ) {};
+ void contentsMouseMoveEvent ( TQMouseEvent * ) {};
private:
- QValueList<KompareListViewDiffItem*> m_items;
- QPtrDict<KompareListViewDiffItem> m_itemDict;
+ TQValueList<KompareListViewDiffItem*> m_items;
+ TQPtrDict<KompareListViewDiffItem> m_itemDict;
bool m_isSource;
ViewSettings* m_settings;
int m_scrollId;
int m_maxMainWidth;
const Diff2::DiffModel* m_selectedModel;
const Diff2::Difference* m_selectedDifference;
- QString m_spaces;
+ TQString m_spaces;
};
class KompareListViewFrame : public QFrame
@@ -116,8 +116,8 @@ public slots:
private:
KompareListView m_view;
- QLabel m_label;
- QVBoxLayout m_layout;
+ TQLabel m_label;
+ TQVBoxLayout m_layout;
};
class KompareListViewItem : public QListViewItem
@@ -128,7 +128,7 @@ public:
KompareListViewItem( KompareListViewItem* parent );
KompareListViewItem( KompareListViewItem* parent, KompareListViewItem* after );
- void paintFocus( QPainter* p, const QColorGroup& cg, const QRect& r );
+ void paintFocus( TQPainter* p, const TQColorGroup& cg, const TQRect& r );
int scrollId() { return m_scrollId; };
virtual int maxHeight() = 0;
@@ -187,8 +187,8 @@ public:
virtual void setup();
int maxHeight() { return 0; }
- virtual void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
- virtual void paintText( QPainter* p, const QColor& bg, int column, int width, int align );
+ virtual void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
+ virtual void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align );
KompareListViewDiffItem* diffItemParent() const;
@@ -203,7 +203,7 @@ public:
void setup();
- void paintText( QPainter* p, const QColor& bg, int column, int width, int align );
+ void paintText( TQPainter* p, const TQColor& bg, int column, int width, int align );
};
class KompareListViewHunkItem : public KompareListViewItem
@@ -213,7 +213,7 @@ public:
KompareListViewHunkItem( KompareListView* parent, KompareListViewItem* after, Diff2::DiffHunk* hunk, bool zeroHeight= false );
void setup();
- void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
+ void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
int maxHeight();
diff --git a/kompare/komparepart/kompareprefdlg.cpp b/kompare/komparepart/kompareprefdlg.cpp
index 2d731af3..f920d03d 100644
--- a/kompare/komparepart/kompareprefdlg.cpp
+++ b/kompare/komparepart/kompareprefdlg.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -35,7 +35,7 @@ KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets )
// ok i need some stuff in that pref dlg...
setIconListAllVisible(true);
- QVBox* frame;
+ TQVBox* frame;
frame = addVBoxPage( i18n( "View" ), i18n( "View Settings" ), UserIcon( "diff_view" ) );
m_viewPage = new ViewPage( frame );
m_viewPage->setSettings( viewSets );
diff --git a/kompare/komparepart/komparesaveoptionswidget.cpp b/kompare/komparepart/komparesaveoptionswidget.cpp
index 866ecc0d..723093ac 100644
--- a/kompare/komparepart/komparesaveoptionswidget.cpp
+++ b/kompare/komparepart/komparesaveoptionswidget.cpp
@@ -17,11 +17,11 @@
**
***************************************************************************/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -30,8 +30,8 @@
#include "diffsettings.h"
#include "komparesaveoptionswidget.h"
-KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString destination,
- DiffSettings * settings, QWidget * parent )
+KompareSaveOptionsWidget::KompareSaveOptionsWidget( TQString source, TQString destination,
+ DiffSettings * settings, TQWidget * parent )
: KompareSaveOptionsBase( parent, "save options" )
, m_source( source )
, m_destination( destination )
@@ -58,23 +58,23 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget( QString source, QString dest
m_directoryRequester->setURL( root.url() );
}
- connect( m_SmallerChangesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_LargeFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreCaseCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ExpandTabsCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreEmptyLinesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_IgnoreWhiteSpaceCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_FunctionNamesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_RecursiveCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_NewFilesCB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ContextRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_EdRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_NormalRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_RCSRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_UnifiedRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_SideBySideRB, SIGNAL(toggled(bool)), SLOT(updateCommandLine()) );
- connect( m_ContextLinesSB, SIGNAL(valueChanged(int)), SLOT(updateCommandLine()) );
- connect( m_directoryRequester, SIGNAL(textChanged(const QString&)), SLOT(updateCommandLine()) );
+ connect( m_SmallerChangesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_LargeFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreCaseCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ExpandTabsCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreEmptyLinesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_IgnoreWhiteSpaceCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_FunctionNamesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_RecursiveCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_NewFilesCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ContextRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_EdRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_NormalRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_RCSRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_UnifiedRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_SideBySideRB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCommandLine()) );
+ connect( m_ContextLinesSB, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateCommandLine()) );
+ connect( m_directoryRequester, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCommandLine()) );
loadOptions();
}
@@ -84,23 +84,23 @@ KompareSaveOptionsWidget::~KompareSaveOptionsWidget()
}
-QString KompareSaveOptionsWidget::directory() const
+TQString KompareSaveOptionsWidget::directory() const
{
return KURL( m_directoryRequester->url() ).path();
}
void KompareSaveOptionsWidget::updateCommandLine()
{
- QString cmdLine = "diff";
+ TQString cmdLine = "diff";
- QString options = "";
+ TQString options = "";
switch( static_cast<Kompare::Format>( m_FormatBG->id( m_FormatBG->selected() ) ) ) {
case Kompare::Unified :
- cmdLine += " -U " + QString::number( m_ContextLinesSB->value() );
+ cmdLine += " -U " + TQString::number( m_ContextLinesSB->value() );
break;
case Kompare::Context :
- cmdLine += " -C " + QString::number( m_ContextLinesSB->value() );
+ cmdLine += " -C " + TQString::number( m_ContextLinesSB->value() );
break;
case Kompare::RCS :
options += "n";
diff --git a/kompare/komparepart/komparesaveoptionswidget.h b/kompare/komparepart/komparesaveoptionswidget.h
index 6361ca77..905dcaa4 100644
--- a/kompare/komparepart/komparesaveoptionswidget.h
+++ b/kompare/komparepart/komparesaveoptionswidget.h
@@ -31,11 +31,11 @@ class KompareSaveOptionsWidget : public KompareSaveOptionsBase, public KompareFu
{
Q_OBJECT
public:
- KompareSaveOptionsWidget( QString source, QString destination, DiffSettings* settings, QWidget* parent );
+ KompareSaveOptionsWidget( TQString source, TQString destination, DiffSettings* settings, TQWidget* parent );
~KompareSaveOptionsWidget();
void saveOptions();
- QString directory() const;
+ TQString directory() const;
protected slots:
void updateCommandLine();
@@ -44,8 +44,8 @@ private:
void loadOptions();
DiffSettings* m_settings;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
};
#endif
diff --git a/kompare/komparepart/komparesplitter.cpp b/kompare/komparepart/komparesplitter.cpp
index fcf014cb..59106ffb 100644
--- a/kompare/komparepart/komparesplitter.cpp
+++ b/kompare/komparepart/komparesplitter.cpp
@@ -17,9 +17,9 @@
#include "komparesplitter.h"
-#include <qstyle.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqstyle.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -34,21 +34,21 @@
using namespace Diff2;
-KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent,
+KompareSplitter::KompareSplitter( ViewSettings *settings, TQWidget * parent,
const char *name) :
- QSplitter( Horizontal, parent, name ),
+ TQSplitter( Horizontal, parent, name ),
m_settings( settings )
{
- QFrame *scrollFrame = new QFrame( parent, "scrollFrame" );
- reparent( scrollFrame, *(new QPoint()), false );
+ TQFrame *scrollFrame = new TQFrame( parent, "scrollFrame" );
+ reparent( scrollFrame, *(new TQPoint()), false );
// Set up the scrollFrame
- scrollFrame->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
- scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(QStyle::PM_DefaultFrameWidth));
- QGridLayout *pairlayout = new QGridLayout(scrollFrame, 2, 2, 0);
- m_vScroll = new QScrollBar( QScrollBar::Vertical, scrollFrame );
+ scrollFrame->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
+ scrollFrame->setLineWidth(scrollFrame->style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
+ TQGridLayout *pairlayout = new TQGridLayout(scrollFrame, 2, 2, 0);
+ m_vScroll = new TQScrollBar( TQScrollBar::Vertical, scrollFrame );
pairlayout->addWidget( m_vScroll, 0, 1 );
- m_hScroll = new QScrollBar( QScrollBar::Horizontal, scrollFrame );
+ m_hScroll = new TQScrollBar( TQScrollBar::Horizontal, scrollFrame );
pairlayout->addWidget( m_hScroll, 1, 0 );
new KompareListViewFrame(true, m_settings, this, "source");
@@ -56,33 +56,33 @@ KompareSplitter::KompareSplitter( ViewSettings *settings, QWidget * parent,
pairlayout->addWidget( this, 0, 0 );
// set up our looks
- setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth ) );
+ setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
+ setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) );
setHandleWidth(50);
setChildrenCollapsible( false );
- setFrameStyle( QFrame::NoFrame );
- setSizePolicy( QSizePolicy (QSizePolicy::Ignored, QSizePolicy::Ignored ));
+ setFrameStyle( TQFrame::NoFrame );
+ setSizePolicy( TQSizePolicy (TQSizePolicy::Ignored, TQSizePolicy::Ignored ));
setOpaqueResize( true );
- setFocusPolicy( QWidget::WheelFocus );
+ setFocusPolicy( TQWidget::WheelFocus );
- connect( this, SIGNAL(configChanged()), SLOT(slotConfigChanged()) );
- connect( this, SIGNAL(configChanged()), SLOT(slotDelayedRepaintHandles()) );
- connect( this, SIGNAL(configChanged()), SLOT(slotDelayedUpdateScrollBars()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotConfigChanged()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedRepaintHandles()) );
+ connect( this, TQT_SIGNAL(configChanged()), TQT_SLOT(slotDelayedUpdateScrollBars()) );
// scrolling
- connect( m_vScroll, SIGNAL(valueChanged(int)), SLOT(scrollToId(int)) );
- connect( m_vScroll, SIGNAL(sliderMoved(int)), SLOT(scrollToId(int)) );
- connect( m_hScroll, SIGNAL(valueChanged(int)), SIGNAL(setXOffset(int)) );
- connect( m_hScroll, SIGNAL(sliderMoved(int)), SIGNAL(setXOffset(int)) );
+ connect( m_vScroll, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollToId(int)) );
+ connect( m_vScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(scrollToId(int)) );
+ connect( m_hScroll, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(setXOffset(int)) );
+ connect( m_hScroll, TQT_SIGNAL(sliderMoved(int)), TQT_SIGNAL(setXOffset(int)) );
- m_scrollTimer=new QTimer();
+ m_scrollTimer=new TQTimer();
restartTimer = false;
- connect (m_scrollTimer, SIGNAL(timeout()), SLOT(timerTimeout()) );
+ connect (m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(timerTimeout()) );
// we need to receive childEvents now so that d->list is ready for when
// slotSetSelection(...) arrives
- kapp->sendPostedEvents(this, QEvent::ChildInserted);
+ kapp->sendPostedEvents(this, TQEvent::ChildInserted);
// init stuff
slotUpdateScrollBars();
@@ -111,7 +111,7 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool
if ( d->list.count() > 0 ) {
s = new QSplitterLayoutStruct;
s->resizeMode = KeepSize;
- QString tmp = "qt_splithandle_";
+ TQString tmp = "qt_splithandle_";
tmp += w->name();
KompareListView *lw =
((KompareListViewFrame*)(prepend?w:d->list.last()->wid))->view();
@@ -144,13 +144,13 @@ QSplitterLayoutStruct *KompareSplitter::addWidget( KompareListViewFrame *w, bool
been inserted or removed.
*/
-void KompareSplitter::childEvent( QChildEvent *c )
+void KompareSplitter::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 = d->list.first();
@@ -161,7 +161,7 @@ void KompareSplitter::childEvent( QChildEvent *c )
}
addWidget( (KompareListViewFrame*)c->child() );
recalc( isVisible() );
- } else if ( c->type() == QEvent::ChildRemoved ) {
+ } else if ( c->type() == TQEvent::ChildRemoved ) {
QSplitterLayoutStruct *prev = 0;
if ( d->list.count() > 1 )
prev = d->list.at( 1 ); // yes, this is correct
@@ -170,7 +170,7 @@ void KompareSplitter::childEvent( QChildEvent *c )
if ( curr->wid == c->child() ) {
d->list.removeRef( curr );
if ( prev && prev->isHandle ) {
- QWidget *w = prev->wid;
+ TQWidget *w = prev->wid;
d->list.removeRef( prev );
delete w; // will call childEvent()
}
@@ -185,20 +185,20 @@ void KompareSplitter::childEvent( QChildEvent *c )
}
// This is from a private qt header (kernel/qlayoutengine_p.h). sorry.
-QSize qSmartMinSize( QWidget *w );
+TQSize qSmartMinSize( TQWidget *w );
-static QPoint toggle( QWidget *w, QPoint pos )
+static TQPoint toggle( TQWidget *w, TQPoint pos )
{
- QSize minS = qSmartMinSize( w );
- return -pos - QPoint( minS.width(), minS.height() );
+ TQSize minS = qSmartMinSize( w );
+ return -pos - TQPoint( minS.width(), minS.height() );
}
-static bool isCollapsed( QWidget *w )
+static bool isCollapsed( TQWidget *w )
{
return w->x() < 0 || w->y() < 0;
}
-static QPoint topLeft( QWidget *w )
+static TQPoint topLeft( TQWidget *w )
{
if ( isCollapsed(w) ) {
return toggle( w, w->pos() );
@@ -207,10 +207,10 @@ static QPoint topLeft( QWidget *w )
}
}
-static QPoint bottomRight( QWidget *w )
+static TQPoint bottomRight( TQWidget *w )
{
if ( isCollapsed(w) ) {
- return toggle( w, w->pos() ) - QPoint( 1, 1 );
+ return toggle( w, w->pos() ) - TQPoint( 1, 1 );
} else {
return w->geometry().bottomRight();
}
@@ -227,9 +227,9 @@ void KompareSplitter::moveSplitter( QCOORD p, int id )
int oldP = pick( s->wid->pos() );
int* poss = new int[d->list.count()];
int* ws = new int[d->list.count()];
- QWidget *w = 0;
+ TQWidget *w = 0;
bool upLeft;
- if ( QApplication::reverseLayout() && orient == Horizontal ) {
+ if ( TQApplication::reverseLayout() && orient == Horizontal ) {
int q = p + s->wid->width();
doMove( FALSE, q, id - 1, -1, (p > max), poss, ws );
doMove( TRUE, q, id, -1, (p < min), poss, ws );
@@ -260,7 +260,7 @@ void KompareSplitter::doMove( bool backwards, int pos, int id, int delta,
bool mayCollapse, int* positions, int* widths )
{
QSplitterLayoutStruct *s;
- QWidget *w;
+ TQWidget *w;
for ( ; id >= 0 && id < (int)d->list.count();
id = backwards ? id - delta : id + delta ) {
s = d->list.at( id );
@@ -405,7 +405,7 @@ void KompareSplitter::repaintHandles()
* FIXME: i'm a nasty hack
*/
-void KompareSplitter::wheelEvent( QWheelEvent* e )
+void KompareSplitter::wheelEvent( TQWheelEvent* e )
{
// scroll lines...
if ( e->orientation() == Qt::Vertical )
@@ -438,7 +438,7 @@ void KompareSplitter::wheelEvent( QWheelEvent* e )
repaintHandles();
}
-void KompareSplitter::keyPressEvent( QKeyEvent* e )
+void KompareSplitter::keyPressEvent( TQKeyEvent* e )
{
//keyboard scrolling
switch ( e->key() ) {
@@ -502,7 +502,7 @@ void KompareSplitter::scrollToId( int id )
void KompareSplitter::slotDelayedUpdateScrollBars()
{
- QTimer::singleShot( 0, this, SLOT( slotUpdateScrollBars() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateScrollBars() ) );
}
void KompareSplitter::slotUpdateScrollBars()
@@ -543,7 +543,7 @@ void KompareSplitter::slotUpdateScrollBars()
void KompareSplitter::slotDelayedUpdateVScrollValue()
{
- QTimer::singleShot( 0, this, SLOT( slotUpdateVScrollValue() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotUpdateVScrollValue() ) );
}
void KompareSplitter::slotUpdateVScrollValue()
@@ -582,7 +582,7 @@ int KompareSplitter::pageSize()
if ( !curr->isHandle )
{
KompareListView *view = ((KompareListViewFrame*) curr->wid)->view();
- return view->visibleHeight() - QStyle::PM_ScrollBarExtent;
+ return view->visibleHeight() - TQStyle::PM_ScrollBarExtent;
}
}
return 1;
diff --git a/kompare/komparepart/komparesplitter.h b/kompare/komparepart/komparesplitter.h
index 47eee6bf..8653cfee 100644
--- a/kompare/komparepart/komparesplitter.h
+++ b/kompare/komparepart/komparesplitter.h
@@ -20,7 +20,7 @@
#include "kompare_qsplitter.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "komparelistview.h"
#include "komparemodellist.h"
@@ -40,7 +40,7 @@ class KompareSplitter : public QSplitter
Q_OBJECT
public:
- KompareSplitter(ViewSettings *settings, QWidget *parent=0, const char *name = 0);
+ KompareSplitter(ViewSettings *settings, TQWidget *parent=0, const char *name = 0);
~KompareSplitter();
signals:
@@ -71,9 +71,9 @@ public slots:
void slotUpdateVScrollValue();
protected:
- void childEvent( QChildEvent * );
- void wheelEvent( QWheelEvent* e );
- void keyPressEvent( QKeyEvent* e );
+ void childEvent( TQChildEvent * );
+ void wheelEvent( TQWheelEvent* e );
+ void keyPressEvent( TQKeyEvent* e );
void moveSplitter( QCOORD pos, int id );
@@ -90,7 +90,7 @@ private:
void repaintHandles();
- QTimer* m_scrollTimer;
+ TQTimer* m_scrollTimer;
bool restartTimer;
int scrollTo;
@@ -107,8 +107,8 @@ private:
int minVisibleWidth();
ViewSettings* m_settings;
- QScrollBar* m_vScroll;
- QScrollBar* m_hScroll;
+ TQScrollBar* m_vScroll;
+ TQScrollBar* m_hScroll;
friend class KompareConnectWidgetFrame;
};
diff --git a/kompare/kompareurldialog.cpp b/kompare/kompareurldialog.cpp
index 4630cd18..d24abaf9 100644
--- a/kompare/kompareurldialog.cpp
+++ b/kompare/kompareurldialog.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <klocale.h>
@@ -32,25 +32,25 @@
#include "kompareurldialog.h"
-KompareURLDialog::KompareURLDialog( QWidget *parent, const char *name )
+KompareURLDialog::KompareURLDialog( TQWidget *parent, const char *name )
: KDialogBase( IconList, "", Ok|Cancel, Ok, parent, name )
{
setIconListAllVisible(true);
KConfig* cfg = kapp->config();
- QVBox* filesBox = addVBoxPage( i18n( "Files" ), i18n( "Here you can enter the files you want to compare." ) );
+ TQVBox* filesBox = addVBoxPage( i18n( "Files" ), i18n( "Here you can enter the files you want to compare." ) );
m_filesPage = new FilesPage( filesBox );
m_filesSettings = new FilesSettings( this );
m_filesSettings->loadSettings( cfg );
m_filesPage->setSettings( m_filesSettings );
- QVBox* diffBox = addVBoxPage( i18n( "Diff" ), i18n( "Here you can change the options for comparing the files." ) );
+ TQVBox* diffBox = addVBoxPage( i18n( "Diff" ), i18n( "Here you can change the options for comparing the files." ) );
m_diffPage = new DiffPage( diffBox );
m_diffSettings = new DiffSettings( this );
m_diffSettings->loadSettings( cfg );
m_diffPage->setSettings( m_diffSettings );
- QVBox* viewBox = addVBoxPage( i18n( "Appearance" ), i18n( "Here you can change the options for the view." ) );
+ TQVBox* viewBox = addVBoxPage( i18n( "Appearance" ), i18n( "Here you can change the options for the view." ) );
m_viewPage = new ViewPage( viewBox );
m_viewSettings = new ViewSettings( this );
m_viewSettings->loadSettings( cfg );
@@ -60,10 +60,10 @@ KompareURLDialog::KompareURLDialog( QWidget *parent, const char *name )
enableButtonSeparator( true );
- connect( m_filesPage->firstURLRequester(), SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEnableOk() ) );
- connect( m_filesPage->secondURLRequester(), SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotEnableOk() ) );
+ connect( m_filesPage->firstURLRequester(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEnableOk() ) );
+ connect( m_filesPage->secondURLRequester(), TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotEnableOk() ) );
slotEnableOk();
}
@@ -107,22 +107,22 @@ KURL KompareURLDialog::getSecondURL() const
return KURL( m_filesPage->secondURLRequester()->url() );
}
-QString KompareURLDialog::encoding() const
+TQString KompareURLDialog::encoding() const
{
return m_filesPage->encoding();
}
-void KompareURLDialog::setFirstGroupBoxTitle( const QString& title )
+void KompareURLDialog::setFirstGroupBoxTitle( const TQString& title )
{
m_filesPage->setFirstGroupBoxTitle( title );
}
-void KompareURLDialog::setSecondGroupBoxTitle( const QString& title )
+void KompareURLDialog::setSecondGroupBoxTitle( const TQString& title )
{
m_filesPage->setSecondGroupBoxTitle( title );
}
-void KompareURLDialog::setGroup( const QString& groupName )
+void KompareURLDialog::setGroup( const TQString& groupName )
{
m_filesSettings->setGroup( groupName );
m_filesSettings->loadSettings( kapp->config() );
diff --git a/kompare/kompareurldialog.h b/kompare/kompareurldialog.h
index 61db9974..5fe9f119 100644
--- a/kompare/kompareurldialog.h
+++ b/kompare/kompareurldialog.h
@@ -43,17 +43,17 @@ class KompareURLDialog : public KDialogBase
Q_OBJECT
public:
- KompareURLDialog( QWidget* parent = 0, const char* name = 0 );
+ KompareURLDialog( TQWidget* parent = 0, const char* name = 0 );
~KompareURLDialog();
KURL getFirstURL() const;
KURL getSecondURL() const;
- QString encoding() const;
+ TQString encoding() const;
- void setFirstGroupBoxTitle ( const QString& title );
- void setSecondGroupBoxTitle( const QString& title );
+ void setFirstGroupBoxTitle ( const TQString& title );
+ void setSecondGroupBoxTitle( const TQString& title );
- void setGroup( const QString& groupName );
+ void setGroup( const TQString& groupName );
void setFirstURLRequesterMode ( unsigned int mode );
void setSecondURLRequesterMode( unsigned int mode );
diff --git a/kompare/libdialogpages/diffpage.cpp b/kompare/libdialogpages/diffpage.cpp
index 7f805c5b..0423f1a5 100644
--- a/kompare/libdialogpages/diffpage.cpp
+++ b/kompare/libdialogpages/diffpage.cpp
@@ -15,15 +15,15 @@
**
***************************************************************************/
-#include <qcheckbox.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qvbuttongroup.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqvbuttongroup.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kcombobox.h>
@@ -42,7 +42,7 @@
#include "diffpage.h"
-DiffPage::DiffPage( QWidget* parent ) : PageBase( parent ),
+DiffPage::DiffPage( TQWidget* parent ) : PageBase( parent ),
m_ignoreRegExpDialog( 0 )
{
addDiffTab();
@@ -146,7 +146,7 @@ void DiffPage::setDefaults()
m_ignoreTabExpansionCheckBox->setChecked( false );
m_ignoreRegExpCheckBox->setChecked( false );
- m_ignoreRegExpEdit->setText( QString::null );
+ m_ignoreRegExpEdit->setText( TQString::null );
m_locSpinBox->setValue( 3 );
@@ -160,7 +160,7 @@ void DiffPage::setDefaults()
void DiffPage::slotShowRegExpEditor()
{
if ( ! m_ignoreRegExpDialog )
- m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ m_ignoreRegExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( m_ignoreRegExpDialog->qt_cast( "KRegExpEditorInterface" ) );
@@ -202,18 +202,18 @@ void DiffPage::slotExcludeFileToggled( bool on )
void DiffPage::addDiffTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff program selector
- m_diffProgramGroup = new QVButtonGroup( i18n( "Diff Program" ), page );
+ m_diffProgramGroup = new TQVButtonGroup( i18n( "Diff Program" ), page );
layout->addWidget( m_diffProgramGroup );
m_diffProgramGroup->setMargin( KDialog::marginHint() );
m_diffURLRequester = new KURLRequester( m_diffProgramGroup, "diffURLRequester" );
- QWhatsThis::add( m_diffURLRequester, i18n( "You can select a different diff program here. On Solaris the standard diff program does not support all the options that the GNU version does. This way you can select that version." ) );
+ TQWhatsThis::add( m_diffURLRequester, i18n( "You can select a different diff program here. On Solaris the standard diff program does not support all the options that the GNU version does. This way you can select that version." ) );
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
@@ -223,34 +223,34 @@ void DiffPage::addDiffTab()
void DiffPage::addFormatTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff modes
- m_modeButtonGroup = new QVButtonGroup( i18n( "Output Format" ), page );
- QWhatsThis::add( m_modeButtonGroup, i18n( "Select the format of the output generated by diff. Unified is the one that is used most frequently because it is very readable. The KDE developers like this format the best so use it for sending patches." ) );
+ m_modeButtonGroup = new TQVButtonGroup( i18n( "Output Format" ), page );
+ TQWhatsThis::add( m_modeButtonGroup, i18n( "Select the format of the output generated by diff. Unified is the one that is used most frequently because it is very readable. The KDE developers like this format the best so use it for sending patches." ) );
layout->addWidget( m_modeButtonGroup );
m_modeButtonGroup->setMargin( KDialog::marginHint() );
- QRadioButton* radioButton;
- radioButton = new QRadioButton( i18n( "Context" ), m_modeButtonGroup );
- radioButton = new QRadioButton( i18n( "Ed" ), m_modeButtonGroup );
+ TQRadioButton* radioButton;
+ radioButton = new TQRadioButton( i18n( "Context" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Ed" ), m_modeButtonGroup );
radioButton->setEnabled( false );
- radioButton = new QRadioButton( i18n( "Normal" ), m_modeButtonGroup );
- radioButton = new QRadioButton( i18n( "RCS" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Normal" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "RCS" ), m_modeButtonGroup );
radioButton->setEnabled( false );
- radioButton = new QRadioButton( i18n( "Unified" ), m_modeButtonGroup );
+ radioButton = new TQRadioButton( i18n( "Unified" ), m_modeButtonGroup );
// #lines of context (loc)
- QHGroupBox* groupBox = new QHGroupBox( i18n( "Lines of Context" ), page );
+ TQHGroupBox* groupBox = new TQHGroupBox( i18n( "Lines of Context" ), page );
layout->addWidget( groupBox );
groupBox->setMargin( KDialog::marginHint() );
- QLabel* label = new QLabel( i18n( "Number of context lines:" ), groupBox );
- m_locSpinBox = new QSpinBox( 0, 100, 1, groupBox );
- QWhatsThis::add( m_locSpinBox, i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
+ TQLabel* label = new TQLabel( i18n( "Number of context lines:" ), groupBox );
+ m_locSpinBox = new TQSpinBox( 0, 100, 1, groupBox );
+ TQWhatsThis::add( m_locSpinBox, i18n( "The number of context lines is normally 2 or 3. This makes the diff readable and applicable in most cases. More than 3 lines will only bloat the diff unnecessarily." ) );
label->setBuddy( m_locSpinBox );
layout->addStretch( 1 );
@@ -261,56 +261,56 @@ void DiffPage::addFormatTab()
void DiffPage::addOptionsTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add diff options
- QVButtonGroup* optionButtonGroup = new QVButtonGroup( i18n( "General" ), page );
+ TQVButtonGroup* optionButtonGroup = new TQVButtonGroup( i18n( "General" ), page );
layout->addWidget( optionButtonGroup );
optionButtonGroup->setMargin( KDialog::marginHint() );
- m_smallerCheckBox = new QCheckBox( i18n( "&Look for smaller changes" ), optionButtonGroup );
- QToolTip::add( m_smallerCheckBox, i18n( "This corresponds to the -d diff option." ) );
- m_largerCheckBox = new QCheckBox( i18n( "O&ptimize for large files" ), optionButtonGroup );
- QToolTip::add( m_largerCheckBox, i18n( "This corresponds to the -H diff option." ) );
- m_caseCheckBox = new QCheckBox( i18n( "&Ignore changes in case" ), optionButtonGroup );
- QToolTip::add( m_caseCheckBox, i18n( "This corresponds to the -i diff option." ) );
+ m_smallerCheckBox = new TQCheckBox( i18n( "&Look for smaller changes" ), optionButtonGroup );
+ TQToolTip::add( m_smallerCheckBox, i18n( "This corresponds to the -d diff option." ) );
+ m_largerCheckBox = new TQCheckBox( i18n( "O&ptimize for large files" ), optionButtonGroup );
+ TQToolTip::add( m_largerCheckBox, i18n( "This corresponds to the -H diff option." ) );
+ m_caseCheckBox = new TQCheckBox( i18n( "&Ignore changes in case" ), optionButtonGroup );
+ TQToolTip::add( m_caseCheckBox, i18n( "This corresponds to the -i diff option." ) );
- QHBoxLayout* groupLayout = new QHBoxLayout( layout, -1, "regexp_horizontal_layout" );
+ TQHBoxLayout* groupLayout = new TQHBoxLayout( layout, -1, "regexp_horizontal_layout" );
groupLayout->setMargin( KDialog::marginHint() );
- m_ignoreRegExpCheckBox = new QCheckBox( i18n( "Ignore regexp:" ), page );
- QToolTip::add( m_ignoreRegExpCheckBox, i18n( "This option corresponds to the -I diff option." ) );
+ m_ignoreRegExpCheckBox = new TQCheckBox( i18n( "Ignore regexp:" ), page );
+ TQToolTip::add( m_ignoreRegExpCheckBox, i18n( "This option corresponds to the -I diff option." ) );
groupLayout->addWidget( m_ignoreRegExpCheckBox );
- m_ignoreRegExpEdit = new KLineEdit( QString::null, page, "regexplineedit" );
- QToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
+ m_ignoreRegExpEdit = new KLineEdit( TQString::null, page, "regexplineedit" );
+ TQToolTip::add( m_ignoreRegExpEdit, i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
groupLayout->addWidget( m_ignoreRegExpEdit );
if ( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() )
{
// Ok editor is available, use it
- QButton* ignoreRegExpEditButton = new QPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" );
- QToolTip::add( ignoreRegExpEditButton, i18n( "Clicking this will open a regular expression dialog where\nyou can graphically create regular expressions." ) );
+ TQButton* ignoreRegExpEditButton = new TQPushButton( i18n( "&Edit..." ), page, "regexp_editor_button" );
+ TQToolTip::add( ignoreRegExpEditButton, i18n( "Clicking this will open a regular expression dialog where\nyou can graphically create regular expressions." ) );
groupLayout->addWidget( ignoreRegExpEditButton );
- connect( ignoreRegExpEditButton, SIGNAL( clicked() ), this, SLOT( slotShowRegExpEditor() ) );
+ connect( ignoreRegExpEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowRegExpEditor() ) );
}
- QVButtonGroup* moreOptionButtonGroup = new QVButtonGroup( i18n( "Whitespace" ), page );
+ TQVButtonGroup* moreOptionButtonGroup = new TQVButtonGroup( i18n( "Whitespace" ), page );
layout->addWidget( moreOptionButtonGroup );
moreOptionButtonGroup->setMargin( KDialog::marginHint() );
- m_tabsCheckBox = new QCheckBox( i18n( "E&xpand tabs to spaces in output" ), moreOptionButtonGroup );
- QToolTip::add( m_tabsCheckBox, i18n( "This option corresponds to the -t diff option." ) );
- m_linesCheckBox = new QCheckBox( i18n( "I&gnore added or removed empty lines" ), moreOptionButtonGroup );
- QToolTip::add( m_linesCheckBox, i18n( "This option corresponds to the -B diff option." ) );
- m_whitespaceCheckBox = new QCheckBox( i18n( "Ig&nore changes in the amount of whitespace" ), moreOptionButtonGroup );
- QToolTip::add( m_whitespaceCheckBox, i18n( "This option corresponds to the -b diff option." ) );
- m_allWhitespaceCheckBox = new QCheckBox( i18n( "Ign&ore all whitespace" ), moreOptionButtonGroup );
- QToolTip::add( m_allWhitespaceCheckBox, i18n( "This option corresponds to the -w diff option." ) );
- m_ignoreTabExpansionCheckBox = new QCheckBox( i18n( "Igno&re changes due to tab expansion" ), moreOptionButtonGroup );
- QToolTip::add( m_ignoreTabExpansionCheckBox, i18n( "This option corresponds to the -E diff option." ) );
+ m_tabsCheckBox = new TQCheckBox( i18n( "E&xpand tabs to spaces in output" ), moreOptionButtonGroup );
+ TQToolTip::add( m_tabsCheckBox, i18n( "This option corresponds to the -t diff option." ) );
+ m_linesCheckBox = new TQCheckBox( i18n( "I&gnore added or removed empty lines" ), moreOptionButtonGroup );
+ TQToolTip::add( m_linesCheckBox, i18n( "This option corresponds to the -B diff option." ) );
+ m_whitespaceCheckBox = new TQCheckBox( i18n( "Ig&nore changes in the amount of whitespace" ), moreOptionButtonGroup );
+ TQToolTip::add( m_whitespaceCheckBox, i18n( "This option corresponds to the -b diff option." ) );
+ m_allWhitespaceCheckBox = new TQCheckBox( i18n( "Ign&ore all whitespace" ), moreOptionButtonGroup );
+ TQToolTip::add( m_allWhitespaceCheckBox, i18n( "This option corresponds to the -w diff option." ) );
+ m_ignoreTabExpansionCheckBox = new TQCheckBox( i18n( "Igno&re changes due to tab expansion" ), moreOptionButtonGroup );
+ TQToolTip::add( m_ignoreTabExpansionCheckBox, i18n( "This option corresponds to the -E diff option." ) );
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
@@ -320,31 +320,31 @@ void DiffPage::addOptionsTab()
void DiffPage::addExcludeTab()
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- QHGroupBox* excludeFilePatternGroupBox = new QHGroupBox( i18n( "File Pattern to Exclude" ), page );
- m_excludeFilePatternCheckBox = new QCheckBox( "", excludeFilePatternGroupBox );
- QToolTip::add( m_excludeFilePatternCheckBox, i18n( "If this is checked you can enter a shell pattern in the text box on the right or select entries from the list." ) );
+ TQHGroupBox* excludeFilePatternGroupBox = new TQHGroupBox( i18n( "File Pattern to Exclude" ), page );
+ m_excludeFilePatternCheckBox = new TQCheckBox( "", excludeFilePatternGroupBox );
+ TQToolTip::add( m_excludeFilePatternCheckBox, i18n( "If this is checked you can enter a shell pattern in the text box on the right or select entries from the list." ) );
m_excludeFilePatternEditListBox = new KEditListBox( excludeFilePatternGroupBox, "exclude_file_pattern_editlistbox", false, KEditListBox::Add|KEditListBox::Remove );
- QToolTip::add( m_excludeFilePatternEditListBox, i18n( "Here you can enter or remove a shell pattern or select one or more entries from the list." ) );
+ TQToolTip::add( m_excludeFilePatternEditListBox, i18n( "Here you can enter or remove a shell pattern or select one or more entries from the list." ) );
layout->addWidget( excludeFilePatternGroupBox );
- connect( m_excludeFilePatternCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotExcludeFilePatternToggled(bool)));
+ connect( m_excludeFilePatternCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFilePatternToggled(bool)));
- QHGroupBox* excludeFileNameGroupBox = new QHGroupBox( i18n( "File with Filenames to Exclude" ), page );
- m_excludeFileCheckBox = new QCheckBox( "", excludeFileNameGroupBox );
- QToolTip::add( m_excludeFileCheckBox, i18n( "If this is checked you can enter a filename in the combo box on the right." ) );
+ TQHGroupBox* excludeFileNameGroupBox = new TQHGroupBox( i18n( "File with Filenames to Exclude" ), page );
+ m_excludeFileCheckBox = new TQCheckBox( "", excludeFileNameGroupBox );
+ TQToolTip::add( m_excludeFileCheckBox, i18n( "If this is checked you can enter a filename in the combo box on the right." ) );
m_excludeFileURLComboBox = new KURLComboBox( KURLComboBox::Files, true, excludeFileNameGroupBox, "exclude_file_urlcombo" );
- QToolTip::add( m_excludeFileURLComboBox, i18n( "Here you can enter the URL of a file with shell patterns to ignore during the comparison of the folders." ) );
+ TQToolTip::add( m_excludeFileURLComboBox, i18n( "Here you can enter the URL of a file with shell patterns to ignore during the comparison of the folders." ) );
m_excludeFileURLRequester = new KURLRequester( m_excludeFileURLComboBox, excludeFileNameGroupBox, "exclude_file_name_urlrequester" );
- QToolTip::add( m_excludeFileURLRequester, i18n( "Any file you select in the dialog that pops up when you click it will be put in the dialog to the left of this button." ) );
+ TQToolTip::add( m_excludeFileURLRequester, i18n( "Any file you select in the dialog that pops up when you click it will be put in the dialog to the left of this button." ) );
layout->addWidget( excludeFileNameGroupBox );
- connect( m_excludeFileCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotExcludeFileToggled(bool)));
+ connect( m_excludeFileCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotExcludeFileToggled(bool)));
layout->addStretch( 1 );
page->setMinimumSize( sizeHintForWidget( page ) );
diff --git a/kompare/libdialogpages/diffpage.h b/kompare/libdialogpages/diffpage.h
index dee23989..9a8e1fdc 100644
--- a/kompare/libdialogpages/diffpage.h
+++ b/kompare/libdialogpages/diffpage.h
@@ -41,7 +41,7 @@ class DiffPage : public PageBase
{
Q_OBJECT
public:
- DiffPage( QWidget* );
+ DiffPage( TQWidget* );
~DiffPage();
public:
@@ -69,32 +69,32 @@ public:
KURLRequester* m_diffURLRequester;
- QCheckBox* m_smallerCheckBox;
- QCheckBox* m_largerCheckBox;
- QCheckBox* m_tabsCheckBox;
- QCheckBox* m_caseCheckBox;
- QCheckBox* m_linesCheckBox;
- QCheckBox* m_whitespaceCheckBox;
- QCheckBox* m_allWhitespaceCheckBox;
- QCheckBox* m_ignoreTabExpansionCheckBox;
+ TQCheckBox* m_smallerCheckBox;
+ TQCheckBox* m_largerCheckBox;
+ TQCheckBox* m_tabsCheckBox;
+ TQCheckBox* m_caseCheckBox;
+ TQCheckBox* m_linesCheckBox;
+ TQCheckBox* m_whitespaceCheckBox;
+ TQCheckBox* m_allWhitespaceCheckBox;
+ TQCheckBox* m_ignoreTabExpansionCheckBox;
- QCheckBox* m_ignoreRegExpCheckBox;
+ TQCheckBox* m_ignoreRegExpCheckBox;
KLineEdit* m_ignoreRegExpEdit;
- QStringList* m_ignoreRegExpEditHistory;
- QDialog* m_ignoreRegExpDialog;
+ TQStringList* m_ignoreRegExpEditHistory;
+ TQDialog* m_ignoreRegExpDialog;
- QCheckBox* m_excludeFilePatternCheckBox;
+ TQCheckBox* m_excludeFilePatternCheckBox;
KEditListBox* m_excludeFilePatternEditListBox;
- QCheckBox* m_excludeFileCheckBox;
+ TQCheckBox* m_excludeFileCheckBox;
KURLComboBox* m_excludeFileURLComboBox;
KURLRequester* m_excludeFileURLRequester;
// loc == lines of context
- QSpinBox* m_locSpinBox;
+ TQSpinBox* m_locSpinBox;
- QVButtonGroup* m_modeButtonGroup;
- QVButtonGroup* m_diffProgramGroup;
+ TQVButtonGroup* m_modeButtonGroup;
+ TQVButtonGroup* m_diffProgramGroup;
};
#endif
diff --git a/kompare/libdialogpages/diffsettings.cpp b/kompare/libdialogpages/diffsettings.cpp
index 20504ffe..6c2186f5 100644
--- a/kompare/libdialogpages/diffsettings.cpp
+++ b/kompare/libdialogpages/diffsettings.cpp
@@ -19,7 +19,7 @@
#include "diffsettings.h"
-DiffSettings::DiffSettings( QWidget* parent )
+DiffSettings::DiffSettings( TQWidget* parent )
: SettingsBase( parent ),
m_linesOfContext( 0 ),
m_format( Kompare::Unified ),
diff --git a/kompare/libdialogpages/diffsettings.h b/kompare/libdialogpages/diffsettings.h
index 46962cb8..a41308c0 100644
--- a/kompare/libdialogpages/diffsettings.h
+++ b/kompare/libdialogpages/diffsettings.h
@@ -20,8 +20,8 @@
#ifndef DIFFSETTINGS_H
#define DIFFSETTINGS_H
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include "kompare.h"
#include "settingsbase.h"
@@ -30,7 +30,7 @@ class DiffSettings : public SettingsBase
{
Q_OBJECT
public:
- DiffSettings( QWidget* parent );
+ DiffSettings( TQWidget* parent );
virtual ~DiffSettings();
public:
// some virtual functions that will be overloaded from the base class
@@ -38,7 +38,7 @@ public:
virtual void saveSettings( KConfig* config );
public:
- QString m_diffProgram;
+ TQString m_diffProgram;
int m_linesOfContext;
Kompare::Format m_format;
bool m_largeFiles; // -H
@@ -51,16 +51,16 @@ public:
bool m_showCFunctionChange; // -p
bool m_convertTabsToSpaces; // -t
bool m_ignoreRegExp; // -I
- QString m_ignoreRegExpText; // the RE for -I
- QStringList m_ignoreRegExpTextHistory;
+ TQString m_ignoreRegExpText; // the RE for -I
+ TQStringList m_ignoreRegExpTextHistory;
bool m_recursive; // -r
bool m_newFiles; // -N
// bool m_allText; // -a
bool m_excludeFilePattern; // -x
- QStringList m_excludeFilePatternList; // The list of patterns for -x
+ TQStringList m_excludeFilePatternList; // The list of patterns for -x
bool m_excludeFilesFile; // -X
- QString m_excludeFilesFileURL; // The filename to -X
- QStringList m_excludeFilesFileHistoryList; // The history list of filenames
+ TQString m_excludeFilesFileURL; // The filename to -X
+ TQStringList m_excludeFilesFileHistoryList; // The history list of filenames
};
#endif
diff --git a/kompare/libdialogpages/filespage.cpp b/kompare/libdialogpages/filespage.cpp
index 9e15a129..f326bbde 100644
--- a/kompare/libdialogpages/filespage.cpp
+++ b/kompare/libdialogpages/filespage.cpp
@@ -16,8 +16,8 @@
**
***************************************************************************/
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kapplication.h>
#include <kcharsets.h>
@@ -31,27 +31,27 @@
#include "filessettings.h"
#include "filespage.h"
-FilesPage::FilesPage( QWidget* parent ) : PageBase( parent ), m_URLChanged( false )
+FilesPage::FilesPage( TQWidget* parent ) : PageBase( parent ), m_URLChanged( false )
{
- QWidget* page = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( page );
+ TQWidget* page = new TQWidget( this );
+ TQVBoxLayout* layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- m_firstGB = new QGroupBox( 1, Qt::Vertical, "You have to set this moron :)", page );
+ m_firstGB = new TQGroupBox( 1, Qt::Vertical, "You have to set this moron :)", page );
m_firstURLComboBox = new KURLComboBox( KURLComboBox::Both, true, m_firstGB, "SourceURLComboBox" );
m_firstURLRequester = new KURLRequester( m_firstURLComboBox, m_firstGB );
m_firstURLRequester->setFocus();
- m_secondGB = new QGroupBox( 1, Qt::Vertical, "This too moron !", page );
+ m_secondGB = new TQGroupBox( 1, Qt::Vertical, "This too moron !", page );
m_secondURLComboBox = new KURLComboBox( KURLComboBox::Both, true, m_secondGB, "DestURLComboBox" );
m_secondURLRequester = new KURLRequester( m_secondURLComboBox, m_secondGB );
- connect( m_firstURLRequester, SIGNAL( urlSelected( const QString & ) ), SLOT( setSecondURL( const QString & ) ) );
- connect( m_secondURLRequester, SIGNAL( urlSelected( const QString & ) ), SLOT( setFirstURL( const QString & ) ) );
+ connect( m_firstURLRequester, TQT_SIGNAL( urlSelected( const TQString & ) ), TQT_SLOT( setSecondURL( const TQString & ) ) );
+ connect( m_secondURLRequester, TQT_SIGNAL( urlSelected( const TQString & ) ), TQT_SLOT( setFirstURL( const TQString & ) ) );
- m_thirdGB = new QGroupBox( 1, Qt::Vertical, i18n( "Encoding" ), page );
- m_encodingComboBox = new QComboBox( false, m_thirdGB, "encoding_combobox" );
+ m_thirdGB = new TQGroupBox( 1, Qt::Vertical, i18n( "Encoding" ), page );
+ m_encodingComboBox = new TQComboBox( false, m_thirdGB, "encoding_combobox" );
m_encodingComboBox->insertStringList( KGlobal::charsets()->availableEncodingNames() );
layout->addWidget( m_firstGB );
@@ -79,17 +79,17 @@ KURLRequester* FilesPage::secondURLRequester() const
return m_secondURLRequester;
}
-QString FilesPage::encoding() const
+TQString FilesPage::encoding() const
{
return m_encodingComboBox->currentText();
}
-void FilesPage::setFirstGroupBoxTitle( const QString& title )
+void FilesPage::setFirstGroupBoxTitle( const TQString& title )
{
m_firstGB->setTitle( title );
}
-void FilesPage::setSecondGroupBoxTitle( const QString& title )
+void FilesPage::setSecondGroupBoxTitle( const TQString& title )
{
m_secondGB->setTitle( title );
}
@@ -147,9 +147,9 @@ void FilesPage::setDefaults()
m_encodingComboBox->setCurrentText( "Default" );
}
-void FilesPage::setFirstURL( const QString &url )
+void FilesPage::setFirstURL( const TQString &url )
{
- QString _url = url;
+ TQString _url = url;
if ( !m_URLChanged )
{
m_firstURLRequester->setURL( _url.remove( url.section( '/', -1 ) ) );
@@ -157,9 +157,9 @@ void FilesPage::setFirstURL( const QString &url )
}
}
-void FilesPage::setSecondURL( const QString &url )
+void FilesPage::setSecondURL( const TQString &url )
{
- QString _url = url;
+ TQString _url = url;
if ( !m_URLChanged )
{
m_secondURLRequester->setURL( _url.remove( url.section( '/', -1 ) ) );
diff --git a/kompare/libdialogpages/filespage.h b/kompare/libdialogpages/filespage.h
index 145c4614..db4347b8 100644
--- a/kompare/libdialogpages/filespage.h
+++ b/kompare/libdialogpages/filespage.h
@@ -37,17 +37,17 @@ class FilesPage : PageBase
{
Q_OBJECT
public:
- FilesPage( QWidget* parent );
+ FilesPage( TQWidget* parent );
virtual ~FilesPage();
public:
KURLRequester* firstURLRequester() const;
KURLRequester* secondURLRequester() const;
- QString encoding() const;
+ TQString encoding() const;
- void setFirstGroupBoxTitle ( const QString& title );
- void setSecondGroupBoxTitle( const QString& title );
+ void setFirstGroupBoxTitle ( const TQString& title );
+ void setSecondGroupBoxTitle( const TQString& title );
void setURLsInComboBoxes();
@@ -61,13 +61,13 @@ public:
virtual void setDefaults();
protected slots:
- void setFirstURL( const QString & );
- void setSecondURL( const QString & );
+ void setFirstURL( const TQString & );
+ void setSecondURL( const TQString & );
private:
- QGroupBox* m_firstGB;
- QGroupBox* m_secondGB;
- QGroupBox* m_thirdGB;
+ TQGroupBox* m_firstGB;
+ TQGroupBox* m_secondGB;
+ TQGroupBox* m_thirdGB;
KURLComboBox* m_firstURLComboBox;
KURLComboBox* m_secondURLComboBox;
KURLRequester* m_firstURLRequester;
@@ -75,7 +75,7 @@ private:
// Use this bool to lock the connection between both KURLRequesters.
// This prevents annoying behaviour
bool m_URLChanged;
- QComboBox* m_encodingComboBox;
+ TQComboBox* m_encodingComboBox;
FilesSettings* m_settings;
};
diff --git a/kompare/libdialogpages/filessettings.cpp b/kompare/libdialogpages/filessettings.cpp
index d5a94a66..01b70076 100644
--- a/kompare/libdialogpages/filessettings.cpp
+++ b/kompare/libdialogpages/filessettings.cpp
@@ -21,7 +21,7 @@
#include "filessettings.h"
-FilesSettings::FilesSettings( QWidget* parent )
+FilesSettings::FilesSettings( TQWidget* parent )
: SettingsBase( parent )
{
}
@@ -52,7 +52,7 @@ void FilesSettings::saveSettings( KConfig* config )
config->sync();
}
-void FilesSettings::setGroup( const QString& groupName )
+void FilesSettings::setGroup( const TQString& groupName )
{
m_configGroupName = groupName;
}
diff --git a/kompare/libdialogpages/filessettings.h b/kompare/libdialogpages/filessettings.h
index 3c394dbb..e38fff6d 100644
--- a/kompare/libdialogpages/filessettings.h
+++ b/kompare/libdialogpages/filessettings.h
@@ -19,7 +19,7 @@
#ifndef FILESSETTINGS_H
#define FILESSETTINGS_H
-#include <qstring.h>
+#include <tqstring.h>
#include "settingsbase.h"
@@ -29,7 +29,7 @@ class FilesSettings : public SettingsBase
{
Q_OBJECT
public:
- FilesSettings( QWidget* parent );
+ FilesSettings( TQWidget* parent );
virtual ~FilesSettings();
public:
@@ -37,16 +37,16 @@ public:
virtual void loadSettings( KConfig* config );
virtual void saveSettings( KConfig* config );
- void setGroup( const QString& groupName );
+ void setGroup( const TQString& groupName );
public:
- QString m_configGroupName;
+ TQString m_configGroupName;
- QStringList m_recentSources;
- QString m_lastChosenSourceURL;
- QStringList m_recentDestinations;
- QString m_lastChosenDestinationURL;
- QString m_encoding;
+ TQStringList m_recentSources;
+ TQString m_lastChosenSourceURL;
+ TQStringList m_recentDestinations;
+ TQString m_lastChosenDestinationURL;
+ TQString m_encoding;
};
#endif // FILESSETTINGS_H
diff --git a/kompare/libdialogpages/pagebase.cpp b/kompare/libdialogpages/pagebase.cpp
index de062634..ef9aa1ea 100644
--- a/kompare/libdialogpages/pagebase.cpp
+++ b/kompare/libdialogpages/pagebase.cpp
@@ -17,12 +17,12 @@
**
***************************************************************************/
-#include <qlayout.h>
-#include <qobjectlist.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
#include "pagebase.h"
-PageBase::PageBase( QWidget* parent ) : KTabCtl( parent )
+PageBase::PageBase( TQWidget* parent ) : KTabCtl( parent )
{
}
@@ -33,7 +33,7 @@ PageBase::~PageBase()
}
/** No descriptions */
-QSize PageBase::sizeHintForWidget( QWidget* widget )
+TQSize PageBase::sizeHintForWidget( TQWidget* widget )
{
//
// The size is computed by adding the sizeHint().height() of all
@@ -44,23 +44,23 @@ QSize PageBase::sizeHintForWidget( QWidget* widget )
// this code in this method has been ripped out of a file in kbabel
// so copyright goes to the kbabel authors.
- QSize size;
+ TQSize size;
int numChild = 0;
- QObjectList *l = (QObjectList*)(widget->children());
+ TQObjectList *l = (TQObjectList*)(widget->children());
for( uint i=0; i < l->count(); i++ )
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
numChild += 1;
- QWidget *w=((QWidget*)o);
+ TQWidget *w=((TQWidget*)o);
- QSize s = w->sizeHint();
+ TQSize s = w->sizeHint();
if( s.isEmpty() == true )
{
- s = QSize( 50, 100 ); // Default size
+ s = TQSize( 50, 100 ); // Default size
}
size.setHeight( size.height() + s.height() );
if( s.width() > size.width() )
@@ -73,11 +73,11 @@ QSize PageBase::sizeHintForWidget( QWidget* widget )
if( numChild > 0 )
{
size.setHeight( size.height() + widget->layout()->spacing()*(numChild-1) );
- size += QSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
+ size += TQSize( widget->layout()->margin()*2, widget->layout()->margin()*2 + 1 );
}
else
{
- size = QSize( 1, 1 );
+ size = TQSize( 1, 1 );
}
return( size );
diff --git a/kompare/libdialogpages/pagebase.h b/kompare/libdialogpages/pagebase.h
index 7aab7b81..0f188b36 100644
--- a/kompare/libdialogpages/pagebase.h
+++ b/kompare/libdialogpages/pagebase.h
@@ -20,8 +20,8 @@
#ifndef PAGEBASE_H
#define PAGEBASE_H
-#include <qsize.h>
-#include <qwidget.h>
+#include <tqsize.h>
+#include <tqwidget.h>
#include <kconfig.h>
#include <ktabctl.h>
@@ -32,12 +32,12 @@ class PageBase : public KTabCtl
{
Q_OBJECT
public:
- PageBase( QWidget* );
+ PageBase( TQWidget* );
~PageBase();
public:
/** No descriptions */
- QSize sizeHintForWidget( QWidget* widget );
+ TQSize sizeHintForWidget( TQWidget* widget );
/** No descriptions */
virtual void restore();
/** No descriptions */
diff --git a/kompare/libdialogpages/settingsbase.cpp b/kompare/libdialogpages/settingsbase.cpp
index dc7b64d6..6e347719 100644
--- a/kompare/libdialogpages/settingsbase.cpp
+++ b/kompare/libdialogpages/settingsbase.cpp
@@ -17,11 +17,11 @@
**
***************************************************************************/
-#include <qwidget.h>
+#include <tqwidget.h>
#include "settingsbase.h"
-SettingsBase::SettingsBase( QWidget* parent ) : QObject( parent )
+SettingsBase::SettingsBase( TQWidget* parent ) : TQObject( parent )
{
}
diff --git a/kompare/libdialogpages/settingsbase.h b/kompare/libdialogpages/settingsbase.h
index 5ec035ba..2e6b2f97 100644
--- a/kompare/libdialogpages/settingsbase.h
+++ b/kompare/libdialogpages/settingsbase.h
@@ -20,7 +20,7 @@
#ifndef SETTINGSBASE_H
#define SETTINGSBASE_H
-#include <qobject.h>
+#include <tqobject.h>
#include "kompare.h"
@@ -31,7 +31,7 @@ class SettingsBase : public QObject
{
Q_OBJECT
public:
- SettingsBase( QWidget* parent );
+ SettingsBase( TQWidget* parent );
~SettingsBase();
public:
diff --git a/kompare/libdialogpages/viewpage.cpp b/kompare/libdialogpages/viewpage.cpp
index c4e61e8d..1deb9e21 100644
--- a/kompare/libdialogpages/viewpage.cpp
+++ b/kompare/libdialogpages/viewpage.cpp
@@ -17,12 +17,12 @@
**
***************************************************************************/
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qhgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#include <kapplication.h>
#include <kcolorbutton.h>
@@ -33,62 +33,62 @@
#include "viewpage.h"
#include "viewsettings.h"
-ViewPage::ViewPage( QWidget* parent ) : PageBase( parent )
+ViewPage::ViewPage( TQWidget* parent ) : PageBase( parent )
{
- QWidget* page;
- QVBoxLayout* layout;
- QGroupBox* colorGroupBox;
- QHGroupBox* snolGroupBox;
- QHGroupBox* tabGroupBox;
- QLabel* label;
-
- page = new QWidget( this );
- layout = new QVBoxLayout( page );
+ TQWidget* page;
+ TQVBoxLayout* layout;
+ TQGroupBox* colorGroupBox;
+ TQHGroupBox* snolGroupBox;
+ TQHGroupBox* tabGroupBox;
+ TQLabel* label;
+
+ page = new TQWidget( this );
+ layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
// add a groupbox
- colorGroupBox = new QGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page );
+ colorGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n( "Colors" ), page );
layout->addWidget( colorGroupBox );
colorGroupBox->setMargin( KDialog::marginHint() );
// add the removeColor
- label = new QLabel( i18n( "Removed color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Removed color:" ), colorGroupBox );
m_removedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_removedColorButton );
// add the changeColor
- label = new QLabel( i18n( "Changed color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Changed color:" ), colorGroupBox );
m_changedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_changedColorButton );
// add the addColor
- label = new QLabel( i18n( "Added color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Added color:" ), colorGroupBox );
m_addedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_addedColorButton );
// add the appliedColor
- label = new QLabel( i18n( "Applied color:" ), colorGroupBox );
+ label = new TQLabel( i18n( "Applied color:" ), colorGroupBox );
m_appliedColorButton = new KColorButton( colorGroupBox );
label->setBuddy( m_appliedColorButton );
// scroll number of lines (snol)
- snolGroupBox = new QHGroupBox( i18n( "Mouse Wheel" ), page );
+ snolGroupBox = new TQHGroupBox( i18n( "Mouse Wheel" ), page );
layout->addWidget( snolGroupBox );
snolGroupBox->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Number of lines:" ), snolGroupBox );
- m_snolSpinBox = new QSpinBox( 0, 50, 1, snolGroupBox );
+ label = new TQLabel( i18n( "Number of lines:" ), snolGroupBox );
+ m_snolSpinBox = new TQSpinBox( 0, 50, 1, snolGroupBox );
label->setBuddy( m_snolSpinBox );
// Temporarily here for testing...
// number of spaces for a tab character stuff
- tabGroupBox = new QHGroupBox( i18n( "Tabs to Spaces" ), page );
+ tabGroupBox = new TQHGroupBox( i18n( "Tabs to Spaces" ), page );
layout->addWidget( tabGroupBox );
tabGroupBox->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Number of spaces to convert a tab character to:" ), tabGroupBox );
- m_tabSpinBox = new QSpinBox( 1, 16, 1, tabGroupBox );
+ label = new TQLabel( i18n( "Number of spaces to convert a tab character to:" ), tabGroupBox );
+ m_tabSpinBox = new TQSpinBox( 1, 16, 1, tabGroupBox );
label->setBuddy( m_tabSpinBox );
layout->addStretch( 1 );
@@ -96,21 +96,21 @@ ViewPage::ViewPage( QWidget* parent ) : PageBase( parent )
addTab( page, i18n( "A&ppearance" ) );
- page = new QWidget( this );
- layout = new QVBoxLayout( page );
+ page = new TQWidget( this );
+ layout = new TQVBoxLayout( page );
layout->setSpacing( KDialog::spacingHint() );
layout->setMargin( KDialog::marginHint() );
- QHGroupBox* gb = new QHGroupBox( i18n( "Text Font" ), page );
+ TQHGroupBox* gb = new TQHGroupBox( i18n( "Text Font" ), page );
layout->addWidget( gb );
gb->setMargin( KDialog::marginHint() );
- label = new QLabel( i18n( "Font:" ), gb );
+ label = new TQLabel( i18n( "Font:" ), gb );
m_fontCombo = new KFontCombo( gb, "fontcombo" );
label->setBuddy( m_fontCombo );
- label = new QLabel( i18n( "Size:" ), gb );
- m_fontSizeSpinBox = new QSpinBox( 6, 24, 1, gb, "fontsize" );
+ label = new TQLabel( i18n( "Size:" ), gb );
+ m_fontSizeSpinBox = new TQSpinBox( 6, 24, 1, gb, "fontsize" );
label->setBuddy( m_fontSizeSpinBox );
layout->addStretch( 1 );
@@ -157,7 +157,7 @@ void ViewPage::apply()
m_settings->m_scrollNoOfLines = m_snolSpinBox->value();
m_settings->m_tabToNumberOfSpaces = m_tabSpinBox->value();
- m_settings->m_font = QFont( m_fontCombo->currentFont() );
+ m_settings->m_font = TQFont( m_fontCombo->currentFont() );
m_settings->m_font.setPointSize( m_fontSizeSpinBox->value() );
m_settings->saveSettings( kapp->config() );
diff --git a/kompare/libdialogpages/viewpage.h b/kompare/libdialogpages/viewpage.h
index 30591f4b..6b75684e 100644
--- a/kompare/libdialogpages/viewpage.h
+++ b/kompare/libdialogpages/viewpage.h
@@ -34,7 +34,7 @@ class ViewPage : public PageBase
{
Q_OBJECT
public:
- ViewPage( QWidget* );
+ ViewPage( TQWidget* );
~ViewPage();
public:
@@ -55,10 +55,10 @@ public:
KColorButton* m_addedColorButton;
KColorButton* m_appliedColorButton;
// snol == scroll number of lines
- QSpinBox* m_snolSpinBox;
- QSpinBox* m_tabSpinBox;
+ TQSpinBox* m_snolSpinBox;
+ TQSpinBox* m_tabSpinBox;
KFontCombo* m_fontCombo;
- QSpinBox* m_fontSizeSpinBox;
+ TQSpinBox* m_fontSizeSpinBox;
};
#endif
diff --git a/kompare/libdialogpages/viewsettings.cpp b/kompare/libdialogpages/viewsettings.cpp
index c55dd40e..403746b1 100644
--- a/kompare/libdialogpages/viewsettings.cpp
+++ b/kompare/libdialogpages/viewsettings.cpp
@@ -17,7 +17,7 @@
**
***************************************************************************/
-#include <qfont.h>
+#include <tqfont.h>
#include <kconfig.h>
#include <kglobalsettings.h>
@@ -26,12 +26,12 @@
using namespace Diff2;
-const QColor ViewSettings::default_removeColor (190, 237, 190);
-const QColor ViewSettings::default_changeColor (237, 190, 190);
-const QColor ViewSettings::default_addColor (190, 190, 237);
-const QColor ViewSettings::default_appliedColor(237, 237, 190);
+const TQColor ViewSettings::default_removeColor (190, 237, 190);
+const TQColor ViewSettings::default_changeColor (237, 190, 190);
+const TQColor ViewSettings::default_addColor (190, 190, 237);
+const TQColor ViewSettings::default_appliedColor(237, 237, 190);
-ViewSettings::ViewSettings( QWidget* parent )
+ViewSettings::ViewSettings( TQWidget* parent )
: SettingsBase( parent ),
m_removeColor( 0, 0, 0 ),
m_changeColor( 0, 0, 0),
@@ -56,7 +56,7 @@ void ViewSettings::loadSettings( KConfig* config )
m_scrollNoOfLines = cfg.readNumEntry ( "ScrollNoOfLines", 3 );
m_tabToNumberOfSpaces = cfg.readNumEntry ( "TabToNumberOfSpaces", 4 );
- QFont stdFixed = KGlobalSettings::fixedFont();
+ TQFont stdFixed = KGlobalSettings::fixedFont();
stdFixed.setPointSize( 10 );
m_font = cfg.readFontEntry ( "TextFont", &stdFixed );
}
@@ -74,10 +74,10 @@ void ViewSettings::saveSettings( KConfig* config )
cfg.writeEntry( "TextFont", m_font );
}
-QColor ViewSettings::colorForDifferenceType( int type, bool selected, bool applied )
+TQColor ViewSettings::colorForDifferenceType( int type, bool selected, bool applied )
{
// FIXME: does not belong here
- QColor color;
+ TQColor color;
if( applied )
color = m_appliedColor;
else
diff --git a/kompare/libdialogpages/viewsettings.h b/kompare/libdialogpages/viewsettings.h
index ab0f4d5f..24bf8e9a 100644
--- a/kompare/libdialogpages/viewsettings.h
+++ b/kompare/libdialogpages/viewsettings.h
@@ -20,8 +20,8 @@
#ifndef VIEWSETTINGS_H
#define VIEWSETTINGS_H
-#include <qcolor.h>
-#include <qwidget.h>
+#include <tqcolor.h>
+#include <tqwidget.h>
#include "difference.h"
#include "settingsbase.h"
@@ -30,32 +30,32 @@ class ViewSettings : public SettingsBase
{
Q_OBJECT
public:
- static const QColor default_removeColor;
- static const QColor default_changeColor;
- static const QColor default_addColor;
- static const QColor default_appliedColor;
+ static const TQColor default_removeColor;
+ static const TQColor default_changeColor;
+ static const TQColor default_addColor;
+ static const TQColor default_appliedColor;
- ViewSettings( QWidget* parent );
+ ViewSettings( TQWidget* parent );
~ViewSettings();
public:
// some virtual functions that will be overloaded from the base class
virtual void loadSettings( KConfig* config );
virtual void saveSettings( KConfig* config );
- QColor colorForDifferenceType( int type, bool selected = false, bool applied = false );
+ TQColor colorForDifferenceType( int type, bool selected = false, bool applied = false );
public:
- QColor m_removeColor;
- QColor m_changeColor;
- QColor m_addColor;
- QColor m_appliedColor;
- QColor m_selectedRemoveColor;
- QColor m_selectedChangeColor;
- QColor m_selectedAddColor;
- QColor m_selectedAppliedColor;
+ TQColor m_removeColor;
+ TQColor m_changeColor;
+ TQColor m_addColor;
+ TQColor m_appliedColor;
+ TQColor m_selectedRemoveColor;
+ TQColor m_selectedChangeColor;
+ TQColor m_selectedAddColor;
+ TQColor m_selectedAppliedColor;
int m_scrollNoOfLines;
int m_tabToNumberOfSpaces;
- QFont m_font;
+ TQFont m_font;
};
#endif // VIEWSETTINGS_H
diff --git a/kompare/libdiff2/cvsdiffparser.cpp b/kompare/libdiff2/cvsdiffparser.cpp
index d210eb66..47c79a0f 100644
--- a/kompare/libdiff2/cvsdiffparser.cpp
+++ b/kompare/libdiff2/cvsdiffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
using namespace Diff2;
-CVSDiffParser::CVSDiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+CVSDiffParser::CVSDiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context cvs diff parsing, the rest is the same as in parserbase.cpp
// third capture in header1 is non optional for cvs diff, it is the revision
@@ -43,13 +43,13 @@ enum Kompare::Format CVSDiffParser::determineFormat()
{
// kdDebug(8101) << "Determining the format of the CVSDiff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- [^\\t]+\\t" );
- QRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- [^\\t]+\\t" );
+ TQRegExp contextRE( "^\\*\\*\\* [^\\t]+\\t" );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -89,7 +89,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "CVSDiffParser::parseNormalDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator diffEnd = m_diffLines.end();
+ TQStringList::ConstIterator diffEnd = m_diffLines.end();
while ( m_diffIterator != diffEnd )
{
@@ -99,7 +99,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 1 ) );
@@ -120,7 +120,7 @@ bool CVSDiffParser::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
diff --git a/kompare/libdiff2/cvsdiffparser.h b/kompare/libdiff2/cvsdiffparser.h
index 88fef485..e856cc6d 100644
--- a/kompare/libdiff2/cvsdiffparser.h
+++ b/kompare/libdiff2/cvsdiffparser.h
@@ -18,7 +18,7 @@
#ifndef _CVSDIFF_PARSER_H
#define _CVSDIFF_PARSER_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "parserbase.h"
@@ -30,7 +30,7 @@ class KompareModelList;
class CVSDiffParser : public ParserBase
{
public:
- CVSDiffParser( const KompareModelList* list, const QStringList& diff );
+ CVSDiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~CVSDiffParser();
protected:
diff --git a/kompare/libdiff2/difference.cpp b/kompare/libdiff2/difference.cpp
index 8cbb4093..c23dd1e9 100644
--- a/kompare/libdiff2/difference.cpp
+++ b/kompare/libdiff2/difference.cpp
@@ -34,12 +34,12 @@ Difference::~Difference()
{
}
-void Difference::addSourceLine( QString line )
+void Difference::addSourceLine( TQString line )
{
m_sourceLines.append( new DifferenceString( line ) );
}
-void Difference::addDestinationLine( QString line )
+void Difference::addDestinationLine( TQString line )
{
m_destinationLines.append( new DifferenceString( line ) );
}
@@ -85,9 +85,9 @@ void Difference::determineInlineDifferences()
}
}
-QString Difference::recreateDifference() const
+TQString Difference::recreateDifference() const
{
- QString difference;
+ TQString difference;
// source
DifferenceStringListConstIterator stringIt = m_sourceLines.begin();
diff --git a/kompare/libdiff2/difference.h b/kompare/libdiff2/difference.h
index 91065891..51295636 100644
--- a/kompare/libdiff2/difference.h
+++ b/kompare/libdiff2/difference.h
@@ -20,8 +20,8 @@
#ifndef DIFFERENCE_H
#define DIFFERENCE_H
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
@@ -62,9 +62,9 @@ private:
unsigned int m_offset;
};
-typedef QValueList<Marker*> MarkerList;
-typedef QValueList<Marker*>::iterator MarkerListIterator;
-typedef QValueList<Marker*>::const_iterator MarkerListConstIterator;
+typedef TQValueList<Marker*> MarkerList;
+typedef TQValueList<Marker*>::iterator MarkerListIterator;
+typedef TQValueList<Marker*>::const_iterator MarkerListConstIterator;
class DifferenceString
{
@@ -73,7 +73,7 @@ public:
{
// kdDebug(8101) << "DifferenceString::DifferenceString()" << endl;
}
- DifferenceString( const QString& string, const MarkerList& markerList = MarkerList() ) :
+ DifferenceString( const TQString& string, const MarkerList& markerList = MarkerList() ) :
m_string( string ),
m_markerList( markerList )
{
@@ -91,11 +91,11 @@ public:
~DifferenceString() {}
public:
- const QString& string() const
+ const TQString& string() const
{
return m_string;
}
- const QString& conflictString() const
+ const TQString& conflictString() const
{
return m_conflict;
}
@@ -103,12 +103,12 @@ public:
{
return m_markerList;
}
- void setString( const QString& string )
+ void setString( const TQString& string )
{
m_string = string;
calculateHash();
}
- void setConflictString( const QString& conflict )
+ void setConflictString( const TQString& conflict )
{
m_conflict = conflict;
}
@@ -142,15 +142,15 @@ protected:
}
private:
- QString m_string;
- QString m_conflict;
+ TQString m_string;
+ TQString m_conflict;
unsigned int m_hash;
MarkerList m_markerList;
};
-typedef QValueVector<DifferenceString*> DifferenceStringList;
-typedef QValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
-typedef QValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
+typedef TQValueVector<DifferenceString*> DifferenceStringList;
+typedef TQValueVector<DifferenceString*>::iterator DifferenceStringListIterator;
+typedef TQValueVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
class Difference
{
@@ -190,13 +190,13 @@ public:
void setType( int type ) { m_type = type; }
- void addSourceLine( QString line );
- void addDestinationLine( QString line );
+ void addSourceLine( TQString line );
+ void addDestinationLine( TQString line );
/** This method will calculate the differences between the individual strings and store them as Markers */
void determineInlineDifferences();
- QString recreateDifference() const;
+ TQString recreateDifference() const;
private:
int m_type;
@@ -213,9 +213,9 @@ private:
LevenshteinTable* m_tableXXX; // now unused
};
-typedef QValueList<Difference*> DifferenceList;
-typedef QValueList<Difference*>::iterator DifferenceListIterator;
-typedef QValueList<Difference*>::const_iterator DifferenceListConstIterator;
+typedef TQValueList<Difference*> DifferenceList;
+typedef TQValueList<Difference*>::iterator DifferenceListIterator;
+typedef TQValueList<Difference*>::const_iterator DifferenceListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffhunk.cpp b/kompare/libdiff2/diffhunk.cpp
index f980dd93..3b48d796 100644
--- a/kompare/libdiff2/diffhunk.cpp
+++ b/kompare/libdiff2/diffhunk.cpp
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffHunk::DiffHunk( int sourceLine, int destinationLine, QString function, Type type ) :
+DiffHunk::DiffHunk( int sourceLine, int destinationLine, TQString function, Type type ) :
m_sourceLine( sourceLine ),
m_destinationLine( destinationLine ),
m_function( function ),
@@ -66,10 +66,10 @@ int DiffHunk::destinationLineCount() const
return lineCount;
}
-QString DiffHunk::recreateHunk() const
+TQString DiffHunk::recreateHunk() const
{
- QString hunk;
- QString differences;
+ TQString hunk;
+ TQString differences;
// recreate body
DifferenceListConstIterator diffIt = m_differences.begin();
@@ -97,7 +97,7 @@ QString DiffHunk::recreateHunk() const
}
// recreate header
- hunk += QString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
+ hunk += TQString::fromLatin1( "@@ -%1,%3 +%2,%4 @@" )
.arg( m_sourceLine )
.arg( m_destinationLine )
.arg( slc )
@@ -106,7 +106,7 @@ QString DiffHunk::recreateHunk() const
if ( !m_function.isEmpty() )
hunk += " " + m_function;
- hunk += QString::fromLatin1( "\n" );
+ hunk += TQString::fromLatin1( "\n" );
hunk += differences;
diff --git a/kompare/libdiff2/diffhunk.h b/kompare/libdiff2/diffhunk.h
index 8a76babb..a4194a3a 100644
--- a/kompare/libdiff2/diffhunk.h
+++ b/kompare/libdiff2/diffhunk.h
@@ -33,11 +33,11 @@ public:
enum Type { Normal, AddedByBlend };
public:
- DiffHunk( int sourceLine, int destinationLine, QString function = QString::null, Type type = Normal );
+ DiffHunk( int sourceLine, int destinationLine, TQString function = TQString::null, Type type = Normal );
~DiffHunk();
const DifferenceList& differences() const { return m_differences; };
- const QString& function() const { return m_function; };
+ const TQString& function() const { return m_function; };
int sourceLineNumber() const { return m_sourceLine; };
int destinationLineNumber() const { return m_destinationLine; };
@@ -50,19 +50,19 @@ public:
void add( Difference* diff );
- QString recreateHunk() const;
+ TQString recreateHunk() const;
private:
int m_sourceLine;
int m_destinationLine;
DifferenceList m_differences;
- QString m_function;
+ TQString m_function;
Type m_type;
};
-typedef QValueList<DiffHunk*> DiffHunkList;
-typedef QValueList<DiffHunk*>::iterator DiffHunkListIterator;
-typedef QValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
+typedef TQValueList<DiffHunk*> DiffHunkList;
+typedef TQValueList<DiffHunk*>::iterator DiffHunkListIterator;
+typedef TQValueList<DiffHunk*>::const_iterator DiffHunkListConstIterator;
} // End of namespace Diff2
diff --git a/kompare/libdiff2/diffmodel.cpp b/kompare/libdiff2/diffmodel.cpp
index 54c33457..1b3822b0 100644
--- a/kompare/libdiff2/diffmodel.cpp
+++ b/kompare/libdiff2/diffmodel.cpp
@@ -17,8 +17,8 @@
**
***************************************************************************/
-#include <qregexp.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
using namespace Diff2;
/** */
-DiffModel::DiffModel( const QString& source, const QString& destination ) :
+DiffModel::DiffModel( const TQString& source, const TQString& destination ) :
m_source( source ),
m_destination( destination ),
m_sourcePath( "" ),
@@ -146,19 +146,19 @@ int DiffModel::localeAwareCompareSource( const DiffModel& model )
return result;
}
-QString DiffModel::recreateDiff() const
+TQString DiffModel::recreateDiff() const
{
// For now we'll always return a diff in the diff format
- QString diff;
+ TQString diff;
// recreate header
- QString tab = QString::fromLatin1( "\t" );
- QString nl = QString::fromLatin1( "\n" );
- diff += QString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
+ TQString tab = TQString::fromLatin1( "\t" );
+ TQString nl = TQString::fromLatin1( "\n" );
+ diff += TQString::fromLatin1( "--- %1\t%2" ).arg( m_source ).arg( m_sourceTimestamp );
if ( !m_sourceRevision.isEmpty() )
diff += tab + m_sourceRevision;
diff += nl;
- diff += QString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
+ diff += TQString::fromLatin1( "+++ %1\t%2" ).arg( m_destination ).arg( m_destinationTimestamp );
if ( !m_destinationRevision.isEmpty() )
diff += tab + m_destinationRevision;
diff += nl;
@@ -262,54 +262,54 @@ Difference* DiffModel::nextDifference()
return m_selectedDifference;
}
-const QString DiffModel::sourceFile() const
+const TQString DiffModel::sourceFile() const
{
return m_sourceFile;
}
-const QString DiffModel::destinationFile() const
+const TQString DiffModel::destinationFile() const
{
return m_destinationFile;
}
-const QString DiffModel::sourcePath() const
+const TQString DiffModel::sourcePath() const
{
return m_sourcePath;
}
-const QString DiffModel::destinationPath() const
+const TQString DiffModel::destinationPath() const
{
return m_destinationPath;
}
-void DiffModel::setSourceFile( QString path )
+void DiffModel::setSourceFile( TQString path )
{
m_source = path;
splitSourceInPathAndFileName();
}
-void DiffModel::setDestinationFile( QString path )
+void DiffModel::setDestinationFile( TQString path )
{
m_destination = path;
splitDestinationInPathAndFileName();
}
-void DiffModel::setSourceTimestamp( QString timestamp )
+void DiffModel::setSourceTimestamp( TQString timestamp )
{
m_sourceTimestamp = timestamp;
}
-void DiffModel::setDestinationTimestamp( QString timestamp )
+void DiffModel::setDestinationTimestamp( TQString timestamp )
{
m_destinationTimestamp = timestamp;
}
-void DiffModel::setSourceRevision( QString revision )
+void DiffModel::setSourceRevision( TQString revision )
{
m_destinationRevision = revision;
}
-void DiffModel::setDestinationRevision( QString revision )
+void DiffModel::setDestinationRevision( TQString revision )
{
m_destinationRevision = revision;
}
diff --git a/kompare/libdiff2/diffmodel.h b/kompare/libdiff2/diffmodel.h
index 11c424b5..3b957b89 100644
--- a/kompare/libdiff2/diffmodel.h
+++ b/kompare/libdiff2/diffmodel.h
@@ -20,8 +20,8 @@
#ifndef DIFFMODEL_H
#define DIFFMODEL_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include "diffhunk.h"
#include "kompare.h"
@@ -37,14 +37,14 @@ class DiffModel : public QObject
Q_OBJECT
public:
- DiffModel( const QString& srcBaseURL, const QString& destBaseURL );
+ DiffModel( const TQString& srcBaseURL, const TQString& destBaseURL );
DiffModel();
- DiffModel( const DiffModel& ) : QObject() {};
+ DiffModel( const DiffModel& ) : TQObject() {};
~DiffModel();
- int parseDiff( enum Kompare::Format format, const QStringList& list );
+ int parseDiff( enum Kompare::Format format, const TQStringList& list );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
int hunkCount() const { return m_hunks.count(); }
int differenceCount() const { return m_differences.count(); }
@@ -67,23 +67,23 @@ public:
Difference* prevDifference();
Difference* nextDifference();
- const QString source() const { return m_source; }
- const QString destination() const { return m_destination; }
- const QString sourceFile() const;
- const QString destinationFile() const;
- const QString sourcePath() const;
- const QString destinationPath() const;
- const QString sourceTimestamp() const { return m_sourceTimestamp; }
- const QString destinationTimestamp() const { return m_destinationTimestamp; }
- const QString sourceRevision() const { return m_sourceRevision; }
- const QString destinationRevision() const { return m_destinationRevision; }
-
- void setSourceFile( QString path );
- void setDestinationFile( QString path );
- void setSourceTimestamp( QString timestamp );
- void setDestinationTimestamp( QString timestamp );
- void setSourceRevision( QString revision );
- void setDestinationRevision( QString revision );
+ const TQString source() const { return m_source; }
+ const TQString destination() const { return m_destination; }
+ const TQString sourceFile() const;
+ const TQString destinationFile() const;
+ const TQString sourcePath() const;
+ const TQString destinationPath() const;
+ const TQString sourceTimestamp() const { return m_sourceTimestamp; }
+ const TQString destinationTimestamp() const { return m_destinationTimestamp; }
+ const TQString sourceRevision() const { return m_sourceRevision; }
+ const TQString destinationRevision() const { return m_destinationRevision; }
+
+ void setSourceFile( TQString path );
+ void setDestinationFile( TQString path );
+ void setSourceTimestamp( TQString timestamp );
+ void setDestinationTimestamp( TQString timestamp );
+ void setSourceRevision( TQString revision );
+ void setDestinationRevision( TQString revision );
void addHunk( DiffHunk* hunk );
void addDiff( Difference* diff );
@@ -116,20 +116,20 @@ private:
void splitDestinationInPathAndFileName();
private:
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
- QString m_sourcePath;
- QString m_destinationPath;
+ TQString m_sourcePath;
+ TQString m_destinationPath;
- QString m_sourceFile;
- QString m_destinationFile;
+ TQString m_sourceFile;
+ TQString m_destinationFile;
- QString m_sourceTimestamp;
- QString m_destinationTimestamp;
+ TQString m_sourceTimestamp;
+ TQString m_destinationTimestamp;
- QString m_sourceRevision;
- QString m_destinationRevision;
+ TQString m_sourceRevision;
+ TQString m_destinationRevision;
DiffHunkList m_hunks;
DifferenceList m_differences;
diff --git a/kompare/libdiff2/diffmodellist.h b/kompare/libdiff2/diffmodellist.h
index 9c4f9807..bb4fefb5 100644
--- a/kompare/libdiff2/diffmodellist.h
+++ b/kompare/libdiff2/diffmodellist.h
@@ -19,21 +19,21 @@
#ifndef DIFFMODELLIST_H
#define DIFFMODELLIST_H
-#include <qvaluelist.h> // include for the base class
+#include <tqvaluelist.h> // include for the base class
#include "diffmodel.h"
namespace Diff2
{
-typedef QValueListIterator<DiffModel*> DiffModelListIterator;
-typedef QValueListConstIterator<DiffModel*> DiffModelListConstIterator;
+typedef TQValueListIterator<DiffModel*> DiffModelListIterator;
+typedef TQValueListConstIterator<DiffModel*> DiffModelListConstIterator;
-class DiffModelList : public QValueList<DiffModel*>
+class DiffModelList : public TQValueList<DiffModel*>
{
public:
DiffModelList() {}
- DiffModelList( const DiffModelList &list ) : QValueList<DiffModel*>( list ) {}
+ DiffModelList( const DiffModelList &list ) : TQValueList<DiffModel*>( list ) {}
virtual ~DiffModelList()
{
clear();
diff --git a/kompare/libdiff2/diffparser.cpp b/kompare/libdiff2/diffparser.cpp
index f98fbde5..d85256d2 100644
--- a/kompare/libdiff2/diffparser.cpp
+++ b/kompare/libdiff2/diffparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-DiffParser::DiffParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+DiffParser::DiffParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
// The regexps needed for context diff parsing, the rest is the same as in parserbase.cpp
m_contextDiffHeader1.setPattern( "\\*\\*\\* ([^\\t]+)\\t([^\\t]+)\\n" );
@@ -38,13 +38,13 @@ enum Kompare::Format DiffParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the diff Diff" << endl;
- QRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
- QRegExp unifiedRE( "^--- " );
- QRegExp contextRE( "^\\*\\*\\* " );
- QRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
- QRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
+ TQRegExp normalRE ( "[0-9]+[0-9,]*[acd][0-9]+[0-9,]*" );
+ TQRegExp unifiedRE( "^--- " );
+ TQRegExp contextRE( "^\\*\\*\\* " );
+ TQRegExp rcsRE ( "^[acd][0-9]+ [0-9]+" );
+ TQRegExp edRE ( "^[0-9]+[0-9,]*[acd]" );
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
diff --git a/kompare/libdiff2/diffparser.h b/kompare/libdiff2/diffparser.h
index 72905e3f..8bdbf600 100644
--- a/kompare/libdiff2/diffparser.h
+++ b/kompare/libdiff2/diffparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class DiffParser : public ParserBase
{
public:
- DiffParser( const KompareModelList* list, const QStringList& diff );
+ DiffParser( const KompareModelList* list, const TQStringList& diff );
virtual ~DiffParser();
protected:
diff --git a/kompare/libdiff2/kompare.h b/kompare/libdiff2/kompare.h
index 1ed5c4c7..8f6b7fe5 100644
--- a/kompare/libdiff2/kompare.h
+++ b/kompare/libdiff2/kompare.h
@@ -84,8 +84,8 @@ namespace Kompare
enum Generator _generator = UnknownGenerator,
KURL _source = KURL(),
KURL _destination = KURL(),
- QString _localSource = "",
- QString _localDestination = ""
+ TQString _localSource = "",
+ TQString _localDestination = ""
)
{
mode = _mode;
@@ -103,8 +103,8 @@ namespace Kompare
enum Generator generator;
KURL source;
KURL destination;
- QString localSource;
- QString localDestination;
+ TQString localSource;
+ TQString localDestination;
};
} // End of namespace Kompare
@@ -114,7 +114,7 @@ namespace Kompare
class KompareFunctions
{
public:
- static QString constructRelativePath( const QString& from, const QString& to )
+ static TQString constructRelativePath( const TQString& from, const TQString& to )
{
KURL fromURL( from );
KURL toURL( to );
@@ -130,12 +130,12 @@ public:
if( !root.isValid() ) return to;
- QString relative;
+ TQString relative;
for( ; upLevels > 0; upLevels-- ) {
relative += "../";
}
- relative += QString( to ).replace( 0, root.path(1).length(), "" );
+ relative += TQString( to ).replace( 0, root.path(1).length(), "" );
return relative;
}
diff --git a/kompare/libdiff2/komparemodellist.cpp b/kompare/libdiff2/komparemodellist.cpp
index ac3c725a..db10f4c3 100644
--- a/kompare/libdiff2/komparemodellist.cpp
+++ b/kompare/libdiff2/komparemodellist.cpp
@@ -19,11 +19,11 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qvaluelist.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqvaluelist.h>
#include <kaction.h>
#include <kcharsets.h>
@@ -46,8 +46,8 @@
using namespace Diff2;
-KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent, const char* name )
- : QObject( parent, name ),
+KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent, const char* name )
+ : TQObject( parent, name ),
m_diffProcess( 0 ),
m_diffSettings( diffSettings ),
m_models( 0 ),
@@ -59,33 +59,33 @@ KompareModelList::KompareModelList( DiffSettings* diffSettings, struct Kompare::
m_textCodec( 0 )
{
m_applyDifference = new KAction( i18n("&Apply Difference"), "1rightarrow", Qt::Key_Space,
- this, SLOT(slotActionApplyDifference()),
+ this, TQT_SLOT(slotActionApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_apply" );
m_unApplyDifference = new KAction( i18n("Un&apply Difference"), "1leftarrow", Qt::Key_BackSpace,
- this, SLOT(slotActionUnApplyDifference()),
+ this, TQT_SLOT(slotActionUnApplyDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_unapply" );
m_applyAll = new KAction( i18n("App&ly All"), "2rightarrow", Qt::CTRL + Qt::Key_A,
- this, SLOT(slotActionApplyAllDifferences()),
+ this, TQT_SLOT(slotActionApplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_applyall" );
m_unapplyAll = new KAction( i18n("&Unapply All"), "2leftarrow", Qt::CTRL + Qt::Key_U,
- this, SLOT(slotActionUnapplyAllDifferences()),
+ this, TQT_SLOT(slotActionUnapplyAllDifferences()),
(( KomparePart* )parent)->actionCollection(), "difference_unapplyall" );
m_previousFile = new KAction( i18n("P&revious File"), "2uparrow", Qt::CTRL + Qt::Key_PageUp,
- this, SLOT(slotPreviousModel()),
+ this, TQT_SLOT(slotPreviousModel()),
(( KomparePart* )parent)->actionCollection(), "difference_previousfile" );
m_nextFile = new KAction( i18n("N&ext File"), "2downarrow", Qt::CTRL + Qt::Key_PageDown,
- this, SLOT(slotNextModel()),
+ this, TQT_SLOT(slotNextModel()),
(( KomparePart* )parent)->actionCollection(), "difference_nextfile" );
m_previousDifference = new KAction( i18n("&Previous Difference"), "1uparrow", Qt::CTRL + Qt::Key_Up,
- this, SLOT(slotPreviousDifference()),
+ this, TQT_SLOT(slotPreviousDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_previous" );
m_nextDifference = new KAction( i18n("&Next Difference"), "1downarrow", Qt::CTRL + Qt::Key_Down,
- this, SLOT(slotNextDifference()),
+ this, TQT_SLOT(slotNextDifference()),
(( KomparePart* )parent)->actionCollection(), "difference_next" );
m_previousDifference->setEnabled( false );
m_nextDifference->setEnabled( false );
- m_save = KStdAction::save( this, SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
+ m_save = KStdAction::save( this, TQT_SLOT(slotSaveDestination()), ((KomparePart*)parent)->actionCollection() );
m_save->setEnabled( false );
updateModelListActions();
@@ -95,16 +95,16 @@ KompareModelList::~KompareModelList()
{
}
-bool KompareModelList::isDirectory( const QString& url ) const
+bool KompareModelList::isDirectory( const TQString& url ) const
{
- QFileInfo fi( url );
+ TQFileInfo fi( url );
if ( fi.isDir() )
return true;
else
return false;
}
-bool KompareModelList::isDiff( const QString& mimeType ) const
+bool KompareModelList::isDiff( const TQString& mimeType ) const
{
if ( mimeType == "text/x-diff" )
return true;
@@ -112,7 +112,7 @@ bool KompareModelList::isDiff( const QString& mimeType ) const
return false;
}
-bool KompareModelList::compare( const QString& source, const QString& destination )
+bool KompareModelList::compare( const TQString& source, const TQString& destination )
{
bool result = false;
@@ -126,15 +126,15 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
}
else if ( !sourceIsDirectory && !destinationIsDirectory )
{
- QFile sourceFile( source );
+ TQFile sourceFile( source );
sourceFile.open( IO_ReadOnly );
- QString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
+ TQString sourceMimeType = ( KMimeType::findByContent( sourceFile.readAll() ) )->name();
sourceFile.close();
kdDebug(8101) << "Mimetype source : " << sourceMimeType << endl;
- QFile destinationFile( destination );
+ TQFile destinationFile( destination );
destinationFile.open( IO_ReadOnly );
- QString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
+ TQString destinationMimeType = ( KMimeType::findByContent( destinationFile.readAll() ) )->name();
destinationFile.close();
kdDebug(8101) << "Mimetype destination: " << destinationMimeType << endl;
@@ -172,7 +172,7 @@ bool KompareModelList::compare( const QString& source, const QString& destinatio
return result;
}
-bool KompareModelList::compareFiles( const QString& source, const QString& destination )
+bool KompareModelList::compareFiles( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -183,16 +183,16 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
// m_fileWatch->addFile( m_source );
// m_fileWatch->addFile( m_destination );
-// connect( m_fileWatch, SIGNAL( dirty( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
-// connect( m_fileWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotFileChanged( const QString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( dirty( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
+// connect( m_fileWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotFileChanged( const TQString& ) ) );
// m_fileWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -200,7 +200,7 @@ bool KompareModelList::compareFiles( const QString& source, const QString& desti
return true;
}
-bool KompareModelList::compareDirs( const QString& source, const QString& destination )
+bool KompareModelList::compareDirs( const TQString& source, const TQString& destination )
{
m_source = source;
m_destination = destination;
@@ -212,16 +212,16 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
// m_dirWatch->addDir( m_source, true, true );
// m_dirWatch->addDir( m_destination, true, true );
-// connect( m_dirWatch, SIGNAL( dirty ( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( created( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
-// connect( m_dirWatch, SIGNAL( deleted( const QString& ) ), this, SLOT( slotDirectoryChanged( const QString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( dirty ( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( created( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
+// connect( m_dirWatch, TQT_SIGNAL( deleted( const TQString& ) ), this, TQT_SLOT( slotDirectoryChanged( const TQString& ) ) );
// m_dirWatch->startScan();
m_diffProcess = new KompareProcess( m_diffSettings, Kompare::Custom, m_source, m_destination );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotDiffProcessFinished( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotDiffProcessFinished( bool )) );
emit status( Kompare::RunningDiff );
m_diffProcess->start();
@@ -229,7 +229,7 @@ bool KompareModelList::compareDirs( const QString& source, const QString& destin
return true;
}
-bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff )
+bool KompareModelList::openFileAndDiff( const TQString& file, const TQString& diff )
{
clear();
@@ -253,7 +253,7 @@ bool KompareModelList::openFileAndDiff( const QString& file, const QString& diff
return true;
}
-bool KompareModelList::openDirAndDiff( const QString& dir, const QString& diff )
+bool KompareModelList::openDirAndDiff( const TQString& dir, const TQString& diff )
{
clear();
@@ -302,8 +302,8 @@ bool KompareModelList::saveDestination( DiffModel* model )
return false;
}
- QTextStream* stream = temp->textStream();
- QStringList list;
+ TQTextStream* stream = temp->textStream();
+ TQStringList list;
DiffHunkListConstIterator hunkIt = model->hunks()->begin();
DiffHunkListConstIterator hEnd = model->hunks()->end();
@@ -357,25 +357,25 @@ bool KompareModelList::saveDestination( DiffModel* model )
if ( m_info.mode == Kompare::ComparingDirs )
{
- QString destination = model->destinationPath() + model->destinationFile();
+ TQString destination = model->destinationPath() + model->destinationFile();
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << destination << endl;
KIO::UDSEntry entry;
- if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::stat( KURL( destination ).path(), entry, (TQWidget*)parent() ) )
{
- if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (QWidget*)parent() ) )
+ if ( !KIO::NetAccess::mkdir( KURL( destination ).path(), (TQWidget*)parent() ) )
{
emit error( i18n( "<qt>Could not create destination directory <b>%1</b>.\nThe file has not been saved.</qt>" ) );
return false;
}
}
- result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( destination ), (TQWidget*)parent() );
}
else
{
kdDebug(8101) << "Tempfilename : " << temp->name() << endl;
kdDebug(8101) << "DestinationURL : " << m_destination << endl;
- result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (QWidget*)parent() );
+ result = KIO::NetAccess::upload( temp->name(), KURL( m_destination ), (TQWidget*)parent() );
}
if ( !result )
@@ -407,12 +407,12 @@ bool KompareModelList::saveAll()
return true;
}
-void KompareModelList::setEncoding( const QString& encoding )
+void KompareModelList::setEncoding( const TQString& encoding )
{
m_encoding = encoding;
if ( encoding.lower() == "default" )
{
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
else
{
@@ -420,7 +420,7 @@ void KompareModelList::setEncoding( const QString& encoding )
m_textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
kdDebug() << "TextCodec: " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
}
kdDebug() << "TextCodec: " << m_textCodec << endl;
}
@@ -459,7 +459,7 @@ void KompareModelList::slotDiffProcessFinished( bool success )
m_diffProcess = 0;
}
-void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
+void KompareModelList::slotDirectoryChanged( const TQString& /*dir*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie directories are being watched !!! :)" << endl;
@@ -470,7 +470,7 @@ void KompareModelList::slotDirectoryChanged( const QString& /*dir*/ )
}
}
-void KompareModelList::slotFileChanged( const QString& /*file*/ )
+void KompareModelList::slotFileChanged( const TQString& /*file*/ )
{
// some debug output to see if watching works properly
kdDebug(8101) << "Yippie files are being watched !!! :)" << endl;
@@ -481,10 +481,10 @@ void KompareModelList::slotFileChanged( const QString& /*file*/ )
}
}
-QStringList KompareModelList::split( const QString& fileContents )
+TQStringList KompareModelList::split( const TQString& fileContents )
{
- QString contents = fileContents;
- QStringList list;
+ TQString contents = fileContents;
+ TQStringList list;
int pos = 0;
unsigned int oldpos = 0;
@@ -508,36 +508,36 @@ QStringList KompareModelList::split( const QString& fileContents )
return list;
}
-QString KompareModelList::readFile( const QString& fileName )
+TQString KompareModelList::readFile( const TQString& fileName )
{
- QStringList list;
+ TQStringList list;
- QFile file( fileName );
+ TQFile file( fileName );
file.open( IO_ReadOnly );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
kdDebug() << "Codec = " << m_textCodec << endl;
if ( !m_textCodec )
- m_textCodec = QTextCodec::codecForLocale();
+ m_textCodec = TQTextCodec::codecForLocale();
stream.setCodec( m_textCodec );
- QString contents = stream.read();
+ TQString contents = stream.read();
file.close();
return contents;
}
-bool KompareModelList::openDiff( const QString& diffFile )
+bool KompareModelList::openDiff( const TQString& diffFile )
{
kdDebug(8101) << "Stupid :) Url = " << diffFile << endl;
if ( diffFile.isEmpty() )
return false;
- QString diff = readFile( diffFile );
+ TQString diff = readFile( diffFile );
clear(); // Clear the current models
@@ -557,9 +557,9 @@ bool KompareModelList::openDiff( const QString& diffFile )
return true;
}
-QString KompareModelList::recreateDiff() const
+TQString KompareModelList::recreateDiff() const
{
- QString diff;
+ TQString diff;
DiffModelListConstIterator modelIt = m_models->begin();
DiffModelListConstIterator mEnd = m_models->end();
@@ -571,7 +571,7 @@ QString KompareModelList::recreateDiff() const
return diff;
}
-bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSettings* diffSettings )
+bool KompareModelList::saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings )
{
kdDebug() << "KompareModelList::saveDiff: " << endl;
@@ -589,8 +589,8 @@ bool KompareModelList::saveDiff( const QString& url, QString directory, DiffSett
m_diffProcess = new KompareProcess( diffSettings, Kompare::Custom, m_source, m_destination, directory );
m_diffProcess->setEncoding( m_encoding );
- connect( m_diffProcess, SIGNAL(diffHasFinished( bool )),
- this, SLOT(slotWriteDiffOutput( bool )) );
+ connect( m_diffProcess, TQT_SIGNAL(diffHasFinished( bool )),
+ this, TQT_SLOT(slotWriteDiffOutput( bool )) );
emit status( Kompare::RunningDiff );
return m_diffProcess->start();
@@ -602,7 +602,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
if( success )
{
- QTextStream* stream = m_diffTemp->textStream();
+ TQTextStream* stream = m_diffTemp->textStream();
*stream << m_diffProcess->diffOutput();
@@ -613,7 +613,7 @@ void KompareModelList::slotWriteDiffOutput( bool success )
emit error( i18n( "Could not write to the temporary file." ) );
}
- KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (QWidget*)parent() );
+ KIO::NetAccess::upload( m_diffTemp->name(), KURL( m_diffURL ), (TQWidget*)parent() );
emit status( Kompare::FinishedWritingDiff );
}
@@ -857,11 +857,11 @@ void KompareModelList::slotApplyAllDifferences( bool apply )
emit applyAllDifferences( apply );
}
-int KompareModelList::parseDiffOutput( const QString& diff )
+int KompareModelList::parseDiffOutput( const TQString& diff )
{
kdDebug(8101) << "KompareModelList::parseDiffOutput" << endl;
- QStringList diffLines = split( diff );
+ TQStringList diffLines = split( diff );
Parser* parser = new Parser( this );
m_models = parser->parse( diffLines );
@@ -888,30 +888,30 @@ int KompareModelList::parseDiffOutput( const QString& diff )
return 0;
}
-bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
+bool KompareModelList::blendOriginalIntoModelList( const TQString& localURL )
{
kdDebug() << "Hurrah we are blending..." << endl;
- QFileInfo fi( localURL );
+ TQFileInfo fi( localURL );
bool result = false;
DiffModel* model;
- QString fileContents;
+ TQString fileContents;
if ( fi.isDir() )
{ // is a dir
kdDebug() << "Blend Dir" << endl;
-// QDir dir( localURL, QString::null, QDir::Name|QDir::DirsFirst, QDir::All );
+// TQDir dir( localURL, TQString::null, TQDir::Name|TQDir::DirsFirst, TQDir::All );
DiffModelListIterator modelIt = m_models->begin();
DiffModelListIterator mEnd = m_models->end();
for ( ; modelIt != mEnd; ++modelIt )
{
model = *modelIt;
kdDebug(8101) << "Model : " << model << endl;
- QString filename = model->sourcePath() + model->sourceFile();
+ TQString filename = model->sourcePath() + model->sourceFile();
if ( !filename.startsWith( localURL ) )
filename.prepend( localURL );
- QFileInfo fi2( filename );
+ TQFileInfo fi2( filename );
if ( fi2.exists() )
{
kdDebug(8101) << "Reading from: " << filename << endl;
@@ -941,7 +941,7 @@ bool KompareModelList::blendOriginalIntoModelList( const QString& localURL )
return result;
}
-bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents )
+bool KompareModelList::blendFile( DiffModel* model, const TQString& fileContents )
{
if ( !model )
{
@@ -953,10 +953,10 @@ bool KompareModelList::blendFile( DiffModel* model, const QString& fileContents
int srcLineNo = 1, destLineNo = 1;
- QStringList lines = split( fileContents );
+ TQStringList lines = split( fileContents );
- QStringList::ConstIterator linesIt = lines.begin();
- QStringList::ConstIterator lEnd = lines.end();
+ TQStringList::ConstIterator linesIt = lines.begin();
+ TQStringList::ConstIterator lEnd = lines.end();
DiffHunkList* hunks = model->hunks();
kdDebug(8101) << "Hunks in hunklist: " << hunks->count() << endl;
@@ -1191,8 +1191,8 @@ void KompareModelList::clear()
void KompareModelList::swap()
{
- QString source = m_source;
- QString destination = m_destination;
+ TQString source = m_source;
+ TQString destination = m_destination;
if ( m_info.mode == Kompare::ComparingFiles )
compareFiles( destination, source );
else if ( m_info.mode == Kompare::ComparingDirs )
diff --git a/kompare/libdiff2/komparemodellist.h b/kompare/libdiff2/komparemodellist.h
index 8ba264fb..d1f834ae 100644
--- a/kompare/libdiff2/komparemodellist.h
+++ b/kompare/libdiff2/komparemodellist.h
@@ -20,7 +20,7 @@
#ifndef KOMPAREMODELLIST_H
#define KOMPAREMODELLIST_H
-#include <qobject.h>
+#include <tqobject.h>
#include "diffmodel.h"
#include "diffmodellist.h"
@@ -42,7 +42,7 @@ class KompareModelList : public QObject
{
Q_OBJECT
public:
- KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, QObject* parent = 0, const char* name = 0 );
+ KompareModelList( DiffSettings* diffSettings, struct Kompare::Info& info, TQObject* parent = 0, const char* name = 0 );
~KompareModelList();
public:
@@ -50,34 +50,34 @@ public:
void swap();
/* Comparing methods */
- bool compare( const QString& source, const QString& destination );
+ bool compare( const TQString& source, const TQString& destination );
- bool compareFiles( const QString& source, const QString& destination );
- bool compareDirs( const QString& source, const QString& destination );
+ bool compareFiles( const TQString& source, const TQString& destination );
+ bool compareDirs( const TQString& source, const TQString& destination );
- bool openDiff( const QString& diff );
+ bool openDiff( const TQString& diff );
- bool openFileAndDiff( const QString& file, const QString& diff );
- bool openDirAndDiff( const QString& dir, const QString& diff );
+ bool openFileAndDiff( const TQString& file, const TQString& diff );
+ bool openDirAndDiff( const TQString& dir, const TQString& diff );
- bool saveDiff( const QString& url, QString directory, DiffSettings* diffSettings );
+ bool saveDiff( const TQString& url, TQString directory, DiffSettings* diffSettings );
bool saveAll();
bool saveDestination( DiffModel* model );
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
- QString recreateDiff() const;
+ TQString recreateDiff() const;
// This parses the difflines and creates new models
- int parseDiffOutput( const QString& diff );
+ int parseDiffOutput( const TQString& diff );
// Call this to emit the signals to the rest of the "world" to show the diff
void show();
// This will blend the original URL (dir or file) into the diffmodel,
// this is like patching but with a twist
- bool blendOriginalIntoModelList( const QString& localURL );
+ bool blendOriginalIntoModelList( const TQString& localURL );
enum Kompare::Mode mode() const { return m_info.mode; };
const DiffModelList* models() const { return m_models; };
@@ -110,12 +110,12 @@ private:
void updateModelListActions();
protected:
- bool blendFile( DiffModel* model, const QString& lines );
+ bool blendFile( DiffModel* model, const TQString& lines );
signals:
void status( Kompare::Status status );
void setStatusBarModelInfo( int modelIndex, int differenceIndex, int modelCount, int differenceCount, int appliedCount );
- void error( QString error );
+ void error( TQString error );
void modelsChanged( const Diff2::DiffModelList* models );
void setSelection( const Diff2::DiffModel* model, const Diff2::Difference* diff );
void setSelection( const Diff2::Difference* diff );
@@ -154,24 +154,24 @@ protected slots:
void slotSaveDestination();
private slots:
- void slotDirectoryChanged( const QString& );
- void slotFileChanged( const QString& );
+ void slotDirectoryChanged( const TQString& );
+ void slotFileChanged( const TQString& );
private: // Helper methods
- bool isDirectory( const QString& url ) const;
- bool isDiff( const QString& mimetype ) const;
- QString readFile( const QString& fileName );
+ bool isDirectory( const TQString& url ) const;
+ bool isDiff( const TQString& mimetype ) const;
+ TQString readFile( const TQString& fileName );
bool hasPrevModel() const;
bool hasNextModel() const;
bool hasPrevDiff() const;
bool hasNextDiff() const;
- QStringList split( const QString& diff );
+ TQStringList split( const TQString& diff );
private:
KTempFile* m_diffTemp;
- QString m_diffURL;
+ TQString m_diffURL;
KompareProcess* m_diffProcess;
@@ -179,8 +179,8 @@ private:
DiffModelList* m_models;
- QString m_source;
- QString m_destination;
+ TQString m_source;
+ TQString m_destination;
DiffModel* m_selectedModel;
Difference* m_selectedDifference;
@@ -204,8 +204,8 @@ private:
KAction* m_save;
- QString m_encoding;
- QTextCodec* m_textCodec;
+ TQString m_encoding;
+ TQTextCodec* m_textCodec;
};
} // End of namespace Diff2
diff --git a/kompare/libdiff2/kompareprocess.cpp b/kompare/libdiff2/kompareprocess.cpp
index 2d5eac00..db165ae5 100644
--- a/kompare/libdiff2/kompareprocess.cpp
+++ b/kompare/libdiff2/kompareprocess.cpp
@@ -19,9 +19,9 @@
**
***************************************************************************/
-#include <qdir.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kcharsets.h>
#include <kdebug.h>
@@ -30,7 +30,7 @@
#include "diffsettings.h"
#include "kompareprocess.h"
-KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString dir )
+KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString dir )
: KProcess(),
m_diffSettings( diffSettings ),
m_mode( mode ),
@@ -39,14 +39,14 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
setUseShell( true );
// connect the stdout and stderr signals
- connect( this, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
- connect( this, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStdout( KProcess*, char*, int ) ) );
+ connect( this, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ TQT_SLOT ( slotReceivedStderr( KProcess*, char*, int ) ) );
// connect the signal that indicates that the proces has exited
- connect( this, SIGNAL( processExited( KProcess* ) ),
- SLOT ( slotProcessExited( KProcess* ) ) );
+ connect( this, TQT_SIGNAL( processExited( KProcess* ) ),
+ TQT_SLOT ( slotProcessExited( KProcess* ) ) );
*this << "LANG=C";
@@ -61,7 +61,7 @@ KompareProcess::KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMo
}
if( !dir.isEmpty() ) {
- QDir::setCurrent( dir );
+ TQDir::setCurrent( dir );
}
// Write file names
@@ -81,7 +81,7 @@ void KompareProcess::writeDefaultCommandLine()
*this << m_diffSettings->m_diffProgram << "-dr";
}
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
}
void KompareProcess::writeCommandLine()
@@ -100,10 +100,10 @@ void KompareProcess::writeCommandLine()
switch( m_diffSettings->m_format ) {
case Kompare::Unified :
- *this << "-U" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-U" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::Context :
- *this << "-C" << QString::number( m_diffSettings->m_linesOfContext );
+ *this << "-C" << TQString::number( m_diffSettings->m_linesOfContext );
break;
case Kompare::RCS :
*this << "-n";
@@ -188,8 +188,8 @@ void KompareProcess::writeCommandLine()
if ( m_diffSettings->m_excludeFilePattern )
{
- QStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
- QStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
+ TQStringList::ConstIterator it = m_diffSettings->m_excludeFilePatternList.begin();
+ TQStringList::ConstIterator end = m_diffSettings->m_excludeFilePatternList.end();
for ( ; it != end; ++it )
{
*this << "-x" << KProcess::quote( *it );
@@ -206,21 +206,21 @@ KompareProcess::~KompareProcess()
{
}
-void KompareProcess::setEncoding( const QString& encoding )
+void KompareProcess::setEncoding( const TQString& encoding )
{
if ( encoding.lower() == "default" )
{
- m_textDecoder = QTextCodec::codecForLocale()->makeDecoder();
+ m_textDecoder = TQTextCodec::codecForLocale()->makeDecoder();
}
else
{
- QTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
+ TQTextCodec* textCodec = KGlobal::charsets()->codecForName( encoding.latin1() );
if ( textCodec )
m_textDecoder = textCodec->makeDecoder();
else
{
kdDebug(8101) << "Using locale codec as backup..." << endl;
- textCodec = QTextCodec::codecForLocale();
+ textCodec = TQTextCodec::codecForLocale();
m_textDecoder = textCodec->makeDecoder();
}
}
@@ -247,8 +247,8 @@ void KompareProcess::slotReceivedStderr( KProcess* /* process */, char* buffer,
bool KompareProcess::start()
{
#ifndef NDEBUG
- QString cmdLine;
- QValueList<QCString>::ConstIterator it = arguments.begin();
+ TQString cmdLine;
+ TQValueList<TQCString>::ConstIterator it = arguments.begin();
for (; it != arguments.end(); ++it )
cmdLine += "\"" + (*it) + "\" ";
kdDebug(8101) << cmdLine << endl;
diff --git a/kompare/libdiff2/kompareprocess.h b/kompare/libdiff2/kompareprocess.h
index 06a4a5ce..a2d2e92b 100644
--- a/kompare/libdiff2/kompareprocess.h
+++ b/kompare/libdiff2/kompareprocess.h
@@ -33,16 +33,16 @@ class KompareProcess : public KProcess, public KompareFunctions
Q_OBJECT
public:
- KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, QString source, QString destination, QString directory = QString::null );
+ KompareProcess( DiffSettings* diffSettings, enum Kompare::DiffMode mode, TQString source, TQString destination, TQString directory = TQString::null );
~KompareProcess();
bool start();
- QString diffOutput() { return m_stdout; }
- QString stdOut() { return m_stdout; }
- QString stdErr() { return m_stderr; }
+ TQString diffOutput() { return m_stdout; }
+ TQString stdOut() { return m_stdout; }
+ TQString stdErr() { return m_stderr; }
- void setEncoding( const QString& encoding );
+ void setEncoding( const TQString& encoding );
signals:
void diffHasFinished( bool finishedNormally );
@@ -59,9 +59,9 @@ protected slots:
private:
DiffSettings* m_diffSettings;
enum Kompare::DiffMode m_mode;
- QString m_stdout;
- QString m_stderr;
- QTextDecoder* m_textDecoder;
+ TQString m_stdout;
+ TQString m_stderr;
+ TQTextDecoder* m_textDecoder;
};
#endif
diff --git a/kompare/libdiff2/levenshteintable.cpp b/kompare/libdiff2/levenshteintable.cpp
index 54525aef..7e4ddbbe 100644
--- a/kompare/libdiff2/levenshteintable.cpp
+++ b/kompare/libdiff2/levenshteintable.cpp
@@ -18,7 +18,7 @@
#include <iostream>
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -107,14 +107,14 @@ unsigned int LevenshteinTable::createTable( DifferenceString* source, Difference
m_source = source;
m_destination = destination;
- QString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
- QString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
+ TQString s = ' ' + source->string(); // Optimization, so i dont have to subtract 1 from the indexes every
+ TQString d = ' ' + destination->string(); // single time and add 1 to the width and height of the table
unsigned int m = s.length();
unsigned int n = d.length();
- const QChar* sq = s.unicode();
- const QChar* dq = d.unicode();
+ const TQChar* sq = s.unicode();
+ const TQChar* dq = d.unicode();
if ( m == 1 )
return --n;
@@ -201,7 +201,7 @@ void LevenshteinTable::createListsOfMarkers()
{
case 0: // north
// kdDebug(8101) << "Picking north" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -226,7 +226,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 1: // northwest
// kdDebug(8101) << "Picking northwest" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_destination->markerList().isEmpty() )
c = m_destination->markerList().first();
@@ -271,7 +271,7 @@ void LevenshteinTable::createListsOfMarkers()
break;
case 2: // west
// kdDebug(8101) << "Picking west" << endl;
-// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << QString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << QString( destination[ y-1 ] ) << endl;
+// kdDebug(8101) << "Source[" << ( x - 1 ) << "] = " << TQString( source[ x-1 ] ) << ", destination[" << ( y - 1 ) << "] = " << TQString( destination[ y-1 ] ) << endl;
if ( !m_source->markerList().isEmpty() )
c = m_source->markerList().first();
@@ -299,7 +299,7 @@ void LevenshteinTable::createListsOfMarkers()
// kdDebug(8101) << "Source string: " << m_source->string() << endl;
// c = m_source->markerList()->first();
-// QStringList list;
+// TQStringList list;
// unsigned int prevValue = 0;
// for ( ; c; c = m_source->markerList()->next() )
// {
diff --git a/kompare/libdiff2/parser.cpp b/kompare/libdiff2/parser.cpp
index 04ff7a4a..1e3efc8a 100644
--- a/kompare/libdiff2/parser.cpp
+++ b/kompare/libdiff2/parser.cpp
@@ -34,13 +34,13 @@ Parser::~Parser()
{
}
-int Parser::cleanUpCrap( QStringList& diffLines )
+int Parser::cleanUpCrap( TQStringList& diffLines )
{
- QStringList::Iterator it = diffLines.begin();
+ TQStringList::Iterator it = diffLines.begin();
int nol = 0;
- QString noNewLine( "\\ No newline" );
+ TQString noNewLine( "\\ No newline" );
for ( ; it != diffLines.end(); ++it )
{
@@ -49,7 +49,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
it = diffLines.remove( it );
// correcting the advance of the iterator because of the remove
--it;
- QString temp( *it );
+ TQString temp( *it );
temp.truncate( temp.find( '\n' ) );
*it = temp;
++nol;
@@ -59,7 +59,7 @@ int Parser::cleanUpCrap( QStringList& diffLines )
return nol;
}
-DiffModelList* Parser::parse( QStringList& diffLines )
+DiffModelList* Parser::parse( TQStringList& diffLines )
{
/* Basically determine the generator then call the parse method */
ParserBase* parser;
@@ -107,14 +107,14 @@ DiffModelList* Parser::parse( QStringList& diffLines )
return modelList;
}
-enum Kompare::Generator Parser::determineGenerator( const QStringList& diffLines )
+enum Kompare::Generator Parser::determineGenerator( const TQStringList& diffLines )
{
// Shit have to duplicate some code with this method and the ParserBase derived classes
- QString cvsDiff ( "Index: " );
- QString perforceDiff( "==== " );
+ TQString cvsDiff ( "Index: " );
+ TQString perforceDiff( "==== " );
- QStringList::ConstIterator it = diffLines.begin();
- QStringList::ConstIterator linesEnd = diffLines.end();
+ TQStringList::ConstIterator it = diffLines.begin();
+ TQStringList::ConstIterator linesEnd = diffLines.end();
while ( it != linesEnd )
{
diff --git a/kompare/libdiff2/parser.h b/kompare/libdiff2/parser.h
index 0ffae23a..b3dd16ee 100644
--- a/kompare/libdiff2/parser.h
+++ b/kompare/libdiff2/parser.h
@@ -34,16 +34,16 @@ public:
~Parser();
public:
- DiffModelList* parse( QStringList& diffLines );
+ DiffModelList* parse( TQStringList& diffLines );
enum Kompare::Generator generator() const { return m_generator; };
enum Kompare::Format format() const { return m_format; };
private:
/** Which program was used to generate the output */
- enum Kompare::Generator determineGenerator( const QStringList& diffLines );
+ enum Kompare::Generator determineGenerator( const TQStringList& diffLines );
- int cleanUpCrap( QStringList& diffLines );
+ int cleanUpCrap( TQStringList& diffLines );
private:
enum Kompare::Generator m_generator;
diff --git a/kompare/libdiff2/parserbase.cpp b/kompare/libdiff2/parserbase.cpp
index 303f7b22..ca19d232 100644
--- a/kompare/libdiff2/parserbase.cpp
+++ b/kompare/libdiff2/parserbase.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
@@ -28,7 +28,7 @@
using namespace Diff2;
-ParserBase::ParserBase( const KompareModelList* list, const QStringList& diff ) :
+ParserBase::ParserBase( const KompareModelList* list, const TQStringList& diff ) :
m_diffLines( diff ),
m_currentModel( 0 ),
m_models( 0 ),
@@ -122,7 +122,7 @@ bool ParserBase::parseContextDiffHeader()
// kdDebug(8101) << "Matched string Header2 = " << m_contextDiffHeader2.cap( 0 ) << endl;
m_currentModel = new DiffModel( m_contextDiffHeader1.cap( 1 ), m_contextDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp ( m_contextDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision ( m_contextDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_contextDiffHeader2.cap( 2 ) );
@@ -164,7 +164,7 @@ bool ParserBase::parseNormalDiffHeader()
// kdDebug(8101) << "Matched string Header = " << m_normalDiffHeader.cap( 0 ) << endl;
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceFile ( m_normalDiffHeader.cap( 1 ) );
m_currentModel->setDestinationFile ( m_normalDiffHeader.cap( 2 ) );
@@ -185,7 +185,7 @@ bool ParserBase::parseNormalDiffHeader()
// Set this to the first line again and hope it is a single file diff
m_diffIterator = m_diffLines.begin();
m_currentModel = new DiffModel();
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_singleFileDiff = true;
}
@@ -215,7 +215,7 @@ bool ParserBase::parseUnifiedDiffHeader()
if ( m_diffIterator != m_diffLines.end() && m_unifiedDiffHeader2.exactMatch( *m_diffIterator ) )
{
m_currentModel = new DiffModel( m_unifiedDiffHeader1.cap( 1 ), m_unifiedDiffHeader2.cap( 1 ) );
- QObject::connect( m_currentModel, SIGNAL( setModified( bool ) ), m_list, SLOT( slotSetModified( bool ) ) );
+ TQObject::connect( m_currentModel, TQT_SIGNAL( setModified( bool ) ), m_list, TQT_SLOT( slotSetModified( bool ) ) );
m_currentModel->setSourceTimestamp( m_unifiedDiffHeader1.cap( 2 ) );
m_currentModel->setSourceRevision( m_unifiedDiffHeader1.cap( 4 ) );
m_currentModel->setDestinationTimestamp( m_unifiedDiffHeader2.cap( 2 ) );
@@ -319,7 +319,7 @@ bool ParserBase::parseContextHunkBody()
// kdDebug(8101) << "ParserBase::parseContextHunkBody()" << endl;
// Storing the src part of the hunk for later use
- QStringList oldLines;
+ TQStringList oldLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added old line: " << *m_diffIterator << endl;
oldLines.append( *m_diffIterator );
@@ -331,13 +331,13 @@ bool ParserBase::parseContextHunkBody()
++m_diffIterator;
// Storing the dest part of the hunk for later use
- QStringList newLines;
+ TQStringList newLines;
for( ; m_diffIterator != m_diffLines.end() && m_contextHunkBodyLine.exactMatch( *m_diffIterator ); ++m_diffIterator ) {
// kdDebug(8101) << "Added new line: " << *m_diffIterator << endl;
newLines.append( *m_diffIterator );
}
- QString function = m_contextHunkHeader1.cap( 1 );
+ TQString function = m_contextHunkHeader1.cap( 1 );
// kdDebug(8101) << "Captured function: " << function << endl;
int linenoA = m_contextHunkHeader2.cap( 1 ).toInt();
// kdDebug(8101) << "Source line number: " << linenoA << endl;
@@ -348,8 +348,8 @@ bool ParserBase::parseContextHunkBody()
m_currentModel->addHunk( hunk );
- QStringList::Iterator oldIt = oldLines.begin();
- QStringList::Iterator newIt = newLines.begin();
+ TQStringList::Iterator oldIt = oldLines.begin();
+ TQStringList::Iterator newIt = newLines.begin();
Difference* diff;
while( oldIt != oldLines.end() || newIt != newLines.end() )
@@ -396,7 +396,7 @@ bool ParserBase::parseContextHunkBody()
( newIt == newLines.end() || m_contextHunkBodyContext.exactMatch( *newIt ) ) &&
( oldIt != oldLines.end() || newIt != newLines.end() ) )
{
- QString l;
+ TQString l;
if( oldIt != oldLines.end() )
{
l = m_contextHunkBodyContext.cap( 1 );
@@ -456,7 +456,7 @@ bool ParserBase::parseNormalHunkBody()
{
// kdDebug(8101) << "ParserBase::parseNormalHunkBody" << endl;
- QString type = QString::null;
+ TQString type = TQString::null;
int linenoA = 0, linenoB = 0;
@@ -513,13 +513,13 @@ bool ParserBase::parseRCSHunkBody()
return false;
}
-bool ParserBase::matchesUnifiedHunkLine( QString line ) const
+bool ParserBase::matchesUnifiedHunkLine( TQString line ) const
{
- static const QChar context( ' ' );
- static const QChar added ( '+' );
- static const QChar removed( '-' );
+ static const TQChar context( ' ' );
+ static const TQChar added ( '+' );
+ static const TQChar removed( '-' );
- QChar first = line[0];
+ TQChar first = line[0];
return ( first == context || first == added || first == removed );
}
@@ -547,7 +547,7 @@ bool ParserBase::parseUnifiedHunkBody()
return false;
linenoB++;
}
- QString function = m_unifiedHunkHeader.cap( 7 );
+ TQString function = m_unifiedHunkHeader.cap( 7 );
for ( int i = 0; i < 9; i++ )
{
// kdDebug(8101) << "Capture " << i << ": " << m_unifiedHunkHeader.cap( i ) << endl;
@@ -556,11 +556,11 @@ bool ParserBase::parseUnifiedHunkBody()
DiffHunk* hunk = new DiffHunk( linenoA, linenoB, function );
m_currentModel->addHunk( hunk );
- const QStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
+ const TQStringList::ConstIterator m_diffLinesEnd = m_diffLines.end();
- const QString context = QString( " " );
- const QString added = QString( "+" );
- const QString removed = QString( "-" );
+ const TQString context = TQString( " " );
+ const TQString added = TQString( "+" );
+ const TQString removed = TQString( "-" );
while( m_diffIterator != m_diffLinesEnd && matchesUnifiedHunkLine( *m_diffIterator ) )
{
@@ -571,8 +571,8 @@ bool ParserBase::parseUnifiedHunkBody()
{ // context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( context ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
linenoB++;
}
@@ -581,12 +581,12 @@ bool ParserBase::parseUnifiedHunkBody()
{ // This is a real difference, not context
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( removed ); ++m_diffIterator )
{
- diff->addSourceLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addSourceLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoA++;
}
for( ; m_diffIterator != m_diffLinesEnd && (*m_diffIterator).startsWith( added ); ++m_diffIterator )
{
- diff->addDestinationLine( QString( *m_diffIterator ).remove( 0, 1 ) );
+ diff->addDestinationLine( TQString( *m_diffIterator ).remove( 0, 1 ) );
linenoB++;
}
if ( diff->sourceLineCount() == 0 )
diff --git a/kompare/libdiff2/parserbase.h b/kompare/libdiff2/parserbase.h
index 5e08803e..e8d5eec4 100644
--- a/kompare/libdiff2/parserbase.h
+++ b/kompare/libdiff2/parserbase.h
@@ -18,7 +18,7 @@
#ifndef _DIFF2_PARSERBASE_H
#define _DIFF2_PARSERBASE_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kompare.h"
#include "difference.h"
@@ -35,7 +35,7 @@ class KompareModelList;
class ParserBase
{
public:
- ParserBase( const KompareModelList* list, const QStringList& diff );
+ ParserBase( const KompareModelList* list, const TQStringList& diff );
virtual ~ParserBase();
public:
@@ -68,7 +68,7 @@ protected:
virtual DiffModelList* parseUnified();
protected: // Helper methods to speed things up
- bool matchesUnifiedHunkLine( QString line ) const;
+ bool matchesUnifiedHunkLine( TQString line ) const;
protected:
/** What is format of the diff */
@@ -76,51 +76,51 @@ protected:
protected:
// Regexps for context parsing
- QRegExp m_contextDiffHeader1;
- QRegExp m_contextDiffHeader2;
+ TQRegExp m_contextDiffHeader1;
+ TQRegExp m_contextDiffHeader2;
- QRegExp m_contextHunkHeader1;
- QRegExp m_contextHunkHeader2;
- QRegExp m_contextHunkHeader3;
+ TQRegExp m_contextHunkHeader1;
+ TQRegExp m_contextHunkHeader2;
+ TQRegExp m_contextHunkHeader3;
- QRegExp m_contextHunkBodyRemoved;
- QRegExp m_contextHunkBodyAdded;
- QRegExp m_contextHunkBodyChanged;
- QRegExp m_contextHunkBodyContext;
- QRegExp m_contextHunkBodyLine; // Added for convenience
+ TQRegExp m_contextHunkBodyRemoved;
+ TQRegExp m_contextHunkBodyAdded;
+ TQRegExp m_contextHunkBodyChanged;
+ TQRegExp m_contextHunkBodyContext;
+ TQRegExp m_contextHunkBodyLine; // Added for convenience
// Regexps for normal parsing
- QRegExp m_normalDiffHeader;
+ TQRegExp m_normalDiffHeader;
- QRegExp m_normalHunkHeaderAdded;
- QRegExp m_normalHunkHeaderRemoved;
- QRegExp m_normalHunkHeaderChanged;
+ TQRegExp m_normalHunkHeaderAdded;
+ TQRegExp m_normalHunkHeaderRemoved;
+ TQRegExp m_normalHunkHeaderChanged;
- QRegExp m_normalHunkBodyRemoved;
- QRegExp m_normalHunkBodyAdded;
- QRegExp m_normalHunkBodyDivider;
+ TQRegExp m_normalHunkBodyRemoved;
+ TQRegExp m_normalHunkBodyAdded;
+ TQRegExp m_normalHunkBodyDivider;
enum Difference::Type m_normalDiffType;
// RegExps for rcs parsing
- QRegExp m_rcsDiffHeader;
+ TQRegExp m_rcsDiffHeader;
// Regexps for unified parsing
- QRegExp m_unifiedDiffHeader1;
- QRegExp m_unifiedDiffHeader2;
+ TQRegExp m_unifiedDiffHeader1;
+ TQRegExp m_unifiedDiffHeader2;
- QRegExp m_unifiedHunkHeader;
+ TQRegExp m_unifiedHunkHeader;
- QRegExp m_unifiedHunkBodyAdded;
- QRegExp m_unifiedHunkBodyRemoved;
- QRegExp m_unifiedHunkBodyContext;
- QRegExp m_unifiedHunkBodyLine; // Added for convenience
+ TQRegExp m_unifiedHunkBodyAdded;
+ TQRegExp m_unifiedHunkBodyRemoved;
+ TQRegExp m_unifiedHunkBodyContext;
+ TQRegExp m_unifiedHunkBodyLine; // Added for convenience
protected:
- const QStringList& m_diffLines;
+ const TQStringList& m_diffLines;
DiffModel* m_currentModel;
DiffModelList* m_models;
- QStringList::ConstIterator m_diffIterator;
+ TQStringList::ConstIterator m_diffIterator;
bool m_singleFileDiff;
diff --git a/kompare/libdiff2/perforceparser.cpp b/kompare/libdiff2/perforceparser.cpp
index 907d88ff..0e0a2aef 100644
--- a/kompare/libdiff2/perforceparser.cpp
+++ b/kompare/libdiff2/perforceparser.cpp
@@ -15,7 +15,7 @@
**
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -23,7 +23,7 @@
using namespace Diff2;
-PerforceParser::PerforceParser( const KompareModelList* list, const QStringList& diff ) : ParserBase( list, diff )
+PerforceParser::PerforceParser( const KompareModelList* list, const TQStringList& diff ) : ParserBase( list, diff )
{
m_contextDiffHeader1.setPattern( "==== (.*) - (.*) ====\\n" );
m_contextDiffHeader1.setMinimal( true );
@@ -43,13 +43,13 @@ enum Kompare::Format PerforceParser::determineFormat()
{
kdDebug(8101) << "Determining the format of the Perforce Diff" << endl;
- QRegExp unifiedRE( "^@@" );
- QRegExp contextRE( "^\\*{15}" );
- QRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
- QRegExp rcsRE ( "^[acd]\\d+ \\d+" );
+ TQRegExp unifiedRE( "^@@" );
+ TQRegExp contextRE( "^\\*{15}" );
+ TQRegExp normalRE ( "^\\d+(|,\\d+)[acd]\\d+(|,\\d+)" );
+ TQRegExp rcsRE ( "^[acd]\\d+ \\d+" );
// Summary is not supported since it gives no useful parsable info
- QStringList::ConstIterator it = m_diffLines.begin();
+ TQStringList::ConstIterator it = m_diffLines.begin();
while( it != m_diffLines.end() )
{
@@ -84,10 +84,10 @@ bool PerforceParser::parseContextDiffHeader()
// kdDebug(8101) << "ParserBase::parseContextDiffHeader()" << endl;
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -128,10 +128,10 @@ bool PerforceParser::parseNormalDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
@@ -179,10 +179,10 @@ bool PerforceParser::parseUnifiedDiffHeader()
{
bool result = false;
- QStringList::ConstIterator itEnd = m_diffLines.end();
+ TQStringList::ConstIterator itEnd = m_diffLines.end();
- QRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
- QRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
+ TQRegExp sourceFileRE ( "([^\\#]+)#(\\d+)" );
+ TQRegExp destinationFileRE( "([^\\#]+)#(|\\d+)" );
while ( m_diffIterator != itEnd )
{
diff --git a/kompare/libdiff2/perforceparser.h b/kompare/libdiff2/perforceparser.h
index 99973167..9db8d5e1 100644
--- a/kompare/libdiff2/perforceparser.h
+++ b/kompare/libdiff2/perforceparser.h
@@ -26,7 +26,7 @@ namespace Diff2
class PerforceParser : public ParserBase
{
public:
- PerforceParser( const KompareModelList* list, const QStringList& diff );
+ PerforceParser( const KompareModelList* list, const TQStringList& diff );
virtual ~PerforceParser();
protected:
diff --git a/kompare/main.cpp b/kompare/main.cpp
index 00827c4d..4e776e9d 100644
--- a/kompare/main.cpp
+++ b/kompare/main.cpp
@@ -186,7 +186,7 @@ int main(int argc, char *argv[])
dialog->setFirstGroupBoxTitle( i18n( "Source" ) );
dialog->setSecondGroupBoxTitle( i18n( "Destination" ) );
- KGuiItem compareGuiItem( i18n( "Compare" ), QString::null, i18n( "Compare these files or folder" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
+ KGuiItem compareGuiItem( i18n( "Compare" ), TQString::null, i18n( "Compare these files or folder" ), i18n( "If you have entered 2 filenames or 2 folders in the fields in this dialog then this button will be enabled and pressing it will start a comparison of the entered files or folders. " ) );
dialog->setButtonOK( compareGuiItem );
dialog->setGroup( "Recent Compare Files" );
@@ -194,7 +194,7 @@ int main(int argc, char *argv[])
dialog->setFirstURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
dialog->setSecondURLRequesterMode( KFile::File|KFile::Directory|KFile::ExistingOnly );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
ks = new KompareShell();
ks->show();
diff --git a/kprofilemethod/kprofilemethod.h b/kprofilemethod/kprofilemethod.h
index e4a9eedd..0e485a94 100644
--- a/kprofilemethod/kprofilemethod.h
+++ b/kprofilemethod/kprofilemethod.h
@@ -19,11 +19,11 @@
#ifndef KPROFILE_METHOD_H
#define KPROFILE_METHOD_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
/**
- * Those macros help profiling using QTime.
+ * Those macros help profiling using TQTime.
* They allow to sum up the time taken by a given bit of code
* in a method called several times.
* This way one can find out which low-level method used by a high-level
@@ -44,7 +44,7 @@
* PROFILE_METHOD_PRINT( pr_theMethod, "theMethod" );
*
*/
-#define PROFILE_METHOD_BEGIN(sym) extern int sym; QTime profile_dt##sym; profile_dt##sym.start();
+#define PROFILE_METHOD_BEGIN(sym) extern int sym; TQTime profile_dt##sym; profile_dt##sym.start();
#define PROFILE_METHOD_END(sym) extern int sym; sym += profile_dt##sym.elapsed();
#define PROFILE_METHOD_PRINT(sym, name) extern int sym; kdDebug() << name << " took " << sym << " milliseconds" << endl;
diff --git a/kspy/classinfoview.cpp b/kspy/classinfoview.cpp
index 1b976cfa..b8b12167 100644
--- a/kspy/classinfoview.cpp
+++ b/kspy/classinfoview.cpp
@@ -15,17 +15,17 @@
* *
***************************************************************************/
-#include <qobjectdict.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
-#include <qvariant.h>
+#include <tqobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
#include <klocale.h>
#include "classinfoview.h"
-ClassInfoView::ClassInfoView(QWidget *parent, const char *name ) : KListView(parent,name)
+ClassInfoView::ClassInfoView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
@@ -39,9 +39,9 @@ ClassInfoView::~ClassInfoView()
{
}
-void ClassInfoView::buildList( QObject *o )
+void ClassInfoView::buildList( TQObject *o )
{
- QMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->metaObject();
for (int index = 0; index < mo->numClassInfo(true); index++) {
const QClassInfo * classInfo = mo->classInfo(index, true);
@@ -49,7 +49,7 @@ void ClassInfoView::buildList( QObject *o )
}
}
-void ClassInfoView::setTarget( QObject *o )
+void ClassInfoView::setTarget( TQObject *o )
{
clear();
buildList( o );
diff --git a/kspy/classinfoview.h b/kspy/classinfoview.h
index e8b4440b..eca9e719 100644
--- a/kspy/classinfoview.h
+++ b/kspy/classinfoview.h
@@ -18,7 +18,7 @@
#ifndef CLASSINFOVIEW_H
#define CLASSINFOVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
/**
@@ -28,13 +28,13 @@
class ClassInfoView : public KListView {
Q_OBJECT
public:
- ClassInfoView(QWidget *parent=0, const char *name=0);
+ ClassInfoView(TQWidget *parent=0, const char *name=0);
~ClassInfoView();
- void buildList( QObject *o );
+ void buildList( TQObject *o );
public slots:
- void setTarget( QObject * );
+ void setTarget( TQObject * );
};
#endif
diff --git a/kspy/kspy.h b/kspy/kspy.h
index e2878125..007c0d10 100644
--- a/kspy/kspy.h
+++ b/kspy/kspy.h
@@ -6,7 +6,7 @@
#include <klibloader.h>
/**
- * Loader for the QObject debugging tool. The usage is simple, just call
+ * Loader for the TQObject debugging tool. The usage is simple, just call
* KSpy::invoke(), then use the spy window to examine the state of your
* QObjects.
*
diff --git a/kspy/navview.cpp b/kspy/navview.cpp
index 8f6afc8e..338922d5 100644
--- a/kspy/navview.cpp
+++ b/kspy/navview.cpp
@@ -15,15 +15,15 @@
* *
***************************************************************************/
-#include <qobjectlist.h>
-#include <qobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqobjectdict.h>
#include <klocale.h>
#include "navview.h"
#include "navviewitem.h"
-NavView::NavView(QWidget *parent, const char *name ) : KListView(parent,name)
+NavView::NavView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Name" ) );
addColumn( i18n( "Type" ) );
@@ -32,8 +32,8 @@ NavView::NavView(QWidget *parent, const char *name ) : KListView(parent,name)
setAllColumnsShowFocus( true );
setFullWidth( true );
- connect( this, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( selectItem( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( selectItem( TQListViewItem * ) ) );
}
NavView::~NavView(){
@@ -41,10 +41,10 @@ NavView::~NavView(){
void NavView::buildTree()
{
- const QObjectList *roots = QObject::objectTrees();
- QObjectListIt it( *roots );
+ const TQObjectList *roots = TQObject::objectTrees();
+ TQObjectListIt it( *roots );
- QObject * obj;
+ TQObject * obj;
while ( (obj = it.current()) != 0 ) {
++it;
NavViewItem *item = new NavViewItem( this, obj );
@@ -54,8 +54,8 @@ void NavView::buildTree()
void NavView::expandVisibleTree()
{
- QListViewItemIterator it( this, QListViewItemIterator::Visible |
- QListViewItemIterator::Expandable );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Visible |
+ TQListViewItemIterator::Expandable );
while ( it.current() ) {
setOpen( *it, true );
@@ -63,7 +63,7 @@ void NavView::expandVisibleTree()
}
}
-void NavView::selectItem( QListViewItem *item )
+void NavView::selectItem( TQListViewItem *item )
{
NavViewItem *navItem = static_cast<NavViewItem*>( item );
@@ -72,12 +72,12 @@ void NavView::selectItem( QListViewItem *item )
void NavView::createSubTree( NavViewItem *parent )
{
- const QObjectList *kids = parent->data->children();
+ const TQObjectList *kids = parent->data->children();
if ( !kids )
return;
- QObject * obj;
- QObjectListIt it( *kids );
+ TQObject * obj;
+ TQObjectListIt it( *kids );
while ( (obj=it.current()) != 0 ) {
++it;
NavViewItem *item = new NavViewItem( parent, obj );
diff --git a/kspy/navview.h b/kspy/navview.h
index 326f7790..947c3572 100644
--- a/kspy/navview.h
+++ b/kspy/navview.h
@@ -18,7 +18,7 @@
#ifndef NAVVIEW_H
#define NAVVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
class NavViewItem;
@@ -31,7 +31,7 @@ class NavView : public KListView
Q_OBJECT
public:
- NavView( QWidget *parent = 0, const char *name = 0 );
+ NavView( TQWidget *parent = 0, const char *name = 0 );
~NavView();
/**
@@ -45,10 +45,10 @@ class NavView : public KListView
void expandVisibleTree();
signals:
- void selected( QObject *object );
+ void selected( TQObject *object );
protected slots:
- void selectItem( QListViewItem *item );
+ void selectItem( TQListViewItem *item );
private:
void createSubTree( NavViewItem* );
diff --git a/kspy/navviewitem.cpp b/kspy/navviewitem.cpp
index de372b4f..641332ac 100644
--- a/kspy/navviewitem.cpp
+++ b/kspy/navviewitem.cpp
@@ -15,19 +15,19 @@
* *
***************************************************************************/
-#include <qobject.h>
+#include <tqobject.h>
#include "navview.h"
#include "navviewitem.h"
-NavViewItem::NavViewItem(NavView *parent, QObject *obj )
+NavViewItem::NavViewItem(NavView *parent, TQObject *obj )
: KListViewItem(parent, obj->name(), obj->className() )
{
data = obj;
setExpandable( true );
}
-NavViewItem::NavViewItem(NavViewItem *parent, QObject *obj )
+NavViewItem::NavViewItem(NavViewItem *parent, TQObject *obj )
: KListViewItem(parent, obj->name(), obj->className() )
{
data = obj;
diff --git a/kspy/navviewitem.h b/kspy/navviewitem.h
index 35a66c07..d9b7ba23 100644
--- a/kspy/navviewitem.h
+++ b/kspy/navviewitem.h
@@ -18,7 +18,7 @@
#ifndef NAVVIEWITEM_H
#define NAVVIEWITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
class NavView;
@@ -28,11 +28,11 @@ class NavView;
class NavViewItem : public KListViewItem {
public:
- NavViewItem(NavView *parent, QObject *item );
- NavViewItem(NavViewItem *parent, QObject *item );
+ NavViewItem(NavView *parent, TQObject *item );
+ NavViewItem(NavViewItem *parent, TQObject *item );
~NavViewItem();
- QObject *data;
+ TQObject *data;
};
#endif
diff --git a/kspy/propsview.cpp b/kspy/propsview.cpp
index 12b855c0..50f60bed 100644
--- a/kspy/propsview.cpp
+++ b/kspy/propsview.cpp
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qobjectdict.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
-#include <qvariant.h>
-#include <qcursor.h>
+#include <tqobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
#include <klocale.h>
@@ -29,26 +29,26 @@
class KSpyItem : KListViewItem
{
public:
- KSpyItem( QListView * parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null, QString label5 = QString::null, QString label6 = QString::null )
+ KSpyItem( TQListView * parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null, TQString label5 = TQString::null, TQString label6 = TQString::null )
: KListViewItem(parent, label1, label2, label3, label4, label5, label6)
{
}
protected:
- void paintCell( QPainter * p, const QColorGroup & cg,
+ void paintCell( TQPainter * p, const TQColorGroup & cg,
int column, int width, int alignment )
{
- if (column == 1 && text(2) == "QColor") {
- QColorGroup color_cg( cg.foreground(), cg.background(),
+ if (column == 1 && text(2) == "TQColor") {
+ TQColorGroup color_cg( cg.foreground(), cg.background(),
cg.light(), cg.dark(), cg.mid(),
- QColor(text(1)), QColor(text(1)) );
- QListViewItem::paintCell(p, color_cg, column, width, alignment);
+ TQColor(text(1)), TQColor(text(1)) );
+ TQListViewItem::paintCell(p, color_cg, column, width, alignment);
} else {
KListViewItem::paintCell(p, cg, column, width, alignment);
}
}
};
-PropsView::PropsView(QWidget *parent, const char *name ) : KListView(parent,name)
+PropsView::PropsView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Name" ) );
addColumn( i18n( "Value" ) );
@@ -67,41 +67,41 @@ PropsView::~PropsView()
{
}
-void PropsView::buildList( QObject *o )
+void PropsView::buildList( TQObject *o )
{
- QMetaObject *mo = o->metaObject();
- QStrList names = mo->propertyNames( true );
+ TQMetaObject *mo = o->metaObject();
+ TQStrList names = mo->propertyNames( true );
for ( uint i = 0; i < names.count(); i++ ) {
char *prop = names.at( i );
- QVariant v = o->property( prop );
- const QMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
+ TQVariant v = o->property( prop );
+ const TQMetaProperty *mp = mo->property( mo->findProperty(prop, true), true );
- QString val( "????" );
+ TQString val( "????" );
switch( v.type() ) {
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
val = v.toString();
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
val = ( v.toBool() ? "True" : "False" );
break;
- case QVariant::Color:
+ case TQVariant::Color:
{
- QColor c = v.toColor();
+ TQColor c = v.toColor();
val = c.name();
break;
}
- case QVariant::Cursor:
+ case TQVariant::Cursor:
{
- QCursor c = v.toCursor();
- val = QString("shape=%1").arg(c.shape());
+ TQCursor c = v.toCursor();
+ val = TQString("shape=%1").arg(c.shape());
break;
}
- case QVariant::Font:
+ case TQVariant::Font:
{
- QFont f = v.toFont();
- val = QString("family=%1, pointSize=%2, weight=%3, italic=%4, bold=%5, underline=%6, strikeOut=%7")
+ TQFont f = v.toFont();
+ val = TQString("family=%1, pointSize=%2, weight=%3, italic=%4, bold=%5, underline=%6, strikeOut=%7")
.arg(f.family())
.arg(f.pointSize())
.arg(f.weight())
@@ -111,61 +111,61 @@ void PropsView::buildList( QObject *o )
.arg(f.strikeOut());
break;
}
- case QVariant::Int:
+ case TQVariant::Int:
val.setNum( v.toInt() );
if (mp->isEnumType()) {
- QMetaObject * metaObject = *(mp->meta);
- val = QString("%1::%2").arg(metaObject->className()).arg(mp->valueToKey(val.toInt()));
+ TQMetaObject * metaObject = *(mp->meta);
+ val = TQString("%1::%2").arg(metaObject->className()).arg(mp->valueToKey(val.toInt()));
}
break;
- case QVariant::Point:
+ case TQVariant::Point:
{
- QPoint p = v.toPoint();
- val = QString("x=%1, y=%2").arg(p.x()).arg(p.y());
+ TQPoint p = v.toPoint();
+ val = TQString("x=%1, y=%2").arg(p.x()).arg(p.y());
break;
}
- case QVariant::Rect:
+ case TQVariant::Rect:
{
- QRect r = v.toRect();
- val = QString("left=%1, right=%2, top=%3, bottom=%4")
+ TQRect r = v.toRect();
+ val = TQString("left=%1, right=%2, top=%3, bottom=%4")
.arg(r.left())
.arg(r.right())
.arg(r.top())
.arg(r.bottom());
break;
}
- case QVariant::Size:
+ case TQVariant::Size:
{
- QSize s = v.toSize();
- val = QString("width=%1, height=%2").arg(s.width()).arg(s.height());
+ TQSize s = v.toSize();
+ val = TQString("width=%1, height=%2").arg(s.width()).arg(s.height());
break;
}
- case QVariant::SizePolicy:
+ case TQVariant::SizePolicy:
{
- QSizePolicy s = v.toSizePolicy();
- val = QString("horData=%1, verData=%2").arg(s.horData()).arg(s.verData());
+ TQSizePolicy s = v.toSizePolicy();
+ val = TQString("horData=%1, verData=%2").arg(s.horData()).arg(s.verData());
break;
}
- case QVariant::Double:
+ case TQVariant::Double:
val.setNum( v.toDouble() );
break;
default:
break;
}
- QString ro("R/O");
- QString rw("R/W");
- QString st("Set");
- QString et("Enum");
- QString yes("Yes");
- QString no("No");
+ TQString ro("R/O");
+ TQString rw("R/W");
+ TQString st("Set");
+ TQString et("Enum");
+ TQString yes("Yes");
+ TQString no("No");
- QString writable = ( mp->writable() ? rw : ro );
- QString setType = ( mp->isSetType() ? st : QString::null );
- QString enumType = ( mp->isEnumType() ? et : QString::null );
- QString designable = ( mp->designable(o) ? yes : no );
+ TQString writable = ( mp->writable() ? rw : ro );
+ TQString setType = ( mp->isSetType() ? st : TQString::null );
+ TQString enumType = ( mp->isEnumType() ? et : TQString::null );
+ TQString designable = ( mp->designable(o) ? yes : no );
- QString flags;
+ TQString flags;
bool first = true;
if ( !setType.isNull() ) {
if ( first )
@@ -188,7 +188,7 @@ void PropsView::buildList( QObject *o )
}
}
-void PropsView::setTarget( QObject *o )
+void PropsView::setTarget( TQObject *o )
{
clear();
buildList( o );
diff --git a/kspy/propsview.h b/kspy/propsview.h
index 62eb5e8d..3d0afe80 100644
--- a/kspy/propsview.h
+++ b/kspy/propsview.h
@@ -18,7 +18,7 @@
#ifndef PROPSVIEW_H
#define PROPSVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
/**
@@ -28,13 +28,13 @@
class PropsView : public KListView {
Q_OBJECT
public:
- PropsView(QWidget *parent=0, const char *name=0);
+ PropsView(TQWidget *parent=0, const char *name=0);
~PropsView();
- void buildList( QObject *o );
+ void buildList( TQObject *o );
public slots:
- void setTarget( QObject * );
+ void setTarget( TQObject * );
};
#endif
diff --git a/kspy/receiversview.cpp b/kspy/receiversview.cpp
index e1da1127..36582640 100644
--- a/kspy/receiversview.cpp
+++ b/kspy/receiversview.cpp
@@ -15,23 +15,23 @@
* *
***************************************************************************/
-#include <qobjectdict.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
-#include <qvariant.h>
-#include <qsignalslotimp.h>
+#include <tqobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
+#include <tqsignalslotimp.h>
#include <klocale.h>
#include "receiversview.h"
-class UnencapsulatedQObject : public QObject {
+class UnencapsulatedQObject : public TQObject {
public:
- QConnectionList *public_receivers(int signal) const { return receivers(signal); }
+ TQConnectionList *public_receivers(int signal) const { return receivers(signal); }
};
-ReceiversView::ReceiversView(QWidget *parent, const char *name ) : KListView(parent,name)
+ReceiversView::ReceiversView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Object" ) );
addColumn( i18n( "Type" ) );
@@ -46,19 +46,19 @@ ReceiversView::~ReceiversView()
{
}
-void ReceiversView::buildList( QObject *o )
+void ReceiversView::buildList( TQObject *o )
{
- QMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->metaObject();
UnencapsulatedQObject * qobject = (UnencapsulatedQObject *) o;
- QStrList signalNames = mo->signalNames(true);
+ TQStrList signalNames = mo->signalNames(true);
for (int sig = 0; sig < mo->numSignals(true); sig++) {
- QConnectionList * clist = qobject->public_receivers(sig);
+ TQConnectionList * clist = qobject->public_receivers(sig);
if (clist != 0) {
KListViewItem *conn = new KListViewItem( this, signalNames.at(sig) );
- for ( QConnection * connection = clist->first();
+ for ( TQConnection * connection = clist->first();
connection != 0;
connection = clist->next() )
{
@@ -71,7 +71,7 @@ void ReceiversView::buildList( QObject *o )
}
}
-void ReceiversView::setTarget( QObject *o )
+void ReceiversView::setTarget( TQObject *o )
{
clear();
buildList( o );
diff --git a/kspy/receiversview.h b/kspy/receiversview.h
index 31768883..b654687a 100644
--- a/kspy/receiversview.h
+++ b/kspy/receiversview.h
@@ -18,7 +18,7 @@
#ifndef RECEIVERSVIEW_H
#define RECEIVERSVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
/**
@@ -28,13 +28,13 @@
class ReceiversView : public KListView {
Q_OBJECT
public:
- ReceiversView(QWidget *parent=0, const char *name=0);
+ ReceiversView(TQWidget *parent=0, const char *name=0);
~ReceiversView();
- void buildList( QObject *o );
+ void buildList( TQObject *o );
public slots:
- void setTarget( QObject * );
+ void setTarget( TQObject * );
};
#endif
diff --git a/kspy/sigslotview.cpp b/kspy/sigslotview.cpp
index 2e04cfa7..d6fdba24 100644
--- a/kspy/sigslotview.cpp
+++ b/kspy/sigslotview.cpp
@@ -15,17 +15,17 @@
* *
***************************************************************************/
-#include <qobjectdict.h>
-#include <qobjectlist.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
-#include <qvariant.h>
+#include <tqobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
+#include <tqvariant.h>
#include <klocale.h>
#include "sigslotview.h"
-SigSlotView::SigSlotView(QWidget *parent, const char *name ) : KListView(parent,name)
+SigSlotView::SigSlotView(TQWidget *parent, const char *name ) : KListView(parent,name)
{
addColumn( i18n( "Signals/Slots" ) );
@@ -38,13 +38,13 @@ SigSlotView::~SigSlotView()
{
}
-void SigSlotView::buildList( QObject *o )
+void SigSlotView::buildList( TQObject *o )
{
- QMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->metaObject();
KListViewItem *sigs = new KListViewItem( this, "Signals" );
- QStrList sigList = mo->signalNames( true );
- QStrListIterator sigIt( sigList );
+ TQStrList sigList = mo->signalNames( true );
+ TQStrListIterator sigIt( sigList );
char *si;
while ( (si=sigIt.current()) != 0 ) {
++sigIt;
@@ -52,8 +52,8 @@ void SigSlotView::buildList( QObject *o )
}
KListViewItem *slts = new KListViewItem( this, "Slots" );
- QStrList sltList = mo->slotNames( true );
- QStrListIterator sltIt( sltList );
+ TQStrList sltList = mo->slotNames( true );
+ TQStrListIterator sltIt( sltList );
char *sl;
while ( (sl=sltIt.current()) != 0 ) {
++sltIt;
@@ -64,7 +64,7 @@ void SigSlotView::buildList( QObject *o )
setOpen( slts, false );
}
-void SigSlotView::setTarget( QObject *o )
+void SigSlotView::setTarget( TQObject *o )
{
clear();
buildList( o );
diff --git a/kspy/sigslotview.h b/kspy/sigslotview.h
index 86138fd1..723069cc 100644
--- a/kspy/sigslotview.h
+++ b/kspy/sigslotview.h
@@ -18,7 +18,7 @@
#ifndef SIGSLOTVIEW_H
#define SIGSLOTVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
/**
@@ -28,13 +28,13 @@
class SigSlotView : public KListView {
Q_OBJECT
public:
- SigSlotView(QWidget *parent=0, const char *name=0);
+ SigSlotView(TQWidget *parent=0, const char *name=0);
~SigSlotView();
- void buildList( QObject *o );
+ void buildList( TQObject *o );
public slots:
- void setTarget( QObject * );
+ void setTarget( TQObject * );
};
#endif
diff --git a/kspy/spy.cpp b/kspy/spy.cpp
index 341f5b62..3aa18be4 100644
--- a/kspy/spy.cpp
+++ b/kspy/spy.cpp
@@ -18,12 +18,12 @@
#include <klistviewsearchline.h>
#include <klocale.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qsplitter.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqsplitter.h>
#include <ktabwidget.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include "navview.h"
#include "propsview.h"
@@ -44,15 +44,15 @@ extern "C"
}
}
-Spy::Spy( QWidget *parent, const char *name )
- : QWidget( parent, name )
+Spy::Spy( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
- QVBoxLayout *layout = new QVBoxLayout( this, 11, 6 );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 11, 6 );
- QSplitter *div = new QSplitter( this );
+ TQSplitter *div = new TQSplitter( this );
layout->addWidget( div );
- QVBox *leftPane = new QVBox( div );
+ TQVBox *leftPane = new TQVBox( div );
KListViewSearchLine *searchLine = new KListViewSearchLine( leftPane, "search line" );
mNavView = new NavView( leftPane, "navigation view" );
@@ -74,14 +74,14 @@ Spy::Spy( QWidget *parent, const char *name )
mNavView->buildTree();
- connect( mNavView, SIGNAL( selected( QObject * ) ),
- mPropsView, SLOT( setTarget( QObject * ) ) );
- connect( mNavView, SIGNAL( selected( QObject * ) ),
- mSigSlotView, SLOT( setTarget( QObject * ) ) );
- connect( mNavView, SIGNAL( selected( QObject * ) ),
- mReceiversView, SLOT( setTarget( QObject * ) ) );
- connect( mNavView, SIGNAL( selected( QObject * ) ),
- mClassInfoView, SLOT( setTarget( QObject * ) ) );
+ connect( mNavView, TQT_SIGNAL( selected( TQObject * ) ),
+ mPropsView, TQT_SLOT( setTarget( TQObject * ) ) );
+ connect( mNavView, TQT_SIGNAL( selected( TQObject * ) ),
+ mSigSlotView, TQT_SLOT( setTarget( TQObject * ) ) );
+ connect( mNavView, TQT_SIGNAL( selected( TQObject * ) ),
+ mReceiversView, TQT_SLOT( setTarget( TQObject * ) ) );
+ connect( mNavView, TQT_SIGNAL( selected( TQObject * ) ),
+ mClassInfoView, TQT_SLOT( setTarget( TQObject * ) ) );
}
Spy::~Spy()
@@ -89,7 +89,7 @@ Spy::~Spy()
}
-void Spy::setTarget( QWidget *target )
+void Spy::setTarget( TQWidget *target )
{
mTarget = target;
mPropsView->buildList( mTarget );
@@ -98,14 +98,14 @@ void Spy::setTarget( QWidget *target )
mClassInfoView->buildList( mTarget );
}
-void Spy::keyPressEvent( QKeyEvent *event )
+void Spy::keyPressEvent( TQKeyEvent *event )
{
if ( event->key() == Qt::Key_Up ) {
event->accept();
- QApplication::postEvent( mNavView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
+ TQApplication::postEvent( mNavView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) );
} else if ( event->key() == Qt::Key_Down ) {
event->accept();
- QApplication::postEvent( mNavView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
+ TQApplication::postEvent( mNavView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) );
} else if ( event->key() == Qt::Key_Return ) {
event->accept();
mNavView->expandVisibleTree();
diff --git a/kspy/spy.h b/kspy/spy.h
index 61d80162..09f68ac4 100644
--- a/kspy/spy.h
+++ b/kspy/spy.h
@@ -23,7 +23,7 @@
#endif
#include <kapplication.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class NavView;
class PropsView;
@@ -39,16 +39,16 @@ class Spy : public QWidget
Q_OBJECT
public:
- Spy( QWidget *parent = 0, const char *name = 0 );
+ Spy( TQWidget *parent = 0, const char *name = 0 );
~Spy();
- void setTarget( QWidget *target );
+ void setTarget( TQWidget *target );
protected:
- virtual void keyPressEvent( QKeyEvent* );
+ virtual void keyPressEvent( TQKeyEvent* );
private:
- QWidget *mTarget;
+ TQWidget *mTarget;
PropsView *mPropsView;
SigSlotView *mSigSlotView;
ReceiversView *mReceiversView;
diff --git a/kstartperf/kstartperf.cpp b/kstartperf/kstartperf.cpp
index 3f029b62..80655dac 100644
--- a/kstartperf/kstartperf.cpp
+++ b/kstartperf/kstartperf.cpp
@@ -15,9 +15,9 @@
#include <errno.h>
#include <sys/time.h>
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kaboutdata.h>
@@ -33,20 +33,20 @@ static KCmdLineOptions options[] =
};
-QString libkstartperf()
+TQString libkstartperf()
{
- QString lib = QString::null;
- QString la_file = locate("lib", "libkstartperf.la");
+ TQString lib = TQString::null;
+ TQString la_file = locate("lib", "libkstartperf.la");
if (la_file.isEmpty())
return lib;
// Find the name of the .so file by reading the .la file
- QFile la(la_file);
+ TQFile la(la_file);
if (la.open(IO_ReadOnly))
{
- QTextStream is(&la);
- QString line;
+ TQTextStream is(&la);
+ TQString line;
while (!is.atEnd())
{
diff --git a/kuiviewer/kuiviewer.cpp b/kuiviewer/kuiviewer.cpp
index 91c54b9f..fab228b7 100644
--- a/kuiviewer/kuiviewer.cpp
+++ b/kuiviewer/kuiviewer.cpp
@@ -26,9 +26,9 @@
#include <kdebug.h>
-#include <qobjectlist.h>
-#include <qdockwindow.h>
-#include <qpixmap.h>
+#include <tqobjectlist.h>
+#include <tqdockwindow.h>
+#include <tqpixmap.h>
#include <kurl.h>
@@ -97,8 +97,8 @@ void KUIViewer::load(const KURL& url)
void KUIViewer::setupActions()
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
}
void KUIViewer::saveProperties(KConfig* /*config*/)
@@ -122,7 +122,7 @@ void KUIViewer::fileOpen()
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
KURL file_name =
- KFileDialog::getOpenURL( QString::null, i18n("*.ui *.UI|User Interface Files"), this );
+ KFileDialog::getOpenURL( TQString::null, i18n("*.ui *.UI|User Interface Files"), this );
if (file_name.isEmpty() == false)
{
@@ -145,7 +145,7 @@ void KUIViewer::fileOpen()
}
}
-void KUIViewer::takeScreenshot(const QCString &filename, int w, int h){
+void KUIViewer::takeScreenshot(const TQCString &filename, int w, int h){
if(!m_part)
return;
showMinimized();
@@ -157,9 +157,9 @@ void KUIViewer::takeScreenshot(const QCString &filename, int w, int h){
// resize app to be as large as desired size
adjustSize();
// Disable the saving of the size
- setAutoSaveSettings(QString::fromLatin1("MainWindow"), false);
+ setAutoSaveSettings(TQString::fromLatin1("MainWindow"), false);
}
- QPixmap pixmap = QPixmap::grabWidget( m_part->widget() );
+ TQPixmap pixmap = TQPixmap::grabWidget( m_part->widget() );
pixmap.save( filename, "PNG" );
}
diff --git a/kuiviewer/kuiviewer.h b/kuiviewer/kuiviewer.h
index 76c9ba49..9ae71b37 100644
--- a/kuiviewer/kuiviewer.h
+++ b/kuiviewer/kuiviewer.h
@@ -71,7 +71,7 @@ public:
* @param h height of image
* @param w width of image
*/
- void takeScreenshot(const QCString &filename, int h=-1, int w=-1);
+ void takeScreenshot(const TQCString &filename, int h=-1, int w=-1);
protected:
/**
diff --git a/kuiviewer/kuiviewer_part.cpp b/kuiviewer/kuiviewer_part.cpp
index b799c042..e4a87a45 100644
--- a/kuiviewer/kuiviewer_part.cpp
+++ b/kuiviewer/kuiviewer_part.cpp
@@ -34,26 +34,26 @@
#include <kparts/genericfactory.h>
#include <kstdaction.h>
#include <kstyle.h>
-#include <qmetaobject.h>
-
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qfile.h>
-#include <qobjectlist.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qstylefactory.h>
-#include <qvariant.h>
-#include <qvbox.h>
-#include <qvariant.h>
-#include <qwidgetfactory.h>
+#include <tqmetaobject.h>
+
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqfile.h>
+#include <tqobjectlist.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqstylefactory.h>
+#include <tqvariant.h>
+#include <tqvbox.h>
+#include <tqvariant.h>
+#include <tqwidgetfactory.h>
typedef KParts::GenericFactory<KUIViewerPart> KUIViewerPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkuiviewerpart, KUIViewerPartFactory )
-KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*args*/ )
+KUIViewerPart::KUIViewerPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*args*/ )
: KParts::ReadOnlyPart(parent, name)
{
// we need an instance
@@ -62,7 +62,7 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
KGlobal::locale()->insertCatalogue("kuiviewer");
// this should be your custom internal widget
- m_widget = new QVBox( parentWidget, widgetName );
+ m_widget = new TQVBox( parentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
@@ -73,20 +73,20 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
m_style = new KListAction( i18n("Style"),
CTRL + Key_S,
this,
- SLOT(slotStyle(int)),
+ TQT_SLOT(slotStyle(int)),
actionCollection(),
"change_style");
m_style->setEditable(false);
kapp->config()->setGroup("General");
- const QString currentStyle = kapp->config()->readEntry("currentWidgetStyle", KStyle::defaultStyle());
+ const TQString currentStyle = kapp->config()->readEntry("currentWidgetStyle", KStyle::defaultStyle());
- const QStringList styles = QStyleFactory::keys();
+ const TQStringList styles = TQStyleFactory::keys();
m_style->setItems(styles);
m_style->setCurrentItem(0);
- QStringList::ConstIterator it = styles.begin();
- QStringList::ConstIterator end = styles.end();
+ TQStringList::ConstIterator it = styles.begin();
+ TQStringList::ConstIterator end = styles.end();
int idx = 0;
for (; it != end; ++it, ++idx) {
if ((*it).lower() == currentStyle.lower()) {
@@ -97,14 +97,14 @@ KUIViewerPart::KUIViewerPart( QWidget *parentWidget, const char *widgetName,
m_style->setToolTip(i18n("Set the current style to view."));
m_style->setMenuAccelsEnabled(true);
- m_copy = KStdAction::copy(this, SLOT(slotGrab()), actionCollection());
+ m_copy = KStdAction::copy(this, TQT_SLOT(slotGrab()), actionCollection());
updateActions();
// Commented out to fix warning (rich)
// slot should probably be called saveAs() for consistency with
// KParts::ReadWritePart BTW.
-// KStdAction::saveAs(this, SLOT(slotSave()), actionCollection());
+// KStdAction::saveAs(this, TQT_SLOT(slotSave()), actionCollection());
}
KUIViewerPart::~KUIViewerPart()
@@ -126,13 +126,13 @@ KAboutData *KUIViewerPart::createAboutData()
bool KUIViewerPart::openFile()
{
- // m_file is always local so we can use QFile on it
- QFile file( m_file );
+ // m_file is always local so we can use TQFile on it
+ TQFile file( m_file );
if ( !file.open(IO_ReadOnly) )
return false;
delete m_view;
- m_view = QWidgetFactory::create( &file, 0, m_widget );
+ m_view = TQWidgetFactory::create( &file, 0, m_widget );
file.close();
updateActions();
@@ -152,7 +152,7 @@ bool KUIViewerPart::openURL( const KURL& url)
emit setWindowCaption( url.prettyURL() );
m_url = url;
- m_file = QString::null;
+ m_file = TQString::null;
if (KIO::NetAccess::download(url, m_file))
return openFile();
else
@@ -178,20 +178,20 @@ void KUIViewerPart::slotStyle(int)
return;
}
- QString styleName = m_style->currentText();
- QStyle* style = QStyleFactory::create(styleName);
+ TQString styleName = m_style->currentText();
+ TQStyle* style = TQStyleFactory::create(styleName);
kdDebug() << "Change style..." << endl;
m_widget->hide();
- QApplication::setOverrideCursor( WaitCursor );
+ TQApplication::setOverrideCursor( WaitCursor );
m_widget->setStyle( style);
- QObjectList *l = m_widget->queryList( "QWidget" );
- for ( QObject *o = l->first(); o; o = l->next() )
- ( static_cast<QWidget *>(o) )->setStyle( style );
+ TQObjectList *l = m_widget->queryList( "TQWidget" );
+ for ( TQObject *o = l->first(); o; o = l->next() )
+ ( static_cast<TQWidget *>(o) )->setStyle( style );
delete l;
m_widget->show();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kapp->config()->setGroup("General");
kapp->config()->writeEntry("currentWidgetStyle", m_style->currentText());
@@ -205,7 +205,7 @@ void KUIViewerPart::slotGrab()
return;
}
- QClipboard *clipboard = QApplication::clipboard();
- clipboard->setPixmap(QPixmap::grabWidget(m_widget));
+ QClipboard *clipboard = TQApplication::clipboard();
+ clipboard->setPixmap(TQPixmap::grabWidget(m_widget));
}
diff --git a/kuiviewer/kuiviewer_part.h b/kuiviewer/kuiviewer_part.h
index 92901985..38f7600d 100644
--- a/kuiviewer/kuiviewer_part.h
+++ b/kuiviewer/kuiviewer_part.h
@@ -22,7 +22,7 @@
#ifndef KUIVIEWERPART_H
#define KUIVIEWERPART_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kparts/part.h>
class QWidget;
@@ -47,8 +47,8 @@ public:
/**
* Default constructor
*/
- KUIViewerPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList &args);
+ KUIViewerPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList &args);
/**
* Destructor
@@ -70,8 +70,8 @@ protected:
virtual bool openFile();
private:
- QVBox *m_widget;
- QGuardedPtr<QWidget> m_view;
+ TQVBox *m_widget;
+ TQGuardedPtr<TQWidget> m_view;
KListAction *m_style;
KAction *m_copy;
};
diff --git a/kuiviewer/main.cpp b/kuiviewer/main.cpp
index 94391c75..b0349058 100644
--- a/kuiviewer/main.cpp
+++ b/kuiviewer/main.cpp
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
if (args->isSet("takescreenshot")){
widget->takeScreenshot(args->getOption("takescreenshot"),
- QString(args->getOption("screenshotwidth")).toInt(),
- QString(args->getOption("screenshotheight")).toInt());
+ TQString(args->getOption("screenshotwidth")).toInt(),
+ TQString(args->getOption("screenshotheight")).toInt());
return 0;
}
widget->show();
diff --git a/kuiviewer/quicreator.cpp b/kuiviewer/quicreator.cpp
index 19da4b29..0dc6da3e 100644
--- a/kuiviewer/quicreator.cpp
+++ b/kuiviewer/quicreator.cpp
@@ -24,9 +24,9 @@
#include <config.h>
#endif
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qwidgetfactory.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqwidgetfactory.h>
#include "quicreator.h"
@@ -40,14 +40,14 @@ extern "C"
}
}
-bool QUICreator::create(const QString &path, int width, int height, QImage &
+bool QUICreator::create(const TQString &path, int width, int height, TQImage &
img)
{
- QWidget *w = QWidgetFactory::create(path, 0, 0);
+ TQWidget *w = TQWidgetFactory::create(path, 0, 0);
if ( w )
{
- QPixmap p = QPixmap::grabWidget(w);
- img = p.convertToImage().smoothScale(width,height,QImage::ScaleMin);
+ TQPixmap p = TQPixmap::grabWidget(w);
+ img = p.convertToImage().smoothScale(width,height,TQImage::ScaleMin);
return true;
}
else
diff --git a/kuiviewer/quicreator.h b/kuiviewer/quicreator.h
index c1139357..45f13f07 100644
--- a/kuiviewer/quicreator.h
+++ b/kuiviewer/quicreator.h
@@ -28,7 +28,7 @@ class QUICreator : public ThumbCreator
{
public:
QUICreator() {};
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kunittest/dcopinterface.h b/kunittest/dcopinterface.h
index e18c0d5a..50f15d3d 100644
--- a/kunittest/dcopinterface.h
+++ b/kunittest/dcopinterface.h
@@ -21,7 +21,7 @@
#define KUNITTEST_DCOPINTERFACE_H
#include <dcopobject.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KUnitTest
{
@@ -30,8 +30,8 @@ namespace KUnitTest
K_DCOP
k_dcop:
- virtual bool addDebugInfo(const QString &name, const QString &info) = 0;
- virtual bool addSlotDebugInfo(const QString &name, const QString &slt, const QString &info) = 0;
+ virtual bool addDebugInfo(const TQString &name, const TQString &info) = 0;
+ virtual bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info) = 0;
};
}
diff --git a/kunittest/example/module/sampleextra.cpp b/kunittest/example/module/sampleextra.cpp
index 38c49448..fa17aa6c 100644
--- a/kunittest/example/module/sampleextra.cpp
+++ b/kunittest/example/module/sampleextra.cpp
@@ -33,5 +33,5 @@ void SomeExtraTester::allTests()
{
kdDebug() << "Debug output belonging to SomeExtraTester." << endl;
- CHECK( QString("Extra") , QString("Extra") );
+ CHECK( TQString("Extra") , TQString("Extra") );
}
diff --git a/kunittest/example/module/samplemodule2.cpp b/kunittest/example/module/samplemodule2.cpp
index 87efde28..672ec08a 100644
--- a/kunittest/example/module/samplemodule2.cpp
+++ b/kunittest/example/module/samplemodule2.cpp
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -40,7 +40,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester )
void SimpleSampleTester::allTests()
{
kdDebug() << "Debug output belonging to SimpleSampleTester." << endl;
- CHECK( QString("SimpleSample") , QString("SimpleSample") );
+ CHECK( TQString("SimpleSample") , TQString("SimpleSample") );
// operator == is used, so this can't work...
//XFAIL( "SimpleSample" , "SampleSimple" );
@@ -55,7 +55,7 @@ void SomeSampleTester::allTests()
kdDebug() << "Checking operator precedences." << endl;
CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 );
- QStringList testList;
+ TQStringList testList;
testList << "one" << "two";
- CHECK( testList.count() , (QStringList::size_type) 2 );
+ CHECK( testList.count() , (TQStringList::size_type) 2 );
}
diff --git a/kunittest/example/module/sampletests.cpp b/kunittest/example/module/sampletests.cpp
index 3b253e55..89e7516a 100644
--- a/kunittest/example/module/sampletests.cpp
+++ b/kunittest/example/module/sampletests.cpp
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -35,7 +35,7 @@
void SlotSampleTester::setUp()
{
kdDebug() << "setUp" << endl;
- m_str = new QString("setUp str");
+ m_str = new TQString("setUp str");
}
void SlotSampleTester::tearDown()
@@ -56,7 +56,7 @@ void SlotSampleTester::testSlot()
CHECK( test() , true);
CHECK( "test" , "test");
kdDebug() << "Checking if m_str is initialized correctly." << endl;
- CHECK( *m_str , QString("setUp str") );
+ CHECK( *m_str , TQString("setUp str") );
}
void SlotSampleTester::testSlot2()
@@ -72,10 +72,10 @@ void SomeSampleTester::allTests()
kdDebug() << "Checking operator precedences." << endl;
CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 );
- QStringList testList;
+ TQStringList testList;
testList << "one" << "two";
- CHECK( testList.count() , (QStringList::size_type) 2 );
- CHECK( testList.count()*2 , (QStringList::size_type) 4 );
+ CHECK( testList.count() , (TQStringList::size_type) 2 );
+ CHECK( testList.count()*2 , (TQStringList::size_type) 4 );
}
#include "sampletests.moc"
diff --git a/kunittest/example/module/sampletests.h b/kunittest/example/module/sampletests.h
index 63ff6e44..3cd30211 100644
--- a/kunittest/example/module/sampletests.h
+++ b/kunittest/example/module/sampletests.h
@@ -41,7 +41,7 @@ public slots:
private:
bool test();
- QString *m_str;
+ TQString *m_str;
};
class SomeSampleTester : public KUnitTest::Tester
diff --git a/kunittest/example/simple/sampletest.cpp b/kunittest/example/simple/sampletest.cpp
index 32d97703..846d514f 100644
--- a/kunittest/example/simple/sampletest.cpp
+++ b/kunittest/example/simple/sampletest.cpp
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -39,7 +39,7 @@ KUNITTEST_REGISTER_TESTER(SomeSampleTester);
void SimpleSampleTester::allTests()
{
kdDebug() << "Debug output belonging to SimpleSampleTester." << endl;
- CHECK( QString("SimpleSample") , QString("SimpleSample") );
+ CHECK( TQString("SimpleSample") , TQString("SimpleSample") );
SKIP("Just curious how this 'skipping' works.");
}
@@ -49,7 +49,7 @@ void SomeSampleTester::allTests()
kdDebug() << "Checking operator precedences." << endl;
CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 );
- QStringList testList;
+ TQStringList testList;
testList << "one" << "two";
- CHECK( testList.count() , (QStringList::size_type) 2 );
+ CHECK( testList.count() , (TQStringList::size_type) 2 );
}
diff --git a/kunittest/runnergui.cpp b/kunittest/runnergui.cpp
index ef5afe98..ded28e57 100644
--- a/kunittest/runnergui.cpp
+++ b/kunittest/runnergui.cpp
@@ -23,13 +23,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <qmetaobject.h>
-#include <qregexp.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qcombobox.h>
+#include <tqmetaobject.h>
+#include <tqregexp.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqcombobox.h>
#include <dcopclient.h>
#include <dcopobject.h>
@@ -68,7 +68,7 @@ namespace KUnitTest
* @param name The name of the test.
* @param info The debug info.
*/
- bool addDebugInfo(const QString &name, const QString &info)
+ bool addDebugInfo(const TQString &name, const TQString &info)
{
Tester *tester = Runner::self()->registry().find(name.local8Bit());
if ( tester == 0L ) return false;
@@ -78,7 +78,7 @@ namespace KUnitTest
return true;
}
- bool addSlotDebugInfo(const QString &name, const QString &slt, const QString &info)
+ bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info)
{
Tester *tester = Runner::self()->registry().find(name.local8Bit());
@@ -95,7 +95,7 @@ namespace KUnitTest
RunnerGUI *m_rg;
};
- RunnerGUI::RunnerGUI(QWidget *parent) : QHBox(parent)
+ RunnerGUI::RunnerGUI(TQWidget *parent) : TQHBox(parent)
{
m_dcop = new RunnerGUIDCOPImpl(this);
@@ -107,12 +107,12 @@ namespace KUnitTest
m_testerWidget->selectCombo()->insertItem("Selected tests . . .");
RegistryIteratorType it(Runner::self()->registry());
- QStringList suites;
+ TQStringList suites;
for ( ; it.current(); ++it )
{
addTester(it.currentKey(), it.current());
- QString test = it.currentKey();
+ TQString test = it.currentKey();
int index = test.find("::");
if ( index != -1 ) test = test.left(index);
@@ -125,7 +125,7 @@ namespace KUnitTest
// configure the resultslist
m_testerWidget->resultList()->setAllColumnsShowFocus(true);
- m_testerWidget->resultList()->setSelectionMode(QListView::Extended);
+ m_testerWidget->resultList()->setSelectionMode(TQListView::Extended);
m_testerWidget->resultList()->setRootIsDecorated(true);
m_testerWidget->resultList()->setColumnAlignment(g_finishedColumn, Qt::AlignHCenter);
m_testerWidget->resultList()->setColumnAlignment(g_skippedColumn, Qt::AlignHCenter);
@@ -140,10 +140,10 @@ namespace KUnitTest
// init the progress bar
configureProgressBar(Runner::self()->numberOfTestCases(), 0);
- connect(Runner::self(), SIGNAL(finished(const char *, Tester *)), this, SLOT(addTestResult(const char *, Tester *)));
- connect(m_testerWidget->resultList(), SIGNAL(clicked(QListViewItem *)), this, SLOT(showDetails(QListViewItem *)));
- connect(m_testerWidget, SIGNAL(run()), this, SLOT(runSuite()));
- connect(m_testerWidget->details(), SIGNAL(doubleClicked(int, int)), this, SLOT(doubleClickedOnDetails(int, int)));
+ connect(Runner::self(), TQT_SIGNAL(finished(const char *, Tester *)), this, TQT_SLOT(addTestResult(const char *, Tester *)));
+ connect(m_testerWidget->resultList(), TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(showDetails(TQListViewItem *)));
+ connect(m_testerWidget, TQT_SIGNAL(run()), this, TQT_SLOT(runSuite()));
+ connect(m_testerWidget->details(), TQT_SIGNAL(doubleClicked(int, int)), this, TQT_SLOT(doubleClickedOnDetails(int, int)));
}
RunnerGUI::~RunnerGUI()
@@ -161,23 +161,23 @@ namespace KUnitTest
{
if ( Runner::self()->numberOfTests() > 0 )
m_testerWidget->resultsLabel()->setText(
- QString("Test cases: %1 | Tests performed: %5, Skipped: <font color=\"#f7a300\">%4</font> | Passed: <font color=\"#009900\">%2</font>, Failed: <font color=\"#990000\">%3</font>")
+ TQString("Test cases: %1 | Tests performed: %5, Skipped: <font color=\"#f7a300\">%4</font> | Passed: <font color=\"#009900\">%2</font>, Failed: <font color=\"#990000\">%3</font>")
.arg(Runner::self()->numberOfTestCases())
.arg(Runner::self()->numberOfPassedTests())
.arg(Runner::self()->numberOfFailedTests())
.arg(Runner::self()->numberOfSkippedTests())
.arg(Runner::self()->numberOfTests()) );
else
- m_testerWidget->resultsLabel()->setText(QString("Test cases: %1").arg(Runner::self()->numberOfTestCases()));
+ m_testerWidget->resultsLabel()->setText(TQString("Test cases: %1").arg(Runner::self()->numberOfTestCases()));
}
void RunnerGUI::addTestResult(const char *name, Tester *test)
{
- QStringList scopes = QStringList::split("::", name);
- QString suite = scopes[0];
+ TQStringList scopes = TQStringList::split("::", name);
+ TQString suite = scopes[0];
// find the suite item
- QListViewItem *item = 0L;
+ TQListViewItem *item = 0L;
for ( uint i = 0; i < scopes.count(); ++i )
item = getItem(scopes[i], item);
@@ -185,7 +185,7 @@ namespace KUnitTest
{
SlotTester *sltest = static_cast<SlotTester*>(test);
TestResultsListIteratorType it(sltest->resultsList());
- QListViewItem *slotItem = 0L;
+ TQListViewItem *slotItem = 0L;
for ( ; it.current(); ++it)
{
slotItem = getItem(it.currentKey(), item);
@@ -201,28 +201,28 @@ namespace KUnitTest
void RunnerGUI::addTester(const char *name, Tester *test)
{
- QStringList scopes = QStringList::split("::", name);
- QString suite = scopes[0];
+ TQStringList scopes = TQStringList::split("::", name);
+ TQString suite = scopes[0];
// find the suite item
- QListViewItem *item = 0L;
+ TQListViewItem *item = 0L;
for ( uint i = 0; i < scopes.count(); ++i )
item = getItem(scopes[i], item);
if ( test->inherits("KUnitTest::SlotTester") )
{
- QStrList allSlots = test->metaObject()->slotNames();
+ TQStrList allSlots = test->metaObject()->slotNames();
for ( char *sl = allSlots.first(); sl; sl = allSlots.next() )
{
- if ( QString(sl).startsWith("test") )
+ if ( TQString(sl).startsWith("test") )
getItem(sl, item);
}
}
}
- QListViewItem *RunnerGUI::getItem(const QString &name, QListViewItem *item /*= 0L*/)
+ TQListViewItem *RunnerGUI::getItem(const TQString &name, TQListViewItem *item /*= 0L*/)
{
- QListViewItem *parent = item;
+ TQListViewItem *parent = item;
if ( item == 0L ) item = m_testerWidget->resultList()->firstChild();
else item = item->firstChild();
@@ -234,9 +234,9 @@ namespace KUnitTest
if ( item == 0L )
{
if ( parent == 0L )
- item = new QListViewItem(m_testerWidget->resultList());
+ item = new TQListViewItem(m_testerWidget->resultList());
else
- item = new QListViewItem(parent);
+ item = new TQListViewItem(parent);
item->setText(g_nameColumn, name);
}
@@ -246,44 +246,44 @@ namespace KUnitTest
void RunnerGUI::reset()
{
- QListViewItemIterator it( m_testerWidget->resultList() );
+ TQListViewItemIterator it( m_testerWidget->resultList() );
while ( it.current() )
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
item->setText(g_finishedColumn, "0");
item->setText(g_skippedColumn, "0");
item->setText(g_failedColumn, "0");
item->setText(g_xfailedColumn, "0");
item->setText(g_passedColumn, "0");
item->setText(g_xpassedColumn, "0");
- item->setPixmap(g_nameColumn, QPixmap());
+ item->setPixmap(g_nameColumn, TQPixmap());
++it;
}
}
- void RunnerGUI::setSummary(QListViewItem *item, TestResults *res)
+ void RunnerGUI::setSummary(TQListViewItem *item, TestResults *res)
{
if ( item == 0L ) return;
bool ok;
int val = item->text(g_finishedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_finishedColumn, QString::number(val + res->testsFinished()));
+ item->setText(g_finishedColumn, TQString::number(val + res->testsFinished()));
val = item->text(g_skippedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_skippedColumn, QString::number(val + res->skipped()));
+ item->setText(g_skippedColumn, TQString::number(val + res->skipped()));
val = item->text(g_passedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_passedColumn, QString::number(val + res->passed()));
+ item->setText(g_passedColumn, TQString::number(val + res->passed()));
val = item->text(g_failedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_failedColumn, QString::number(val + res->errors()));
+ item->setText(g_failedColumn, TQString::number(val + res->errors()));
val = item->text(g_xfailedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_xfailedColumn, QString::number(val + res->xfails()));
+ item->setText(g_xfailedColumn, TQString::number(val + res->xfails()));
val = item->text(g_xpassedColumn).toInt(&ok); if (!ok) val = 0;
- item->setText(g_xpassedColumn, QString::number(val + res->xpasses()));
+ item->setText(g_xpassedColumn, TQString::number(val + res->xpasses()));
bool passed = (item->text(g_failedColumn).toInt(&ok) + item->text(g_xfailedColumn).toInt(&ok)) == 0;
item->setPixmap(g_nameColumn, passed ? SmallIcon("button_ok") : SmallIcon("button_cancel") );
@@ -291,9 +291,9 @@ namespace KUnitTest
setSummary(item->parent(), res);
}
- QString RunnerGUI::fullName(QListViewItem *item)
+ TQString RunnerGUI::fullName(TQListViewItem *item)
{
- QString name = item->text(g_nameColumn);
+ TQString name = item->text(g_nameColumn);
while ( (item = item->parent()) != 0L )
name = item->text(g_nameColumn) + "::" + name;
@@ -312,14 +312,14 @@ namespace KUnitTest
}
else if ( m_testerWidget->selectCombo()->currentItem() == 1 )
{
- QListViewItemIterator it( m_testerWidget->resultList() );
- QStringList prefixes;
+ TQListViewItemIterator it( m_testerWidget->resultList() );
+ TQStringList prefixes;
while ( it.current() )
{
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if ( item->isSelected() )
{
- QString prefix = fullName(item);
+ TQString prefix = fullName(item);
if ( prefix.endsWith("()") )
{
int index = prefix.findRev("::");
@@ -337,11 +337,11 @@ namespace KUnitTest
}
else
{
- QString suite = m_testerWidget->selectCombo()->currentText();
- QStringList tests;
+ TQString suite = m_testerWidget->selectCombo()->currentText();
+ TQStringList tests;
RegistryIteratorType it(Runner::self()->registry());
for ( ; it.current(); ++it )
- if ( QString(it.currentKey()).startsWith(suite) )
+ if ( TQString(it.currentKey()).startsWith(suite) )
tests.append(it.currentKey());
configureProgressBar(tests.count(), 0);
@@ -353,11 +353,11 @@ namespace KUnitTest
showDetails(m_testerWidget->resultList()->currentItem());
}
- void RunnerGUI::showDetails(QListViewItem *item)
+ void RunnerGUI::showDetails(TQListViewItem *item)
{
if ( item == 0L ) return;
- QString name = fullName(item);
+ TQString name = fullName(item);
if ( name.endsWith("()") ) name = fullName(item->parent());
Tester *tester = Runner::self()->registry().find(name.local8Bit());
@@ -374,7 +374,7 @@ namespace KUnitTest
m_testerWidget->details()->setText("No test found with name: " + fullName(item));
else
{
- QTextEdit *te = m_testerWidget->details();
+ TQTextEdit *te = m_testerWidget->details();
te->clear();
@@ -401,7 +401,7 @@ namespace KUnitTest
}
}
- void RunnerGUI::appendList(QTextEdit *te, const QStringList &list)
+ void RunnerGUI::appendList(TQTextEdit *te, const TQStringList &list)
{
for ( uint i = 0; i < list.count(); ++i )
te->append(list[i]);
@@ -409,20 +409,20 @@ namespace KUnitTest
void RunnerGUI::doubleClickedOnDetails(int para, int /*pos*/)
{
- static QRegExp reFileAndLine("^(.*)\\[([0-9]+)\\]:");
+ static TQRegExp reFileAndLine("^(.*)\\[([0-9]+)\\]:");
- QString line = m_testerWidget->details()->text(para);
+ TQString line = m_testerWidget->details()->text(para);
m_testerWidget->details()->setSelection(para, 0, para, line.length()-1);
if ( reFileAndLine.search(line) != -1 )
{
DCOPClient client;
client.attach();
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
bool ok;
- arg << QString(reFileAndLine.cap(1)) << (reFileAndLine.cap(2).toInt(&ok) - 1);
- client.send("kdevelop-*", "KDevPartController", "editDocument(QString,int)", data);
+ arg << TQString(reFileAndLine.cap(1)) << (reFileAndLine.cap(2).toInt(&ok) - 1);
+ client.send("kdevelop-*", "KDevPartController", "editDocument(TQString,int)", data);
client.send("kdevelop-*", "MainWindow", "raise()", "");
client.detach();
diff --git a/kunittest/runnergui.h b/kunittest/runnergui.h
index dbd03666..cda237a5 100644
--- a/kunittest/runnergui.h
+++ b/kunittest/runnergui.h
@@ -26,8 +26,8 @@
#ifndef _KUNITTEST_TESTER_H_
#define _KUNITTEST_TESTER_H_
-#include <qlistview.h>
-#include <qhbox.h>
+#include <tqlistview.h>
+#include <tqhbox.h>
#include <kunittest/runner.h>
#include <kunittest/tester.h>
@@ -46,13 +46,13 @@ namespace KUnitTest
Q_OBJECT
public:
- RunnerGUI(QWidget *parent);
+ RunnerGUI(TQWidget *parent);
~RunnerGUI();
private slots:
void addTestResult(const char *name, Tester *test);
void addTester(const char *name, Tester *test);
- void showDetails(QListViewItem *item);
+ void showDetails(TQListViewItem *item);
void runSuite();
void doubleClickedOnDetails(int para, int pos);
@@ -60,13 +60,13 @@ namespace KUnitTest
void reset();
void configureProgressBar(int steps, int progress);
void fillResultsLabel();
- void appendList(QTextEdit *te, const QStringList &list);
+ void appendList(TQTextEdit *te, const TQStringList &list);
- QListViewItem *getItem(const QString &name, QListViewItem *item = 0L);
- void setItem(QListViewItem *item, const TestResults *res);
- QString fullName(QListViewItem *item);
+ TQListViewItem *getItem(const TQString &name, TQListViewItem *item = 0L);
+ void setItem(TQListViewItem *item, const TestResults *res);
+ TQString fullName(TQListViewItem *item);
- void setSummary(QListViewItem *item, TestResults *res);
+ void setSummary(TQListViewItem *item, TestResults *res);
TesterWidget *m_testerWidget;
diff --git a/kunittest/testerwidget.ui.h b/kunittest/testerwidget.ui.h
index b895a357..fd79eb96 100644
--- a/kunittest/testerwidget.ui.h
+++ b/kunittest/testerwidget.ui.h
@@ -13,34 +13,34 @@
void TesterWidget::init()
{
- connect(m_pshRun, SIGNAL(clicked()), this, SIGNAL(run()));
+ connect(m_pshRun, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(run()));
}
-QListView * TesterWidget::resultList()
+TQListView * TesterWidget::resultList()
{
return m_lvResults;
}
-QTextEdit * TesterWidget::details()
+TQTextEdit * TesterWidget::details()
{
return m_teDetails;
}
-QProgressBar * TesterWidget::progressBar()
+TQProgressBar * TesterWidget::progressBar()
{
return m_pbProgress;
}
-QLabel * TesterWidget::resultsLabel()
+TQLabel * TesterWidget::resultsLabel()
{
return m_lbResults;
}
-QComboBox * TesterWidget::selectCombo()
+TQComboBox * TesterWidget::selectCombo()
{
return m_cbSelect;
}
diff --git a/poxml/GettextParser.cpp b/poxml/GettextParser.cpp
index 90651eaa..fda1066a 100644
--- a/poxml/GettextParser.cpp
+++ b/poxml/GettextParser.cpp
@@ -204,9 +204,9 @@ string GettextParser::comment() {
if ( inputState->guessing==0 ) {
#line 59 "gettext.g"
- mb.comment = QString::fromUtf8(c.c_str());
- mb.msgid = QString::fromUtf8(mi.c_str());
- mb.msgstr = QString::fromUtf8(ms.c_str());
+ mb.comment = TQString::fromUtf8(c.c_str());
+ mb.msgid = TQString::fromUtf8(mi.c_str());
+ mb.msgstr = TQString::fromUtf8(ms.c_str());
#line 212 "GettextParser.cpp"
}
@@ -219,10 +219,10 @@ string GettextParser::comment() {
if ( inputState->guessing==0 ) {
#line 66 "gettext.g"
- mb.comment = QString::fromUtf8(c.c_str());
- mb.msgid = QString::fromUtf8(mi.c_str());
- mb.msgid_plural = QString::fromUtf8(mip.c_str());
- mb.msgstr = QString::fromUtf8(ms.c_str());
+ mb.comment = TQString::fromUtf8(c.c_str());
+ mb.msgid = TQString::fromUtf8(mi.c_str());
+ mb.msgid_plural = TQString::fromUtf8(mip.c_str());
+ mb.msgstr = TQString::fromUtf8(ms.c_str());
#line 228 "GettextParser.cpp"
}
diff --git a/poxml/parser.cpp b/poxml/parser.cpp
index c34976bf..2f0f7e16 100644
--- a/poxml/parser.cpp
+++ b/poxml/parser.cpp
@@ -4,7 +4,7 @@
#include <iostream>
#include <stdlib.h>
#include <assert.h>
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace std;
@@ -47,7 +47,7 @@ static const char *cuttingtags[] = {"bridgehead", "trans_comment", "para", "titl
static const char *literaltags[] = {"literallayout", "synopsis", "screen",
"programlisting", 0};
-bool StructureParser::fatalError ( const QXmlParseException &e )
+bool StructureParser::fatalError ( const TQXmlParseException &e )
{
cerr << "fatalError " << e.message().latin1() << " " << e.lineNumber() << " "
<< e.columnNumber() << endl;
@@ -56,14 +56,14 @@ bool StructureParser::fatalError ( const QXmlParseException &e )
bool StructureParser::startDocument()
{
- infos_reg = QRegExp("\\s*poxml_line=\"(\\d+)\" poxml_col=\"(\\d+)\"");
- do_not_split_reg = QRegExp("\\s*condition=\"do-not-split\"");
+ infos_reg = TQRegExp("\\s*poxml_line=\"(\\d+)\" poxml_col=\"(\\d+)\"");
+ do_not_split_reg = TQRegExp("\\s*condition=\"do-not-split\"");
message = "";
inside = 0;
return true;
}
-bool StructureParser::isCuttingTag(const QString &qName)
+bool StructureParser::isCuttingTag(const TQString &qName)
{
int index = 0;
while (cuttingtags[index]) {
@@ -74,7 +74,7 @@ bool StructureParser::isCuttingTag(const QString &qName)
return isLiteralTag(qName);
}
-bool StructureParser::isSingleTag(const QString &qName)
+bool StructureParser::isSingleTag(const TQString &qName)
{
int index = 0;
while (singletags[index]) {
@@ -85,7 +85,7 @@ bool StructureParser::isSingleTag(const QString &qName)
return false;
}
-bool StructureParser::isLiteralTag(const QString &qName)
+bool StructureParser::isLiteralTag(const TQString &qName)
{
int index = 0;
while (literaltags[index]) {
@@ -96,24 +96,24 @@ bool StructureParser::isLiteralTag(const QString &qName)
return false;
}
-bool StructureParser::skippedEntity ( const QString & name )
+bool StructureParser::skippedEntity ( const TQString & name )
{
if (inside)
- message += QString("&%1;").arg(name);
+ message += TQString("&%1;").arg(name);
return true;
}
-bool StructureParser::startElement( const QString& , const QString& ,
- const QString& qName,
- const QXmlAttributes & attr )
+bool StructureParser::startElement( const TQString& , const TQString& ,
+ const TQString& qName,
+ const TQXmlAttributes & attr )
{
- QString tname = qName.lower();
+ TQString tname = qName.lower();
bool first = false;
if (isCuttingTag(tname)) {
if (!inside) {
- message = QString::null;
+ message = TQString::null;
list.pc.increasePara();
startline = locator->lineNumber();
startcol = locator->columnNumber();
@@ -124,12 +124,12 @@ bool StructureParser::startElement( const QString& , const QString& ,
if (inside)
{
- QString tmp = "<" + tname;
+ TQString tmp = "<" + tname;
for (int i = 0; i < attr.length(); i++) {
- tmp += QString(" %1=\"%2\"").arg(attr.qName(i)).arg(attr.value(i));
+ tmp += TQString(" %1=\"%2\"").arg(attr.qName(i)).arg(attr.value(i));
}
- tmp += QString(" poxml_line=\"%1\"").arg(locator->lineNumber());
- tmp += QString(" poxml_col=\"%1\"").arg(locator->columnNumber());
+ tmp += TQString(" poxml_line=\"%1\"").arg(locator->lineNumber());
+ tmp += TQString(" poxml_col=\"%1\"").arg(locator->columnNumber());
if (isSingleTag(qName))
tmp += "/>";
@@ -160,17 +160,17 @@ bool StructureParser::endCDATA()
return true;
}
-bool StructureParser::isClosure(const QString &message)
+bool StructureParser::isClosure(const TQString &message)
{
assert(message.at(0) == '<');
int endindex = 1;
while (!message.at(endindex).isSpace() && message.at(endindex) != '>')
endindex++;
- QString tag = message.mid(1, endindex - 1);
+ TQString tag = message.mid(1, endindex - 1);
return closureTag(message, tag);
}
-bool StructureParser::closureTag(const QString& message, const QString &tag)
+bool StructureParser::closureTag(const TQString& message, const TQString &tag)
{
#ifdef POXML_DEBUG
qDebug("closureTag %s %s", message.latin1(), tag.latin1());
@@ -180,8 +180,8 @@ bool StructureParser::closureTag(const QString& message, const QString &tag)
uint index = 0;
while (true)
{
- int nextclose = message.find(QRegExp(QString::fromLatin1("</%1[\\s>]").arg(tag)), index);
- int nextstart = message.find(QRegExp(QString::fromLatin1("<%1[>\\s]").arg(tag)), index);
+ int nextclose = message.find(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)), index);
+ int nextstart = message.find(TQRegExp(TQString::fromLatin1("<%1[>\\s]").arg(tag)), index);
// qDebug("finding %d %d %d %d", nextstart, nextclose, index, inside);
if (nextclose == -1) {
#ifdef POXML_DEBUG
@@ -214,7 +214,7 @@ bool StructureParser::closureTag(const QString& message, const QString &tag)
}
}
-void StructureParser::descape(QString &message)
+void StructureParser::descape(TQString &message)
{
uint index = 0;
stripWhiteSpace( message );
@@ -239,7 +239,7 @@ void StructureParser::descape(QString &message)
while (endindex < message.length() && !message.at(endindex).isSpace() &&
message.at(endindex) != '>')
endindex++;
- QString tag = message.mid(index + 1, endindex - index - 1);
+ TQString tag = message.mid(index + 1, endindex - index - 1);
if (tag.at(0) == '/') {
if (isLiteralTag(tag.mid(1)))
inside--;
@@ -254,7 +254,7 @@ void StructureParser::descape(QString &message)
index++;
}
- message.replace(QRegExp("\010"), "");
+ message.replace(TQRegExp("\010"), "");
}
bool StructureParser::formatMessage(MsgBlock &msg) const
@@ -278,7 +278,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
{
int slen = strlen(singletags[index]);
- if (msg.msgid.left(slen + 1) == QString::fromLatin1("<%1").arg(singletags[index]) &&
+ if (msg.msgid.left(slen + 1) == TQString::fromLatin1("<%1").arg(singletags[index]) &&
!msg.msgid.at( slen + 1 ).isLetterOrNumber() )
{
#ifdef POXML_DEBUG
@@ -316,7 +316,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
int strindex = 1;
while (msg.msgid.at(strindex) != ' ' && msg.msgid.at(strindex) != '>')
strindex++;
- QString starttag = msg.msgid.mid(1, strindex - 1);
+ TQString starttag = msg.msgid.mid(1, strindex - 1);
int endindex = msg.msgid.length() - 2;
while (msg.msgid.at(endindex) != '<' && msg.msgid.at(endindex + 1) != '/')
endindex--;
@@ -324,10 +324,10 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
qDebug("endIndex %d", endindex);
#endif
strindex = endindex;
- QString orig = msg.msgid;
+ TQString orig = msg.msgid;
- QString endtag = msg.msgid.mid(endindex + 2, msg.msgid.length() - (endindex + 2) - 1);
- QString endtag_attr = endtag.mid(endtag.find(' '), endtag.length());
+ TQString endtag = msg.msgid.mid(endindex + 2, msg.msgid.length() - (endindex + 2) - 1);
+ TQString endtag_attr = endtag.mid(endtag.find(' '), endtag.length());
endtag.replace(infos_reg, "");
if (endtag == starttag) {
if (!closureTag(msg.msgid, starttag))
@@ -338,7 +338,7 @@ bool StructureParser::formatMessage(MsgBlock &msg) const
strindex = 0;
while (msg.msgid.at(strindex) != '>')
strindex++;
- QString attr = msg.msgid.left(strindex);
+ TQString attr = msg.msgid.left(strindex);
msg.msgid = msg.msgid.mid(strindex + 1);
offset += strindex + 1;
for (int index = 0; msg.msgid.at(index) == ' '; index++, offset++) ;
@@ -389,7 +389,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
MsgBlock msg1 = mb;
MsgBlock msg2 = mb;
- QString message = mb.msgid;
+ TQString message = mb.msgid;
#ifdef POXML_DEBUG
qDebug("splitMessage %s", message.latin1());
@@ -399,7 +399,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
int endindex = 1;
while (!message.at(endindex).isSpace() && message.at(endindex) != '>')
endindex++;
- QString tag = message.mid(1, endindex - 1);
+ TQString tag = message.mid(1, endindex - 1);
if (closureTag(message, tag))
goto error;
@@ -418,9 +418,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
#endif
// the exception for poxml_* attributes is made in the closing tag
- int closing_index = message.find(QRegExp(QString::fromLatin1("</%1[\\s>]").arg(tag)),
+ int closing_index = message.find(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)),
strindex);
- int starting_index = message.find(QRegExp(QString::fromLatin1("<%1[\\s>]").arg(tag)),
+ int starting_index = message.find(TQRegExp(TQString::fromLatin1("<%1[\\s>]").arg(tag)),
strindex);
#ifdef POXML_DEBUG
@@ -509,7 +509,7 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
int endindex = message.length() - 1;
while (endindex >= 0 && (message.at(endindex) != '<' || message.at(endindex + 1) != '/'))
endindex--;
- QString tag = message.mid(endindex + 2, message.length() - endindex - 3);
+ TQString tag = message.mid(endindex + 2, message.length() - endindex - 3);
if (tag.find(' ') > 0 ) {
tag = tag.left(tag.find(' '));
}
@@ -529,9 +529,9 @@ MsgList StructureParser::splitMessage(const MsgBlock &mb)
qDebug("inside %s %d", message.mid(strindex, 35).latin1(), inside);
#endif
- int closing_index = message.findRev(QRegExp(QString::fromLatin1("</%1[\\s>]").arg(tag)),
+ int closing_index = message.findRev(TQRegExp(TQString::fromLatin1("</%1[\\s>]").arg(tag)),
strindex - 1);
- int starting_index = message.findRev(QRegExp(QString::fromLatin1("<%1[\\s>]").arg(tag)),
+ int starting_index = message.findRev(TQRegExp(TQString::fromLatin1("<%1[\\s>]").arg(tag)),
strindex - 1);
#ifdef POXML_DEBUG
@@ -593,17 +593,17 @@ error:
return result;
}
-bool StructureParser::endElement( const QString& , const QString&, const QString& qName)
+bool StructureParser::endElement( const TQString& , const TQString&, const TQString& qName)
{
- QString tname = qName.lower();
+ TQString tname = qName.lower();
// qDebug("endElement %s - %s %d", tname.latin1(), message.latin1(), inside);
if (inside) {
if (!isSingleTag(qName)) {
- message += QString("</%1").arg(tname);
- message += QString(" poxml_line=\"%1\"").arg(locator->lineNumber());
- message += QString(" poxml_col=\"%1\"").arg(locator->columnNumber());
+ message += TQString("</%1").arg(tname);
+ message += TQString(" poxml_line=\"%1\"").arg(locator->lineNumber());
+ message += TQString(" poxml_col=\"%1\"").arg(locator->columnNumber());
message += ">";
}
}
@@ -640,7 +640,7 @@ bool StructureParser::endElement( const QString& , const QString&, const QString
(*it).lines.first().offset = 0;
}
}
- (*it).msgid.replace(infos_reg, QString::null);
+ (*it).msgid.replace(infos_reg, TQString::null);
if (!(*it).msgid.isEmpty())
list.append(*it);
@@ -651,7 +651,7 @@ bool StructureParser::endElement( const QString& , const QString&, const QString
return true;
}
-bool StructureParser::comment ( const QString &c )
+bool StructureParser::comment ( const TQString &c )
{
if (c.left(7) != " TRANS:")
return true;
@@ -660,30 +660,30 @@ bool StructureParser::comment ( const QString &c )
return true;
}
-QString StructureParser::escapeLiterals( const QString &_contents) {
- QString contents = _contents;
+TQString StructureParser::escapeLiterals( const TQString &_contents) {
+ TQString contents = _contents;
- contents.replace(QRegExp("\n"), "&POXML_LINEFEED;");
- contents.replace(QRegExp("<"), "&POXML_LT;");
- contents.replace(QRegExp(">"), "&POXML_GT;");
- contents.replace(QRegExp("\t"), " ");
- contents.replace(QRegExp(" "), "&POXML_SPACE;");
+ contents.replace(TQRegExp("\n"), "&POXML_LINEFEED;");
+ contents.replace(TQRegExp("<"), "&POXML_LT;");
+ contents.replace(TQRegExp(">"), "&POXML_GT;");
+ contents.replace(TQRegExp("\t"), " ");
+ contents.replace(TQRegExp(" "), "&POXML_SPACE;");
return contents;
}
-QString StructureParser::descapeLiterals( const QString &_contents) {
- QString contents = _contents;
+TQString StructureParser::descapeLiterals( const TQString &_contents) {
+ TQString contents = _contents;
- contents.replace(QRegExp("&POXML_LINEFEED;"), "\n");
- contents.replace(QRegExp("&POXML_LT;"), "<");
- contents.replace(QRegExp("&POXML_GT;"), ">");
- contents.replace(QRegExp("&POXML_SPACE;"), " ");
- contents.replace(QRegExp("!POXML_AMP!"), "&");
+ contents.replace(TQRegExp("&POXML_LINEFEED;"), "\n");
+ contents.replace(TQRegExp("&POXML_LT;"), "<");
+ contents.replace(TQRegExp("&POXML_GT;"), ">");
+ contents.replace(TQRegExp("&POXML_SPACE;"), " ");
+ contents.replace(TQRegExp("!POXML_AMP!"), "&");
return contents;
}
-void StructureParser::stripWhiteSpace( QString &contents)
+void StructureParser::stripWhiteSpace( TQString &contents)
{
contents = contents.stripWhiteSpace();
bool changed;
@@ -708,13 +708,13 @@ void StructureParser::stripWhiteSpace( QString &contents)
} while (changed);
}
-void StructureParser::cleanupTags( QString &contents )
+void StructureParser::cleanupTags( TQString &contents )
{
- contents.replace(QRegExp("&"), "!POXML_AMP!");
+ contents.replace(TQRegExp("&"), "!POXML_AMP!");
for (int index = 0; literaltags[index]; index++) {
- QRegExp start(QString("<%1[\\s>]").arg(literaltags[index]));
- QRegExp end(QString("</%1[\\s>]").arg(literaltags[index]));
+ TQRegExp start(TQString("<%1[\\s>]").arg(literaltags[index]));
+ TQRegExp end(TQString("</%1[\\s>]").arg(literaltags[index]));
int strindex = 0;
while (true) {
strindex = contents.find(start, strindex);
@@ -724,25 +724,25 @@ void StructureParser::cleanupTags( QString &contents )
strindex++;
strindex++; // one more
int endindex = contents.find(end, strindex);
- QString part = contents.mid(strindex, endindex - strindex);
- QString newpart = escapeLiterals(part);
+ TQString part = contents.mid(strindex, endindex - strindex);
+ TQString newpart = escapeLiterals(part);
contents.replace(strindex, part.length(), newpart);
// this assumes that literal tags to not overlap
strindex = strindex + newpart.length();
}
}
- QRegExp unclosed("</(\\w*)\\s\\s*>");
+ TQRegExp unclosed("</(\\w*)\\s\\s*>");
int index = -1;
while (true) {
index = unclosed.search(contents, index + 1);
if (index < 0)
break;
- QString tag = unclosed.cap(1);
- contents.replace(index, unclosed.matchedLength(), QString("</%1>").arg(tag));
+ TQString tag = unclosed.cap(1);
+ contents.replace(index, unclosed.matchedLength(), TQString("</%1>").arg(tag));
}
- QRegExp start("<((\\s*[^<>\\s])*)\\s\\s*(/*)>");
+ TQRegExp start("<((\\s*[^<>\\s])*)\\s\\s*(/*)>");
start.setMinimal(true);
index = -1;
@@ -750,32 +750,32 @@ void StructureParser::cleanupTags( QString &contents )
index = start.search(contents, index + 1);
if (index < 0)
break;
- QString tag = start.cap(1);
- QString cut = start.capturedTexts().last();
+ TQString tag = start.cap(1);
+ TQString cut = start.capturedTexts().last();
// qDebug("UNCLO %s %d -%s- -%s-", start.cap(0).latin1(), index, tag.latin1(), cut.latin1());
- contents.replace(index, start.matchedLength(), QString("<%1%2>").arg(tag).arg(cut));
+ contents.replace(index, start.matchedLength(), TQString("<%1%2>").arg(tag).arg(cut));
}
- QRegExp singletag("<(\\w*)\\s([^><]*)/>");
+ TQRegExp singletag("<(\\w*)\\s([^><]*)/>");
index = -1;
while (true) {
index = singletag.search(contents, index + 1);
if (index < 0)
break;
- QString tag = singletag.cap(1);
+ TQString tag = singletag.cap(1);
if (!StructureParser::isSingleTag(tag)) {
- contents.replace(index, singletag.matchedLength(), QString("<%1 %2></%3>").arg(tag).arg(singletag.cap(2)).arg(tag));
+ contents.replace(index, singletag.matchedLength(), TQString("<%1 %2></%3>").arg(tag).arg(singletag.cap(2)).arg(tag));
}
}
- QRegExp trans_comment("<!-- TRANS:([^<>]*)-->");
+ TQRegExp trans_comment("<!-- TRANS:([^<>]*)-->");
index = -1;
while (true) {
index = trans_comment.search(contents, index + 1);
if (index < 0)
break;
- QString msgid = trans_comment.cap(1);
- contents.replace(index, trans_comment.matchedLength(), QString("<trans_comment>%1</trans_comment>").arg(msgid));
+ TQString msgid = trans_comment.cap(1);
+ contents.replace(index, trans_comment.matchedLength(), TQString("<trans_comment>%1</trans_comment>").arg(msgid));
}
#ifdef POXML_DEBUG
@@ -784,11 +784,11 @@ void StructureParser::cleanupTags( QString &contents )
}
-static bool removeEmptyTag( QString &contents, const QString & tag)
+static bool removeEmptyTag( TQString &contents, const TQString & tag)
{
// qDebug("cont %s %s", contents.latin1(), tag.latin1());
- QRegExp empty(QString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").arg(tag).arg(tag));
+ TQRegExp empty(TQString("<%1[^>]*>[\\s\n][\\s\n]*</%2\\s*>").arg(tag).arg(tag));
int strindex = 0;
while (true) {
strindex = contents.find(empty, strindex);
@@ -802,7 +802,7 @@ static bool removeEmptyTag( QString &contents, const QString & tag)
return false;
}
-void StructureParser::removeEmptyTags( QString &contents )
+void StructureParser::removeEmptyTags( TQString &contents )
{
bool removed;
do {
@@ -822,24 +822,24 @@ void StructureParser::removeEmptyTags( QString &contents )
} while (removed);
}
-bool StructureParser::characters(const QString &ch)
+bool StructureParser::characters(const TQString &ch)
{
if (inside && !ch.isEmpty())
message += ch;
return true;
}
-QString escape(QString message)
+TQString escape(TQString message)
{
- message.replace(QRegExp("\\\\"), "\\\\");
- message.replace(QRegExp("\""), "\\\"");
+ message.replace(TQRegExp("\\\\"), "\\\\");
+ message.replace(TQRegExp("\""), "\\\"");
return message;
}
-void outputMsg(const char *prefix, const QString &message)
+void outputMsg(const char *prefix, const TQString &message)
{
- QStringList list = QStringList::split('\n', message, true);
- QString line;
+ TQStringList list = TQStringList::split('\n', message, true);
+ TQString line;
if (list.count() == 1) {
line = list.first();
@@ -849,7 +849,7 @@ void outputMsg(const char *prefix, const QString &message)
cout << prefix << " \"" << escape(line).utf8().data() << "\"\n";
} else {
cout << prefix << " \"\"\n";
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++) {
line = *it;
if (!line.isEmpty()) {
cout << " \"" << escape(line).utf8().data();
@@ -867,7 +867,7 @@ void outputMsg(const char *prefix, const QString &message)
}
}
-QString escapePO(QString msgid)
+TQString escapePO(TQString msgid)
{
int index = 0;
while (true) {
@@ -909,8 +909,8 @@ QString escapePO(QString msgid)
index += 1;
}
- msgid.replace(QRegExp("&POXML_LITERALLINEFEED;"), "\\n");
- msgid.replace(QRegExp("&POXML_LITERALQUOTE;"), "\\");
+ msgid.replace(TQRegExp("&POXML_LITERALLINEFEED;"), "\\n");
+ msgid.replace(TQRegExp("&POXML_LITERALQUOTE;"), "\\");
return msgid;
}
@@ -918,15 +918,15 @@ QString escapePO(QString msgid)
MsgList parseXML(const char *filename)
{
StructureParser handler;
- QFile xmlFile( filename );
+ TQFile xmlFile( filename );
xmlFile.open(IO_ReadOnly);
- QCString ccontents;
+ TQCString ccontents;
ccontents.fill(0, xmlFile.size() + 1);
memcpy(ccontents.data(), xmlFile.readAll().data(), xmlFile.size());
xmlFile.close();
- QString contents = QString::fromUtf8( ccontents );
+ TQString contents = TQString::fromUtf8( ccontents );
StructureParser::cleanupTags(contents);
while (true) {
@@ -935,7 +935,7 @@ MsgList parseXML(const char *filename)
break;
int inside = 0;
int endindex = index + 1;
- QString replacement = "";
+ TQString replacement = "";
while (contents.at(endindex) != '>' || inside)
{
switch (contents.at(endindex).latin1()) {
@@ -955,9 +955,9 @@ MsgList parseXML(const char *filename)
contents.replace(index, endindex - index, replacement);
}
- QTextStream ts(contents.utf8(), IO_ReadOnly);
- QXmlInputSource source( ts );
- QXmlSimpleReader reader;
+ TQTextStream ts(contents.utf8(), IO_ReadOnly);
+ TQXmlInputSource source( ts );
+ TQXmlSimpleReader reader;
reader.setFeature( "http://trolltech.com/xml/features/report-start-end-entity", true);
reader.setContentHandler( &handler );
reader.setLexicalHandler( &handler );
@@ -970,15 +970,15 @@ MsgList parseXML(const char *filename)
do {
changed = false;
- QMap<QString, QString> msgids;
+ TQMap<TQString, TQString> msgids;
for (MsgList::Iterator it = english.begin();
it != english.end(); it++)
{
- QMap<QString,QString>::Iterator found = msgids.find((*it).msgid);
+ TQMap<TQString,TQString>::Iterator found = msgids.find((*it).msgid);
if ((*it).msgid.length() < 4) {
- (*it).msgid = QString("<%1>").arg((*it).tag) + (*it).msgid +
- QString("</%1>").arg((*it).tag);
+ (*it).msgid = TQString("<%1>").arg((*it).tag) + (*it).msgid +
+ TQString("</%1>").arg((*it).tag);
changed = true;
break;
}
@@ -988,12 +988,12 @@ MsgList parseXML(const char *filename)
qDebug("same msgid for '%s' and '%s'", found.data().latin1(), (*it).tag.latin1());
#endif
changed = true;
- QString msgid = (*it).msgid;
+ TQString msgid = (*it).msgid;
for (MsgList::Iterator it2 = english.begin();
it2 != english.end(); it2++)
{
if ((*it2).msgid == msgid)
- (*it2).msgid = QString("<%1>").arg((*it2).tag) + msgid + QString("</%1>").arg((*it2).tag);
+ (*it2).msgid = TQString("<%1>").arg((*it2).tag) + msgid + TQString("</%1>").arg((*it2).tag);
}
break;
}
diff --git a/poxml/parser.h b/poxml/parser.h
index f63f6cef..923723c5 100644
--- a/poxml/parser.h
+++ b/poxml/parser.h
@@ -1,9 +1,9 @@
#ifndef PARSER_H
#define PARSER_H
-#include <qxml.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqxml.h>
+#include <tqmap.h>
+#include <tqregexp.h>
struct BlockInfo {
int start_line;
@@ -31,13 +31,13 @@ class MsgBlock {
MsgBlock(const MsgBlock &rhs ) {
*this = rhs;
}
- QValueList<BlockInfo> lines;
- QString tag;
- QString comment;
- QString msgid;
- QString msgid_plural;
- QString msgstr;
- QStringList msgstr_plurals;
+ TQValueList<BlockInfo> lines;
+ TQString tag;
+ TQString comment;
+ TQString msgid;
+ TQString msgid_plural;
+ TQString msgstr;
+ TQStringList msgstr_plurals;
int start, end;
bool do_not_split;
@@ -59,14 +59,14 @@ class ParaCounter
{
public:
ParaCounter() { current = 0; }
- void addAnchor(QString anchor) { anchors.insert(anchor, current); }
+ void addAnchor(TQString anchor) { anchors.insert(anchor, current); }
void increasePara() { current++; }
- QMap<QString, int> anchors;
+ TQMap<TQString, int> anchors;
int current;
};
-class MsgList : public QValueList<MsgBlock>
+class MsgList : public TQValueList<MsgBlock>
{
public:
MsgList() {}
@@ -77,48 +77,48 @@ class StructureParser : public QXmlDefaultHandler
{
public:
bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString &ch);
- static bool isCuttingTag(const QString &tag);
- static bool isSingleTag(const QString &qName);
- static bool isLiteralTag(const QString &qName);
- void setDocumentLocator ( QXmlLocator * l ) { locator = l; }
- bool skippedEntity ( const QString & name );
- bool fatalError ( const QXmlParseException & );
- bool comment ( const QString & );
- bool error(const QXmlParseException &e ) { return fatalError(e); }
- bool warning(const QXmlParseException &e ) { return fatalError(e); }
+ bool startElement( const TQString&, const TQString&, const TQString& ,
+ const TQXmlAttributes& );
+ bool endElement( const TQString&, const TQString&, const TQString& );
+ bool characters( const TQString &ch);
+ static bool isCuttingTag(const TQString &tag);
+ static bool isSingleTag(const TQString &qName);
+ static bool isLiteralTag(const TQString &qName);
+ void setDocumentLocator ( TQXmlLocator * l ) { locator = l; }
+ bool skippedEntity ( const TQString & name );
+ bool fatalError ( const TQXmlParseException & );
+ bool comment ( const TQString & );
+ bool error(const TQXmlParseException &e ) { return fatalError(e); }
+ bool warning(const TQXmlParseException &e ) { return fatalError(e); }
MsgList getList() const { return list; }
MsgList splitMessage(const MsgBlock &message);
virtual bool startCDATA();
virtual bool endCDATA();
- static bool closureTag(const QString& message, const QString &tag);
- static bool isClosure(const QString &message);
- static void descape(QString &message);
- static QString escapeLiterals( const QString &contents);
- static QString descapeLiterals( const QString &contents);
- static void cleanupTags( QString &contents );
- static void removeEmptyTags( QString &contents);
- static void stripWhiteSpace( QString &contents);
+ static bool closureTag(const TQString& message, const TQString &tag);
+ static bool isClosure(const TQString &message);
+ static void descape(TQString &message);
+ static TQString escapeLiterals( const TQString &contents);
+ static TQString descapeLiterals( const TQString &contents);
+ static void cleanupTags( TQString &contents );
+ static void removeEmptyTags( TQString &contents);
+ static void stripWhiteSpace( TQString &contents);
private:
bool formatMessage(MsgBlock &message) const;
- QXmlLocator *locator;
- QString message;
+ TQXmlLocator *locator;
+ TQString message;
int inside, startline, startcol;
int line;
MsgList list;
- mutable QRegExp infos_reg;
- mutable QRegExp do_not_split_reg;
+ mutable TQRegExp infos_reg;
+ mutable TQRegExp do_not_split_reg;
};
-void outputMsg(const char *prefix, const QString &message);
+void outputMsg(const char *prefix, const TQString &message);
MsgList parseXML(const char *filename);
-QString escapePO(QString msgid);
+TQString escapePO(TQString msgid);
#endif
diff --git a/poxml/po2xml.cpp b/poxml/po2xml.cpp
index 9e8bc1a5..c30a340f 100644
--- a/poxml/po2xml.cpp
+++ b/poxml/po2xml.cpp
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include <iostream>
#include <assert.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <fstream>
#include "GettextLexer.hpp"
@@ -14,9 +14,9 @@
using namespace std;
-QString translate(QString xml, QString orig, QString translation)
+TQString translate(TQString xml, TQString orig, TQString translation)
{
- QString prefix;
+ TQString prefix;
while (xml.at(0) == '<' && orig.at(0) != '<') {
// a XML tag as prefix
int index = xml.find('>');
@@ -59,12 +59,12 @@ int main( int argc, char **argv )
return 1;
}
- QMap<QString, QString> translations;
+ TQMap<TQString, TQString> translations;
for (MsgList::ConstIterator it = translated.begin();
it != translated.end(); ++it)
{
- QString msgstr;
- QString msgid = escapePO((*it).msgid);
+ TQString msgstr;
+ TQString msgid = escapePO((*it).msgid);
if ((*it).comment.find("fuzzy") < 0)
msgstr = escapePO((*it).msgstr);
@@ -74,17 +74,17 @@ int main( int argc, char **argv )
translations.insert(msgid, msgstr);
}
- QFile xml(argv[1]);
+ TQFile xml(argv[1]);
xml.open(IO_ReadOnly);
- QTextStream ds(&xml);
- ds.setEncoding(QTextStream::UnicodeUTF8);
- QString xml_text = ds.read();
+ TQTextStream ds(&xml);
+ ds.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString xml_text = ds.read();
xml.close();
- QString output;
- QTextStream ts(&output, IO_WriteOnly);
+ TQString output;
+ TQTextStream ts(&output, IO_WriteOnly);
StructureParser::cleanupTags(xml_text);
- QValueList<int> line_offsets;
+ TQValueList<int> line_offsets;
line_offsets.append(0);
int index = 0;
while (true) {
@@ -95,7 +95,7 @@ int main( int argc, char **argv )
}
int old_start_line = -1, old_start_col = -1;
- QString old_text;
+ TQString old_text;
MsgList::Iterator old_it = english.end();
for (MsgList::Iterator it = english.begin();
@@ -134,7 +134,7 @@ int main( int argc, char **argv )
continue;
int end_pos = line_offsets[bi.end_line - 1] + bi.end_col - 1;
- QString xml = xml_text.mid(start_pos, end_pos - start_pos);
+ TQString xml = xml_text.mid(start_pos, end_pos - start_pos);
int index = 0;
while (true) {
index = xml.find("<!--");
@@ -152,7 +152,7 @@ int main( int argc, char **argv )
}
StructureParser::descape(xml);
- QString descaped = StructureParser::descapeLiterals((*it).msgid);
+ TQString descaped = StructureParser::descapeLiterals((*it).msgid);
if (translations.contains(descaped))
descaped = translations[descaped];
@@ -170,7 +170,7 @@ int main( int argc, char **argv )
index++;
while ((*it).msgid.at(index) == ' ')
index++;
- QString omsgid = (*it).msgid;
+ TQString omsgid = (*it).msgid;
(*it).msgid = (*it).msgid.mid(index);
index = (*it).msgid.length() - 1;
@@ -236,14 +236,14 @@ int main( int argc, char **argv )
ts << xml_text.mid(old_pos);
- output.replace(QRegExp("<trans_comment\\s*>"), "");
- output.replace(QRegExp("</trans_comment\\s*>"), "");
+ output.replace(TQRegExp("<trans_comment\\s*>"), "");
+ output.replace(TQRegExp("</trans_comment\\s*>"), "");
StructureParser::removeEmptyTags(output);
index = 0;
while (true) {
- index = output.find(QRegExp(">[^\n]"), index );
+ index = output.find(TQRegExp(">[^\n]"), index );
if ( index == -1 )
break;
if ( output.at( index - 1 ) == '/' || output.at( index - 1 ) == '-' ||
diff --git a/poxml/split.cpp b/poxml/split.cpp
index 28149ed6..29104d3e 100644
--- a/poxml/split.cpp
+++ b/poxml/split.cpp
@@ -16,14 +16,14 @@ int main( int argc, char **argv )
MsgList english = parseXML(argv[1]);
MsgList translated = parseXML(argv[2]);
- QMap<QString, int>::ConstIterator eit2 = english.pc.anchors.begin();
+ TQMap<TQString, int>::ConstIterator eit2 = english.pc.anchors.begin();
- QMap<int, QString> errors;
+ TQMap<int, TQString> errors;
while (eit2 != english.pc.anchors.end())
{
if (eit2.data() == translated.pc.anchors[eit2.key()]) {
- QString key = eit2.key();
+ TQString key = eit2.key();
eit2++;
translated.pc.anchors.remove(key);
english.pc.anchors.remove(key);
@@ -34,7 +34,7 @@ int main( int argc, char **argv )
}
if (report_mismatches && errors.count()) {
- for (QMap<int, QString>::ConstIterator it = errors.begin(); it != errors.end(); ++it)
+ for (TQMap<int, TQString>::ConstIterator it = errors.begin(); it != errors.end(); ++it)
{
if (translated.pc.anchors.contains(it.data()))
fprintf(stderr, "id=\"%s\" not in the same paragraphs (%d vs %d)\n", it.data().latin1(),
@@ -58,7 +58,7 @@ int main( int argc, char **argv )
bool have_roles_of_translators = false;
bool have_credit_for_translators = false;
- QMap<QString, int> msgids;
+ TQMap<TQString, int> msgids;
int index = 0;
for (MsgList::Iterator it = english.begin();
@@ -112,7 +112,7 @@ int main( int argc, char **argv )
while (tit != translated.end())
{
MsgBlock mb;
- mb.msgid = QString::fromLatin1("appended paragraph %1").arg(counter++);
+ mb.msgid = TQString::fromLatin1("appended paragraph %1").arg(counter++);
mb.msgstr = (*tit).msgid;
mb.lines += (*tit).lines;
english.append(mb);
@@ -130,7 +130,7 @@ int main( int argc, char **argv )
it != english.end(); ++it)
{
cout << "#: ";
- for (QValueList<BlockInfo>::ConstIterator it2 =
+ for (TQValueList<BlockInfo>::ConstIterator it2 =
(*it).lines.begin(); it2 != (*it).lines.end(); it2++) {
if (it2 != (*it).lines.begin())
cout << ", ";
diff --git a/poxml/transxx.cpp b/poxml/transxx.cpp
index dc3dde00..d876d56c 100644
--- a/poxml/transxx.cpp
+++ b/poxml/transxx.cpp
@@ -4,9 +4,9 @@ using namespace std;
#include <fstream>
#include "GettextLexer.hpp"
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
int main(int argc, char **argv)
{
@@ -15,15 +15,15 @@ int main(int argc, char **argv)
return -1;
}
- QString translation = "xx";
- QCString filename;
+ TQString translation = "xx";
+ TQCString filename;
if( argc == 4 ) {
- if( argv[1]!=QString("--text") ) {
+ if( argv[1]!=TQString("--text") ) {
qWarning( "usage: %s [--text translation] potfile", argv[0] );
return -1;
}
- translation = QString::fromLocal8Bit(argv[2]);
+ translation = TQString::fromLocal8Bit(argv[2]);
filename = argv[3];
} else {
filename = argv[1];
@@ -54,17 +54,17 @@ int main(int argc, char **argv)
}
else
{
- QStringList headerLines = QStringList::split( "\\n", ( *header ).msgstr, false );
- QFileInfo fi( QString::fromLocal8Bit( filename ) );
- QString projectId( "Project-Id-Version: " );
+ TQStringList headerLines = TQStringList::split( "\\n", ( *header ).msgstr, false );
+ TQFileInfo fi( TQString::fromLocal8Bit( filename ) );
+ TQString projectId( "Project-Id-Version: " );
projectId += fi.baseName( false );
- headerLines.gres( QRegExp( "^Project-Id-Version:.*" ), projectId );
- headerLines.gres( QRegExp( "^Last-Translator:.*" ), "Last-Translator: transxx program <null@kde.org>" );
- headerLines.gres( QRegExp( "^Language-Team:.*" ), "Language-Team: Test Language <kde-i18n-doc@kde.org>" );
- QString revisionDate ( "PO-Revision-Date: " );
- const QDateTime dt = QDateTime::currentDateTime( Qt::UTC );
+ headerLines.gres( TQRegExp( "^Project-Id-Version:.*" ), projectId );
+ headerLines.gres( TQRegExp( "^Last-Translator:.*" ), "Last-Translator: transxx program <null@kde.org>" );
+ headerLines.gres( TQRegExp( "^Language-Team:.*" ), "Language-Team: Test Language <kde-i18n-doc@kde.org>" );
+ TQString revisionDate ( "PO-Revision-Date: " );
+ const TQDateTime dt = TQDateTime::currentDateTime( Qt::UTC );
revisionDate += dt.toString( "yyyy-MM-dd hh:mm+0000" );
- headerLines.gres( QRegExp( "^PO-Revision-Date:.*" ), revisionDate );
+ headerLines.gres( TQRegExp( "^PO-Revision-Date:.*" ), revisionDate );
headerLines << "Plural-Forms: nplurals=1; plural=0;";
outputMsg ( "msgid", "" );
outputMsg ( "msgstr", escapePO( headerLines.join("\\n") + "\\n" ) );
@@ -74,8 +74,8 @@ int main(int argc, char **argv)
for (MsgList::ConstIterator it = translated.begin();
it != translated.end(); ++it)
{
- QString msgid = ( *it ).msgid;
- QString msgid_plural = ( *it ).msgid_plural;
+ TQString msgid = ( *it ).msgid;
+ TQString msgid_plural = ( *it ).msgid_plural;
if ( !msgid.isEmpty() ) {
outputMsg("msgid", escapePO( msgid) );
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
outputMsg("msgid_plural", escapePO( msgid_plural ) );
}
- QString msgstr;
+ TQString msgstr;
if ( msgid.find( "Definition of PluralForm" ) != -1 ) {
outputMsg("msgstr", "NoPlural");
diff --git a/poxml/xml2pot.cpp b/poxml/xml2pot.cpp
index 593e75be..340d4689 100644
--- a/poxml/xml2pot.cpp
+++ b/poxml/xml2pot.cpp
@@ -1,8 +1,8 @@
#include "parser.h"
#include <stdlib.h>
#include <iostream>
-#include <qfileinfo.h>
-#include <qdatetime.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
using namespace std;
@@ -15,7 +15,7 @@ int main( int argc, char **argv )
MsgList english = parseXML(argv[1]);
- QMap<QString, int> msgids;
+ TQMap<TQString, int> msgids;
int index = 0;
for (MsgList::Iterator it = english.begin();
@@ -33,7 +33,7 @@ int main( int argc, char **argv )
}
}
- const QDateTime now = QDateTime::currentDateTime( Qt::UTC );
+ const TQDateTime now = TQDateTime::currentDateTime( Qt::UTC );
cout << "# SOME DESCRIPTIVE TITLE.\n";
cout << "# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n";
@@ -52,14 +52,14 @@ int main( int argc, char **argv )
cout << "\"Content-Transfer-Encoding: 8bit\\n\"\n";
cout << "\n";
- const QString fname = QFileInfo(argv[1]).fileName();
+ const TQString fname = TQFileInfo(argv[1]).fileName();
for (MsgList::ConstIterator it = english.begin();
it != english.end(); ++it)
{
cout << "#. Tag: " << (*it).tag.utf8() << endl;
cout << "#: ";
- for (QValueList<BlockInfo>::ConstIterator it2 =
+ for (TQValueList<BlockInfo>::ConstIterator it2 =
(*it).lines.begin(); it2 != (*it).lines.end(); it2++) {
if (it2 != (*it).lines.begin())
cout << " ";
diff --git a/scheck/scheck.cpp b/scheck/scheck.cpp
index d0d50422..bf00d699 100644
--- a/scheck/scheck.cpp
+++ b/scheck/scheck.cpp
@@ -37,31 +37,31 @@
#include <stdlib.h>
-#include <qdict.h>
-#include <qdrawutil.h>
-#include <qpainter.h>
-#include <qpointarray.h>
-#include <qstyleplugin.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfontmetrics.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qmenubar.h>
-#include <qobjectlist.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qregexp.h>
-#include <qscrollbar.h>
-#include <qslider.h>
-#include <qstylesheet.h>
-#include <qtabbar.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtoolbar.h>
-#include <qpopupmenu.h>
-#include <qwidgetlist.h>
+#include <tqdict.h>
+#include <tqdrawutil.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
+#include <tqstyleplugin.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfontmetrics.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqmenubar.h>
+#include <tqobjectlist.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqregexp.h>
+#include <tqscrollbar.h>
+#include <tqslider.h>
+#include <tqstylesheet.h>
+#include <tqtabbar.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtoolbar.h>
+#include <tqpopupmenu.h>
+#include <tqwidgetlist.h>
#include <kdrawutil.h>
#include <kaccelmanager.h>
@@ -80,12 +80,12 @@ class StyleCheckStylePlugin : public QStylePlugin
StyleCheckStylePlugin() {}
~StyleCheckStylePlugin() {}
- QStringList keys() const
+ TQStringList keys() const
{
- return QStringList() << "Check";
+ return TQStringList() << "Check";
}
- QStyle* create( const QString& key )
+ TQStyle* create( const TQString& key )
{
if ( key == "check" )
return new StyleCheckStyle( );
@@ -100,12 +100,12 @@ KDE_Q_EXPORT_PLUGIN( StyleCheckStylePlugin )
// ### Remove globals
-static QBitmap lightBmp;
-static QBitmap grayBmp;
-static QBitmap dgrayBmp;
-static QBitmap centerBmp;
-static QBitmap maskBmp;
-static QBitmap xBmp;
+static TQBitmap lightBmp;
+static TQBitmap grayBmp;
+static TQBitmap dgrayBmp;
+static TQBitmap centerBmp;
+static TQBitmap maskBmp;
+static TQBitmap xBmp;
static const int itemFrame = 1;
static const int itemHMargin = 3;
@@ -115,7 +115,7 @@ static const int rightBorder = 12;
// ---------------------------------------------------------------------------
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
enum ColonMode
{
@@ -177,13 +177,13 @@ namespace
class LowerCaseWords
{
private:
- static QDict<bool>* m_words;
+ static TQDict<bool>* m_words;
public:
- static QDict<bool>* words()
+ static TQDict<bool>* words()
{
if (!m_words)
{
- m_words = new QDict<bool>;
+ m_words = new TQDict<bool>;
// Prepositions under five letters, except from & under
m_words->insert( "for", (bool*)1);
m_words->insert( "in", (bool*)1);
@@ -217,20 +217,20 @@ namespace
}
};
- QDict<bool>* LowerCaseWords::m_words = 0;
+ TQDict<bool>* LowerCaseWords::m_words = 0;
class ExplicitCaseWords
{
private:
- static QDict<const char>* m_words;
+ static TQDict<const char>* m_words;
public:
- static QDict<const char>* words()
+ static TQDict<const char>* words()
{
if (!m_words)
{
// Store the words like this:
// "lowercase", "CorrectCase"
- m_words = new QDict<const char>(61);
+ m_words = new TQDict<const char>(61);
// week day names
m_words->insert( "monday", "Monday");
m_words->insert( "tuesday", "Tuesday");
@@ -297,12 +297,12 @@ namespace
}
};
- QDict<const char>* ExplicitCaseWords::m_words = 0;
+ TQDict<const char>* ExplicitCaseWords::m_words = 0;
}
static bool xxMode;
-static QColor severityColor(int severity)
+static TQColor severityColor(int severity)
{
if (severity == StyleGuideViolation::Error)
{
@@ -310,7 +310,7 @@ static QColor severityColor(int severity)
}
else if (severity == StyleGuideViolation::AccelConflict)
{
- return QColor(255, 128, 0);
+ return TQColor(255, 128, 0);
}
else if (severity == StyleGuideViolation::AccelSuggestion)
{
@@ -318,7 +318,7 @@ static QColor severityColor(int severity)
}
else if (severity == StyleGuideViolation::Untranslated)
{
- return QColor(255, 0, 255);
+ return TQColor(255, 0, 255);
}
else
{
@@ -327,7 +327,7 @@ static QColor severityColor(int severity)
}
// Removes '&' style accelerators from text strings
-static void removeAccelerators(QString &str)
+static void removeAccelerators(TQString &str)
{
for (unsigned int p = 0; p < str.length(); p++)
{
@@ -341,19 +341,19 @@ static void removeAccelerators(QString &str)
}
-static void removeXX(QString &str)
+static void removeXX(TQString &str)
{
str.replace("xx",""); // simple but atm best working
}
-static QString removedXX(QString str)
+static TQString removedXX(TQString str)
{
if (xxMode)
removeXX(str);
return str;
}
-static QString stripAccelViolations(QString str)
+static TQString stripAccelViolations(TQString str)
{
int conflict_pos = str.find("(&&)");
if (conflict_pos >= 0)
@@ -371,7 +371,7 @@ static QString stripAccelViolations(QString str)
}
// Must be passed a string with its accelerators removed
-QString findAccelViolations(QString str, QValueVector<StyleGuideViolation> &violations)
+TQString findAccelViolations(TQString str, TQValueVector<StyleGuideViolation> &violations)
{
int conflict_pos = str.find("(&)");
@@ -397,7 +397,7 @@ QString findAccelViolations(QString str, QValueVector<StyleGuideViolation> &viol
return str;
}
-QString findUntranslatedViolations(QString str, QValueVector<StyleGuideViolation> &violations)
+TQString findUntranslatedViolations(TQString str, TQValueVector<StyleGuideViolation> &violations)
{
if (str.find("xx")!=-1)
removeXX(str);
@@ -409,9 +409,9 @@ QString findUntranslatedViolations(QString str, QValueVector<StyleGuideViolation
return str;
}
-static QValueVector<StyleGuideViolation> checkSentenceStyle(QString str, ColonMode mode = ColonlessWidget, AccelMode accelMode = HasAccels)
+static TQValueVector<StyleGuideViolation> checkSentenceStyle(TQString str, ColonMode mode = ColonlessWidget, AccelMode accelMode = HasAccels)
{
- QValueVector<StyleGuideViolation> violations;
+ TQValueVector<StyleGuideViolation> violations;
bool afterWhiteSpace = true;
bool firstChar = true;
bool inQuote = false;
@@ -486,7 +486,7 @@ static QValueVector<StyleGuideViolation> checkSentenceStyle(QString str, ColonM
if (afterWhiteSpace) //We don't check for fOO and things like that, just first letters..
{
// Try to extract the whole word..
- QString word = QString::null;
+ TQString word = TQString::null;
for (unsigned int l = c+1; l<str.length(); l++)
{
if (!str[l].isLetter() && !str[l].isNumber() && str[l] != '&' && str[l] != '-')
@@ -517,12 +517,12 @@ static QValueVector<StyleGuideViolation> checkSentenceStyle(QString str, ColonM
}
}
}
- else if (str[c].category() == QChar::Letter_Lowercase) //Lowercase character..
+ else if (str[c].category() == TQChar::Letter_Lowercase) //Lowercase character..
{
if (firstChar)
violations.push_back(c);
}
- else if (str[c].category() == QChar::Letter_Uppercase)
+ else if (str[c].category() == TQChar::Letter_Uppercase)
{
if (!firstChar) //A possible violation -- can be a proper name..
{
@@ -532,7 +532,7 @@ static QValueVector<StyleGuideViolation> checkSentenceStyle(QString str, ColonM
{
if (str[d].isSpace() )
break;
- if (str[d].category() == QChar::Letter_Uppercase)
+ if (str[d].category() == TQChar::Letter_Uppercase)
{
acronym = true;
break;
@@ -581,9 +581,9 @@ static QValueVector<StyleGuideViolation> checkSentenceStyle(QString str, ColonM
return violations;
}
-static QValueVector<StyleGuideViolation> checkTitleStyle(QString str, TitleType titleType = ShortTitle, AccelMode accelMode = NoAccels)
+static TQValueVector<StyleGuideViolation> checkTitleStyle(TQString str, TitleType titleType = ShortTitle, AccelMode accelMode = NoAccels)
{
- QValueVector<StyleGuideViolation> violations;
+ TQValueVector<StyleGuideViolation> violations;
bool afterWhiteSpace = true;
if (xxMode)
@@ -646,7 +646,7 @@ static QValueVector<StyleGuideViolation> checkTitleStyle(QString str, TitleType
bool lastWord = false;
//Now, try to extract the whole word..
- QString word = QString::null;
+ TQString word = TQString::null;
for (unsigned int l = c+1; l<str.length(); l++)
{
if (!str[l].isLetter() && !str[l].isNumber() && str[l] != '&' && str[l] != '-')
@@ -664,7 +664,7 @@ static QValueVector<StyleGuideViolation> checkTitleStyle(QString str, TitleType
lastWord = true;
}
- QString lower_word = word.lower();
+ TQString lower_word = word.lower();
// Check if it's in the explicit case word list
const char *correctWord = ExplicitCaseWords::words()->find(lower_word);
@@ -689,12 +689,12 @@ static QValueVector<StyleGuideViolation> checkTitleStyle(QString str, TitleType
else if (c && !lastWord && LowerCaseWords::words()->find(word.lower()))
{
// We're a lowercase word
- if (str[c].category() == QChar::Letter_Uppercase)
+ if (str[c].category() == TQChar::Letter_Uppercase)
violations.push_back(c);
}
else
{
- if (str[c].category() == QChar::Letter_Lowercase)
+ if (str[c].category() == TQChar::Letter_Lowercase)
violations.push_back(c);
}
}
@@ -707,7 +707,7 @@ static QValueVector<StyleGuideViolation> checkTitleStyle(QString str, TitleType
}
-static void renderViolations(const QValueVector<StyleGuideViolation>& violations, QPainter* p, QRect r, int flags, QString text)
+static void renderViolations(const TQValueVector<StyleGuideViolation>& violations, TQPainter* p, TQRect r, int flags, TQString text)
{
if (xxMode)
@@ -716,20 +716,20 @@ static void renderViolations(const QValueVector<StyleGuideViolation>& violations
if (violations.size()>0)
{
p->save();
- QFontMetrics qfm = p->fontMetrics ();
+ TQFontMetrics qfm = p->fontMetrics ();
- QString parStr = text;
+ TQString parStr = text;
int len = text.length();
/*****
- Begin code snipped from QPainter, somewhat modified
+ Begin code snipped from TQPainter, somewhat modified
*/
// str.setLength() always does a deep copy, so the replacement code below is safe.
parStr.setLength( len );
// compatible behaviour to the old implementation. Replace tabs by spaces
- QChar *chr = (QChar*)parStr.unicode();
+ TQChar *chr = (TQChar*)parStr.unicode();
int l = len;
while ( l-- )
{
@@ -763,14 +763,14 @@ static void renderViolations(const QValueVector<StyleGuideViolation>& violations
/*****
- end code snipped from QPainter...
+ end code snipped from TQPainter...
*/
int yt = yoff - h;
int yb = yoff;;
- QRect bnd(xoff, yoff - h, w, h);
+ TQRect bnd(xoff, yoff - h, w, h);
for (unsigned int v = 0; v < violations.size(); v++)
{
@@ -814,22 +814,22 @@ static void renderViolations(const QValueVector<StyleGuideViolation>& violations
StyleCheckTitleWatcher::StyleCheckTitleWatcher()
{
- QTimer* checkTimer = new QTimer(this);
- connect( checkTimer, SIGNAL(timeout()), this, SLOT(slotCheck()) );
+ TQTimer* checkTimer = new TQTimer(this);
+ connect( checkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheck()) );
checkTimer->start(1000);
}
-void StyleCheckTitleWatcher::addWatched(QWidget* w)
+void StyleCheckTitleWatcher::addWatched(TQWidget* w)
{
watched.push_back(w);
watchedTitles.push_back(w->caption());
}
-QString StyleCheckTitleWatcher::cleanErrorMarkers(QString in)
+TQString StyleCheckTitleWatcher::cleanErrorMarkers(TQString in)
{
//We add # to denote an error...So now remove it.. It helps us check whether it's the same caption as before..
- QString out = "";
+ TQString out = "";
for (unsigned int c = 0; c < in.length(); c++)
{
if (in[c] != '|')
@@ -846,16 +846,16 @@ void StyleCheckTitleWatcher::slotCheck()
if (!watched[c].isNull() )
{
- QString cleaned = cleanErrorMarkers(watched[c]->caption());
+ TQString cleaned = cleanErrorMarkers(watched[c]->caption());
if (cleaned != watchedTitles[c])
{
watchedTitles[c] = watched[c]->caption();
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(watched[c]->caption(), LongTitle, NoAccels);
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(watched[c]->caption(), LongTitle, NoAccels);
if (violations.size() == 0)
continue;
- QString out = "";
- QString in = watched[c]->caption();
+ TQString out = "";
+ TQString in = watched[c]->caption();
int prev = -1;
for (unsigned int v = 0; v < violations.size(); v++)
{
@@ -879,10 +879,10 @@ StyleCheckStyle::StyleCheckStyle( )
: KStyle( 0 , ThreeButtonScrollBar )
{
hoverWidget = 0L;
- topLevelAccelManageTimer = new QTimer(this);
- connect(topLevelAccelManageTimer, SIGNAL(timeout()), this, SLOT(slotAccelManage()));
+ topLevelAccelManageTimer = new TQTimer(this);
+ connect(topLevelAccelManageTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAccelManage()));
watcher = new StyleCheckTitleWatcher;
- xxMode = (QString(getenv("KDE_LANG"))=="xx");
+ xxMode = (TQString(getenv("KDE_LANG"))=="xx");
}
@@ -892,7 +892,7 @@ StyleCheckStyle::~StyleCheckStyle()
}
//We walk down the widget tree until we find something we render, and sic KAccelManager in programmer's mode on those
-void StyleCheckStyle::accelManageRecursive(QWidget* widget)
+void StyleCheckStyle::accelManageRecursive(TQWidget* widget)
{
if (&widget->style() == this)
{
@@ -900,16 +900,16 @@ void StyleCheckStyle::accelManageRecursive(QWidget* widget)
return;
}
- const QObjectList* children = widget->children();
+ const TQObjectList* children = widget->children();
if (!children)
return;
- QObjectListIterator iter(*children);
+ TQObjectListIterator iter(*children);
- QObject* walk;
+ TQObject* walk;
while ((walk = iter.current()))
{
if (walk->isWidgetType())
- accelManageRecursive(static_cast<QWidget*>(walk));
+ accelManageRecursive(static_cast<TQWidget*>(walk));
++iter;
}
}
@@ -918,13 +918,13 @@ void StyleCheckStyle::accelManageRecursive(QWidget* widget)
void StyleCheckStyle::slotAccelManage()
{
//Walk through top-levels
- QWidgetList* topLevels = QApplication::topLevelWidgets();
+ TQWidgetList* topLevels = TQApplication::topLevelWidgets();
if (!topLevels)
return;
- QWidgetListIt iter(*topLevels);
+ TQWidgetListIt iter(*topLevels);
- QWidget* walk;
+ TQWidget* walk;
while ((walk = iter.current()))
{
accelManageRecursive(walk);
@@ -934,7 +934,7 @@ void StyleCheckStyle::slotAccelManage()
}
-void StyleCheckStyle::polish(QWidget* widget)
+void StyleCheckStyle::polish(TQWidget* widget)
{
/* Having a global view on the widget makes accel
easier to catch. However, just intruding on the main window
@@ -945,21 +945,21 @@ void StyleCheckStyle::polish(QWidget* widget)
//
// Put in order of highest occurance to maximise hit rate
- if (widget->inherits("QPushButton")) {
+ if (widget->inherits("TQPushButton")) {
widget->installEventFilter(this);
}
- if (widget->inherits("QLabel"))
+ if (widget->inherits("TQLabel"))
{
widget->installEventFilter(this);
}
- if (widget->inherits("QGroupBox"))
+ if (widget->inherits("TQGroupBox"))
{
widget->installEventFilter(this);
}
- if (widget->inherits("QMainWindow") || widget->inherits("QDialog" ) )
+ if (widget->inherits("TQMainWindow") || widget->inherits("TQDialog" ) )
{
watcher->addWatched(widget);
}
@@ -968,18 +968,18 @@ void StyleCheckStyle::polish(QWidget* widget)
}
-void StyleCheckStyle::unPolish(QWidget* widget)
+void StyleCheckStyle::unPolish(TQWidget* widget)
{
- if (widget->inherits("QPushButton")) {
+ if (widget->inherits("TQPushButton")) {
widget->removeEventFilter(this);
}
- if (widget->inherits("QLabel"))
+ if (widget->inherits("TQLabel"))
{
widget->removeEventFilter(this);
}
- if (widget->inherits("QGroupBox"))
+ if (widget->inherits("TQGroupBox"))
{
widget->removeEventFilter(this);
}
@@ -993,11 +993,11 @@ void StyleCheckStyle::unPolish(QWidget* widget)
// This function draws primitive elements as well as their masks.
void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
bool down = flags & Style_Down;
bool on = flags & Style_On;
@@ -1026,7 +1026,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
int y2 = y+h-1;
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Outer frame (round style)
p->setPen(cg.shadow());
@@ -1058,10 +1058,10 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
if ( sunken )
kDrawBeButton( p, x, y, w, h, cg, true,
- &cg.brush(QColorGroup::Mid) );
+ &cg.brush(TQColorGroup::Mid) );
else if ( flags & Style_MouseOver ) {
- QBrush brush(cg.button().light(110));
+ TQBrush brush(cg.button().light(110));
kDrawBeButton( p, x, y, w, h, cg, false, &brush );
}
@@ -1071,7 +1071,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
else
kDrawBeButton(p, x, y, w, h, cg, false,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
break;
}
@@ -1101,7 +1101,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+2, y+2, w-4, h-4, cg.button());
else
- renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), flags & Style_Horizontal );
}
break;
@@ -1121,8 +1121,8 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
case PE_HeaderSection: {
// Temporary solution for the proper orientation of gradients.
bool horizontal = true;
- if (p && p->device()->devType() == QInternal::Widget) {
- QHeader* hdr = dynamic_cast<QHeader*>(p->device());
+ if (p && p->device()->devType() == TQInternal::Widget) {
+ TQHeader* hdr = dynamic_cast<TQHeader*>(p->device());
if (hdr)
horizontal = hdr->orientation() == Horizontal;
}
@@ -1132,7 +1132,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
bool sunken = on || down;
int x2 = x+w-1;
int y2 = y+h-1;
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
// Bevel
p->setPen(sunken ? cg.mid() : cg.light());
@@ -1148,7 +1148,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
if (sunken)
p->fillRect(x+1, y+1, w-3, h-3, cg.button());
else
- renderGradient( p, QRect(x+1, y+1, w-3, h-3),
+ renderGradient( p, TQRect(x+1, y+1, w-3, h-3),
cg.button(), !horizontal );
p->setPen( oldPen );
break;
@@ -1212,12 +1212,12 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
if (flags & Style_Horizontal) {
p->drawLine(x, y, x2, y);
p->drawLine(x, y2, x2, y2);
- renderGradient(p, QRect(x, y+1, w, h-2),
+ renderGradient(p, TQRect(x, y+1, w, h-2),
cg.mid(), false);
} else {
p->drawLine(x, y, x, y2);
p->drawLine(x2, y, x2, y2);
- renderGradient(p, QRect(x+1, y, w-2, h),
+ renderGradient(p, TQRect(x+1, y, w-2, h),
cg.mid(), true);
}
break;
@@ -1252,7 +1252,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
bool nochange = flags & Style_NoChange;
if (xBmp.isNull()) {
- xBmp = QBitmap(7, 7, x_bits, true);
+ xBmp = TQBitmap(7, 7, x_bits, true);
xBmp.setMask(xBmp);
}
@@ -1306,10 +1306,10 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator: {
if (lightBmp.isNull()) {
- lightBmp = QBitmap(13, 13, radiooff_light_bits, true);
- grayBmp = QBitmap(13, 13, radiooff_gray_bits, true);
- dgrayBmp = QBitmap(13, 13, radiooff_dgray_bits, true);
- centerBmp = QBitmap(13, 13, radiooff_center_bits, true);
+ lightBmp = TQBitmap(13, 13, radiooff_light_bits, true);
+ grayBmp = TQBitmap(13, 13, radiooff_gray_bits, true);
+ dgrayBmp = TQBitmap(13, 13, radiooff_dgray_bits, true);
+ centerBmp = TQBitmap(13, 13, radiooff_center_bits, true);
centerBmp.setMask( centerBmp );
}
@@ -1326,7 +1326,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
// Indicator "dot"
if ( on ) {
- QColor color = flags & Style_NoChange ?
+ TQColor color = flags & Style_NoChange ?
cg.dark() : cg.text();
p->setPen(color);
@@ -1345,7 +1345,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
case PE_ExclusiveIndicatorMask: {
if (maskBmp.isNull()) {
- maskBmp = QBitmap(13, 13, radiomask_bits, true);
+ maskBmp = TQBitmap(13, 13, radiomask_bits, true);
maskBmp.setMask(maskBmp);
}
@@ -1380,7 +1380,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
p->setPen(cg.mid());
p->drawLine(x2-1, y+1, x2-1, y2-1);
p->drawLine(x+1, y2-1, x2-1, y2-1);
- p->fillRect(x+3, y+3, w-5, h-5, cg.brush(QColorGroup::Background));
+ p->fillRect(x+3, y+3, w-5, h-5, cg.brush(TQColorGroup::Background));
break;
}
@@ -1396,7 +1396,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
: opt.lineWidth();
if (lw == 2)
{
- QPen oldPen = p->pen();
+ TQPen oldPen = p->pen();
int x,y,w,h;
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
@@ -1438,13 +1438,13 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine(x2, r.y(), x2, y2);
// ### Qt should specify Style_Horizontal where appropriate
- renderGradient( p, QRect(r.x()+1, r.y()+1, x2-1, y2-1),
+ renderGradient( p, TQRect(r.x()+1, r.y()+1, x2-1, y2-1),
cg.button(), (r.width() < r.height()) &&
(pe != PE_PanelMenuBar) );
}
else
{
- renderGradient( p, QRect(r.x(), r.y(), x2, y2),
+ renderGradient( p, TQRect(r.x(), r.y(), x2, y2),
cg.button(), (r.width() < r.height()) &&
(pe != PE_PanelMenuBar) );
}
@@ -1480,7 +1480,7 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
// -------------------------------------------------------------------
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft)
{
- QPointArray a;
+ TQPointArray a;
// HighColor & Default arrows
switch(pe) {
@@ -1527,12 +1527,12 @@ void StyleCheckStyle::drawPrimitive( PrimitiveElement pe,
void StyleCheckStyle::drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &opt ) const
+ const TQStyleOption &opt ) const
{
switch ( kpe )
{
@@ -1613,15 +1613,15 @@ void StyleCheckStyle::drawKStylePrimitive( KStylePrimitive kpe,
// SLIDER GROOVE
// -------------------------------------------------------------------
case KPE_SliderGroove: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
int gcenter = (horizontal ? r.height() : r.width()) / 2;
- QRect gr;
+ TQRect gr;
if (horizontal)
- gr = QRect(r.x(), r.y()+gcenter-3, r.width(), 7);
+ gr = TQRect(r.x(), r.y()+gcenter-3, r.width(), 7);
else
- gr = QRect(r.x()+gcenter-3, r.y(), 7, r.height());
+ gr = TQRect(r.x()+gcenter-3, r.y(), 7, r.height());
int x,y,w,h;
gr.rect(&x, &y, &w, &h);
@@ -1647,7 +1647,7 @@ void StyleCheckStyle::drawKStylePrimitive( KStylePrimitive kpe,
// SLIDER HANDLE
// -------------------------------------------------------------------
case KPE_SliderHandle: {
- const QSlider* slider = (const QSlider*)widget;
+ const TQSlider* slider = (const TQSlider*)widget;
bool horizontal = slider->orientation() == Horizontal;
int x,y,w,h;
r.rect(&x, &y, &w, &h);
@@ -1673,7 +1673,7 @@ void StyleCheckStyle::drawKStylePrimitive( KStylePrimitive kpe,
p->setPen(cg.mid());
p->drawLine(x+3, y2-2, x2-2, y2-2);
p->drawLine(x2-2, y+3, x2-2, y2-2);
- renderGradient(p, QRect(x+3, y+3, w-6, h-6),
+ renderGradient(p, TQRect(x+3, y+3, w-6, h-6),
cg.button(), !horizontal);
// Paint riffles
@@ -1706,12 +1706,12 @@ void StyleCheckStyle::drawKStylePrimitive( KStylePrimitive kpe,
void StyleCheckStyle::drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch (element)
{
@@ -1721,8 +1721,8 @@ void StyleCheckStyle::drawControl( ControlElement element,
if ( widget == hoverWidget )
flags |= Style_MouseOver;
- QPushButton *button = (QPushButton*) widget;
- QRect br = r;
+ TQPushButton *button = (TQPushButton*) widget;
+ TQRect br = r;
bool btnDefault = button->isDefault();
if ( btnDefault || button->autoDefault() ) {
@@ -1743,7 +1743,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
// PUSHBUTTON LABEL
// -------------------------------------------------------------------
case CE_PushButtonLabel: {
- const QPushButton* button = (const QPushButton*)widget;
+ const TQPushButton* button = (const TQPushButton*)widget;
bool active = button->isOn() || button->isDown();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1758,61 +1758,61 @@ void StyleCheckStyle::drawControl( ControlElement element,
// Does the button have a popup menu?
if ( button->isMenuButton() ) {
int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, QRect(x + w - dx - 2, y + 2, dx, h - 4),
+ drawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4),
cg, flags, opt );
w -= dx;
}
// Draw the icon if there is one
if ( button->iconSet() && !button->iconSet()->isNull() ) {
- QIconSet::Mode mode = QIconSet::Disabled;
- QIconSet::State state = QIconSet::Off;
+ TQIconSet::Mode mode = TQIconSet::Disabled;
+ TQIconSet::State state = TQIconSet::Off;
if (button->isEnabled())
- mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal;
+ mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal;
if (button->isToggleButton() && button->isOn())
- state = QIconSet::On;
+ state = TQIconSet::On;
- QPixmap pixmap = button->iconSet()->pixmap( QIconSet::Small, mode, state );
+ TQPixmap pixmap = button->iconSet()->pixmap( TQIconSet::Small, mode, state );
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
int pw = pixmap.width();
x += pw + 4;
w -= pw + 4;
}
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(button->text(), ShortTitle, HasAccels);
- renderViolations(violations, p, QRect(x,y,w,h), AlignCenter | ShowPrefix, button->text());
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(button->text(), ShortTitle, HasAccels);
+ renderViolations(violations, p, TQRect(x,y,w,h), AlignCenter | ShowPrefix, button->text());
// Make the label indicate if the button is a default button or not
if ( active || button->isDefault() ) {
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in QPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
int i;
// Text shadow
if (button->isEnabled()) // Don't draw double-shadow when disabled
for(i=0; i<2; i++)
- drawItem( p, QRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), button->pixmap(),
removedXX(stripAccelViolations(button->text())), -1,
active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for(i=0; i<2; i++)
- drawItem( p, QRect(x+i, y, w, h), AlignCenter | ShowPrefix,
+ drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix,
button->colorGroup(), button->isEnabled(), button->pixmap(),
removedXX(stripAccelViolations(button->text())), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
} else
- drawItem( p, QRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), removedXX(stripAccelViolations(button->text())), -1,
active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
// Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- QStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
+ TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
cg, flags );
break;
}
@@ -1822,15 +1822,15 @@ void StyleCheckStyle::drawControl( ControlElement element,
if ( opt.isDefault() )
break;
- const QTabBar * tb = (const QTabBar *) widget;
- QTab * t = opt.tab();
+ const TQTabBar * tb = (const TQTabBar *) widget;
+ TQTab * t = opt.tab();
- QRect tr = r;
+ TQRect tr = r;
if ( t->identifier() == tb->currentTab() )
tr.setBottom( tr.bottom() -
- pixelMetric( QStyle::PM_DefaultFrameWidth, tb ) );
+ pixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) );
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(t->text(), ShortTitle, HasAccels);
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(t->text(), ShortTitle, HasAccels);
renderViolations(violations, p, r, AlignCenter |ShowPrefix, t->text());
drawItem( p, tr, AlignCenter | ShowPrefix, cg,
@@ -1844,11 +1844,11 @@ void StyleCheckStyle::drawControl( ControlElement element,
case CE_CheckBoxLabel:
{
- const QCheckBox* checkbox = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* checkbox = static_cast<const TQCheckBox*>(widget);
- int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
- QValueVector<StyleGuideViolation> violations = checkSentenceStyle(checkbox->text());
+ TQValueVector<StyleGuideViolation> violations = checkSentenceStyle(checkbox->text());
renderViolations(violations, p, r, alignment | AlignVCenter | ShowPrefix, checkbox->text());
@@ -1857,7 +1857,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
if (flags & Style_HasFocus)
{
- QRect fr = visualRect(subRect(SR_CheckBoxFocusRect, widget), widget);
+ TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, widget), widget);
drawPrimitive(PE_FocusRect, p, fr, cg, flags);
}
break;
@@ -1865,11 +1865,11 @@ void StyleCheckStyle::drawControl( ControlElement element,
case CE_RadioButtonLabel:
{
- const QRadioButton* rb = static_cast<const QRadioButton*>(widget);
+ const TQRadioButton* rb = static_cast<const TQRadioButton*>(widget);
- int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft;
+ int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft;
- QValueVector<StyleGuideViolation> violations = checkSentenceStyle(rb->text());
+ TQValueVector<StyleGuideViolation> violations = checkSentenceStyle(rb->text());
renderViolations(violations, p, r,alignment | AlignVCenter | ShowPrefix, rb->text());
@@ -1878,7 +1878,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
if (flags & Style_HasFocus)
{
- QRect fr = visualRect(subRect(SR_CheckBoxFocusRect, widget), widget);
+ TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, widget), widget);
drawPrimitive(PE_FocusRect, p, fr, cg, flags);
}
break;
@@ -1889,21 +1889,21 @@ void StyleCheckStyle::drawControl( ControlElement element,
// -------------------------------------------------------------------
case CE_MenuBarItem:
{
- QMenuBar *mb = (QMenuBar*)widget;
- QMenuItem *mi = opt.menuItem();
- QRect pr = mb->rect();
+ TQMenuBar *mb = (TQMenuBar*)widget;
+ TQMenuItem *mi = opt.menuItem();
+ TQRect pr = mb->rect();
bool active = flags & Style_Active;
bool focused = flags & Style_HasFocus;
if ( active && focused )
qDrawShadePanel(p, r.x(), r.y(), r.width(), r.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
renderGradient( p, r, cg.button(), false,
r.x(), r.y()-1, pr.width()-2, pr.height()-2);
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(mi->text(), ShortTitle, HasAccels);
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(mi->text(), ShortTitle, HasAccels);
renderViolations(violations, p, r, AlignCenter | AlignVCenter | ShowPrefix, mi->text());
drawItem( p, r, AlignCenter | AlignVCenter | ShowPrefix
@@ -1917,14 +1917,14 @@ void StyleCheckStyle::drawControl( ControlElement element,
// POPUPMENU ITEM
// -------------------------------------------------------------------
case CE_PopupMenuItem: {
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
if ( !mi ) {
- // Don't leave blank holes if we set NoBackground for the QPopupMenu.
+ // Don't leave blank holes if we set NoBackground for the TQPopupMenu.
// This only happens when the popupMenu spans more than one column.
if (! (widget->erasePixmap() && !widget->erasePixmap()->isNull()) )
- p->fillRect(r, cg.brush(QColorGroup::Button) );
+ p->fillRect(r, cg.brush(TQColorGroup::Button) );
break;
}
@@ -1934,7 +1934,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText );
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1953,7 +1953,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
// Draw the menu item background
if ( active )
qDrawShadePanel( p, x, y, w, h, cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the transparency pixmap
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( x, y, *widget->erasePixmap(), x, y, w, h );
@@ -1963,23 +1963,23 @@ void StyleCheckStyle::drawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() ) {
- QIconSet::Mode mode;
- QRect cr = visualRect( QRect(x, y, checkcol, h), r );
+ TQIconSet::Mode mode;
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if ( active )
- mode = enabled ? QIconSet::Active : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Active : TQIconSet::Disabled;
else
- mode = enabled ? QIconSet::Normal : QIconSet::Disabled;
+ mode = enabled ? TQIconSet::Normal : TQIconSet::Disabled;
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && !active && mi->isChecked() )
qDrawShadePanel( p, cr.x(), cr.y(), cr.width(), cr.height(),
- cg, true, 1, &cg.brush(QColorGroup::Midlight) );
+ cg, true, 1, &cg.brush(TQColorGroup::Midlight) );
// Draw the icon
- QPixmap pixmap = mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr( 0, 0, pixmap.width(), pixmap.height() );
+ TQPixmap pixmap = mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr( 0, 0, pixmap.width(), pixmap.height() );
pmr.moveCenter( cr.center() );
p->drawPixmap( pmr.topLeft(), pixmap );
}
@@ -1992,13 +1992,13 @@ void StyleCheckStyle::drawControl( ControlElement element,
// if it's active the "pressed" background is already drawn
if ( ! active )
qDrawShadePanel( p, cx, y, checkcol, h, cg, true, 1,
- &cg.brush(QColorGroup::Midlight) );
+ &cg.brush(TQColorGroup::Midlight) );
// Draw the checkmark
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, QRect( cx + itemFrame, y + itemFrame,
+ drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame*2, h - itemFrame*2), cg, cflags );
}
@@ -2020,7 +2020,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
// This color will be used instead of the above if the menu item
// is active and disabled at the same time. (etched text)
- QColor discol = cg.mid();
+ TQColor discol = cg.mid();
// Does the menu item draw it's own label?
if ( mi->custom() ) {
@@ -2039,14 +2039,14 @@ void StyleCheckStyle::drawControl( ControlElement element,
p->restore();
}
else {
- QValueVector<StyleGuideViolation> ourViolations;
+ TQValueVector<StyleGuideViolation> ourViolations;
- QString tmpStr = mi->text();
+ TQString tmpStr = mi->text();
removeAccelerators(tmpStr);
findAccelViolations(tmpStr, ourViolations);
// The menu item doesn't draw it's own label
- QString s = stripAccelViolations(mi->text());
+ TQString s = stripAccelViolations(mi->text());
// Does the menu item have a text label?
if ( !s.isNull() ) {
@@ -2071,9 +2071,9 @@ void StyleCheckStyle::drawControl( ControlElement element,
s = s.left( t );
}
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(s, ShortTitle, HasAccels);
- renderViolations(violations, p, QRect(xp, y+m, tw, h-2*m), text_flags, s);
- renderViolations(ourViolations, p, QRect(xp, y+m, tw, h-2*m), text_flags, s);
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(s, ShortTitle, HasAccels);
+ renderViolations(violations, p, TQRect(xp, y+m, tw, h-2*m), text_flags, s);
+ renderViolations(ourViolations, p, TQRect(xp, y+m, tw, h-2*m), text_flags, s);
// Draw the left part of the label (or the whole label
@@ -2092,7 +2092,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
// The menu item doesn't have a text label
// Check if it has a pixmap instead
else if ( mi->pixmap() ) {
- QPixmap *pixmap = mi->pixmap();
+ TQPixmap *pixmap = mi->pixmap();
// Draw the pixmap
if ( pixmap->depth() == 1 )
@@ -2111,7 +2111,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = pixelMetric(PM_MenuButtonIndicator);
- QRect vr = visualRect( QRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -2119,7 +2119,7 @@ void StyleCheckStyle::drawControl( ControlElement element,
if ( enabled )
discol = cg.buttonText();
- QColorGroup g2( discol, cg.highlight(), white, white,
+ TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
drawPrimitive( arrow, p, vr, g2, Style_Enabled );
@@ -2132,28 +2132,28 @@ void StyleCheckStyle::drawControl( ControlElement element,
case CE_HeaderLabel:
{
- //Most of code here shamelessly lifted from QCommonStyle.
- QRect rect = r;
- const QHeader* header = static_cast<const QHeader*>(widget);
+ //Most of code here shamelessly lifted from TQCommonStyle.
+ TQRect rect = r;
+ const TQHeader* header = static_cast<const TQHeader*>(widget);
int section = opt.headerSection();
- QIconSet* icon = header->iconSet( section );
+ TQIconSet* icon = header->iconSet( section );
if ( icon )
{
- QPixmap pixmap = icon->pixmap( QIconSet::Small,
- flags & Style_Enabled ? QIconSet::Normal : QIconSet::Disabled );
+ TQPixmap pixmap = icon->pixmap( TQIconSet::Small,
+ flags & Style_Enabled ? TQIconSet::Normal : TQIconSet::Disabled );
int pixw = pixmap.width();
int pixh = pixmap.height();
// "pixh - 1" because of tricky integer division
- QRect pixRect = rect;
+ TQRect pixRect = rect;
pixRect.setY( rect.center().y() - (pixh - 1) / 2 );
drawItem ( p, pixRect, AlignVCenter, cg, flags & Style_Enabled,
- &pixmap, QString::null );
+ &pixmap, TQString::null );
rect.setLeft( rect.left() + pixw + 2 );
}
- QString s = header->label( section );
+ TQString s = header->label( section );
- QValueVector<StyleGuideViolation> violations = checkTitleStyle(s, ShortTitle, NoAccels);
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle(s, ShortTitle, NoAccels);
renderViolations(violations, p, rect, AlignVCenter, s);
@@ -2170,10 +2170,10 @@ void StyleCheckStyle::drawControl( ControlElement element,
void StyleCheckStyle::drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
switch (element)
{
@@ -2185,7 +2185,7 @@ void StyleCheckStyle::drawControlMask( ControlElement element,
QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
- p->drawPoints( QPointArray(4, corners) );
+ p->drawPoints( TQPointArray(4, corners) );
break;
}
@@ -2196,14 +2196,14 @@ void StyleCheckStyle::drawControlMask( ControlElement element,
void StyleCheckStyle::drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption& opt ) const
+ const TQStyleOption& opt ) const
{
switch(control)
{
@@ -2234,7 +2234,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
p->drawPoint(x2,y);
p->drawPoint(x2,y2);
- renderGradient( p, QRect(x+2, y+2, w-4, h-4),
+ renderGradient( p, TQRect(x+2, y+2, w-4, h-4),
cg.button(), false);
p->setPen(sunken ? cg.light() : cg.mid());
@@ -2246,7 +2246,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
p->drawLine(x+1, y+2, x+1, y2-2);
// Get the button bounding box
- QRect ar = QStyle::visualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow),
widget );
@@ -2264,8 +2264,8 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
// Draw an edit field if required
if ( controls & SC_ComboBoxEditField )
{
- const QComboBox * cb = (const QComboBox *) widget;
- QRect re = QStyle::visualRect(
+ const TQComboBox * cb = (const TQComboBox *) widget;
+ TQRect re = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget,
SC_ComboBoxEditField), widget );
@@ -2287,13 +2287,13 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
if ( cb->hasFocus() && !cb->editable() ) {
// Draw the contents
p->fillRect( re.x(), re.y(), re.width(), re.height(),
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
- QRect re = QStyle::visualRect(
+ TQRect re = TQStyle::visualRect(
subRect(SR_ComboBoxFocusRect, cb), widget);
drawPrimitive( PE_FocusRect, p, re, cg,
- Style_FocusAtBorder, QStyleOption(cg.highlight()));
+ Style_FocusAtBorder, TQStyleOption(cg.highlight()));
}
}
break;
@@ -2302,9 +2302,9 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
// TOOLBUTTON
// -------------------------------------------------------------------
case CC_ToolButton: {
- const QToolButton *toolbutton = (const QToolButton *) widget;
+ const TQToolButton *toolbutton = (const TQToolButton *) widget;
- QRect button, menuarea;
+ TQRect button, menuarea;
button = querySubControlMetrics(control, widget, SC_ToolButton, opt);
menuarea = querySubControlMetrics(control, widget, SC_ToolButtonMenu, opt);
@@ -2327,15 +2327,15 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
toolbutton->parentWidget()->backgroundPixmap() &&
!toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- QPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (widget->parent())
{
- if (widget->parent()->inherits("QToolBar"))
+ if (widget->parent()->inherits("TQToolBar"))
{
- QToolBar* parent = (QToolBar*)widget->parent();
- QRect pr = parent->rect();
+ TQToolBar* parent = (TQToolBar*)widget->parent();
+ TQRect pr = parent->rect();
renderGradient( p, r, cg.button(),
parent->orientation() == Qt::Vertical,
@@ -2343,9 +2343,9 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
}
else if (widget->parent()->inherits("QToolBarExtensionWidget"))
{
- QWidget* parent = (QWidget*)widget->parent();
- QToolBar* toolbar = (QToolBar*)parent->parent();
- QRect tr = toolbar->rect();
+ TQWidget* parent = (TQWidget*)widget->parent();
+ TQToolBar* toolbar = (TQToolBar*)parent->parent();
+ TQRect tr = toolbar->rect();
if ( toolbar->orientation() == Qt::Horizontal ) {
renderGradient( p, r, cg.button(), false, r.x(), r.y(),
@@ -2367,7 +2367,7 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
}
if (toolbutton->hasFocus() && !toolbutton->focusProxy()) {
- QRect fr = toolbutton->rect();
+ TQRect fr = toolbutton->rect();
fr.addCoords(3, 3, -3, -3);
drawPrimitive(PE_FocusRect, p, fr, cg);
}
@@ -2385,10 +2385,10 @@ void StyleCheckStyle::drawComplexControl( ComplexControl control,
void StyleCheckStyle::drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& opt ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& opt ) const
{
switch (control)
{
@@ -2401,7 +2401,7 @@ void StyleCheckStyle::drawComplexControlMask( ComplexControl control,
QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
- p->drawPoints( QPointArray(4, corners) );
+ p->drawPoints( TQPointArray(4, corners) );
break;
}
@@ -2411,14 +2411,14 @@ void StyleCheckStyle::drawComplexControlMask( ComplexControl control,
}
-QRect StyleCheckStyle::subRect(SubRect r, const QWidget *widget) const
+TQRect StyleCheckStyle::subRect(SubRect r, const TQWidget *widget) const
{
// We want the focus rect for buttons to be adjusted from
// the Qt3 defaults to be similar to Qt 2's defaults.
// -------------------------------------------------------------------
if (r == SR_PushButtonFocusRect ) {
- const QPushButton* button = (const QPushButton*) widget;
- QRect wrect(widget->rect());
+ const TQPushButton* button = (const TQPushButton*) widget;
+ TQRect wrect(widget->rect());
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
@@ -2429,7 +2429,7 @@ QRect StyleCheckStyle::subRect(SubRect r, const QWidget *widget) const
int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2,
dfw2 = dfw1 * 2;
- return QRect(wrect.x() + dfw1 + dbw1 + 1,
+ return TQRect(wrect.x() + dfw1 + dbw1 + 1,
wrect.y() + dfw1 + dbw1 + 1,
wrect.width() - dfw2 - dbw2 - 1,
wrect.height() - dfw2 - dbw2 - 1);
@@ -2438,7 +2438,7 @@ QRect StyleCheckStyle::subRect(SubRect r, const QWidget *widget) const
}
-int StyleCheckStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
+int StyleCheckStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -2470,17 +2470,17 @@ int StyleCheckStyle::pixelMetric(PixelMetric m, const QWidget *widget) const
}
-QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
- const QWidget* widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const
+TQSize StyleCheckStyle::sizeFromContents( ContentsType contents,
+ const TQWidget* widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const
{
switch (contents)
{
// PUSHBUTTON SIZE
// ------------------------------------------------------------------
case CT_PushButton: {
- const QPushButton* button = (const QPushButton*) widget;
+ const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
int bm = pixelMetric( PM_ButtonMargin, widget );
@@ -2503,7 +2503,7 @@ QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
if ( h < 22 )
h = 22;
- return QSize( w, h );
+ return TQSize( w, h );
}
@@ -2513,9 +2513,9 @@ QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
if ( ! widget || opt.isDefault() )
return contentSize;
- const QPopupMenu *popup = (const QPopupMenu *) widget;
+ const TQPopupMenu *popup = (const TQPopupMenu *) widget;
bool checkable = popup->isCheckable();
- QMenuItem *mi = opt.menuItem();
+ TQMenuItem *mi = opt.menuItem();
int maxpmw = opt.maxIconWidth();
int w = contentSize.width(), h = contentSize.height();
@@ -2543,7 +2543,7 @@ QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
if ( mi->iconSet() )
h = QMAX( h, mi->iconSet()->pixmap(
- QIconSet::Small, QIconSet::Normal).height() +
+ TQIconSet::Small, TQIconSet::Normal).height() +
2 * itemFrame );
}
@@ -2561,7 +2561,7 @@ QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
w += rightBorder;
- return QSize( w, h );
+ return TQSize( w, h );
}
@@ -2572,15 +2572,15 @@ QSize StyleCheckStyle::sizeFromContents( ContentsType contents,
// Fix Qt's wacky image alignment
-QPixmap StyleCheckStyle::stylePixmap(StylePixmap stylepixmap,
- const QWidget* widget,
- const QStyleOption& opt) const
+TQPixmap StyleCheckStyle::stylePixmap(StylePixmap stylepixmap,
+ const TQWidget* widget,
+ const TQStyleOption& opt) const
{
switch (stylepixmap) {
case SP_TitleBarMinButton:
- return QPixmap((const char **)hc_minimize_xpm);
+ return TQPixmap((const char **)hc_minimize_xpm);
case SP_TitleBarCloseButton:
- return QPixmap((const char **)hc_close_xpm);
+ return TQPixmap((const char **)hc_close_xpm);
default:
break;
}
@@ -2589,47 +2589,47 @@ QPixmap StyleCheckStyle::stylePixmap(StylePixmap stylepixmap,
}
-bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
+bool StyleCheckStyle::eventFilter( TQObject *object, TQEvent *event )
{
if (KStyle::eventFilter( object, event ))
return true;
// Handle push button hover effects.
- QPushButton* button = dynamic_cast<QPushButton*>(object);
+ TQPushButton* button = dynamic_cast<TQPushButton*>(object);
if ( button )
{
- if ( (event->type() == QEvent::Enter) &&
+ if ( (event->type() == TQEvent::Enter) &&
(button->isEnabled()) ) {
hoverWidget = button;
button->repaint( false );
}
- else if ( (event->type() == QEvent::Leave) &&
+ else if ( (event->type() == TQEvent::Leave) &&
(object == hoverWidget) ) {
hoverWidget = 0L;
button->repaint( false );
}
}
- if ( event->type() == QEvent::Paint && object->inherits("QLabel") )
+ if ( event->type() == TQEvent::Paint && object->inherits("TQLabel") )
{
- QLabel* lb = static_cast<QLabel*>(object);
+ TQLabel* lb = static_cast<TQLabel*>(object);
if (lb->pixmap() || lb->picture() || lb->movie() || (lb->textFormat() == Qt::RichText) ||
- (lb->textFormat() == Qt::AutoText && QStyleSheet::mightBeRichText(lb->text())) )
+ (lb->textFormat() == Qt::AutoText && TQStyleSheet::mightBeRichText(lb->text())) )
{
return false;
}
- QPainter p(lb);
+ TQPainter p(lb);
- QRect cr = lb->contentsRect();
+ TQRect cr = lb->contentsRect();
int m = lb->indent();
if ( m < 0 && lb->frameWidth() ) // no indent, but we do have a frame
m = lb->fontMetrics().width('x') / 2 - lb->margin();
if ( m > 0 )
{
- int hAlign = QApplication::horizontalAlignment( lb->alignment() );
+ int hAlign = TQApplication::horizontalAlignment( lb->alignment() );
if ( hAlign & AlignLeft )
cr.setLeft( cr.left() + m );
if ( hAlign & AlignRight )
@@ -2640,9 +2640,9 @@ bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
cr.setBottom( cr.bottom() - m );
}
- QValueVector<StyleGuideViolation> violations;
+ TQValueVector<StyleGuideViolation> violations;
- if (QCString(lb->name()) == "KJanusWidgetTitleLabel" || lb->font().bold())
+ if (TQCString(lb->name()) == "KJanusWidgetTitleLabel" || lb->font().bold())
{
// We're a page title
violations = checkTitleStyle(lb->text(), LongTitle, lb->buddy() ? HasAccels : NoAccels);
@@ -2675,34 +2675,34 @@ bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
return true;
}
- if ( event->type() == QEvent::Paint && object->inherits("QGroupBox") )
+ if ( event->type() == TQEvent::Paint && object->inherits("TQGroupBox") )
{
- QPaintEvent * pevent = static_cast<QPaintEvent*>(event);
- QGroupBox* gb = static_cast<QGroupBox*>(object);
+ TQPaintEvent * pevent = static_cast<TQPaintEvent*>(event);
+ TQGroupBox* gb = static_cast<TQGroupBox*>(object);
bool nestedGroupBox = false;
- QString stripped_title = removedXX(stripAccelViolations(gb->title()));
+ TQString stripped_title = removedXX(stripAccelViolations(gb->title()));
//Walk parent hierarchy to check whether any are groupboxes too..
- QObject* parent = gb;
+ TQObject* parent = gb;
// GCC suggested parentheses around assignment used as truth value
// I suggested that it could eat me. GCC won.
while ( (parent = parent->parent()) )
{
- if (parent->inherits("QGroupBox"))
+ if (parent->inherits("TQGroupBox"))
{
nestedGroupBox = true;
break;
}
}
- QPainter paint( gb );
+ TQPainter paint( gb );
if ( stripped_title.length() )
{
// draw title
- QFontMetrics fm = paint.fontMetrics();
+ TQFontMetrics fm = paint.fontMetrics();
int h = fm.height();
- int tw = fm.width( stripped_title, stripped_title.length() ) + 2*fm.width(QChar(' '));
+ int tw = fm.width( stripped_title, stripped_title.length() ) + 2*fm.width(TQChar(' '));
int x;
if ( gb->alignment() & AlignHCenter ) // center alignment
x = gb->frameRect().width()/2 - tw/2;
@@ -2712,14 +2712,14 @@ bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
x = 8;
else
{ // auto align
- if( QApplication::reverseLayout() )
+ if( TQApplication::reverseLayout() )
x = gb->frameRect().width() - tw - 8;
else
x = 8;
}
- QRect r( x, 0, tw, h );
+ TQRect r( x, 0, tw, h );
- QValueVector<StyleGuideViolation> violations = checkTitleStyle( gb->title(), ShortTitle, HasAccels );
+ TQValueVector<StyleGuideViolation> violations = checkTitleStyle( gb->title(), ShortTitle, HasAccels );
renderViolations( violations, &paint, r, AlignCenter | ShowPrefix, gb->title() );
@@ -2732,16 +2732,16 @@ bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
if (nestedGroupBox)
{
paint.save();
- QPen errorPen(Qt::red, 4, QPen::DashDotDotLine);
+ TQPen errorPen(Qt::red, 4, TQPen::DashDotDotLine);
paint.setPen(errorPen);
paint.drawRect( gb->frameRect() );
paint.restore();
}
else
{
- drawPrimitive( QStyle::PE_GroupBoxFrame, &paint, gb->frameRect(),
- gb->colorGroup(), QStyle::Style_Default,
- QStyleOption(gb->lineWidth(), gb->midLineWidth(),
+ drawPrimitive( TQStyle::PE_GroupBoxFrame, &paint, gb->frameRect(),
+ gb->colorGroup(), TQStyle::Style_Default,
+ TQStyleOption(gb->lineWidth(), gb->midLineWidth(),
gb->frameShape(), gb->frameShadow()) );
}
return true; //We already drew the everything
@@ -2751,8 +2751,8 @@ bool StyleCheckStyle::eventFilter( QObject *object, QEvent *event )
}
-void StyleCheckStyle::renderGradient( QPainter* p, const QRect& r,
- QColor clr, bool, int, int, int, int) const
+void StyleCheckStyle::renderGradient( TQPainter* p, const TQRect& r,
+ TQColor clr, bool, int, int, int, int) const
{
p->fillRect(r, clr);
return;
diff --git a/scheck/scheck.h b/scheck/scheck.h
index 303a8f22..e25104dc 100644
--- a/scheck/scheck.h
+++ b/scheck/scheck.h
@@ -38,11 +38,11 @@
#ifndef STYLE_CHECK_H
#define STYLE_CHECK_H
-#include <qbitmap.h>
-#include <qheader.h>
-#include <qintdict.h>
-#include <qvaluevector.h>
-#include <qguardedptr.h>
+#include <tqbitmap.h>
+#include <tqheader.h>
+#include <tqintdict.h>
+#include <tqvaluevector.h>
+#include <tqguardedptr.h>
#include <kdrawutil.h>
#include <kpixmap.h>
@@ -57,13 +57,13 @@ class StyleCheckTitleWatcher: public QObject
public:
StyleCheckTitleWatcher();
- void addWatched(QWidget* w);
+ void addWatched(TQWidget* w);
public slots:
void slotCheck();
private:
- QString cleanErrorMarkers(QString in);
- QValueVector<QGuardedPtr<QWidget> > watched;
- QValueVector<QString> watchedTitles;
+ TQString cleanErrorMarkers(TQString in);
+ TQValueVector<TQGuardedPtr<TQWidget> > watched;
+ TQValueVector<TQString> watchedTitles;
};
class StyleCheckStyle : public KStyle
@@ -74,91 +74,91 @@ class StyleCheckStyle : public KStyle
StyleCheckStyle( );
virtual ~StyleCheckStyle();
- void polish( QWidget* widget );
- void unPolish( QWidget* widget );
+ void polish( TQWidget* widget );
+ void unPolish( TQWidget* widget );
void drawKStylePrimitive( KStylePrimitive kpe,
- QPainter* p,
- const QWidget* widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawPrimitive( PrimitiveElement pe,
- QPainter* p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter* p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawControlMask( ControlElement element,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControl( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const QStyleOption& = QStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::Default ) const;
void drawComplexControlMask( ComplexControl control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption& = TQStyleOption::Default ) const;
int pixelMetric( PixelMetric m,
- const QWidget *widget = 0 ) const;
+ const TQWidget *widget = 0 ) const;
- QSize sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentSize,
- const QStyleOption& opt ) const;
+ TQSize sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentSize,
+ const TQStyleOption& opt ) const;
- QRect subRect( SubRect r,
- const QWidget *widget ) const;
+ TQRect subRect( SubRect r,
+ const TQWidget *widget ) const;
// Fix Qt3's wacky image positions
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
protected:
- bool eventFilter( QObject *object, QEvent *event );
+ bool eventFilter( TQObject *object, TQEvent *event );
- void renderGradient( QPainter* p,
- const QRect& r,
- QColor clr,
+ void renderGradient( TQPainter* p,
+ const TQRect& r,
+ TQColor clr,
bool horizontal,
int px=0,
int py=0,
int pwidth=-1,
int pheight=-1 ) const;
- QTimer *topLevelAccelManageTimer;
- QWidget *hoverWidget;
+ TQTimer *topLevelAccelManageTimer;
+ TQWidget *hoverWidget;
private slots:
void slotAccelManage();
private:
- void accelManageRecursive(QWidget* widget);
+ void accelManageRecursive(TQWidget* widget);
StyleCheckTitleWatcher* watcher;
diff --git a/umbrello/umbrello/activitywidget.cpp b/umbrello/umbrello/activitywidget.cpp
index 26ab29fd..c0f0c836 100644
--- a/umbrello/umbrello/activitywidget.cpp
+++ b/umbrello/umbrello/activitywidget.cpp
@@ -13,7 +13,7 @@
#include "activitywidget.h"
// qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
// kde includes
#include <klocale.h>
@@ -38,7 +38,7 @@ ActivityWidget::ActivityWidget(UMLView * view, ActivityType activityType, Uml::I
ActivityWidget::~ActivityWidget() {}
-void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ActivityWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
switch ( m_ActivityType )
@@ -49,7 +49,7 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.setBrush( UMLWidget::getFillColour() );
}
{
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
//int middleX = w / 2;
int textStartY = (h / 2) - (fontHeight / 2);
@@ -62,12 +62,12 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
break;
case Initial :
- p.setPen( QPen(m_LineColour, 1) );
+ p.setPen( TQPen(m_LineColour, 1) );
p.setBrush( WidgetBase::getLineColor() );
p.drawEllipse( offsetX, offsetY, w, h );
break;
case End :
- p.setPen( QPen(m_LineColour, 1) );
+ p.setPen( TQPen(m_LineColour, 1) );
p.setBrush( WidgetBase::getLineColor() );
p.drawEllipse( offsetX, offsetY, w, h );
p.setBrush( Qt::white );
@@ -79,11 +79,11 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
p.setBrush( UMLWidget::getFillColour() );
{
- QPointArray array( 4 );
- array[ 0 ] = QPoint( offsetX + w / 2, offsetY );
- array[ 1 ] = QPoint( offsetX + w, offsetY + h / 2 );
- array[ 2 ] = QPoint( offsetX + w / 2, offsetY + h );
- array[ 3 ] = QPoint( offsetX, offsetY + h / 2 );
+ TQPointArray array( 4 );
+ array[ 0 ] = TQPoint( offsetX + w / 2, offsetY );
+ array[ 1 ] = TQPoint( offsetX + w, offsetY + h / 2 );
+ array[ 2 ] = TQPoint( offsetX + w / 2, offsetY + h );
+ array[ 3 ] = TQPoint( offsetX, offsetY + h / 2 );
p.drawPolygon( array );
p.drawPolyline( array );
}
@@ -95,7 +95,7 @@ void ActivityWidget::draw(QPainter & p, int offsetX, int offsetY) {
void ActivityWidget::constrain(int& width, int& height) {
if (m_ActivityType == Normal) {
- QSize minSize = calculateSize();
+ TQSize minSize = calculateSize();
if (width < minSize.width())
width = minSize.width();
if (height < minSize.height())
@@ -125,10 +125,10 @@ void ActivityWidget::constrain(int& width, int& height) {
}
}
-QSize ActivityWidget::calculateSize() {
+TQSize ActivityWidget::calculateSize() {
int width, height;
if ( m_ActivityType == Normal ) {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
height = fontHeight;
@@ -139,7 +139,7 @@ QSize ActivityWidget::calculateSize() {
} else {
width = height = 20;
}
- return QSize(width, height);
+ return TQSize(width, height);
}
ActivityWidget::ActivityType ActivityWidget::getActivityType() const {
@@ -156,7 +156,7 @@ void ActivityWidget::slotMenuSelection(int sel) {
bool done = false;
bool ok = false;
- QString name = m_Text;
+ TQString name = m_Text;
switch( sel ) {
case ListPopupMenu::mt_Rename:
@@ -211,8 +211,8 @@ bool ActivityWidget::isActivity(WorkToolBar::ToolBar_Buttons tbb,
return status;
}
-void ActivityWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement activityElement = qDoc.createElement( "activitywidget" );
+void ActivityWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement activityElement = qDoc.createElement( "activitywidget" );
UMLWidget::saveToXMI( qDoc, activityElement );
activityElement.setAttribute( "activityname", m_Text );
activityElement.setAttribute( "documentation", m_Doc );
@@ -220,12 +220,12 @@ void ActivityWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( activityElement );
}
-bool ActivityWidget::loadFromXMI( QDomElement & qElement ) {
+bool ActivityWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_Text = qElement.attribute( "activityname", "" );
m_Doc = qElement.attribute( "documentation", "" );
- QString type = qElement.attribute( "activitytype", "1" );
+ TQString type = qElement.attribute( "activitytype", "1" );
setActivityType( (ActivityType)type.toInt() );
return true;
}
diff --git a/umbrello/umbrello/activitywidget.h b/umbrello/umbrello/activitywidget.h
index f23d4b65..8e40838c 100644
--- a/umbrello/umbrello/activitywidget.h
+++ b/umbrello/umbrello/activitywidget.h
@@ -61,7 +61,7 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Overrides Method from UMLWidget.
@@ -98,18 +98,18 @@ public:
/**
* Saves the widget to the "activitywidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the widget from the "activitywidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Type of activity.
diff --git a/umbrello/umbrello/actor.cpp b/umbrello/umbrello/actor.cpp
index 6e09c506..37a39a2e 100644
--- a/umbrello/umbrello/actor.cpp
+++ b/umbrello/umbrello/actor.cpp
@@ -11,7 +11,7 @@
#include "actor.h"
-UMLActor::UMLActor(const QString & name, Uml::IDType id) : UMLCanvasObject(name, id) {
+UMLActor::UMLActor(const TQString & name, Uml::IDType id) : UMLCanvasObject(name, id) {
init();
}
@@ -27,12 +27,12 @@ UMLObject* UMLActor::clone() const {
return clone;
}
-void UMLActor::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement actorElement = UMLObject::save("UML:Actor", qDoc);
+void UMLActor::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement actorElement = UMLObject::save("UML:Actor", qDoc);
qElement.appendChild(actorElement);
}
-bool UMLActor::load(QDomElement&) {
+bool UMLActor::load(TQDomElement&) {
return true;
}
diff --git a/umbrello/umbrello/actor.h b/umbrello/umbrello/actor.h
index 479482e0..a3bff4c3 100644
--- a/umbrello/umbrello/actor.h
+++ b/umbrello/umbrello/actor.h
@@ -34,7 +34,7 @@ public:
* @param name The name of the Actor.
* @param id The unique id to assign to this Actor.
*/
- explicit UMLActor(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLActor(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -54,13 +54,13 @@ public:
/**
* Creates the <UML:Actor> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:Actor> XMI element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
#endif
diff --git a/umbrello/umbrello/actorwidget.cpp b/umbrello/umbrello/actorwidget.cpp
index 0001e146..38ddb4f5 100644
--- a/umbrello/umbrello/actorwidget.cpp
+++ b/umbrello/umbrello/actorwidget.cpp
@@ -13,7 +13,7 @@
#include "actorwidget.h"
// system includes
-#include <qpainter.h>
+#include <tqpainter.h>
// local includes
#include "actor.h"
@@ -26,14 +26,14 @@ ActorWidget::ActorWidget(UMLView * view, UMLActor *a) : UMLWidget(view, a) {
ActorWidget::~ActorWidget() {}
-void ActorWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ActorWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
const int w = width();
const int h = height();
p.setFont( UMLWidget::getFont() );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int textWidth = fm.width(getName());
const int fontHeight = fm.lineSpacing();
const int a_height = h - fontHeight - A_MARGIN;
@@ -54,25 +54,25 @@ void ActorWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawLine(offsetX + middleX - a_width / 2, offsetY + thirdY + thirdY / 2,
offsetX + middleX + a_width / 2, offsetY + thirdY + thirdY / 2); //arms
//draw text
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
p.drawText(offsetX + A_MARGIN, offsetY + h - fontHeight,
w - A_MARGIN * 2, fontHeight, Qt::AlignCenter, getName());
if(m_bSelected)
drawSelected(&p, offsetX, offsetY);
}
-QSize ActorWidget::calculateSize() {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+TQSize ActorWidget::calculateSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
int width = textWidth > A_WIDTH ? textWidth : A_WIDTH;
int height = A_HEIGHT + fontHeight + A_MARGIN;
width += A_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ActorWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement actorElement = qDoc.createElement( "actorwidget" );
+void ActorWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement actorElement = qDoc.createElement( "actorwidget" );
UMLWidget::saveToXMI( qDoc, actorElement );
qElement.appendChild( actorElement );
}
diff --git a/umbrello/umbrello/actorwidget.h b/umbrello/umbrello/actorwidget.h
index 6d19290c..6b62bc98 100644
--- a/umbrello/umbrello/actorwidget.h
+++ b/umbrello/umbrello/actorwidget.h
@@ -60,19 +60,19 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "actorwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
};
#endif
diff --git a/umbrello/umbrello/aligntoolbar.cpp b/umbrello/umbrello/aligntoolbar.cpp
index 3be8689a..1e41eee7 100644
--- a/umbrello/umbrello/aligntoolbar.cpp
+++ b/umbrello/umbrello/aligntoolbar.cpp
@@ -17,7 +17,7 @@
#include <vector>
// qt includes
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
// kde includes
#include <klocale.h>
@@ -31,7 +31,7 @@
#include "umlwidget.h"
#include "umlwidgetlist.h"
-AlignToolBar::AlignToolBar(QMainWindow* parentWindow, const char* )
+AlignToolBar::AlignToolBar(TQMainWindow* parentWindow, const char* )
: KToolBar(parentWindow,Qt::DockRight,false) {
// load images for the buttons
loadPixmaps();
@@ -50,7 +50,7 @@ AlignToolBar::AlignToolBar(QMainWindow* parentWindow, const char* )
setVerticalStretchable( true );
// gets called whenever a button in the toolbar is clicked
- connect( this, SIGNAL( released( int ) ), this, SLOT( slotButtonChanged (int ) ) );
+ connect( this, TQT_SIGNAL( released( int ) ), this, TQT_SLOT( slotButtonChanged (int ) ) );
}
AlignToolBar::~AlignToolBar() {
@@ -68,7 +68,7 @@ bool AlignToolBar::hasWidgetSmallerY(const UMLWidget* widget1, const UMLWidget*
void AlignToolBar::loadPixmaps() {
KStandardDirs* dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
m_Pixmaps[alac_align_left].load( dataDir + "align_left.png" );
@@ -381,7 +381,7 @@ void AlignToolBar::slotButtonChanged(int btn) {
} else {
KMessageBox::messageBox(0, KMessageBox::Information,
i18n("For alignment you have to select at least 2 objects like classes or actors. You can not align associations."),
- i18n("Information"), i18n("&OK"), QString(""),
+ i18n("Information"), i18n("&OK"), TQString(""),
"showAlignInformation");
} // if (widgetList.count() > 1)
diff --git a/umbrello/umbrello/aligntoolbar.h b/umbrello/umbrello/aligntoolbar.h
index 271e9c0b..f417244f 100644
--- a/umbrello/umbrello/aligntoolbar.h
+++ b/umbrello/umbrello/aligntoolbar.h
@@ -12,7 +12,7 @@
#ifndef ALIGNTOOLBAR_H
#define ALIGNTOOLBAR_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <ktoolbar.h>
#include "umlnamespace.h"
#include "umlwidgetlist.h"
@@ -38,7 +38,7 @@ public:
* @param parentWindow The parent of the toolbar.
* @param name The name of the toolbar.
*/
- AlignToolBar(QMainWindow* parentWindow, const char* name);
+ AlignToolBar(TQMainWindow* parentWindow, const char* name);
/**
* Standard deconstructor.
@@ -209,7 +209,7 @@ private:
/**
* Holds the icons for the different buttons.
*/
- QPixmap m_Pixmaps[nrAlignButtons];
+ TQPixmap m_Pixmaps[nrAlignButtons];
private slots:
diff --git a/umbrello/umbrello/artifact.cpp b/umbrello/umbrello/artifact.cpp
index 12f77966..8576ca8b 100644
--- a/umbrello/umbrello/artifact.cpp
+++ b/umbrello/umbrello/artifact.cpp
@@ -15,7 +15,7 @@
#include <kdebug.h>
#include <klocale.h>
-UMLArtifact::UMLArtifact(const QString & name, Uml::IDType id)
+UMLArtifact::UMLArtifact(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -34,14 +34,14 @@ UMLObject* UMLArtifact::clone() const {
return clone;
}
-void UMLArtifact::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement artifactElement = UMLObject::save("UML:Artifact", qDoc);
+void UMLArtifact::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement artifactElement = UMLObject::save("UML:Artifact", qDoc);
artifactElement.setAttribute("drawas", m_drawAsType);
qElement.appendChild(artifactElement);
}
-bool UMLArtifact::load(QDomElement& element) {
- QString drawAs = element.attribute("drawas", "0");
+bool UMLArtifact::load(TQDomElement& element) {
+ TQString drawAs = element.attribute("drawas", "0");
m_drawAsType = (Draw_Type)drawAs.toInt();
return true;
}
diff --git a/umbrello/umbrello/artifact.h b/umbrello/umbrello/artifact.h
index 8b76f154..d5087545 100644
--- a/umbrello/umbrello/artifact.h
+++ b/umbrello/umbrello/artifact.h
@@ -46,7 +46,7 @@ public:
* @param Name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLArtifact(const QString & Name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLArtifact(const TQString & Name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -67,7 +67,7 @@ public:
* Creates the UML:Artifact element including its operations,
* attributes and templates
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* sets m_drawAsType for which method to draw the artifact as
@@ -84,7 +84,7 @@ protected:
* Loads the UML:Artifact element including its operations,
* attributes and templates
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/artifactwidget.cpp b/umbrello/umbrello/artifactwidget.cpp
index 931f757a..7356f260 100644
--- a/umbrello/umbrello/artifactwidget.cpp
+++ b/umbrello/umbrello/artifactwidget.cpp
@@ -13,8 +13,8 @@
#include "artifactwidget.h"
// qt/kde includes
-#include <qpainter.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
#include <kdebug.h>
// app includes
@@ -36,19 +36,19 @@ void ArtifactWidget::init() {
ArtifactWidget::~ArtifactWidget() {}
-void ArtifactWidget::drawAsNormal(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsNormal(TQPainter& p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
- QString stereotype = m_pObject->getStereotype();
+ TQString name = getName();
+ TQString stereotype = m_pObject->getStereotype();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
if (!stereotype.isEmpty()) {
@@ -76,17 +76,17 @@ void ArtifactWidget::drawAsNormal(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsFile(TQPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
int startX = offsetX + (w/2) - 25;
int iconHeight = h - fontHeight;
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, startX, offsetY);
pointArray.setPoint(1, startX + 40, offsetY);
pointArray.setPoint(2, startX + 50, offsetY + 10);
@@ -98,7 +98,7 @@ void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX + 40, offsetY + 10, startX + 50, offsetY + 10);
p.drawLine(startX + 40, offsetY, startX + 50, offsetY + 10);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -109,18 +109,18 @@ void ArtifactWidget::drawAsFile(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsLibrary(TQPainter& p, int offsetX, int offsetY) {
//FIXME this should have gears on it
const int w = width();
const int h = height();
- const QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
const int startX = offsetX + (w/2) - 25;
const int iconHeight = h - fontHeight;
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, startX, offsetY);
pointArray.setPoint(1, startX + 40, offsetY);
pointArray.setPoint(2, startX + 50, offsetY + 10);
@@ -132,7 +132,7 @@ void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX + 40, offsetY + 10, startX + 50, offsetY + 10);
p.drawLine(startX + 40, offsetY, startX + 50, offsetY + 10);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -143,13 +143,13 @@ void ArtifactWidget::drawAsLibrary(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::drawAsTable(TQPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFont font = UMLWidget::getFont();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFont font = UMLWidget::getFont();
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- const QString name = getName();
+ const TQString name = getName();
const int startX = offsetX + (w/2) - 25;
const int iconHeight = h - fontHeight;
@@ -162,13 +162,13 @@ void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
p.drawLine(startX, offsetY + (iconHeight/2) + (iconHeight/4),
startX + 49, offsetY + (iconHeight/2) + (iconHeight/4));
- QPen thickerPen = p.pen();
+ TQPen thickerPen = p.pen();
thickerPen.setWidth(2);
p.setPen(thickerPen);
p.drawLine(startX + 10, offsetY, startX + 10, offsetY + iconHeight);
p.drawLine(startX, offsetY + (iconHeight/4), startX + 50, offsetY + (iconHeight/4));
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
p.drawText(offsetX, offsetY + h - fontHeight,
@@ -179,7 +179,7 @@ void ArtifactWidget::drawAsTable(QPainter& p, int offsetX, int offsetY) {
}
}
-void ArtifactWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void ArtifactWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
p.setBrush( UMLWidget::getFillColour() );
@@ -208,8 +208,8 @@ void ArtifactWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize ArtifactWidget::calculateIconSize() {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+TQSize ArtifactWidget::calculateIconSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int width = fm.width( m_pObject->getName() );
@@ -218,11 +218,11 @@ QSize ArtifactWidget::calculateIconSize() {
int height = 50 + fontHeight;
- return QSize(width, height);
+ return TQSize(width, height);
}
-QSize ArtifactWidget::calculateNormalSize() {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+TQSize ArtifactWidget::calculateNormalSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int width = fm.width( m_pObject->getName() );
@@ -236,10 +236,10 @@ QSize ArtifactWidget::calculateNormalSize() {
int height = (2*fontHeight) + (ARTIFACT_MARGIN * 2);
- return QSize(width, height);
+ return TQSize(width, height);
}
-QSize ArtifactWidget::calculateSize() {
+TQSize ArtifactWidget::calculateSize() {
if ( !m_pObject) {
return UMLWidget::calculateSize();
}
@@ -251,8 +251,8 @@ QSize ArtifactWidget::calculateSize() {
}
}
-void ArtifactWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("artifactwidget");
+void ArtifactWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("artifactwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/artifactwidget.h b/umbrello/umbrello/artifactwidget.h
index a68f3acc..3fdd26c2 100644
--- a/umbrello/umbrello/artifactwidget.h
+++ b/umbrello/umbrello/artifactwidget.h
@@ -48,19 +48,19 @@ public:
/**
* Overrides standard method
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves the widget to the "artifactwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
@@ -71,32 +71,32 @@ private:
/**
* calculates the size when drawing as an icon (it's the same size for all icons)
*/
- QSize calculateIconSize();
+ TQSize calculateIconSize();
/**
* calculates the size for drawing as a box
*/
- QSize calculateNormalSize();
+ TQSize calculateNormalSize();
/**
* draw as a file icon
*/
- void drawAsFile(QPainter& p, int offsetX, int offsetY);
+ void drawAsFile(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a library file icon
*/
- void drawAsLibrary(QPainter& p, int offsetX, int offsetY);
+ void drawAsLibrary(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a database table icon
*/
- void drawAsTable(QPainter& p, int offsetX, int offsetY);
+ void drawAsTable(TQPainter& p, int offsetX, int offsetY);
/**
* draw as a box
*/
- void drawAsNormal(QPainter& p, int offsetX, int offsetY);
+ void drawAsNormal(TQPainter& p, int offsetX, int offsetY);
/**
* The right mouse button menu
diff --git a/umbrello/umbrello/association.cpp b/umbrello/umbrello/association.cpp
index eacc8d13..62f47a43 100644
--- a/umbrello/umbrello/association.cpp
+++ b/umbrello/umbrello/association.cpp
@@ -14,7 +14,7 @@
// qt/kde includes
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// app includes
#include "classifier.h"
#include "folder.h"
@@ -78,7 +78,7 @@ bool UMLAssociation::operator==(UMLAssociation &rhs) {
m_pRole[B] == rhs.m_pRole[B] );
}
-const QString UMLAssociation::assocTypeStr[UMLAssociation::nAssocTypes] = {
+const TQString UMLAssociation::assocTypeStr[UMLAssociation::nAssocTypes] = {
/* The elements must be listed in the same order as in the
Uml::Association_Type. */
i18n("Generalization"), // at_Generalization
@@ -103,9 +103,9 @@ Uml::Association_Type UMLAssociation::getAssocType() const {
return m_AssocType;
}
-QString UMLAssociation::toString ( ) const
+TQString UMLAssociation::toString ( ) const
{
- QString string;
+ TQString string;
if(m_pRole[A])
{
string += m_pRole[A]->getObject()->getName();
@@ -122,7 +122,7 @@ QString UMLAssociation::toString ( ) const
return string;
}
-QString UMLAssociation::typeAsString (Uml::Association_Type atype)
+TQString UMLAssociation::typeAsString (Uml::Association_Type atype)
{
if (atype < atypeFirst || atype > atypeLast)
return "";
@@ -159,9 +159,9 @@ bool UMLAssociation::resolveRef() {
return false;
}
-void UMLAssociation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void UMLAssociation::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
if (m_AssocType == Uml::at_Generalization) {
- QDomElement assocElement = UMLObject::save("UML:Generalization", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Generalization", qDoc);
assocElement.setAttribute( "discriminator", "" );
assocElement.setAttribute( "child", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "parent", ID2STR(getObjectId(B)) );
@@ -169,28 +169,28 @@ void UMLAssociation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
return;
}
if (m_AssocType == Uml::at_Realization) {
- QDomElement assocElement = UMLObject::save("UML:Abstraction", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Abstraction", qDoc);
assocElement.setAttribute( "client", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "supplier", ID2STR(getObjectId(B)) );
qElement.appendChild( assocElement );
return;
}
if (m_AssocType == Uml::at_Dependency) {
- QDomElement assocElement = UMLObject::save("UML:Dependency", qDoc);
+ TQDomElement assocElement = UMLObject::save("UML:Dependency", qDoc);
assocElement.setAttribute( "client", ID2STR(getObjectId(A)) );
assocElement.setAttribute( "supplier", ID2STR(getObjectId(B)) );
qElement.appendChild( assocElement );
return;
}
- QDomElement associationElement = UMLObject::save("UML:Association", qDoc);
- QDomElement connElement = qDoc.createElement("UML:Association.connection");
+ TQDomElement associationElement = UMLObject::save("UML:Association", qDoc);
+ TQDomElement connElement = qDoc.createElement("UML:Association.connection");
getUMLRole(A)->saveToXMI (qDoc, connElement);
getUMLRole(B)->saveToXMI (qDoc, connElement);
associationElement.appendChild (connElement);
qElement.appendChild( associationElement );
}
-bool UMLAssociation::load( QDomElement & element ) {
+bool UMLAssociation::load( TQDomElement & element ) {
if (getID() == Uml::id_None)
return false; // old style XMI file. No real info in this association.
@@ -200,10 +200,10 @@ bool UMLAssociation::load( QDomElement & element ) {
m_AssocType == Uml::at_Realization ||
m_AssocType == Uml::at_Dependency) {
for (unsigned r = Uml::A; r <= Uml::B; r++) {
- const QString fetch = (m_AssocType == Uml::at_Generalization ?
+ const TQString fetch = (m_AssocType == Uml::at_Generalization ?
r == Uml::A ? "child" : "parent"
: r == Uml::A ? "client" : "supplier");
- QString roleIdStr = element.attribute(fetch, "");
+ TQString roleIdStr = element.attribute(fetch, "");
if (roleIdStr.isEmpty()) {
// Might be given as a child node instead - see below.
continue;
@@ -225,23 +225,23 @@ bool UMLAssociation::load( QDomElement & element ) {
}
}
if (obj[A] == NULL || obj[B] == NULL) {
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(tag))
continue;
// Permitted tag names:
// roleA: "child" "subtype" "client"
// roleB: "parent" "supertype" "supplier"
- QString idStr = tempElement.attribute( "xmi.id", "" );
+ TQString idStr = tempElement.attribute( "xmi.id", "" );
if (idStr.isEmpty())
idStr = tempElement.attribute( "xmi.idref", "" );
if (idStr.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
idStr = tmpElem.attribute( "xmi.id", "" );
if (idStr.isEmpty())
idStr = tmpElem.attribute( "xmi.idref", "" );
@@ -271,13 +271,13 @@ bool UMLAssociation::load( QDomElement & element ) {
return true;
}
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
// uml13.dtd compliant format (new style)
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(tag))
continue;
if (!tagEq(tag, "Association.connection") &&
@@ -352,11 +352,11 @@ bool UMLAssociation::load( QDomElement & element ) {
}
// From here on it's old-style stuff.
- QString assocTypeStr = element.attribute( "assoctype", "-1" );
+ TQString assocTypeStr = element.attribute( "assoctype", "-1" );
Uml::Association_Type assocType = Uml::at_Unknown;
if (assocTypeStr[0] >= 'a' && assocTypeStr[0] <= 'z') {
// In an earlier version, the natural assoctype names were saved.
- const QString assocTypeString[nAssocTypes] = {
+ const TQString assocTypeString[nAssocTypes] = {
"generalization", // at_Generalization
"aggregation", // at_Aggregation
"dependency", // at_Dependency
@@ -426,16 +426,16 @@ bool UMLAssociation::load( QDomElement & element ) {
setRoleDoc(element.attribute( "docb", "" ), B);
// Visibility defaults to Public if it cant set it here..
- QString visibilityA = element.attribute( "visibilitya", "0");
- QString visibilityB = element.attribute( "visibilityb", "0");
+ TQString visibilityA = element.attribute( "visibilitya", "0");
+ TQString visibilityB = element.attribute( "visibilityb", "0");
if (visibilityA.toInt() > 0)
setVisibility((Uml::Visibility::Value)visibilityA.toInt(), A);
if (visibilityB.toInt() > 0)
setVisibility((Uml::Visibility::Value)visibilityB.toInt(), B);
// Changeability defaults to Changeable if it cant set it here..
- QString changeabilityA = element.attribute( "changeabilitya", "0");
- QString changeabilityB = element.attribute( "changeabilityb", "0");
+ TQString changeabilityA = element.attribute( "changeabilitya", "0");
+ TQString changeabilityB = element.attribute( "changeabilityb", "0");
if (changeabilityA.toInt() > 0)
setChangeability ( (Uml::Changeability_Type) changeabilityA.toInt(), A);
if (changeabilityB.toInt() > 0)
@@ -452,7 +452,7 @@ Uml::IDType UMLAssociation::getObjectId(Uml::Role_Type role) {
UMLRole *roleObj = m_pRole[role];
UMLObject *o = roleObj->getObject();
if (o == NULL) {
- QString auxID = roleObj->getSecondaryId();
+ TQString auxID = roleObj->getSecondaryId();
if (auxID.isEmpty()) {
kError() << "UMLAssociation::getObjectId(" << role
<< "): getObject returns NULL" << endl;
@@ -480,15 +480,15 @@ Uml::Visibility UMLAssociation::getVisibility(Uml::Role_Type role) const {
return m_pRole[role]->getVisibility();
}
-QString UMLAssociation::getMulti(Uml::Role_Type role) const {
+TQString UMLAssociation::getMulti(Uml::Role_Type role) const {
return m_pRole[role]->getMultiplicity();
}
-QString UMLAssociation::getRoleName(Uml::Role_Type role) const {
+TQString UMLAssociation::getRoleName(Uml::Role_Type role) const {
return m_pRole[role]->getName();
}
-QString UMLAssociation::getRoleDoc(Uml::Role_Type role) const {
+TQString UMLAssociation::getRoleDoc(Uml::Role_Type role) const {
return m_pRole[role]->getDoc();
}
@@ -531,19 +531,19 @@ void UMLAssociation::setChangeability(Uml::Changeability_Type value, Uml::Role_T
m_pRole[role]->setChangeability(value);
}
-void UMLAssociation::setMulti(const QString &value, Uml::Role_Type role) {
+void UMLAssociation::setMulti(const TQString &value, Uml::Role_Type role) {
m_pRole[role]->setMultiplicity(value);
}
-void UMLAssociation::setRoleName(const QString &value, Uml::Role_Type role) {
+void UMLAssociation::setRoleName(const TQString &value, Uml::Role_Type role) {
m_pRole[role]->setName(value);
}
-void UMLAssociation::setRoleDoc(const QString &doc, Uml::Role_Type role) {
+void UMLAssociation::setRoleDoc(const TQString &doc, Uml::Role_Type role) {
m_pRole[role]->setDoc(doc);
}
-QString UMLAssociation::ChangeabilityToString(Uml::Changeability_Type type) {
+TQString UMLAssociation::ChangeabilityToString(Uml::Changeability_Type type) {
switch (type) {
case Uml::chg_Frozen:
return "frozen";
diff --git a/umbrello/umbrello/association.h b/umbrello/umbrello/association.h
index 3b0ef94d..01fb357e 100644
--- a/umbrello/umbrello/association.h
+++ b/umbrello/umbrello/association.h
@@ -12,7 +12,7 @@
#ifndef ASSOCIATION_H
#define ASSOCIATION_H
-#include <qdom.h>
+#include <tqdom.h>
#include "umlnamespace.h"
#include "umlobject.h"
@@ -66,7 +66,7 @@ public:
/**
* Returns a String representation of this UMLAssociation.
*/
- QString toString( ) const;
+ TQString toString( ) const;
/**
* Converts a Uml::Association_Type to its string representation.
@@ -74,7 +74,7 @@ public:
* @param atype The Association_Type enum value to convert.
* @return The string representation of the Association_Type.
*/
- static QString typeAsString(Uml::Association_Type atype);
+ static TQString typeAsString(Uml::Association_Type atype);
/**
* Returns true if the given Association_Type has a representation as a
@@ -131,21 +131,21 @@ public:
*
* @return The multiplicity assigned to the given role.
*/
- QString getMulti(Uml::Role_Type role) const;
+ TQString getMulti(Uml::Role_Type role) const;
/**
* Returns the name assigned to the role A.
*
* @return The name assigned to the given role.
*/
- QString getRoleName(Uml::Role_Type role) const;
+ TQString getRoleName(Uml::Role_Type role) const;
/**
* Returns the documentation assigned to the given role.
*
* @return Documentation text of given role.
*/
- QString getRoleDoc(Uml::Role_Type role) const;
+ TQString getRoleDoc(Uml::Role_Type role) const;
/**
* Sets the assocType of the UMLAssociation.
@@ -184,7 +184,7 @@ public:
* @param multi The multiplicity of the given role.
* @param role The Uml::Role_Type to which the multiplicity is being applied
*/
- void setMulti(const QString &multi, Uml::Role_Type role);
+ void setMulti(const TQString &multi, Uml::Role_Type role);
/**
* Sets the name of the given role of the UMLAssociation.
@@ -192,7 +192,7 @@ public:
* @param roleName The name to set for the given role.
* @param role The Uml::Role_Type for which to set the name.
*/
- void setRoleName(const QString &roleName, Uml::Role_Type role);
+ void setRoleName(const TQString &roleName, Uml::Role_Type role);
/**
* Sets the documentation on the given role in the association.
@@ -200,14 +200,14 @@ public:
* @param doc The string with the documentation.
* @param role The Uml::Role_Type to which the documentation is being applied
*/
- void setRoleDoc(const QString &doc, Uml::Role_Type role);
+ void setRoleDoc(const TQString &doc, Uml::Role_Type role);
/**
- * Convert Changeability_Type value into QString representation.
+ * Convert Changeability_Type value into TQString representation.
*
* @param type The Changeability_Type enum value to convert.
*/
- static QString ChangeabilityToString(Uml::Changeability_Type type);
+ static TQString ChangeabilityToString(Uml::Changeability_Type type);
/**
* Get the underlying UMLRole object for the given role.
@@ -248,14 +248,14 @@ public:
* Creates the <UML:Generalization> or <UML:Association> XMI element
* including its role objects.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Creates the <UML:Generalization> or <UML:Association> XMI element
* including its role objects.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
// keep track of number of parent widgets
int nrof_parent_widgets;
@@ -278,12 +278,12 @@ protected:
static const Uml::Association_Type atypeFirst;
static const Uml::Association_Type atypeLast;
static const unsigned int nAssocTypes;
- static const QString assocTypeStr[];
+ static const TQString assocTypeStr[];
UMLRole * m_pRole[2];
Uml::Association_Type m_AssocType;
- QString m_Name;
+ TQString m_Name;
bool m_bOldLoadMode;
};
diff --git a/umbrello/umbrello/associationwidget.cpp b/umbrello/umbrello/associationwidget.cpp
index 3f2fe0b7..825308a9 100644
--- a/umbrello/umbrello/associationwidget.cpp
+++ b/umbrello/umbrello/associationwidget.cpp
@@ -15,8 +15,8 @@
#include <cstdlib>
#include <cmath>
// qt/kde includes
-#include <qcanvas.h>
-#include <qvalidator.h>
+#include <tqcanvas.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <klocale.h>
#include <kinputdialog.h>
@@ -117,7 +117,7 @@ AssociationWidget::AssociationWidget(UMLView *view, UMLWidget* pWidgetA,
if (isCollaboration()) {
// Create a temporary name to bring on setName()
int collabID = m_pView->generateCollaborationId();
- setName('m' + QString::number(collabID));
+ setName('m' + TQString::number(collabID));
}
}
@@ -245,7 +245,7 @@ FloatingTextWidget* AssociationWidget::getMultiWidget(Uml::Role_Type role) {
return m_role[role].m_pMulti;
}
-QString AssociationWidget::getMulti(Uml::Role_Type role) const
+TQString AssociationWidget::getMulti(Uml::Role_Type role) const
{
if (m_role[role].m_pMulti == NULL)
return "";
@@ -257,7 +257,7 @@ FloatingTextWidget* AssociationWidget::getNameWidget()
return m_pName;
}
-QString AssociationWidget::getName() const {
+TQString AssociationWidget::getName() const {
if (m_pName == NULL)
return "";
return m_pName->getText();
@@ -294,20 +294,20 @@ FloatingTextWidget* AssociationWidget::getTextWidgetByRole(Uml::Text_Role tr) {
return NULL;
}
-QString AssociationWidget::getRoleName(Uml::Role_Type role) const {
+TQString AssociationWidget::getRoleName(Uml::Role_Type role) const {
if (m_role[role].m_pRole == NULL)
return "";
return m_role[role].m_pRole->getText();
}
-QString AssociationWidget::getRoleDoc(Uml::Role_Type role) const {
+TQString AssociationWidget::getRoleDoc(Uml::Role_Type role) const {
if (m_pObject == NULL || m_pObject->getBaseType() != ot_Association)
return "";
UMLAssociation *umla = static_cast<UMLAssociation*>(m_pObject);
return umla->getRoleDoc(role);
}
-void AssociationWidget::setName(const QString &strName) {
+void AssociationWidget::setName(const TQString &strName) {
// set attribute of UMLAssociation associated with this associationwidget
UMLAssociation *umla = getAssociation();
if (umla)
@@ -342,7 +342,7 @@ void AssociationWidget::setName(const QString &strName) {
}
void AssociationWidget::setFloatingText(Uml::Text_Role tr,
- const QString &text,
+ const TQString &text,
FloatingTextWidget* &ft) {
if (! FloatingTextWidget::isTextValid(text)) {
if (ft) {
@@ -369,7 +369,7 @@ void AssociationWidget::setFloatingText(Uml::Text_Role tr,
ft->show();
}
-void AssociationWidget::setMulti(const QString &strMulti, Uml::Role_Type role) {
+void AssociationWidget::setMulti(const TQString &strMulti, Uml::Role_Type role) {
Text_Role tr = (role == A ? tr_MultiA : tr_MultiB);
setFloatingText(tr, strMulti, m_role[role].m_pMulti);
@@ -378,7 +378,7 @@ void AssociationWidget::setMulti(const QString &strMulti, Uml::Role_Type role) {
getAssociation()->setMulti(strMulti, role);
}
-void AssociationWidget::setRoleName (const QString &strRole, Uml::Role_Type role) {
+void AssociationWidget::setRoleName (const TQString &strRole, Uml::Role_Type role) {
Uml::Association_Type type = getAssocType();
//if the association is not supposed to have a Role FloatingTextWidget
if (!AssocRules::allowRole(type)) {
@@ -403,7 +403,7 @@ void AssociationWidget::setRoleName (const QString &strRole, Uml::Role_Type role
getAssociation()->setRoleName(strRole, role);
}
-void AssociationWidget::setRoleDoc (const QString &doc, Uml::Role_Type role) {
+void AssociationWidget::setRoleDoc (const TQString &doc, Uml::Role_Type role) {
if (m_pObject && m_pObject->getBaseType() == ot_Association)
getAssociation()->setRoleDoc(doc, role);
else
@@ -411,7 +411,7 @@ void AssociationWidget::setRoleDoc (const QString &doc, Uml::Role_Type role) {
}
void AssociationWidget::setMessageText(FloatingTextWidget *ft) {
- QString message;
+ TQString message;
if (isCollaboration()) {
if (m_pObject != NULL) {
message = getMulti(A) + ": " + getOperationText(m_pView);
@@ -449,7 +449,7 @@ void AssociationWidget::setVisibility(Uml::Visibility value, Uml::Role_Type role
m_role[role].m_Visibility = value;
// update role pre-text attribute as appropriate
if (m_role[role].m_pRole) {
- QString scopeString = value.toString(true);
+ TQString scopeString = value.toString(true);
m_role[role].m_pRole->setPreText(scopeString);
}
}
@@ -466,7 +466,7 @@ void AssociationWidget::setChangeability (Uml::Changeability_Type value, Uml::Ro
{
if (value == getChangeability(role))
return;
- QString changeString = UMLAssociation::ChangeabilityToString(value);
+ TQString changeString = UMLAssociation::ChangeabilityToString(value);
if (m_pObject && m_pObject->getBaseType() == ot_Association) // update our model object
getAssociation()->setChangeability(value, role);
m_role[role].m_Changeability = value;
@@ -474,7 +474,7 @@ void AssociationWidget::setChangeability (Uml::Changeability_Type value, Uml::Ro
setChangeWidget(changeString, role);
}
-void AssociationWidget::setChangeWidget(const QString &strChangeWidget, Uml::Role_Type role) {
+void AssociationWidget::setChangeWidget(const TQString &strChangeWidget, Uml::Role_Type role) {
bool newLabel = false;
Text_Role tr = (role == A ? tr_ChangeA : tr_ChangeB);
@@ -508,7 +508,7 @@ void AssociationWidget::setChangeWidget(const QString &strChangeWidget, Uml::Rol
}
bool AssociationWidget::linePathStartsAt(const UMLWidget* widget) {
- QPoint lpStart = m_LinePath.getPoint(0);
+ TQPoint lpStart = m_LinePath.getPoint(0);
int startX = lpStart.x();
int startY = lpStart.y();
int wX = widget->getX();
@@ -520,7 +520,7 @@ bool AssociationWidget::linePathStartsAt(const UMLWidget* widget) {
return result;
}
-void AssociationWidget::setText(FloatingTextWidget *ft, const QString &text) {
+void AssociationWidget::setText(FloatingTextWidget *ft, const TQString &text) {
Uml::Text_Role role = ft->getRole();
switch (role) {
case tr_Name:
@@ -819,7 +819,7 @@ void AssociationWidget::setUMLAssociation (UMLAssociation * assoc)
assoc->nrof_parent_widgets = 0;
assoc->nrof_parent_widgets++;
- connect(assoc, SIGNAL(modified()), this, SLOT(syncToModel()));
+ connect(assoc, TQT_SIGNAL(modified()), this, TQT_SLOT(syncToModel()));
}
}
@@ -888,9 +888,9 @@ Uml::IDType AssociationWidget::getWidgetID(Uml::Role_Type role) const {
return id;
}
-/** Returns a QString Object representing this AssociationWidget */
-QString AssociationWidget::toString() {
- QString string = "";
+/** Returns a TQString Object representing this AssociationWidget */
+TQString AssociationWidget::toString() {
+ TQString string = "";
if(m_role[A].m_pWidget) {
string = m_role[A].m_pWidget -> getName();
@@ -915,7 +915,7 @@ QString AssociationWidget::toString() {
return string;
}
-void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
+void AssociationWidget::mouseDoubleClickEvent(TQMouseEvent * me) {
if (me->button() != Qt::RightButton && me->button() != Qt::LeftButton)
return;
int i = m_LinePath.onLinePath(me->pos());
@@ -925,13 +925,13 @@ void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
}
if (me->button() != Qt::LeftButton)
return;
- const QPoint mp(me->pos());
+ const TQPoint mp(me->pos());
/* if there is no point around the mouse pointer, we insert a new one */
if (! m_LinePath.isPoint(i, mp, POINT_DELTA)) {
m_LinePath.insertPoint(i + 1, mp);
if (m_nLinePathSegmentIndex == i) {
- QPoint segStart = m_LinePath.getPoint(i);
- QPoint segEnd = m_LinePath.getPoint(i + 2);
+ TQPoint segStart = m_LinePath.getPoint(i);
+ TQPoint segEnd = m_LinePath.getPoint(i + 2);
const int midSegX = segStart.x() + (segEnd.x() - segStart.x()) / 2;
const int midSegY = segStart.y() + (segEnd.y() - segStart.y()) / 2;
/*
@@ -975,7 +975,7 @@ void AssociationWidget::mouseDoubleClickEvent(QMouseEvent * me) {
m_umldoc->setModified(true);
}
-void AssociationWidget::moveEvent(QMoveEvent* me) {
+void AssociationWidget::moveEvent(TQMoveEvent* me) {
// 2004-04-30: Achim Spangler
// Simple Approach to block moveEvent during load of
// XMI
@@ -1001,13 +1001,13 @@ void AssociationWidget::moveEvent(QMoveEvent* me) {
*/
//first see if either the first or last segments moved, else no need to recalculate their point positions
- QPoint oldNamePoint = calculateTextPosition(tr_Name);
- QPoint oldMultiAPoint = calculateTextPosition(tr_MultiA);
- QPoint oldMultiBPoint = calculateTextPosition(tr_MultiB);
- QPoint oldChangeAPoint = calculateTextPosition(tr_ChangeA);
- QPoint oldChangeBPoint = calculateTextPosition(tr_ChangeB);
- QPoint oldRoleAPoint = calculateTextPosition(tr_RoleAName);
- QPoint oldRoleBPoint = calculateTextPosition(tr_RoleBName);
+ TQPoint oldNamePoint = calculateTextPosition(tr_Name);
+ TQPoint oldMultiAPoint = calculateTextPosition(tr_MultiA);
+ TQPoint oldMultiBPoint = calculateTextPosition(tr_MultiB);
+ TQPoint oldChangeAPoint = calculateTextPosition(tr_ChangeA);
+ TQPoint oldChangeBPoint = calculateTextPosition(tr_ChangeB);
+ TQPoint oldRoleAPoint = calculateTextPosition(tr_RoleAName);
+ TQPoint oldRoleBPoint = calculateTextPosition(tr_RoleBName);
m_LinePath.setPoint( m_nMovingPoint, me->pos() );
int pos = m_LinePath.count() - 1;//set to last point for widget b
@@ -1100,14 +1100,14 @@ void AssociationWidget::calculateEndingPoints() {
int w = pWidgetA -> getWidth();
//see if above widget ok to start
if( y - DISTANCE > 0 ) {
- m_LinePath.setStartEndPoints( QPoint( x + w / 4, y ) , QPoint( x + w * 3 / 4, y ) );
- m_LinePath.insertPoint( 1, QPoint( x + w / 4, y - DISTANCE ) );
- m_LinePath.insertPoint( 2 ,QPoint( x + w * 3 / 4, y - DISTANCE ) );
+ m_LinePath.setStartEndPoints( TQPoint( x + w / 4, y ) , TQPoint( x + w * 3 / 4, y ) );
+ m_LinePath.insertPoint( 1, TQPoint( x + w / 4, y - DISTANCE ) );
+ m_LinePath.insertPoint( 2 ,TQPoint( x + w * 3 / 4, y - DISTANCE ) );
m_role[A].m_WidgetRegion = m_role[B].m_WidgetRegion = North;
} else {
- m_LinePath.setStartEndPoints( QPoint( x + w / 4, y + h ), QPoint( x + w * 3 / 4, y + h ) );
- m_LinePath.insertPoint( 1, QPoint( x + w / 4, y + h + DISTANCE ) );
- m_LinePath.insertPoint( 2, QPoint( x + w * 3 / 4, y + h + DISTANCE ) );
+ m_LinePath.setStartEndPoints( TQPoint( x + w / 4, y + h ), TQPoint( x + w * 3 / 4, y + h ) );
+ m_LinePath.insertPoint( 1, TQPoint( x + w / 4, y + h + DISTANCE ) );
+ m_LinePath.insertPoint( 2, TQPoint( x + w * 3 / 4, y + h + DISTANCE ) );
m_role[A].m_WidgetRegion = m_role[B].m_WidgetRegion = South;
}
return;
@@ -1118,7 +1118,7 @@ void AssociationWidget::calculateEndingPoints() {
int xB = pWidgetB->getX() + pWidgetB->getWidth() / 2;
int yB = pWidgetB->getY() + pWidgetB->getHeight() / 2;
if( size > 2 ) {
- QPoint p = m_LinePath.getPoint( 1 );
+ TQPoint p = m_LinePath.getPoint( 1 );
xB = p.x();
yB = p.y();
}
@@ -1130,7 +1130,7 @@ void AssociationWidget::calculateEndingPoints() {
int xA = pWidgetA->getX() + pWidgetA->getWidth() / 2;
int yA = pWidgetA->getY() + pWidgetA->getHeight() / 2;
if (size > 2 ) {
- QPoint p = m_LinePath.getPoint( size - 2 );
+ TQPoint p = m_LinePath.getPoint( size - 2 );
xA = p.x();
yA = p.y();
}
@@ -1143,7 +1143,7 @@ void AssociationWidget::doUpdates(int otherX, int otherY, Uml::Role_Type role) {
// Find widget region.
Region oldRegion = m_role[role].m_WidgetRegion;
UMLWidget *pWidget = m_role[role].m_pWidget;
- QRect rc(pWidget->getX(), pWidget->getY(),
+ TQRect rc(pWidget->getX(), pWidget->getY(),
pWidget->getWidth(), pWidget->getHeight());
Region& region = m_role[role].m_WidgetRegion; // alias for brevity
region = findPointRegion( rc, otherX, otherY);
@@ -1297,7 +1297,7 @@ void AssociationWidget::widgetMoved(UMLWidget* widget, int x, int y ) {
// Assoc to self - move all points:
if( m_role[A].m_pWidget == m_role[B].m_pWidget ) {
for( int i=1 ; i < (int)pos ; i++ ) {
- QPoint p = m_LinePath.getPoint( i );
+ TQPoint p = m_LinePath.getPoint( i );
int newX = p.x() - dx;
int newY = p.y() - dy;
// safety. We DON'T want to go off the screen
@@ -1363,7 +1363,7 @@ void AssociationWidget::widgetMoved(UMLWidget* widget, int x, int y ) {
8 = On diagonal 1 between Region 4 and 1
9 = On diagonal 1 and On diagonal 2 (the center)
*/
-AssociationWidget::Region AssociationWidget::findPointRegion(const QRect& Rect, int PosX, int PosY) {
+AssociationWidget::Region AssociationWidget::findPointRegion(const TQRect& Rect, int PosX, int PosY) {
float w = (float)Rect.width();
float h = (float)Rect.height();
float x = (float)Rect.x();
@@ -1416,8 +1416,8 @@ AssociationWidget::Region AssociationWidget::findPointRegion(const QRect& Rect,
return result;
}
-QPoint AssociationWidget::swapXY(const QPoint &p) {
- QPoint swapped( p.y(), p.x() );
+TQPoint AssociationWidget::swapXY(const TQPoint &p) {
+ TQPoint swapped( p.y(), p.x() );
return swapped;
}
@@ -1429,8 +1429,8 @@ float AssociationWidget::totalLength() {
float total_length = 0;
for(uint i = 0; i < size - 1; i++) {
- QPoint pi = m_LinePath.getPoint( i );
- QPoint pj = m_LinePath.getPoint( i+1 );
+ TQPoint pi = m_LinePath.getPoint( i );
+ TQPoint pj = m_LinePath.getPoint( i+1 );
int xi = pi.y();
int xj = pj.y();
int yi = pi.x();
@@ -1446,7 +1446,7 @@ float AssociationWidget::totalLength() {
Lets say such point is P3, the distance from P1 to P3 must be equal to Distance
and if P3 is not a point of the segment P1P2 then the function returns (-1,-1)
*/
-QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoint &P2, float Distance) {
+TQPoint AssociationWidget::calculatePointAtDistance(const TQPoint &P1, const TQPoint &P2, float Distance) {
/*
the distance D between points (x1, y1) and (x3, y3) has the following formula:
--- ------------------------------
@@ -1508,7 +1508,7 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
int y2 = P2.x();
if(x2 == x1) {
- return QPoint(x1, y1 + (int)Distance);
+ return TQPoint(x1, y1 + (int)Distance);
}
float slope = ((float)y2 - (float)y1) / ((float)x2 - (float)x1);
float b = (y1 - slope*x1);
@@ -1518,16 +1518,16 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
float t = B*B - 4*A*C;
if(t < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
float sol_1 = ((-1* B) + sqrt(t) ) / (2*A);
float sol_2 = ((-1*B) - sqrt(t) ) / (2*A);
if(sol_1 < 0.0 && sol_2 < 0.0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
- QPoint sol1Point((int)(slope*sol_1 + b), (int)(sol_1));
- QPoint sol2Point((int)(slope*sol_2 + b), (int)(sol_2));
+ TQPoint sol1Point((int)(slope*sol_1 + b), (int)(sol_1));
+ TQPoint sol2Point((int)(slope*sol_2 + b), (int)(sol_2));
if(sol_1 < 0 && sol_2 >=0) {
if(x2 > x1) {
if(x1 <= sol_2 && sol_2 <= x2)
@@ -1557,14 +1557,14 @@ QPoint AssociationWidget::calculatePointAtDistance(const QPoint &P1, const QPoin
return sol2Point;
}
}
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
/** Calculates which point of a perpendicular line to segment P1P2 that contains P2
has a distance equal to Distance from P2,
Lets say such point is P3, the distance from P2 to P3 must be equal to Distance
*/
-QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &P1, const QPoint &P2, float Distance) {
+TQPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const TQPoint &P1, const TQPoint &P2, float Distance) {
/*
the distance D between points (x2, y2) and (x3, y3) has the following formula:
@@ -1630,7 +1630,7 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
to calculate
*/
if (P1.x() == P2.x()) {
- return QPoint((int)(P2.x() + Distance), P2.y());
+ return TQPoint((int)(P2.x() + Distance), P2.y());
}
const int x1 = P1.y();
const int y1 = P1.x();
@@ -1644,17 +1644,17 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
float C = (b*b) - (Distance*Distance) + (x2*x2) + (y2*y2) - (2*b*y2);
float t = B*B - 4*A*C;
if (t < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
float sol_1 = ((-1* B) + sqrt(t) ) / (2*A);
float sol_2 = ((-1*B) - sqrt(t) ) / (2*A);
if(sol_1 < 0 && sol_2 < 0) {
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
- QPoint sol1Point((int)(slope*sol_1 + b), (int)sol_1);
- QPoint sol2Point((int)(slope*sol_2 + b), (int)sol_2);
+ TQPoint sol1Point((int)(slope*sol_1 + b), (int)sol_1);
+ TQPoint sol2Point((int)(slope*sol_2 + b), (int)sol_2);
if(sol_1 < 0 && sol_2 >=0) {
return sol2Point;
} else if(sol_1 >= 0 && sol_2 < 0) {
@@ -1673,14 +1673,14 @@ QPoint AssociationWidget::calculatePointAtDistanceOnPerpendicular(const QPoint &
}
}
- return QPoint(-1, -1); // never reached, just keep compilers happy
+ return TQPoint(-1, -1); // never reached, just keep compilers happy
}
/** Calculates the intersection (PS) between line P1P2 and a perpendicular line containing
P3, the result is returned in ResultingPoint. and result value represents the distance
between ResultingPoint and P3; if this value is negative an error ocurred. */
-float AssociationWidget::perpendicularProjection(const QPoint& P1, const QPoint& P2, const QPoint& P3,
- QPoint& ResultingPoint) {
+float AssociationWidget::perpendicularProjection(const TQPoint& P1, const TQPoint& P2, const TQPoint& P3,
+ TQPoint& ResultingPoint) {
//line P1P2 is Line 1 = y=slope1*x + b1
//line P3PS is Line 1 = y=slope2*x + b2
@@ -1721,9 +1721,9 @@ float AssociationWidget::perpendicularProjection(const QPoint& P1, const QPoint&
return distance;
}
-QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
+TQPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
const int SPACE = 2;
- QPoint p(-1, -1), q(-1, -1);
+ TQPoint p(-1, -1), q(-1, -1);
// used to find out if association end point (p)
// is at top or bottom edge of widget.
@@ -1742,7 +1742,7 @@ QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
} else if (role != tr_Name) {
kError() << "AssociationWidget::calculateTextPosition called with unsupported Text_Role "
<< role << endl;
- return QPoint(-1, -1);
+ return TQPoint(-1, -1);
}
if ( pWidget && ( pWidget->getY() == p.y() || pWidget->getY() + pWidget->height() == p.y() ))
@@ -1803,12 +1803,12 @@ QPoint AssociationWidget::calculateTextPosition(Uml::Text_Role role) {
if (text) {
constrainTextPos(x, y, textW, textH, role);
}
- p = QPoint( x, y );
+ p = TQPoint( x, y );
return p;
}
-QPoint AssociationWidget::midPoint(const QPoint& p0, const QPoint& p1) {
- QPoint midP;
+TQPoint AssociationWidget::midPoint(const TQPoint& p0, const TQPoint& p1) {
+ TQPoint midP;
if (p0.x() < p1.x())
midP.setX(p0.x() + (p1.x() - p0.x()) / 2);
else
@@ -1826,7 +1826,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
const int textCenterX = textX + textWidth / 2;
const int textCenterY = textY + textHeight / 2;
const uint lastSegment = m_LinePath.count() - 1;
- QPoint p0, p1;
+ TQPoint p0, p1;
switch (tr) {
case tr_RoleAName:
case tr_MultiA:
@@ -1859,7 +1859,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
for (uint i = 0; i < lastSegment; i++) {
p0 = m_LinePath.getPoint(i);
p1 = m_LinePath.getPoint(i + 1);
- QPoint midP = midPoint(p0, p1);
+ TQPoint midP = midPoint(p0, p1);
const int deltaX = textCenterX - midP.x();
const int deltaY = textCenterY - midP.y();
const int cSquare = deltaX * deltaX + deltaY * deltaY;
@@ -1886,7 +1886,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
*/
p0 = swapXY(p0); // go to the natural coordinate system
p1 = swapXY(p1); // with (0,0) in the lower left corner
- QPoint midP = midPoint(p0, p1);
+ TQPoint midP = midPoint(p0, p1);
// If (textX,textY) is not inside the circle around midP then
// constrain (textX,textY) to the nearest point on that circle.
const int x0 = p0.x();
@@ -1897,7 +1897,7 @@ void AssociationWidget::constrainTextPos(int &textX, int &textY,
if (textWidth > r)
r = textWidth;
// swap textCenter{X,Y} to convert from Qt coord.system.
- const QPoint origTextCenter(textCenterY, textCenterX);
+ const TQPoint origTextCenter(textCenterY, textCenterX);
const int relX = abs(origTextCenter.x() - midP.x());
const int relY = abs(origTextCenter.y() - midP.y());
const double negativeWhenInsideCircle = relX * relX + relY * relY - r * r;
@@ -1976,8 +1976,8 @@ void AssociationWidget::calculateNameTextSegment() {
float total_length = 0;
float smallest_length = 0;
for(uint i = 0; i < size - 1; i++) {
- QPoint pi = m_LinePath.getPoint( i );
- QPoint pj = m_LinePath.getPoint( i+1 );
+ TQPoint pi = m_LinePath.getPoint( i );
+ TQPoint pj = m_LinePath.getPoint( i+1 );
int xtiDiff = xt - pi.x();
int xtjDiff = xt - pj.x();
int ytiDiff = yt - pi.y();
@@ -2015,7 +2015,7 @@ void AssociationWidget::setTextPosition(Uml::Text_Role role) {
FloatingTextWidget *ft = getTextWidgetByRole(role);
if (ft == NULL)
return;
- QPoint pos = calculateTextPosition(role);
+ TQPoint pos = calculateTextPosition(role);
int x = pos.x();
int y = pos.y();
if ( (x < 0 || x > FloatingTextWidget::restrictPositionMax) ||
@@ -2030,7 +2030,7 @@ void AssociationWidget::setTextPosition(Uml::Text_Role role) {
ft->setY( y );
}
-void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const QPoint &oldPosition) {
+void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const TQPoint &oldPosition) {
bool startMove = false;
if( m_role[A].m_pMulti && m_role[A].m_pMulti->getStartMove() )
startMove = true;
@@ -2063,7 +2063,7 @@ void AssociationWidget::setTextPositionRelatively(Uml::Text_Role role, const QPo
<< FloatingTextWidget::restrictPositionMax << "]" << endl;
return;
}
- QPoint pos = calculateTextPosition(role);
+ TQPoint pos = calculateTextPosition(role);
int relX = pos.x() - oldPosition.x();
int relY = pos.y() - oldPosition.y();
int ftNewX = ftX + relX;
@@ -2097,9 +2097,9 @@ void AssociationWidget::removeAssocClassLine() {
void AssociationWidget::createAssocClassLine() {
if (m_pAssocClassLine == NULL)
- m_pAssocClassLine = new QCanvasLine(m_pView->canvas());
+ m_pAssocClassLine = new TQCanvasLine(m_pView->canvas());
computeAssocClassLine();
- QPen pen(getLineColor(), getLineWidth(), Qt::DashLine);
+ TQPen pen(getLineColor(), getLineWidth(), Qt::DashLine);
m_pAssocClassLine->setPen(pen);
m_pAssocClassLine->setVisible(true);
}
@@ -2126,14 +2126,14 @@ void AssociationWidget::computeAssocClassLine() {
<< "m_nLinePathSegmentIndex is not set" << endl;
return;
}
- QPoint segStart = m_LinePath.getPoint(m_nLinePathSegmentIndex);
- QPoint segEnd = m_LinePath.getPoint(m_nLinePathSegmentIndex + 1);
+ TQPoint segStart = m_LinePath.getPoint(m_nLinePathSegmentIndex);
+ TQPoint segEnd = m_LinePath.getPoint(m_nLinePathSegmentIndex + 1);
const int midSegX = segStart.x() + (segEnd.x() - segStart.x()) / 2;
const int midSegY = segStart.y() + (segEnd.y() - segStart.y()) / 2;
- QPoint segmentMidPoint(midSegX, midSegY);
- QRect classRectangle = m_pAssocClassWidget->rect();
- QPoint cwEdgePoint = findIntercept(classRectangle, segmentMidPoint);
+ TQPoint segmentMidPoint(midSegX, midSegY);
+ TQRect classRectangle = m_pAssocClassWidget->rect();
+ TQPoint cwEdgePoint = findIntercept(classRectangle, segmentMidPoint);
int acwMinX = cwEdgePoint.x();
int acwMinY = cwEdgePoint.y();
@@ -2166,12 +2166,12 @@ void AssociationWidget::selectAssocClassLine(bool sel /* =true */) {
m_pAssocClassLineSel1 = Widget_Utils::decoratePoint(m_pAssocClassLine->endPoint());
}
-void AssociationWidget::mousePressEvent(QMouseEvent * me) {
+void AssociationWidget::mousePressEvent(TQMouseEvent * me) {
m_nMovingPoint = -1;
//make sure we should be here depending on the button
if(me -> button() != Qt::RightButton && me->button() != Qt::LeftButton)
return;
- QPoint mep = me->pos();
+ TQPoint mep = me->pos();
// See if `mep' is on the connecting line to the association class
if (onAssocClassLine(mep)) {
m_bSelected = true;
@@ -2186,7 +2186,7 @@ void AssociationWidget::mousePressEvent(QMouseEvent * me) {
setSelected( !m_bSelected );
}
-void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
+void AssociationWidget::mouseReleaseEvent(TQMouseEvent * me) {
if(me -> button() != Qt::RightButton && me->button() != Qt::LeftButton) {
setSelected( false );
return;
@@ -2198,15 +2198,15 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
///@todo: check for non-horizontal / -vertical lines
if (m_nMovingPoint > 0 && m_nMovingPoint < m_LinePath.count() - 1)
{
- QPoint m = m_LinePath.getPoint(m_nMovingPoint);
- QPoint b = m_LinePath.getPoint(m_nMovingPoint - 1);
- QPoint a = m_LinePath.getPoint(m_nMovingPoint + 1);
+ TQPoint m = m_LinePath.getPoint(m_nMovingPoint);
+ TQPoint b = m_LinePath.getPoint(m_nMovingPoint - 1);
+ TQPoint a = m_LinePath.getPoint(m_nMovingPoint + 1);
if ( (b.x() == m.x() && a.x() == m.x()) ||
(b.y() == m.y() && a.y() == m.y()) )
m_LinePath.removePoint(m_nMovingPoint, m, POINT_DELTA);
}
m_nMovingPoint = -1;
- const QPoint p = me->pos();
+ const TQPoint p = me->pos();
if (me->button() != Qt::RightButton) {
return;
@@ -2218,8 +2218,8 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
//also must be within a certain distance to be a multiplicity menu
ListPopupMenu::Menu_Type menuType = ListPopupMenu::mt_Undefined;
const int DISTANCE = 40;//must be within this many pixels for it to be a multi menu
- const QPoint lpStart = m_LinePath.getPoint(0);
- const QPoint lpEnd = m_LinePath.getPoint(m_LinePath.count() - 1);
+ const TQPoint lpStart = m_LinePath.getPoint(0);
+ const TQPoint lpEnd = m_LinePath.getPoint(m_LinePath.count() - 1);
const int startXDiff = lpStart.x() - p.x();
const int startYDiff = lpStart.y() - p.y();
const int endXDiff = lpEnd.x() - p.x();
@@ -2248,19 +2248,19 @@ void AssociationWidget::mouseReleaseEvent(QMouseEvent * me) {
}
m_pMenu = new ListPopupMenu(m_pView, menuType);
m_pMenu->popup(me -> globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
setSelected();
}//end method mouseReleaseEvent
bool AssociationWidget::showDialog() {
- AssocPropDlg dlg(static_cast<QWidget*>(m_pView), this );
+ AssocPropDlg dlg(static_cast<TQWidget*>(m_pView), this );
if (! dlg.exec())
return false;
- QString name = getName();
- QString doc = getDoc();
- QString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
- QString rnA = getRoleName(A), rnB = getRoleName(B);
- QString ma = getMulti(A), mb = getMulti(B);
+ TQString name = getName();
+ TQString doc = getDoc();
+ TQString roleADoc = getRoleDoc(A), roleBDoc = getRoleDoc(B);
+ TQString rnA = getRoleName(A), rnB = getRoleName(B);
+ TQString ma = getMulti(A), mb = getMulti(B);
Uml::Visibility vA = getVisibility(A), vB = getVisibility(B);
Uml::Changeability_Type cA = getChangeability(A), cB = getChangeability(B);
//rules built into these functions to stop updating incorrect values
@@ -2281,9 +2281,9 @@ bool AssociationWidget::showDialog() {
}
void AssociationWidget::slotMenuSelection(int sel) {
- QString oldText, newText;
- QFont font;
- QRegExpValidator v(QRegExp(".*"), 0);
+ TQString oldText, newText;
+ TQFont font;
+ TQRegExpValidator v(TQRegExp(".*"), 0);
Uml::Association_Type atype = getAssocType();
Uml::Role_Type r = Uml::B;
@@ -2393,7 +2393,7 @@ void AssociationWidget::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Line_Color:
case ListPopupMenu::mt_Line_Color_Selection:
{
- QColor newColour;
+ TQColor newColour;
if( KColorDialog::getColor(newColour) ) {
m_pView->selectionSetLineColor(newColour);
m_umldoc->setModified(true);
@@ -2421,7 +2421,7 @@ void AssociationWidget::slotMenuSelection(int sel) {
}
-void AssociationWidget::lwSetFont (QFont font) {
+void AssociationWidget::lwSetFont (TQFont font) {
if( m_pName) {
m_pName->setFont( font );
}
@@ -2444,8 +2444,8 @@ void AssociationWidget::lwSetFont (QFont font) {
}
// find a general font for the association
-QFont AssociationWidget::getFont() const {
- QFont font;
+TQFont AssociationWidget::getFont() const {
+ TQFont font;
if( m_role[A].m_pRole )
font = m_role[A].m_pRole -> getFont( );
@@ -2467,7 +2467,7 @@ QFont AssociationWidget::getFont() const {
return font;
}
-void AssociationWidget::setLineColor(const QColor &colour) {
+void AssociationWidget::setLineColor(const TQColor &colour) {
WidgetBase::setLineColor(colour);
m_LinePath.setLineColor(colour);
}
@@ -2477,14 +2477,14 @@ void AssociationWidget::setLineWidth(uint width) {
m_LinePath.setLineWidth(width);
}
-void AssociationWidget::checkPoints(const QPoint &p) {
+void AssociationWidget::checkPoints(const TQPoint &p) {
m_nMovingPoint = -1;
//only check if more than the two endpoints
int size = m_LinePath.count();
if( size <= 2 )
return;
//check all points except the end points to see if we clicked on one of them
- QPoint tempPoint;
+ TQPoint tempPoint;
int x, y;
const int BOUNDARY = 4; // check for pixels around the point
for(int i=1;i<size-1;i++) {
@@ -2499,7 +2499,7 @@ void AssociationWidget::checkPoints(const QPoint &p) {
}//end for
}
-void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
+void AssociationWidget::mouseMoveEvent(TQMouseEvent* me) {
if( me->state() != Qt::LeftButton) {
return;
}
@@ -2518,8 +2518,8 @@ void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
setSelected();
//new position for point
- QPoint p = me->pos();
- QPoint oldp = m_LinePath.getPoint(m_nMovingPoint);
+ TQPoint p = me->pos();
+ TQPoint oldp = m_LinePath.getPoint(m_nMovingPoint);
if( m_pView -> getSnapToGrid() ) {
int newX = m_pView->snappedX( p.x() );
@@ -2555,7 +2555,7 @@ void AssociationWidget::mouseMoveEvent(QMouseEvent* me) {
}
//move event called now
- QMoveEvent m(p, oldp);
+ TQMoveEvent m(p, oldp);
moveEvent(&m);
m_pView->resizeCanvasToItems();
}
@@ -2598,7 +2598,7 @@ int AssociationWidget::getRegionCount(AssociationWidget::Region region, Uml::Rol
return widgetCount;
}
-QPoint AssociationWidget::findIntercept(const QRect &rect, const QPoint &point) {
+TQPoint AssociationWidget::findIntercept(const TQRect &rect, const TQPoint &point) {
Region region = findPointRegion(rect, point.x(), point.y());
/*
const char *regionStr[] = { "Error",
@@ -2664,40 +2664,40 @@ QPoint AssociationWidget::findIntercept(const QRect &rect, const QPoint &point)
if (region == North)
yoff = -yoff;
if (dX == 0) {
- return QPoint(rectMidY + yoff, rectMidX); // swap back X and Y
+ return TQPoint(rectMidY + yoff, rectMidX); // swap back X and Y
}
if (dY == 0) {
kError() << "AssociationWidget::findIntercept usage error: "
<< "North/South (dY == 0)" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
const float m = (float)dY / (float)dX;
const float b = (float)pY - m * pX;
const int inputY = rectMidY + yoff;
const float outputX = ((float)inputY - b) / m;
- return QPoint(inputY, (int)outputX); // swap back X and Y
+ return TQPoint(inputY, (int)outputX); // swap back X and Y
} else {
int xoff = rectHalfWidth;
if (region == East)
xoff = -xoff;
if (dY == 0)
- return QPoint(rectMidY, rectMidX + xoff); // swap back X and Y
+ return TQPoint(rectMidY, rectMidX + xoff); // swap back X and Y
if (dX == 0) {
kError() << "AssociationWidget::findIntercept usage error: "
<< "East/West (dX == 0)" << endl;
- return QPoint(0,0);
+ return TQPoint(0,0);
}
const float m = (float)dY / (float)dX;
const float b = (float)pY - m * pX;
const int inputX = rectMidX + xoff;
const float outputY = m * (float)inputX + b;
- return QPoint((int)outputY, inputX); // swap back X and Y
+ return TQPoint((int)outputY, inputX); // swap back X and Y
}
}
-int AssociationWidget::findInterceptOnEdge(const QRect &rect,
+int AssociationWidget::findInterceptOnEdge(const TQRect &rect,
AssociationWidget::Region region,
- const QPoint &point)
+ const TQPoint &point)
{
// The Qt coordinate system has (0,0) in the top left corner.
// In order to go to the regular XY coordinate system with (0,0)
@@ -2815,7 +2815,7 @@ void AssociationWidget::updateAssociations(int totalCount,
// Determine intercept position on the edge indicated by `region'.
UMLWidget * otherWidget = (inWidgetARegion ? wB : wA);
LinePath *linepath = assocwidget->getLinePath();
- QPoint refpoint;
+ TQPoint refpoint;
if (assocwidget->linePathStartsAt(otherWidget))
refpoint = linepath->getPoint(linepath->count() - 2);
else
@@ -2869,23 +2869,23 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
// See if above widget ok to place assoc.
switch( m_role[A].m_WidgetRegion ) {
case North:
- m_LinePath.setPoint( 0, QPoint( x + ( ww / 4 ), y ) );
- m_LinePath.setPoint( size - 1, QPoint(x + ( ww * 3 / 4 ), y ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ( ww / 4 ), y ) );
+ m_LinePath.setPoint( size - 1, TQPoint(x + ( ww * 3 / 4 ), y ) );
break;
case South:
- m_LinePath.setPoint( 0, QPoint( x + ( ww / 4 ), y + wh ) );
- m_LinePath.setPoint( size - 1, QPoint( x + ( ww * 3 / 4 ), y + wh ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ( ww / 4 ), y + wh ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x + ( ww * 3 / 4 ), y + wh ) );
break;
case East:
- m_LinePath.setPoint( 0, QPoint( x + ww, y + ( wh / 4 ) ) );
- m_LinePath.setPoint( size - 1, QPoint( x + ww, y + ( wh * 3 / 4 ) ) );
+ m_LinePath.setPoint( 0, TQPoint( x + ww, y + ( wh / 4 ) ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x + ww, y + ( wh * 3 / 4 ) ) );
break;
case West:
- m_LinePath.setPoint( 0, QPoint( x, y + ( wh / 4 ) ) );
- m_LinePath.setPoint( size - 1, QPoint( x, y + ( wh * 3 / 4 ) ) );
+ m_LinePath.setPoint( 0, TQPoint( x, y + ( wh / 4 ) ) );
+ m_LinePath.setPoint( size - 1, TQPoint( x, y + ( wh * 3 / 4 ) ) );
break;
default:
break;
@@ -2914,7 +2914,7 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
int cw = 0;
if (angular) {
uint nind = (role == A ? 1 : m_LinePath.count() - 2);
- QPoint neighbour = m_LinePath.getPoint(nind);
+ TQPoint neighbour = m_LinePath.getPoint(nind);
if (neighbour.x() < x)
cw = 0;
else if (neighbour.x() > x + ww)
@@ -2935,9 +2935,9 @@ void AssociationWidget::updateRegionLineCount(int index, int totalCount,
int snapX = m_pView->snappedX(x + cw);
int snapY = m_pView->snappedY(y + ch);
- QPoint pt;
+ TQPoint pt;
if (angular) {
- pt = QPoint(snapX, snapY);
+ pt = TQPoint(snapX, snapY);
} else {
switch(region) {
case West:
@@ -3011,19 +3011,19 @@ void AssociationWidget::setSelected(bool _select /* = true */) {
}
}
-bool AssociationWidget::onAssocClassLine(const QPoint &point) {
+bool AssociationWidget::onAssocClassLine(const TQPoint &point) {
if (m_pAssocClassLine == NULL)
return false;
- QCanvasItemList list = m_pView->canvas()->collisions(point);
- QCanvasItemList::iterator end(list.end());
- for (QCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it) {
+ TQCanvasItemList list = m_pView->canvas()->collisions(point);
+ TQCanvasItemList::iterator end(list.end());
+ for (TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it) {
if (*item_it == m_pAssocClassLine)
return true;
}
return false;
}
-bool AssociationWidget::onAssociation(const QPoint & point) {
+bool AssociationWidget::onAssociation(const TQPoint & point) {
if (m_LinePath.onLinePath(point) != -1)
return true;
return onAssocClassLine(point);
@@ -3032,7 +3032,7 @@ bool AssociationWidget::onAssociation(const QPoint & point) {
void AssociationWidget::slotRemovePopupMenu()
{
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
@@ -3045,7 +3045,7 @@ void AssociationWidget::slotClearAllSelected() {
void AssociationWidget::moveMidPointsBy( int x, int y ) {
int pos = m_LinePath.count() - 1;
for( int i=1 ; i < (int)pos ; i++ ) {
- QPoint p = m_LinePath.getPoint( i );
+ TQPoint p = m_LinePath.getPoint( i );
int newX = p.x() + x;
int newY = p.y() + y;
newX = m_pView -> snappedX( newX );
@@ -3064,10 +3064,10 @@ void AssociationWidget::moveEntireAssoc( int x, int y ) {
resetTextPositions();
}
-QRect AssociationWidget::getAssocLineRectangle()
+TQRect AssociationWidget::getAssocLineRectangle()
{
- QRect rectangle;
- QPoint p;
+ TQRect rectangle;
+ TQPoint p;
uint pen_width;
/* we also want the end points connected to the other widget */
@@ -3122,15 +3122,15 @@ void AssociationWidget::setUMLObject(UMLObject *obj) {
break;
case Uml::ot_Attribute:
klass = static_cast<UMLClassifier*>(obj->parent());
- connect(klass, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
+ connect(klass, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
attr = static_cast<UMLAttribute*>(obj);
- connect(attr, SIGNAL(attributeChanged()), this, SLOT(slotAttributeChanged()));
+ connect(attr, TQT_SIGNAL(attributeChanged()), this, TQT_SLOT(slotAttributeChanged()));
break;
case Uml::ot_EntityAttribute:
ent = static_cast<UMLEntity*>(obj->parent());
- connect(ent, SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
- this, SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(slotAttributeRemoved(UMLClassifierListItem*)));
break;
default:
kError() << "UMLAssociation constructor: cannot associate UMLObject of type "
@@ -3200,8 +3200,8 @@ void AssociationWidget::init (UMLView *view)
m_umldoc = UMLApp::app()->getDocument();
m_LinePath.setAssociation( this );
- connect(m_pView, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu()));
- connect(m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
+ connect(m_pView, TQT_SIGNAL(sigRemovePopupMenu()), this, TQT_SLOT(slotRemovePopupMenu()));
+ connect(m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
}
void AssociationWidget::resetTextPositions() {
@@ -3250,10 +3250,10 @@ UMLOperation *AssociationWidget::getOperation() {
void AssociationWidget::setOperation(UMLOperation *op) {
if (m_pObject)
- disconnect(m_pObject, SIGNAL(modified()), m_pName, SLOT(setMessageText()));
+ disconnect(m_pObject, TQT_SIGNAL(modified()), m_pName, TQT_SLOT(setMessageText()));
m_pObject = op;
if (m_pObject)
- connect(m_pObject, SIGNAL(modified()), m_pName, SLOT(setMessageText()));
+ connect(m_pObject, TQT_SIGNAL(modified()), m_pName, TQT_SLOT(setMessageText()));
}
UMLClassifier *AssociationWidget::getOperationOwner() {
@@ -3269,13 +3269,13 @@ UMLClassifier *AssociationWidget::getOperationOwner() {
return c;
}
-void AssociationWidget::setSeqNumAndOp(const QString &seqNum, const QString &op) {
+void AssociationWidget::setSeqNumAndOp(const TQString &seqNum, const TQString &op) {
if (! op.isEmpty())
setName(op);
setMulti(seqNum, A);
}
-UMLClassifier *AssociationWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
+UMLClassifier *AssociationWidget::getSeqNumAndOp(TQString& seqNum, TQString& op) {
seqNum = getMulti(A);
op = getName();
UMLObject *o = getWidget(B)->getUMLObject();
@@ -3283,11 +3283,11 @@ UMLClassifier *AssociationWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
return c;
}
-void AssociationWidget::setCustomOpText(const QString &opText) {
+void AssociationWidget::setCustomOpText(const TQString &opText) {
setName(opText);
}
-QString AssociationWidget::getCustomOpText() {
+TQString AssociationWidget::getCustomOpText() {
return getName();
}
@@ -3300,8 +3300,8 @@ void AssociationWidget::setWidget( UMLWidget* widget, Uml::Role_Type role) {
}
}
-void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement assocElement = qDoc.createElement( "assocwidget" );
+void AssociationWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement assocElement = qDoc.createElement( "assocwidget" );
WidgetBase::saveToXMI(qDoc, assocElement);
if (m_pObject) {
@@ -3349,7 +3349,7 @@ void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
m_role[B].m_pChangeWidget -> saveToXMI( qDoc, assocElement );
if (m_pAssocClassWidget) {
- QString acid = ID2STR(m_pAssocClassWidget->getID());
+ TQString acid = ID2STR(m_pAssocClassWidget->getID());
assocElement.setAttribute("assocclass", acid);
assocElement.setAttribute("aclsegindex", m_nLinePathSegmentIndex);
}
@@ -3357,15 +3357,15 @@ void AssociationWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
qElement.appendChild( assocElement );
}
-bool AssociationWidget::loadFromXMI( QDomElement & qElement,
+bool AssociationWidget::loadFromXMI( TQDomElement & qElement,
const UMLWidgetList& widgets,
const MessageWidgetList* pMessages )
{
WidgetBase::loadFromXMI(qElement);
// load child widgets first
- QString widgetaid = qElement.attribute( "widgetaid", "-1" );
- QString widgetbid = qElement.attribute( "widgetbid", "-1" );
+ TQString widgetaid = qElement.attribute( "widgetaid", "-1" );
+ TQString widgetbid = qElement.attribute( "widgetbid", "-1" );
Uml::IDType aId = STR2ID(widgetaid);
Uml::IDType bId = STR2ID(widgetbid);
UMLWidget *pWidgetA = Widget_Utils::findWidget( aId, widgets, pMessages );
@@ -3383,10 +3383,10 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setWidget(pWidgetA, A);
setWidget(pWidgetB, B);
- QString type = qElement.attribute( "type", "-1" );
+ TQString type = qElement.attribute( "type", "-1" );
Uml::Association_Type aType = (Uml::Association_Type) type.toInt();
- QString id = qElement.attribute( "xmi.id", "-1" );
+ TQString id = qElement.attribute( "xmi.id", "-1" );
bool oldStyleLoad = false;
if (id == "-1") {
// xmi.id not present, ergo either a pure widget association,
@@ -3438,20 +3438,20 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setRoleDoc( qElement.attribute("roleBdoc", ""), B );
// visibilty defaults to Public if it cant set it here..
- QString visibilityA = qElement.attribute( "visibilityA", "0");
+ TQString visibilityA = qElement.attribute( "visibilityA", "0");
if (visibilityA.toInt() > 0)
setVisibility( (Uml::Visibility::Value)visibilityA.toInt(), A);
- QString visibilityB = qElement.attribute( "visibilityB", "0");
+ TQString visibilityB = qElement.attribute( "visibilityB", "0");
if (visibilityB.toInt() > 0)
setVisibility( (Uml::Visibility::Value)visibilityB.toInt(), B);
// Changeability defaults to "Changeable" if it cant set it here..
- QString changeabilityA = qElement.attribute( "changeabilityA", "0");
+ TQString changeabilityA = qElement.attribute( "changeabilityA", "0");
if (changeabilityA.toInt() > 0)
setChangeability( (Uml::Changeability_Type)changeabilityA.toInt(), A);
- QString changeabilityB = qElement.attribute( "changeabilityB", "0");
+ TQString changeabilityB = qElement.attribute( "changeabilityB", "0");
if (changeabilityB.toInt() > 0)
setChangeability( (Uml::Changeability_Type)changeabilityB.toInt(), B);
@@ -3485,16 +3485,16 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
setAssocType(aType);
- QString indexa = qElement.attribute( "indexa", "0" );
- QString indexb = qElement.attribute( "indexb", "0" );
- QString totalcounta = qElement.attribute( "totalcounta", "0" );
- QString totalcountb = qElement.attribute( "totalcountb", "0" );
+ TQString indexa = qElement.attribute( "indexa", "0" );
+ TQString indexb = qElement.attribute( "indexb", "0" );
+ TQString totalcounta = qElement.attribute( "totalcounta", "0" );
+ TQString totalcountb = qElement.attribute( "totalcountb", "0" );
m_role[A].m_nIndex = indexa.toInt();
m_role[B].m_nIndex = indexb.toInt();
m_role[A].m_nTotalCount = totalcounta.toInt();
m_role[B].m_nTotalCount = totalcountb.toInt();
- QString assocclassid = qElement.attribute("assocclass", "");
+ TQString assocclassid = qElement.attribute("assocclass", "");
if (! assocclassid.isEmpty()) {
Uml::IDType acid = STR2ID(assocclassid);
UMLWidget *w = Widget_Utils::findWidget(acid, widgets);
@@ -3502,7 +3502,7 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
m_pAssocClassWidget = static_cast<ClassifierWidget*>(w);
m_pAssocClassWidget->setClassAssocWidget(this);
// Preparation of the assoc class line is done in activate()
- QString aclsegindex = qElement.attribute("aclsegindex", "0");
+ TQString aclsegindex = qElement.attribute("aclsegindex", "0");
m_nLinePathSegmentIndex = aclsegindex.toInt();
} else {
kError() << "AssociationWidget::loadFromXMI: "
@@ -3512,10 +3512,10 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
}
//now load child elements
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "linepath" ) {
if( !m_LinePath.loadFromXMI( element ) )
return false;
@@ -3524,13 +3524,13 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
// as IF this ISNT done, then the subsequent call to
// widgetMoved will inadvertantly think we have made a
// big move in the position of the association when we haven't.
- QPoint p = m_LinePath.getPoint(0);
+ TQPoint p = m_LinePath.getPoint(0);
m_role[A].m_OldCorner.setX(p.x());
m_role[A].m_OldCorner.setY(p.y());
}
} else if (tag == "floatingtext" ||
tag == "UML:FloatingTextWidget") { // for bkwd compatibility
- QString r = element.attribute( "role", "-1");
+ TQString r = element.attribute( "role", "-1");
if( r == "-1" )
return false;
Uml::Text_Role role = (Uml::Text_Role)r.toInt();
@@ -3606,7 +3606,7 @@ bool AssociationWidget::loadFromXMI( QDomElement & qElement,
return true;
}
-bool AssociationWidget::loadFromXMI( QDomElement & qElement ) {
+bool AssociationWidget::loadFromXMI( TQDomElement & qElement ) {
const MessageWidgetList& messages = m_pView->getMessageList();
return loadFromXMI( qElement, m_pView->getWidgetList(), &messages );
}
diff --git a/umbrello/umbrello/associationwidget.h b/umbrello/umbrello/associationwidget.h
index 67739450..5034f016 100644
--- a/umbrello/umbrello/associationwidget.h
+++ b/umbrello/umbrello/associationwidget.h
@@ -132,7 +132,7 @@ public:
*
* @return Text of the given role's multiplicity widget.
*/
- QString getMulti(Uml::Role_Type role) const;
+ TQString getMulti(Uml::Role_Type role) const;
/**
* Read property of FloatingTextWidget* m_pName.
@@ -146,7 +146,7 @@ public:
*
* @return Text of the FloatingTextWidget name widget.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Return the given role's FloatingTextWidget object.
@@ -167,24 +167,24 @@ public:
*
* @return The name set at the FloatingTextWidget.
*/
- QString getRoleName(Uml::Role_Type role) const;
+ TQString getRoleName(Uml::Role_Type role) const;
/**
* Returns the given role's documentation.
*/
- QString getRoleDoc(Uml::Role_Type role) const;
+ TQString getRoleDoc(Uml::Role_Type role) const;
/**
* Sets the text in the FloatingTextWidget widget representing the Name
* of this association.
*/
- void setName (const QString &strRole);
+ void setName (const TQString &strRole);
/**
* Sets the text in the FloatingTextWidget representing the multiplicity
* at the given side of the association.
*/
- void setMulti(const QString &strMulti, Uml::Role_Type role);
+ void setMulti(const TQString &strMulti, Uml::Role_Type role);
/**
* Gets the visibility on the given role of the association.
@@ -265,11 +265,11 @@ public:
void setAssocType(Uml::Association_Type type);
/**
- * Returns a QString object representing this AssociationWidget.
+ * Returns a TQString object representing this AssociationWidget.
*
* @return Textual representation of the AssociationWidget.
*/
- QString toString();
+ TQString toString();
/**
* Read property of bool m_bActivated.
@@ -347,27 +347,27 @@ public:
/**
* Adds a break point (if left mouse button).
*/
- void mouseDoubleClickEvent(QMouseEvent * me);
+ void mouseDoubleClickEvent(TQMouseEvent * me);
/**
* Sets the association to be selected.
*/
- void mousePressEvent(QMouseEvent * me);
+ void mousePressEvent(TQMouseEvent * me);
/**
* Displays the right mouse buttom menu if right button is pressed.
*/
- void mouseReleaseEvent(QMouseEvent * me);
+ void mouseReleaseEvent(TQMouseEvent * me);
/**
* Moves the break point being dragged.
*/
- void mouseMoveEvent(QMouseEvent * me);
+ void mouseMoveEvent(TQMouseEvent * me);
/**
* Returns true if the given point is on the Association.
*/
- bool onAssociation(const QPoint & point);
+ bool onAssociation(const TQPoint & point);
/**
* Returns true if the given point is on the connecting line to
@@ -375,7 +375,7 @@ public:
* class attached, or if the given point is not on the connecting
* line.
*/
- bool onAssocClassLine(const QPoint & point);
+ bool onAssocClassLine(const TQPoint & point);
/**
* Creates the association class connecting line.
@@ -411,18 +411,18 @@ public:
/**
* Returns the bounding rectangle of all segments of the association.
*/
- QRect getAssocLineRectangle();
+ TQRect getAssocLineRectangle();
/**
* Return the first font found being used by any child widget. (They
* could be different fonts, so this is a slightly misleading method.)
*/
- QFont getFont () const;
+ TQFont getFont () const;
/**
* Overrides the method from WidgetBase.
*/
- void setLineColor(const QColor &colour);
+ void setLineColor(const TQColor &colour);
/**
* Overrides the method from WidgetBase.
@@ -432,7 +432,7 @@ public:
/**
* Set all 'owned' child widgets to this font.
*/
- void lwSetFont (QFont font);
+ void lwSetFont (TQFont font);
/**
* Return the given role's changeability FloatingTextWidget widget.
@@ -445,12 +445,12 @@ public:
* For this function to work properly, the associated widget
* should already be set.
*/
- void setRoleName(const QString &strRole, Uml::Role_Type role);
+ void setRoleName(const TQString &strRole, Uml::Role_Type role);
/**
* Set the documentation on the given role.
*/
- void setRoleDoc(const QString &doc, Uml::Role_Type role);
+ void setRoleDoc(const TQString &doc, Uml::Role_Type role);
/**
* Overrides operation from LinkWidget.
@@ -475,13 +475,13 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- QString getCustomOpText();
+ TQString getCustomOpText();
/**
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setCustomOpText(const QString &opText);
+ void setCustomOpText(const TQString &opText);
/**
* Overrides operation from LinkWidget.
@@ -512,7 +512,7 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setText(FloatingTextWidget *ft, const QString &text);
+ void setText(FloatingTextWidget *ft, const TQString &text);
/**
* Calls @ref setTextPosition() on all the labels.
@@ -572,7 +572,7 @@ public:
* @param seqNum The new sequence number string to set.
* @param op The new operation string to set.
*/
- void setSeqNumAndOp(const QString &seqNum, const QString &op);
+ void setSeqNumAndOp(const TQString &seqNum, const TQString &op);
/**
* Overrides operation from LinkWidget.
@@ -581,7 +581,7 @@ public:
* @param seqNum Return this AssociationWidget's sequence number string.
* @param op Return this AssociationWidget's operation string.
*/
- UMLClassifier * getSeqNumAndOp(QString& seqNum, QString& op);
+ UMLClassifier * getSeqNumAndOp(TQString& seqNum, TQString& op);
/**
* Calculates and sets the first and last point in the association's
@@ -613,12 +613,12 @@ public:
/**
* Saves this widget to the "assocwidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads this widget from the "assocwidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
/**
* Same as above, but uses the supplied widgetList for resolving
@@ -626,7 +626,7 @@ public:
* the UMLView for these widgets.)
* Required for clipboard operations.
*/
- bool loadFromXMI( QDomElement & qElement, const UMLWidgetList& widgets,
+ bool loadFromXMI( TQDomElement & qElement, const UMLWidgetList& widgets,
const MessageWidgetList* pMessages = NULL);
/**
@@ -678,7 +678,7 @@ private:
* 8 = On diagonal 1 between Region4 and 1
* 9 = On diagonal 1 and On diagonal 2 (the center)
*/
- static Region findPointRegion(const QRect& Rect, int PosX, int PosY);
+ static Region findPointRegion(const TQRect& Rect, int PosX, int PosY);
/**
* Given a rectangle and a point, findInterceptOnEdge computes the
@@ -691,14 +691,14 @@ private:
* constant.)
* @todo This is buggy. Try replacing by findIntercept()
*/
- static int findInterceptOnEdge(const QRect &rect, Region region, const QPoint &point);
+ static int findInterceptOnEdge(const TQRect &rect, Region region, const TQPoint &point);
- static QPoint findIntercept(const QRect &rect, const QPoint &point);
+ static TQPoint findIntercept(const TQRect &rect, const TQPoint &point);
/**
* Overrides moveEvent.
*/
- void moveEvent(QMoveEvent *me);
+ void moveEvent(TQMoveEvent *me);
/**
* This function calculates which role should be set for the m_pName
@@ -710,13 +710,13 @@ private:
* Returns true if point (PosX, PosY) is close enough to any of the
* association's segments.
*/
- bool isPointInsideBoundaries(int PosX, int PosY, QPoint & SPoint,
+ bool isPointInsideBoundaries(int PosX, int PosY, TQPoint & SPoint,
uint & StartSegmentIndex, uint & EndSegmentIndex);
/**
* Returns a point with interchanged X and Y coordinates.
*/
- static QPoint swapXY(const QPoint &p);
+ static TQPoint swapXY(const TQPoint &p);
/**
* Returns the total length of the association's LinePath:
@@ -731,7 +731,7 @@ private:
* to Distance and if PX is not a point of the segment P1P2 then the
* function returns (-1,-1).
*/
- static QPoint calculatePointAtDistance(const QPoint &P1, const QPoint &P2, float Distance);
+ static TQPoint calculatePointAtDistance(const TQPoint &P1, const TQPoint &P2, float Distance);
/**
* Calculates which point of a perpendicular line to segment P1P2 that
@@ -739,7 +739,7 @@ private:
* Let's say such point is PX, the distance from P2 to PX must be equal
* to Distance.
*/
- static QPoint calculatePointAtDistanceOnPerpendicular(const QPoint &P1, const QPoint &P2, float Distance);
+ static TQPoint calculatePointAtDistanceOnPerpendicular(const TQPoint &P1, const TQPoint &P2, float Distance);
/**
* Calculates the intersection between line P1P2 and a perpendicular
@@ -748,19 +748,19 @@ private:
* P3. If this value is negative an error ocurred.
* This method is not currently used.
*/
- static float perpendicularProjection(const QPoint& P1, const QPoint& P2, const QPoint& P3, QPoint& ResultingPoint);
+ static float perpendicularProjection(const TQPoint& P1, const TQPoint& P2, const TQPoint& P3, TQPoint& ResultingPoint);
/**
* Return the mid point between p0 and p1
*/
- static QPoint midPoint(const QPoint& p0, const QPoint& p1);
+ static TQPoint midPoint(const TQPoint& p0, const TQPoint& p1);
/**
* Calculates the position of the text widget depending on the role
* that widget is playing.
* Returns the point at which to put the widget.
*/
- QPoint calculateTextPosition(Uml::Text_Role role);
+ TQPoint calculateTextPosition(Uml::Text_Role role);
/**
* Puts the text widget with the given role at the given position.
@@ -774,7 +774,7 @@ private:
* Moves the text widget with the given role by the difference between
* the two points.
*/
- void setTextPositionRelatively(Uml::Text_Role role, const QPoint &oldPosition);
+ void setTextPositionRelatively(Uml::Text_Role role, const TQPoint &oldPosition);
/**
* Returns the Region the widget to line intersection is for the given
@@ -829,7 +829,7 @@ private:
/**
* This role's old top left corner before moving.
*/
- QPoint m_OldCorner;
+ TQPoint m_OldCorner;
/**
* The region of this role's widget.
@@ -849,7 +849,7 @@ private:
// The following items are only used if m_pObject is not set.
Uml::Visibility m_Visibility;
Uml::Changeability_Type m_Changeability;
- QString m_RoleDoc;
+ TQString m_RoleDoc;
} m_role[2];
@@ -866,7 +866,7 @@ private:
* @param ft Reference to the pointer to FloatingTextWidget to change or create.
* On creation/deletion, the pointer value will be changed.
*/
- void setFloatingText(Uml::Text_Role tr, const QString &text, FloatingTextWidget* &ft);
+ void setFloatingText(Uml::Text_Role tr, const TQString &text, FloatingTextWidget* &ft);
/**
* Called to tell the association that another association has added
@@ -905,7 +905,7 @@ private:
* For internal purposes only.
* Other classes/users should use setChangeability() instead.
*/
- void setChangeWidget(const QString &strChangeWidget, Uml::Role_Type role);
+ void setChangeWidget(const TQString &strChangeWidget, Uml::Role_Type role);
/**
* Checks to see if the given point is one of the points of the line.
@@ -913,7 +913,7 @@ private:
* This is only valid if no other point id being moved and only
* while the left mouse button is down.
*/
- void checkPoints(const QPoint &p);
+ void checkPoints(const TQPoint &p);
/**
* Returns true if the line path starts at the given widget.
@@ -955,42 +955,42 @@ private:
/**
* Position of Name floatingtext saved by saveIdealTextPositions()
*/
- QPoint m_oldNamePoint;
+ TQPoint m_oldNamePoint;
/**
* Position of role A multiplicity floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldMultiAPoint;
+ TQPoint m_oldMultiAPoint;
/**
* Position of role B multiplicity floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldMultiBPoint;
+ TQPoint m_oldMultiBPoint;
/**
* Position of role A changeability floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldChangeAPoint;
+ TQPoint m_oldChangeAPoint;
/**
* Position of role B changeability floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldChangeBPoint;
+ TQPoint m_oldChangeBPoint;
/**
* Position of role A name floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldRoleAPoint;
+ TQPoint m_oldRoleAPoint;
/**
* Position of role B name floatingtext saved by
* saveIdealTextPositions()
*/
- QPoint m_oldRoleBPoint;
+ TQPoint m_oldRoleBPoint;
int m_nLinePathSegmentIndex; ///< anchor for m_pAssocClassLine
- QCanvasLine *m_pAssocClassLine; ///< used for connecting assoc. class
+ TQCanvasLine *m_pAssocClassLine; ///< used for connecting assoc. class
/// selection adornment for the endpoints of the assoc. class connecting line
- QCanvasRectangle *m_pAssocClassLineSel0, *m_pAssocClassLineSel1;
+ TQCanvasRectangle *m_pAssocClassLineSel0, *m_pAssocClassLineSel1;
ClassifierWidget *m_pAssocClassWidget; ///< used if we have an assoc. class
diff --git a/umbrello/umbrello/associationwidgetlist.h b/umbrello/umbrello/associationwidgetlist.h
index 28271b74..4a51a615 100644
--- a/umbrello/umbrello/associationwidgetlist.h
+++ b/umbrello/umbrello/associationwidgetlist.h
@@ -18,12 +18,12 @@
#ifndef _ASSOCIATIONWIDGETLIST_H
#define _ASSOCIATIONWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class AssociationWidget;
-typedef QPtrList<AssociationWidget> AssociationWidgetList;
-typedef QPtrListIterator<AssociationWidget> AssociationWidgetListIt;
+typedef TQPtrList<AssociationWidget> AssociationWidgetList;
+typedef TQPtrListIterator<AssociationWidget> AssociationWidgetListIt;
#endif
diff --git a/umbrello/umbrello/attribute.cpp b/umbrello/umbrello/attribute.cpp
index 3bdadeb7..9266c1f4 100644
--- a/umbrello/umbrello/attribute.cpp
+++ b/umbrello/umbrello/attribute.cpp
@@ -12,7 +12,7 @@
// own header
#include "attribute.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifier.h"
@@ -24,9 +24,9 @@
#include "object_factory.h"
UMLAttribute::UMLAttribute( const UMLObject *parent,
- const QString& name, Uml::IDType id,
+ const TQString& name, Uml::IDType id,
Uml::Visibility s,
- UMLObject *type, const QString& iv )
+ UMLObject *type, const TQString& iv )
: UMLClassifierListItem(parent, name, id) {
m_InitialValue = iv;
m_BaseType = Uml::ot_Attribute;
@@ -48,7 +48,7 @@ UMLAttribute::UMLAttribute(const UMLObject *parent) : UMLClassifierListItem(pare
UMLAttribute::~UMLAttribute() { }
-void UMLAttribute::setName(const QString &name) {
+void UMLAttribute::setName(const TQString &name) {
m_Name = name;
emit attributeChanged();
UMLObject::emitModified();
@@ -60,11 +60,11 @@ void UMLAttribute::setVisibility(Uml::Visibility s) {
UMLObject::emitModified();
}
-QString UMLAttribute::getInitialValue() {
+TQString UMLAttribute::getInitialValue() {
return m_InitialValue;
}
-void UMLAttribute::setInitialValue(const QString &iv) {
+void UMLAttribute::setInitialValue(const TQString &iv) {
if(m_InitialValue != iv) {
m_InitialValue = iv;
UMLObject::emitModified();
@@ -79,8 +79,8 @@ Uml::Parameter_Direction UMLAttribute::getParmKind () const {
return m_ParmKind;
}
-QString UMLAttribute::toString(Uml::Signature_Type sig) {
- QString s;
+TQString UMLAttribute::toString(Uml::Signature_Type sig) {
+ TQString s;
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig) {
s = m_Vis.toString(true) + ' ';
@@ -101,7 +101,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
<< " is not a UMLClassifier" << endl;
return "";
}
- QString typeName;
+ TQString typeName;
UMLClassifier *type = UMLClassifierListItem::getType();
if (type) {
UMLPackage *typeScope = type->getUMLPackage();
@@ -118,7 +118,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
else if (m_ParmKind == Uml::pd_Out)
s += "out ";
// Construct the attribute text.
- QString string = s + getName() + " : " + typeName;
+ TQString string = s + getName() + " : " + typeName;
if(m_InitialValue.length() > 0)
string += " = " + m_InitialValue;
return string;
@@ -126,7 +126,7 @@ QString UMLAttribute::toString(Uml::Signature_Type sig) {
return s + getName();
}
-QString UMLAttribute::getFullyQualifiedName( const QString& separator,
+TQString UMLAttribute::getFullyQualifiedName( const TQString& separator,
bool includeRoot /* = false */) const {
UMLOperation *op = NULL;
UMLObject *owningObject = static_cast<UMLObject*>(parent());
@@ -141,10 +141,10 @@ QString UMLAttribute::getFullyQualifiedName( const QString& separator,
<< " is not a UMLClassifier" << endl;
return "";
}
- QString tempSeparator = separator;
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
- QString fqn = ownParent->getFullyQualifiedName(tempSeparator, includeRoot);
+ TQString fqn = ownParent->getFullyQualifiedName(tempSeparator, includeRoot);
if (op)
fqn.append(tempSeparator + op->getName());
fqn.append(tempSeparator + m_Name);
@@ -188,8 +188,8 @@ UMLObject* UMLAttribute::clone() const
}
-void UMLAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement attributeElement = UMLObject::save("UML:Attribute", qDoc);
+void UMLAttribute::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement attributeElement = UMLObject::save("UML:Attribute", qDoc);
if (m_pSecondary == NULL) {
kDebug() << "UMLAttribute::saveToXMI(" << m_Name
<< "): m_pSecondary is NULL, m_SecondaryId is '"
@@ -202,7 +202,7 @@ void UMLAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( attributeElement );
}
-bool UMLAttribute::load( QDomElement & element ) {
+bool UMLAttribute::load( TQDomElement & element ) {
m_SecondaryId = element.attribute( "type", "" );
// We use the m_SecondaryId as a temporary store for the xmi.id
// of the attribute type model object.
@@ -212,14 +212,14 @@ bool UMLAttribute::load( QDomElement & element ) {
// that has not yet been loaded.
if (m_SecondaryId.isEmpty()) {
// Perhaps the type is stored in a child node:
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while (!node.isNull()) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "type")) {
node = node.nextSibling();
continue;
@@ -228,8 +228,8 @@ bool UMLAttribute::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute( "xmi.idref", "" );
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
m_SecondaryId = tmpElem.attribute( "xmi.id", "" );
if (m_SecondaryId.isEmpty())
m_SecondaryId = tmpElem.attribute( "xmi.idref", "" );
@@ -249,28 +249,28 @@ bool UMLAttribute::load( QDomElement & element ) {
return true;
}
-bool UMLAttribute::showPropertiesDialog(QWidget* parent) {
+bool UMLAttribute::showPropertiesDialog(TQWidget* parent) {
UMLAttributeDialog dialog(parent, this);
return dialog.exec();
}
-void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList) {
+void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifierList &templateParamList) {
if (templateParam.isEmpty())
return;
- QString type = templateParam.simplifyWhiteSpace();
+ TQString type = templateParam.simplifyWhiteSpace();
- int start = type.find(QChar('<'));
+ int start = type.find(TQChar('<'));
if (start >= 0 ) {
int end = start;
int count = 1;
int len = type.length();
while (count != 0 && ++end < len) {
- QChar c = type.at(end);
- if (c == QChar('<')) {
+ TQChar c = type.at(end);
+ if (c == TQChar('<')) {
count++;
}
- if (c == QChar('>')) {
+ if (c == TQChar('>')) {
count--;
}
}
@@ -281,14 +281,14 @@ void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifier
setTemplateParams(type.mid(start + 1, end - start - 1), templateParamList);
setTemplateParams(type.left(start) + type.right(len - end - 1), templateParamList);
} else {
- QStringList paramsList = QStringList::split(QChar(','), type);
- for ( QStringList::Iterator it = paramsList.begin(); it != paramsList.end(); ++it ) {
- QString param = *it;
+ TQStringList paramsList = TQStringList::split(TQChar(','), type);
+ for ( TQStringList::Iterator it = paramsList.begin(); it != paramsList.end(); ++it ) {
+ TQString param = *it;
if (!param.isEmpty()) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLObject* obj = pDoc->findUMLObject(param);
if (obj == NULL ) {
- obj = pDoc->findUMLObject(param.remove(QChar(' ')));
+ obj = pDoc->findUMLObject(param.remove(TQChar(' ')));
}
if (obj != NULL ) {
//We want to list only the params that already exist in this document
@@ -306,14 +306,14 @@ void UMLAttribute::setTemplateParams(const QString& templateParam, UMLClassifier
UMLClassifierList UMLAttribute::getTemplateParams() {
UMLClassifierList templateParamList;
- QString type = getType()->getName();
- QString templateParam;
+ TQString type = getType()->getName();
+ TQString templateParam;
// Handle C++/D/Java template/generic parameters
const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
if (pl == Uml::pl_Cpp || pl == Uml::pl_Java || pl == Uml::pl_D) {
- int start = type.find(QChar('<'));
+ int start = type.find(TQChar('<'));
if (start >= 0 ) {
- int end = type.findRev(QChar('>'));
+ int end = type.findRev(TQChar('>'));
if (end > start) {
templateParam = type.mid(start + 1, end - start - 1);
setTemplateParams(templateParam, templateParamList);
diff --git a/umbrello/umbrello/attribute.h b/umbrello/umbrello/attribute.h
index 85253216..7749b3e4 100644
--- a/umbrello/umbrello/attribute.h
+++ b/umbrello/umbrello/attribute.h
@@ -38,10 +38,10 @@ public:
* @param type The type of this UMLAttribute.
* @param iv The initial value of the attribute.
*/
- UMLAttribute(const UMLObject *parent, const QString& name,
+ UMLAttribute(const UMLObject *parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Private,
- UMLObject *type = 0, const QString& iv = 0);
+ UMLObject *type = 0, const TQString& iv = 0);
/**
* Sets up an attribute.
@@ -70,7 +70,7 @@ public:
* Reimplementation of method from UMLObject is required as
* an extra signal, attributeChanged(), is emitted.
*/
- void setName(const QString &name);
+ void setName(const TQString &name);
/**
* Reimplementation of method from UMLObject is required as
@@ -88,14 +88,14 @@ public:
*
* @return The initial value of the Atrtibute.
*/
- QString getInitialValue();
+ TQString getInitialValue();
/**
* Sets the initial value of the UMLAttribute.
*
* @param iv The initial value of the UMLAttribute.
*/
- void setInitialValue( const QString &iv );
+ void setInitialValue( const TQString &iv );
/**
* Returns a string representation of the UMLAttribute.
@@ -104,23 +104,23 @@ public:
* initial value.
* @return Returns a string representation of the UMLAttribute.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Reimplement method from UMLObject.
*/
- QString getFullyQualifiedName(const QString& separator = QString::null,
+ TQString getFullyQualifiedName(const TQString& separator = TQString::null,
bool includeRoot = false) const;
/**
* Creates the <UML:Attribute> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Display the properties configuration dialog for the attribute.
*/
- virtual bool showPropertiesDialog(QWidget* parent);
+ virtual bool showPropertiesDialog(TQWidget* parent);
void setParmKind (Uml::Parameter_Direction pk);
Uml::Parameter_Direction getParmKind () const;
@@ -141,16 +141,16 @@ protected:
/**
* Loads the <UML:Attribute> XMI element.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
- QString m_InitialValue; ///< text for the attribute's initial value.
+ TQString m_InitialValue; ///< text for the attribute's initial value.
Uml::Parameter_Direction m_ParmKind;
private:
/**
* Puts in the param templateParamList all the template params that are in templateParam
*/
- void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
+ void setTemplateParams(const TQString& templateParam, UMLClassifierList &templateParamList);
};
diff --git a/umbrello/umbrello/autolayout/autolayoutdlg.cpp b/umbrello/umbrello/autolayout/autolayoutdlg.cpp
index 2f6b1a4c..894dddbc 100644
--- a/umbrello/umbrello/autolayout/autolayoutdlg.cpp
+++ b/umbrello/umbrello/autolayout/autolayoutdlg.cpp
@@ -14,13 +14,13 @@
#include "../umlwidget.h"
#include "autolayout.h"
#include "newautolayoutdialog.h"
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
#include <kdebug.h>
-AutolayoutDlg::AutolayoutDlg(KConfig* c,UMLView* v,QWidget *parent, const char *name)
+AutolayoutDlg::AutolayoutDlg(KConfig* c,UMLView* v,TQWidget *parent, const char *name)
:MyDialog1(parent, name)
{
view=v;
@@ -159,7 +159,7 @@ void AutolayoutDlg::writeConfig( KConfig * conf)
}
-void AutolayoutDlg::slotSelectAlgorithm( const QString& _algname)
+void AutolayoutDlg::slotSelectAlgorithm( const TQString& _algname)
{
algname=_algname;
@@ -167,7 +167,7 @@ void AutolayoutDlg::slotSelectAlgorithm( const QString& _algname)
Autolayout::Autolayouter * AutolayoutDlg::getAutolayouter( )
{
- const QString text = algorithmCOB->currentText();
+ const TQString text = algorithmCOB->currentText();
kDebug() << "Autolayout Algorithm " << algname << " found " << text << endl;
if (text == "dot")
return new Autolayout::DotAutolayouter();
diff --git a/umbrello/umbrello/autolayout/autolayoutdlg.h b/umbrello/umbrello/autolayout/autolayoutdlg.h
index 2e40d736..126c4a08 100644
--- a/umbrello/umbrello/autolayout/autolayoutdlg.h
+++ b/umbrello/umbrello/autolayout/autolayoutdlg.h
@@ -14,7 +14,7 @@
#include "newautolayoutdialog.h"
#include "../umlview.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kconfig.h>
#include "autolayout.h"
@@ -22,7 +22,7 @@ class AutolayoutDlg : public MyDialog1
{
Q_OBJECT
public:
- AutolayoutDlg(KConfig* c,UMLView* v, QWidget *parent = 0, const char *name = 0);
+ AutolayoutDlg(KConfig* c,UMLView* v, TQWidget *parent = 0, const char *name = 0);
public slots:
virtual void slotSetAssociationWeight(int i);
virtual void slotSetDependenciesWeight(int i);
@@ -39,7 +39,7 @@ class AutolayoutDlg : public MyDialog1
virtual void slotDoAutolayout();
void readConfig(KConfig*);
void writeConfig(KConfig*);
- virtual void slotSelectAlgorithm(const QString&);
+ virtual void slotSelectAlgorithm(const TQString&);
private:
@@ -55,7 +55,7 @@ class AutolayoutDlg : public MyDialog1
bool clusterizeHierarchies;
int shapeSeparation;
KConfig* config;
- QString algname;
+ TQString algname;
Autolayout::Autolayouter* getAutolayouter();
};
diff --git a/umbrello/umbrello/autolayout/simplecanvas.h b/umbrello/umbrello/autolayout/simplecanvas.h
index 41865f8a..29712b9e 100644
--- a/umbrello/umbrello/autolayout/simplecanvas.h
+++ b/umbrello/umbrello/autolayout/simplecanvas.h
@@ -16,7 +16,7 @@
#define AUTOLAYOUTSIMPLECANVAS_H
#include "canvas.h"
-#include <qrect.h>
+#include <tqrect.h>
namespace Autolayout {
/**
diff --git a/umbrello/umbrello/boxwidget.cpp b/umbrello/umbrello/boxwidget.cpp
index e1cff3d9..b85db401 100644
--- a/umbrello/umbrello/boxwidget.cpp
+++ b/umbrello/umbrello/boxwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "boxwidget.h"
// qt/kde includes
-#include <qevent.h>
+#include <tqevent.h>
#include <kdebug.h>
BoxWidget::BoxWidget(UMLView * view, Uml::IDType id)
@@ -20,14 +20,14 @@ BoxWidget::BoxWidget(UMLView * view, Uml::IDType id)
setSize(100,80);
UMLWidget::setBaseType( Uml::wt_Box );
WidgetBase::m_bUsesDiagramLineColour = false; // boxes be black
- WidgetBase::m_LineColour = QColor("black");
+ WidgetBase::m_LineColour = TQColor("black");
setZ(m_origZ = 0);
}
BoxWidget::~BoxWidget() {
}
-void BoxWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void BoxWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
p.drawRect( offsetX, offsetY, width(), height() );
@@ -36,8 +36,8 @@ void BoxWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-void BoxWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement boxElement = qDoc.createElement("boxwidget");
+void BoxWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement boxElement = qDoc.createElement("boxwidget");
UMLWidget::saveToXMI(qDoc, boxElement);
qElement.appendChild(boxElement);
}
diff --git a/umbrello/umbrello/boxwidget.h b/umbrello/umbrello/boxwidget.h
index f412fee6..13f7e480 100644
--- a/umbrello/umbrello/boxwidget.h
+++ b/umbrello/umbrello/boxwidget.h
@@ -12,7 +12,7 @@
#ifndef BOXWIDGET_H
#define BOXWIDGET_H
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//app includes
#include "umlwidget.h"
@@ -48,13 +48,13 @@ public:
/**
* Draws a rectangle.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "boxwidget" XMI element.
* Note: For loading from XMI, the inherited parent method is used.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
};
#endif
diff --git a/umbrello/umbrello/classifier.cpp b/umbrello/umbrello/classifier.cpp
index 22deee10..4b8e0bc0 100644
--- a/umbrello/umbrello/classifier.cpp
+++ b/umbrello/umbrello/classifier.cpp
@@ -39,7 +39,7 @@
using namespace Uml;
-UMLClassifier::UMLClassifier(const QString & name, Uml::IDType id)
+UMLClassifier::UMLClassifier(const TQString & name, Uml::IDType id)
: UMLPackage(name, id)
{
init();
@@ -64,7 +64,7 @@ void UMLClassifier::setBaseType(Uml::Object_Type ot) {
newIcon = Uml::it_Interface;
break;
case ot_Class:
- UMLObject::setStereotype(QString());
+ UMLObject::setStereotype(TQString());
UMLObject::m_bAbstract = false;
newIcon = Uml::it_Class;
break;
@@ -93,7 +93,7 @@ bool UMLClassifier::isDatatype() const {
}
UMLOperation * UMLClassifier::checkOperationSignature(
- const QString& name,
+ const TQString& name,
UMLAttributeList opParams,
UMLOperation *exemptOp)
{
@@ -129,7 +129,7 @@ UMLOperation * UMLClassifier::checkOperationSignature(
return NULL;
}
-UMLOperation* UMLClassifier::findOperation(const QString& name,
+UMLOperation* UMLClassifier::findOperation(const TQString& name,
Model_Utils::NameAndType_List params) {
UMLOperationList list = findOperations(name);
if (list.count() == 0)
@@ -161,7 +161,7 @@ UMLOperation* UMLClassifier::findOperation(const QString& name,
return test;
}
-UMLOperation* UMLClassifier::createOperation(const QString &name /*=null*/,
+UMLOperation* UMLClassifier::createOperation(const TQString &name /*=null*/,
bool *isExistingOp /*=NULL*/,
Model_Utils::NameAndType_List *params /*=NULL*/)
{
@@ -193,7 +193,7 @@ UMLOperation* UMLClassifier::createOperation(const QString &name /*=null*/,
op->setName( uniqChildName(Uml::ot_Operation) );
do {
UMLOperationDialog operationDialogue(0, op);
- if( operationDialogue.exec() != QDialog::Accepted ) {
+ if( operationDialogue.exec() != TQDialog::Accepted ) {
delete op;
return NULL;
} else if (checkOperationSignature(op->getName(), op->getParmList())) {
@@ -236,7 +236,7 @@ bool UMLClassifier::addOperation(UMLOperation* op, int position )
m_List.insert(position,op);
UMLClassifierListItemList itemList = getFilteredList(Uml::ot_Operation);
UMLClassifierListItem* currentAtt;
- QString buf;
+ TQString buf;
for (UMLClassifierListItemListIt it0(itemList); (currentAtt = it0.current()); ++it0)
buf.append(' ' + currentAtt->getName());
kDebug() << " UMLClassifier::addOperation list after change: " << buf << endl;
@@ -244,7 +244,7 @@ bool UMLClassifier::addOperation(UMLOperation* op, int position )
m_List.append( op );
emit operationAdded(op);
UMLObject::emitModified();
- connect(op,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(op,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
@@ -270,22 +270,22 @@ int UMLClassifier::removeOperation(UMLOperation *op) {
}
// disconnection needed.
// note that we don't delete the operation, just remove it from the Classifier
- disconnect(op,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(op,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
emit operationRemoved(op);
UMLObject::emitModified();
return m_List.count();
}
-UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString()*/) {
- QString name = currentName;
+UMLObject* UMLClassifier::createTemplate(const TQString& currentName /*= TQString()*/) {
+ TQString name = currentName;
bool goodName = !name.isEmpty();
if (!goodName)
name = uniqChildName(Uml::ot_Template);
UMLTemplate* newTemplate = new UMLTemplate(this, name);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
- while (button==QDialog::Accepted && !goodName) {
+ while (button==TQDialog::Accepted && !goodName) {
UMLTemplateDialog templateDialogue(0, newTemplate);
button = templateDialogue.exec();
name = newTemplate->getName();
@@ -299,7 +299,7 @@ UMLObject* UMLClassifier::createTemplate(const QString& currentName /*= QString(
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
return NULL;
}
@@ -326,7 +326,7 @@ UMLAttributeList UMLClassifier::getAttributeList() const{
return attributeList;
}
-UMLOperationList UMLClassifier::findOperations(const QString &n) {
+UMLOperationList UMLClassifier::findOperations(const TQString &n) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
UMLOperationList list;
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
@@ -495,12 +495,12 @@ bool UMLClassifier::acceptAssociationType(Uml::Association_Type type)
return false; //shutup compiler warning
}
-UMLAttribute* UMLClassifier::createAttribute(const QString &name,
+UMLAttribute* UMLClassifier::createAttribute(const TQString &name,
UMLObject *type,
Uml::Visibility vis,
- const QString &init) {
+ const TQString &init) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_Attribute);
} else {
@@ -508,15 +508,15 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
}
UMLAttribute* newAttribute = new UMLAttribute(this, currentName, id, vis, type, init);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
bool goodName = false;
//check for name.isNull() stops dialog being shown
//when creating attribute via list view
- while (button == QDialog::Accepted && !goodName && name.isNull()) {
+ while (button == TQDialog::Accepted && !goodName && name.isNull()) {
UMLAttributeDialog attributeDialogue(0, newAttribute);
button = attributeDialogue.exec();
- QString name = newAttribute->getName();
+ TQString name = newAttribute->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -527,7 +527,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
delete newAttribute;
return NULL;
}
@@ -539,7 +539,7 @@ UMLAttribute* UMLClassifier::createAttribute(const QString &name,
return newAttribute;
}
-UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::IDType id /* = Uml::id_None */) {
+UMLAttribute* UMLClassifier::addAttribute(const TQString &name, Uml::IDType id /* = Uml::id_None */) {
for (UMLObjectListIt lit(m_List); lit.current(); ++lit) {
UMLObject *obj = lit.current();
if (obj->getBaseType() == Uml::ot_Attribute && obj->getName() == name)
@@ -550,11 +550,11 @@ UMLAttribute* UMLClassifier::addAttribute(const QString &name, Uml::IDType id /*
m_List.append(a);
emit attributeAdded(a);
UMLObject::emitModified();
- connect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return a;
}
-UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope) {
+UMLAttribute* UMLClassifier::addAttribute(const TQString &name, UMLObject *type, Uml::Visibility scope) {
UMLAttribute *a = new UMLAttribute(this);
a->setName(name);
a->setVisibility(scope);
@@ -564,7 +564,7 @@ UMLAttribute* UMLClassifier::addAttribute(const QString &name, UMLObject *type,
m_List.append(a);
emit attributeAdded(a);
UMLObject::emitModified();
- connect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return a;
}
@@ -579,7 +579,7 @@ bool UMLClassifier::addAttribute(UMLAttribute* att, IDChangeLog* Log /* = 0 */,
m_List.append(att);
emit attributeAdded(att);
UMLObject::emitModified();
- connect(att, SIGNAL(modified()), this, SIGNAL(modified()));
+ connect(att, TQT_SIGNAL(modified()), this, TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID(att->getID());
@@ -596,8 +596,8 @@ int UMLClassifier::removeAttribute(UMLAttribute* a) {
emit attributeRemoved(a);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete a;
return m_List.count();
}
@@ -643,7 +643,7 @@ UMLOperationList UMLClassifier::getOpList(bool includeInherited) {
UMLOperationList pops = c->getOpList(true);
// add these operations to operation list, but only if unique.
for (UMLOperation *po = pops.first(); po; po = pops.next()) {
- QString po_as_string(po->toString(Uml::st_SigNoVis));
+ TQString po_as_string(po->toString(Uml::st_SigNoVis));
UMLOperation *o = NULL;
for (o = ops.first(); o; o = ops.next())
if (o->toString(Uml::st_SigNoVis) == po_as_string)
@@ -669,7 +669,7 @@ UMLClassifierListItemList UMLClassifier::getFilteredList(Uml::Object_Type ot) co
return resultList;
}
-UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::IDType id) {
+UMLTemplate* UMLClassifier::addTemplate(const TQString &name, Uml::IDType id) {
UMLTemplate *t = findTemplate(name);
if (t)
return t;
@@ -677,19 +677,19 @@ UMLTemplate* UMLClassifier::addTemplate(const QString &name, Uml::IDType id) {
m_List.append(t);
emit templateAdded(t);
UMLObject::emitModified();
- connect(t, SIGNAL(modified()), this, SIGNAL(modified()));
+ connect(t, TQT_SIGNAL(modified()), this, TQT_SIGNAL(modified()));
return t;
}
bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* = 0*/) {
- QString name = newTemplate->getName();
+ TQString name = newTemplate->getName();
if (findChildObject(name) == NULL) {
newTemplate->parent()->removeChild(newTemplate);
this->insertChild(newTemplate);
m_List.append(newTemplate);
emit templateAdded(newTemplate);
UMLObject::emitModified();
- connect(newTemplate,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(newTemplate,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (log) {
log->removeChangeByNewID( newTemplate->getID() );
@@ -700,7 +700,7 @@ bool UMLClassifier::addTemplate(UMLTemplate* newTemplate, IDChangeLog* log /* =
bool UMLClassifier::addTemplate(UMLTemplate* Template, int position)
{
- QString name = Template->getName();
+ TQString name = Template->getName();
if (findChildObject(name) == NULL) {
Template->parent()->removeChild(Template);
this->insertChild(Template);
@@ -710,7 +710,7 @@ bool UMLClassifier::addTemplate(UMLTemplate* Template, int position)
m_List.append(Template);
emit templateAdded(Template);
UMLObject::emitModified();
- connect(Template,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(Template,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
//else
@@ -724,12 +724,12 @@ int UMLClassifier::removeTemplate(UMLTemplate* umltemplate) {
}
emit templateRemoved(umltemplate);
UMLObject::emitModified();
- disconnect(umltemplate,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(umltemplate,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return m_List.count();
}
-UMLTemplate *UMLClassifier::findTemplate(const QString& name) {
+UMLTemplate *UMLClassifier::findTemplate(const TQString& name) {
UMLTemplateList templParams = getTemplateList();
for (UMLTemplate *t = templParams.first(); t; t = templParams.next()) {
if (t->getName() == name)
@@ -756,12 +756,12 @@ UMLTemplateList UMLClassifier::getTemplateList() const {
int UMLClassifier::takeItem(UMLClassifierListItem *item) {
UMLObject* currentAtt;
- QString buf;
+ TQString buf;
for (UMLObjectListIt it0(m_List);
(currentAtt = it0.current()); ++it0) {
- QString txt = currentAtt->getName();
+ TQString txt = currentAtt->getName();
if (txt.isEmpty())
- txt = "Type-" + QString::number((int) currentAtt->getBaseType());
+ txt = "Type-" + TQString::number((int) currentAtt->getBaseType());
buf.append(' ' + currentAtt->getName());
}
kDebug() << " UMLClassifier::takeItem (before): m_List is " << buf << endl;
@@ -847,7 +847,7 @@ UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented() {
if (a->getObjectId(Uml::B) == getID())
continue; // we need to be at the A side
- QString roleNameB = a->getRoleName(Uml::B);
+ TQString roleNameB = a->getRoleName(Uml::B);
if (!roleNameB.isEmpty()) {
UMLAttributeList atl = getAttributeList();
bool found = false;
@@ -866,8 +866,8 @@ UMLAssociationList UMLClassifier::getUniAssociationToBeImplemented() {
return uniAssocListToBeImplemented;
}
-void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
- QString tag;
+void UMLClassifier::saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQString tag;
switch (m_BaseType) {
case Uml::ot_Class:
tag = "UML:Class";
@@ -883,7 +883,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
<< m_BaseType << endl;
return;
}
- QDomElement classifierElement = UMLObject::save(tag, qDoc);
+ TQDomElement classifierElement = UMLObject::save(tag, qDoc);
if (m_BaseType == Uml::ot_Datatype && m_pSecondary != NULL)
classifierElement.setAttribute( "elementReference",
ID2STR(m_pSecondary->getID()) );
@@ -891,7 +891,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
//save templates
UMLClassifierListItemList list = getFilteredList(Uml::ot_Template);
if (list.count()) {
- QDomElement tmplElement = qDoc.createElement( "UML:ModelElement.templateParameter" );
+ TQDomElement tmplElement = qDoc.createElement( "UML:ModelElement.templateParameter" );
for (UMLClassifierListItem *tmpl = list.first(); tmpl; tmpl = list.next() ) {
tmpl->saveToXMI(qDoc, tmplElement);
}
@@ -901,12 +901,12 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
//save generalizations (we are the subclass, the other end is the superclass)
UMLAssociationList generalizations = getSpecificAssocs(Uml::at_Generalization);
if (generalizations.count()) {
- QDomElement genElement = qDoc.createElement("UML:GeneralizableElement.generalization");
+ TQDomElement genElement = qDoc.createElement("UML:GeneralizableElement.generalization");
for (UMLAssociation *a = generalizations.first(); a; a = generalizations.next()) {
// We are the subclass if we are at the role A end.
if (m_nId != a->getObjectId(Uml::A))
continue;
- QDomElement gElem = qDoc.createElement("UML:Generalization");
+ TQDomElement gElem = qDoc.createElement("UML:Generalization");
gElem.setAttribute( "xmi.idref", ID2STR(a->getID()) );
genElement.appendChild(gElem);
}
@@ -915,7 +915,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
}
// save attributes
- QDomElement featureElement = qDoc.createElement( "UML:Classifier.feature" );
+ TQDomElement featureElement = qDoc.createElement( "UML:Classifier.feature" );
UMLClassifierListItemList attList = getFilteredList(Uml::ot_Attribute);
for (UMLClassifierListItem *pAtt = attList.first(); pAtt; pAtt = attList.next() )
pAtt -> saveToXMI( qDoc, featureElement );
@@ -929,7 +929,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
// save contained objects
if (m_objects.count()) {
- QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
UMLObject *obj = oit.current();
obj->saveToXMI (qDoc, ownedElement);
@@ -939,7 +939,7 @@ void UMLClassifier::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( classifierElement );
}
-UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag) {
+UMLClassifierListItem* UMLClassifier::makeChildObject(const TQString& xmiTag) {
UMLClassifierListItem* pObject = NULL;
if (tagEq(xmiTag, "Operation")) {
pObject = new UMLOperation(this);
@@ -953,7 +953,7 @@ UMLClassifierListItem* UMLClassifier::makeChildObject(const QString& xmiTag) {
return pObject;
}
-bool UMLClassifier::load(QDomElement& element) {
+bool UMLClassifier::load(TQDomElement& element) {
UMLClassifierListItem *child = NULL;
m_SecondaryId = element.attribute( "elementReference", "" );
if (!m_SecondaryId.isEmpty()) {
@@ -961,12 +961,12 @@ bool UMLClassifier::load(QDomElement& element) {
m_isRef = true;
}
bool totalSuccess = true;
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
element = node.toElement();
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tagEq(tag, "ModelElement.templateParameter") ||
tagEq(tag, "Classifier.feature") ||
tagEq(tag, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/classifier.h b/umbrello/umbrello/classifier.h
index c599fe16..9bec4917 100644
--- a/umbrello/umbrello/classifier.h
+++ b/umbrello/umbrello/classifier.h
@@ -51,7 +51,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLClassifier(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLClassifier(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -83,10 +83,10 @@ public:
* @param init An optional initial value, used by when creating through UMLListView
* @return The UMLAttribute created
*/
- virtual UMLAttribute* createAttribute(const QString &name = QString::null,
+ virtual UMLAttribute* createAttribute(const TQString &name = TQString::null,
UMLObject *type = 0,
Uml::Visibility vis = Uml::Visibility::Private,
- const QString &init = QString::null);
+ const TQString &init = TQString::null);
/**
* Adds an attribute to the class.
@@ -100,9 +100,9 @@ public:
* will internally assign a new ID.
* @return Pointer to the UMLAttribute created or found.
*/
- UMLAttribute* addAttribute(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLAttribute* addAttribute(const TQString &name, Uml::IDType id = Uml::id_None);
- UMLAttribute* addAttribute(const QString &name, UMLObject *type, Uml::Visibility scope);
+ UMLAttribute* addAttribute(const TQString &name, UMLObject *type, Uml::Visibility scope);
/**
* Adds an already created attribute.
@@ -165,7 +165,7 @@ public:
* created because for example, the user canceled the dialog
* or no appropriate name can be found.
*/
- UMLOperation* createOperation( const QString &name = QString::null,
+ UMLOperation* createOperation( const TQString &name = TQString::null,
bool *isExistingOp = NULL,
Model_Utils::NameAndType_List *params = NULL);
@@ -204,7 +204,7 @@ public:
* @return NULL if the signature is valid (ok), else return a pointer
* to the existing UMLOperation that causes the conflict.
*/
- UMLOperation * checkOperationSignature( const QString& name,
+ UMLOperation * checkOperationSignature( const TQString& name,
UMLAttributeList opParams,
UMLOperation *exemptOp = NULL);
@@ -239,7 +239,7 @@ public:
*
* @return The UMLTemplate created
*/
- UMLObject* createTemplate(const QString& name = QString::null);
+ UMLObject* createTemplate(const TQString& name = TQString::null);
/**
* Adds a template to the class if it is not there yet.
@@ -248,7 +248,7 @@ public:
* @param id The id of the template.
* @return Pointer to the UMLTemplate object created.
*/
- UMLTemplate* addTemplate(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLTemplate* addTemplate(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created template.
@@ -285,7 +285,7 @@ public:
/**
* Seeks the template parameter of the given name.
*/
- UMLTemplate *findTemplate(const QString& name);
+ UMLTemplate *findTemplate(const TQString& name);
/**
* Returns the number of templates for the class.
@@ -338,7 +338,7 @@ public:
* @param n The name of the operation to find.
* @return The list of objects found; will be empty if none found.
*/
- UMLOperationList findOperations(const QString &n);
+ UMLOperationList findOperations(const TQString &n);
/**
* Find an attribute, operation, association or template.
@@ -357,7 +357,7 @@ public:
*
* @return The operation found. Will return 0 if none found.
*/
- UMLOperation* findOperation(const QString& name,
+ UMLOperation* findOperation(const TQString& name,
Model_Utils::NameAndType_List params);
/**
@@ -440,7 +440,7 @@ public:
* <UML:Attribute>, <UML:Operation>, or <UML:TemplateParameter>.
* Used by the clipboard for paste operation.
*/
- UMLClassifierListItem* makeChildObject(const QString& xmiTag);
+ UMLClassifierListItem* makeChildObject(const TQString& xmiTag);
/**
* Return the list of unidirectional association that should show up in the code
@@ -478,9 +478,9 @@ protected:
/**
* Auxiliary to saveToXMI of inheriting classes:
- * Saves template parameters to the given QDomElement.
+ * Saves template parameters to the given TQDomElement.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to loadFromXMI:
@@ -489,7 +489,7 @@ protected:
* Child classes can override the loadSpecialized method
* to load its additional tags.
*/
- virtual bool load(QDomElement& element);
+ virtual bool load(TQDomElement& element);
};
diff --git a/umbrello/umbrello/classifiercodedocument.cpp b/umbrello/umbrello/classifiercodedocument.cpp
index a2d2f9fc..29e4bd88 100644
--- a/umbrello/umbrello/classifiercodedocument.cpp
+++ b/umbrello/umbrello/classifiercodedocument.cpp
@@ -19,7 +19,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "association.h"
@@ -129,10 +129,10 @@ bool ClassifierCodeDocument::hasObjectVectorClassFields() {
if(cf->getClassFieldType() != CodeClassField::Attribute)
{
UMLRole * role = dynamic_cast<UMLRole*>(cf->getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
if (
- multi.contains(QRegExp("[23456789\\*]")) ||
- multi.contains(QRegExp("1\\d"))
+ multi.contains(TQRegExp("[23456789\\*]")) ||
+ multi.contains(TQRegExp("1\\d"))
)
return true;
}
@@ -248,11 +248,11 @@ UMLClassifier * ClassifierCodeDocument::getParentClassifier ( ) {
}
/**
- * @return QPtrList<CodeOperation>
+ * @return TQPtrList<CodeOperation>
*/
-QPtrList<CodeOperation> ClassifierCodeDocument::getCodeOperations ( ) {
+TQPtrList<CodeOperation> ClassifierCodeDocument::getCodeOperations ( ) {
- QPtrList<CodeOperation> list;
+ TQPtrList<CodeOperation> list;
list.setAutoDelete(false);
TextBlockList * tlist = getTextBlockList();
@@ -274,7 +274,7 @@ void ClassifierCodeDocument::addOperation (UMLClassifierListItem * o) {
kError() << "ClassifierCodeDocument::addOperation: arg is not a UMLOperation"
<< endl;
}
- QString tag = CodeOperation::findTag(op);
+ TQString tag = CodeOperation::findTag(op);
CodeOperation * codeOp = dynamic_cast<CodeOperation*>(findTextBlockByTag(tag, true));
bool createdNew = false;
@@ -299,7 +299,7 @@ void ClassifierCodeDocument::addOperation (UMLClassifierListItem * o) {
*/
void ClassifierCodeDocument::removeOperation (UMLClassifierListItem * op ) {
- QString tag = CodeOperation::findTag((UMLOperation*)op);
+ TQString tag = CodeOperation::findTag((UMLOperation*)op);
TextBlock *tb = findTextBlockByTag(tag, true);
if(tb)
{
@@ -327,7 +327,7 @@ void ClassifierCodeDocument::addCodeClassFieldMethods(CodeClassFieldList &list )
for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
/*
- QString tag = method->getTag();
+ TQString tag = method->getTag();
if(tag.isEmpty())
{
tag = getUniqueTag();
@@ -397,15 +397,15 @@ void ClassifierCodeDocument::init (UMLClassifier * c )
// slots
if (parentIsClass()) {
- connect(c,SIGNAL(attributeAdded(UMLClassifierListItem*)),this,SLOT(addAttributeClassField(UMLClassifierListItem*)));
- connect(c,SIGNAL(attributeRemoved(UMLClassifierListItem*)),this,SLOT(removeAttributeClassField(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),this,TQT_SLOT(addAttributeClassField(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),this,TQT_SLOT(removeAttributeClassField(UMLClassifierListItem*)));
}
- connect(c,SIGNAL(sigAssociationEndAdded(UMLAssociation*)),this,SLOT(addAssociationClassField(UMLAssociation*)));
- connect(c,SIGNAL(sigAssociationEndRemoved(UMLAssociation*)),this,SLOT(removeAssociationClassField(UMLAssociation*)));
- connect(c,SIGNAL(operationAdded(UMLClassifierListItem*)),this,SLOT(addOperation(UMLClassifierListItem*)));
- connect(c,SIGNAL(operationRemoved(UMLClassifierListItem*)),this,SLOT(removeOperation(UMLClassifierListItem*)));
- connect(c,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(c,TQT_SIGNAL(sigAssociationEndAdded(UMLAssociation*)),this,TQT_SLOT(addAssociationClassField(UMLAssociation*)));
+ connect(c,TQT_SIGNAL(sigAssociationEndRemoved(UMLAssociation*)),this,TQT_SLOT(removeAssociationClassField(UMLAssociation*)));
+ connect(c,TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),this,TQT_SLOT(addOperation(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),this,TQT_SLOT(removeOperation(UMLClassifierListItem*)));
+ connect(c,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
@@ -425,7 +425,7 @@ void ClassifierCodeDocument::init (UMLClassifier * c )
// but that object is not yet constructed.
//
void ClassifierCodeDocument::syncNamesToParent( ) {
- QString fileName = CodeGenerator::cleanName(getParentClassifier()->getName());
+ TQString fileName = CodeGenerator::cleanName(getParentClassifier()->getName());
if (!UMLApp::app()->activeLanguageIsCaseSensitive()) {
// @todo let the user decide about mixed case file names (codegen setup menu)
fileName = fileName.lower();
@@ -458,7 +458,7 @@ void ClassifierCodeDocument::updateOperations( ) {
UMLOperationList opList(getParentClassifier()->getOpList());
for (UMLOperation *op = opList.first(); op; op = opList.next())
{
- QString tag = CodeOperation::findTag(op);
+ TQString tag = CodeOperation::findTag(op);
CodeOperation * codeOp = dynamic_cast<CodeOperation*>(findTextBlockByTag(tag, true));
bool createdNew = false;
@@ -570,7 +570,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool
/** set the class attributes of this object from
* the passed element node.
*/
-void ClassifierCodeDocument::setAttributesFromNode ( QDomElement & elem )
+void ClassifierCodeDocument::setAttributesFromNode ( TQDomElement & elem )
{
// NOTE: we DON'T set the parent here as we ONLY get to this point
@@ -579,10 +579,10 @@ void ClassifierCodeDocument::setAttributesFromNode ( QDomElement & elem )
// We FIRST set code class field stuff..check re-linnking with
// accessor methods by looking for our particular child element
- QDomNode node = elem.firstChild();
- QDomElement childElem = node.toElement();
+ TQDomNode node = elem.firstChild();
+ TQDomElement childElem = node.toElement();
while( !childElem.isNull() ) {
- QString tag = childElem.tagName();
+ TQString tag = childElem.tagName();
if( tag == "classfields" ) {
// load classfields
loadClassFieldsFromXMI(childElem);
@@ -627,15 +627,15 @@ ClassifierCodeDocument::findCodeClassFieldFromParentID (Uml::IDType id,
return (CodeClassField*) NULL; // not found
}
-void ClassifierCodeDocument::loadClassFieldsFromXMI( QDomElement & elem) {
+void ClassifierCodeDocument::loadClassFieldsFromXMI( TQDomElement & elem) {
- QDomNode node = elem.firstChild();
- QDomElement childElem = node.toElement();
+ TQDomNode node = elem.firstChild();
+ TQDomElement childElem = node.toElement();
while( !childElem.isNull() ) {
- QString nodeName = childElem.tagName();
+ TQString nodeName = childElem.tagName();
if( nodeName == "codeclassfield")
{
- QString id = childElem.attribute("parent_id","-1");
+ TQString id = childElem.attribute("parent_id","-1");
int role_id = childElem.attribute("role_id","-1").toInt();
CodeClassField * cf = findCodeClassFieldFromParentID(STR2ID(id), role_id);
if(cf)
@@ -661,10 +661,10 @@ void ClassifierCodeDocument::loadClassFieldsFromXMI( QDomElement & elem) {
/**
* Save the XMI representation of this object
*/
-void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
+void ClassifierCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
#if 0
// avoid the creation of primitive data type
- QString strType;
+ TQString strType;
if (getParentClassifier()->getBaseType() == Uml::ot_Datatype) {
strType = getParentClassifier()->getName();
// lets get the default code generator to check if it is a primitive data type
@@ -673,7 +673,7 @@ void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root
return;
}
#endif
- QDomElement docElement = doc.createElement( "classifiercodedocument" );
+ TQDomElement docElement = doc.createElement( "classifiercodedocument" );
setAttributesOnNode(doc, docElement);
@@ -683,7 +683,7 @@ void ClassifierCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root
/**
* load params from the appropriate XMI element node.
*/
-void ClassifierCodeDocument::loadFromXMI ( QDomElement & root ) {
+void ClassifierCodeDocument::loadFromXMI ( TQDomElement & root ) {
// set attributes/fields
setAttributesFromNode(root);
@@ -695,7 +695,7 @@ void ClassifierCodeDocument::loadFromXMI ( QDomElement & root ) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void ClassifierCodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// do super-class first
@@ -706,7 +706,7 @@ void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// (code) class fields
// which we will store in its own separate child node block
- QDomElement fieldsElement = doc.createElement( "classfields" );
+ TQDomElement fieldsElement = doc.createElement( "classfields" );
for (CodeClassFieldListIt ccflit(m_classfieldVector); ccflit.current(); ++ccflit)
{
CodeClassField * field = ccflit.current();
@@ -716,7 +716,7 @@ void ClassifierCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomEleme
}
-TextBlock * ClassifierCodeDocument::findCodeClassFieldTextBlockByTag (const QString &tag)
+TextBlock * ClassifierCodeDocument::findCodeClassFieldTextBlockByTag (const TQString &tag)
{
for (CodeClassFieldListIt ccflit(m_classfieldVector); ccflit.current(); ++ccflit)
diff --git a/umbrello/umbrello/classifiercodedocument.h b/umbrello/umbrello/classifiercodedocument.h
index 2e103034..2c847c35 100644
--- a/umbrello/umbrello/classifiercodedocument.h
+++ b/umbrello/umbrello/classifiercodedocument.h
@@ -19,9 +19,9 @@
#ifndef CLASSIFIERCODEDOCUMENT_H
#define CLASSIFIERCODEDOCUMENT_H
-#include <qmap.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "classifier.h"
#include "codeaccessormethod.h"
@@ -108,9 +108,9 @@ public:
/**
* Get a list of codeoperation objects held by this classifiercodedocument.
- * @return QPtrList<CodeOperation>
+ * @return TQPtrList<CodeOperation>
*/
- QPtrList<CodeOperation> getCodeOperations ( );
+ TQPtrList<CodeOperation> getCodeOperations ( );
/** Get a list of codeclassifier objects held by this classifiercodedocument that meet the passed criteria.
* @return CodeClassFieldList
@@ -168,33 +168,33 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
/**
* Load CodeClassFields from XMI element node.
*/
- void loadClassFieldsFromXMI( QDomElement & childElem);
+ void loadClassFieldsFromXMI( TQDomElement & childElem);
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
// find a specific textblock held by any code class field in this document
// by its tag
- TextBlock * findCodeClassFieldTextBlockByTag (const QString &tag);
+ TextBlock * findCodeClassFieldTextBlockByTag (const TQString &tag);
// add the declaration text blocks for various classfields
void declareClassFields (CodeClassFieldList & list , CodeGenObjectWithTextBlocks * parent);
@@ -225,7 +225,7 @@ private:
* Maps CodeClassFields to UMLObjects. Used to prevent re-adding a class
* field.
*/
- QMap<UMLObject *,CodeClassField *> m_classFieldMap;
+ TQMap<UMLObject *,CodeClassField *> m_classFieldMap;
/**
* Init from a UMLClassifier object.
diff --git a/umbrello/umbrello/classifierlistitem.cpp b/umbrello/umbrello/classifierlistitem.cpp
index 888f3da7..60e5b7bf 100644
--- a/umbrello/umbrello/classifierlistitem.cpp
+++ b/umbrello/umbrello/classifierlistitem.cpp
@@ -24,7 +24,7 @@
#include "object_factory.h"
UMLClassifierListItem::UMLClassifierListItem(const UMLObject *parent,
- const QString& name, Uml::IDType id)
+ const TQString& name, Uml::IDType id)
: UMLObject(parent, name, id) {
UMLObject *parentObj = const_cast<UMLObject*>(parent);
UMLClassifier *pc = dynamic_cast<UMLClassifier*>(parentObj);
@@ -49,7 +49,7 @@ void UMLClassifierListItem::copyInto(UMLClassifierListItem *rhs) const
UMLObject::copyInto(rhs);
}
-QString UMLClassifierListItem::toString(Uml::Signature_Type /*sig*/) {
+TQString UMLClassifierListItem::toString(Uml::Signature_Type /*sig*/) {
return getName();
}
@@ -57,7 +57,7 @@ UMLClassifier * UMLClassifierListItem::getType() const{
return static_cast<UMLClassifier*>(m_pSecondary);
}
-QString UMLClassifierListItem::getTypeName() const{
+TQString UMLClassifierListItem::getTypeName() const{
if (m_pSecondary == NULL)
return m_SecondaryId;
const UMLPackage *typePkg = m_pSecondary->getUMLPackage();
@@ -73,10 +73,10 @@ void UMLClassifierListItem::setType(UMLObject *type) {
}
}
-void UMLClassifierListItem::setTypeName(const QString &type) {
+void UMLClassifierListItem::setTypeName(const TQString &type) {
if (type.isEmpty() || type == "void") {
m_pSecondary = NULL;
- m_SecondaryId = QString();
+ m_SecondaryId = TQString();
return;
}
UMLDoc *pDoc = UMLApp::app()->getDocument();
diff --git a/umbrello/umbrello/classifierlistitem.h b/umbrello/umbrello/classifierlistitem.h
index fd68fdf3..ceac48cc 100644
--- a/umbrello/umbrello/classifierlistitem.h
+++ b/umbrello/umbrello/classifierlistitem.h
@@ -44,7 +44,7 @@ public:
* @param id The id of the operation.
*/
UMLClassifierListItem(const UMLObject *parent,
- const QString& name,
+ const TQString& name,
Uml::IDType id = Uml::id_None);
/**
@@ -76,7 +76,7 @@ public:
*
* @return The type name of the UMLClassifierListItem.
*/
- virtual QString getTypeName() const;
+ virtual TQString getTypeName() const;
/**
* Sets the type name of the UMLClassifierListItem.
@@ -84,7 +84,7 @@ public:
*
* @param type The type name of the UMLClassifierListItem.
*/
- void setTypeName( const QString &type );
+ void setTypeName( const TQString &type );
/**
* Sets the type of the UMLAttribute.
@@ -99,7 +99,7 @@ public:
* @param sig What type of operation string to show.
* @return The string representation of the operation.
*/
- virtual QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ virtual TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Display the properties configuration dialog for the list item.
@@ -107,7 +107,7 @@ public:
* @param parent The parent widget.
* @return True for success of this operation.
*/
- virtual bool showPropertiesDialog(QWidget* parent) = 0;
+ virtual bool showPropertiesDialog(TQWidget* parent) = 0;
/**
* Copy the internal presentation of this object into the new
diff --git a/umbrello/umbrello/classifierwidget.cpp b/umbrello/umbrello/classifierwidget.cpp
index 4d4c1eb8..8105818f 100644
--- a/umbrello/umbrello/classifierwidget.cpp
+++ b/umbrello/umbrello/classifierwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "classifierwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
#include "classifier.h"
@@ -296,7 +296,7 @@ int ClassifierWidget::displayedOperations() {
return displayedMembers(Uml::ot_Operation);
}
-QSize ClassifierWidget::calculateSize() {
+TQSize ClassifierWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
@@ -304,7 +304,7 @@ QSize ClassifierWidget::calculateSize() {
return calculateAsCircleSize();
}
- const QFontMetrics &fm = getFontMetrics(UMLWidget::FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(UMLWidget::FT_NORMAL);
const int fontHeight = fm.lineSpacing();
// width is the width of the longest 'word'
int width = 0, height = 0;
@@ -313,7 +313,7 @@ QSize ClassifierWidget::calculateSize() {
if (m_bShowStereotype && !m_pObject->getStereotype().isEmpty()) {
height += fontHeight;
// ... width
- const QFontMetrics &bfm = UMLWidget::getFontMetrics(UMLWidget::FT_BOLD);
+ const TQFontMetrics &bfm = UMLWidget::getFontMetrics(UMLWidget::FT_BOLD);
const int stereoWidth = bfm.size(0,m_pObject->getStereotype(true)).width();
if (stereoWidth > width)
width = stereoWidth;
@@ -322,7 +322,7 @@ QSize ClassifierWidget::calculateSize() {
// consider name
height += fontHeight;
// ... width
- QString displayedName;
+ TQString displayedName;
if (m_bShowPackage)
displayedName = m_pObject->getFullyQualifiedName();
else
@@ -361,7 +361,7 @@ QSize ClassifierWidget::calculateSize() {
for (UMLOperation* op = list.first(); op; op = list.next()) {
if (m_bShowPublicOnly && op->getVisibility() != Uml::Visibility::Public)
continue;
- const QString displayedOp = op->toString(m_ShowOpSigs);
+ const TQString displayedOp = op->toString(m_ShowOpSigs);
UMLWidget::FontType oft;
oft = (op->getAbstract() ? UMLWidget::FT_ITALIC : UMLWidget::FT_NORMAL);
const int w = UMLWidget::getFontMetrics(oft).size(0,displayedOp).width();
@@ -371,7 +371,7 @@ QSize ClassifierWidget::calculateSize() {
}
// consider template box _as last_ !
- QSize templatesBoxSize = calculateTemplatesBoxSize();
+ TQSize templatesBoxSize = calculateTemplatesBoxSize();
if (templatesBoxSize.width() != 0) {
// add width to largest 'word'
width += templatesBoxSize.width() / 2;
@@ -389,7 +389,7 @@ QSize ClassifierWidget::calculateSize() {
// allow for width margin
width += MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void ClassifierWidget::slotMenuSelection(int sel) {
@@ -468,21 +468,21 @@ void ClassifierWidget::slotMenuSelection(int sel) {
}
}
-QSize ClassifierWidget::calculateTemplatesBoxSize() {
+TQSize ClassifierWidget::calculateTemplatesBoxSize() {
UMLTemplateList list = getClassifier()->getTemplateList();
int count = list.count();
if (count == 0) {
- return QSize(0, 0);
+ return TQSize(0, 0);
}
int width, height;
height = width = 0;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
height = count * fm.lineSpacing() + (MARGIN*2);
@@ -493,7 +493,7 @@ QSize ClassifierWidget::calculateTemplatesBoxSize() {
}
width += (MARGIN*2);
- return QSize(width, height);
+ return TQSize(width, height);
}
int ClassifierWidget::displayedAttributes() {
@@ -518,7 +518,7 @@ UMLClassifier *ClassifierWidget::getClassifier() {
return static_cast<UMLClassifier*>(m_pObject);
}
-void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ClassifierWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
@@ -531,7 +531,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
// Draw the bounding rectangle
- QSize templatesBoxSize = calculateTemplatesBoxSize();
+ TQSize templatesBoxSize = calculateTemplatesBoxSize();
m_bodyOffsetY = offsetY;
if (templatesBoxSize.height() > 0)
m_bodyOffsetY += templatesBoxSize.height() - MARGIN;
@@ -543,28 +543,28 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
h -= templatesBoxSize.height() - MARGIN;
p.drawRect(offsetX, m_bodyOffsetY, w, h);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setUnderline(false);
font.setItalic(false);
- const QFontMetrics fm = UMLWidget::getFontMetrics(UMLWidget::FT_NORMAL);
+ const TQFontMetrics fm = UMLWidget::getFontMetrics(UMLWidget::FT_NORMAL);
const int fontHeight = fm.lineSpacing();
//If there are any templates then draw them
UMLTemplateList tlist = getClassifier()->getTemplateList();
if ( tlist.count() > 0 ) {
UMLWidget::setPen(p);
- QPen pen = p.pen();
+ TQPen pen = p.pen();
pen.setStyle(Qt::DotLine);
p.setPen(pen);
p.drawRect( offsetX + width() - templatesBoxSize.width(), offsetY,
templatesBoxSize.width(), templatesBoxSize.height() );
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
font.setBold(false);
p.setFont(font);
const int x = offsetX + width() - templatesBoxSize.width() + MARGIN;
int y = offsetY + MARGIN;
for ( UMLTemplate *t = tlist.first(); t; t = tlist.next() ) {
- QString text = t->toString();
+ TQString text = t->toString();
p.drawText(x, y, fm.size(0,text).width(), fontHeight, Qt::AlignVCenter, text);
y += fontHeight;
}
@@ -573,11 +573,11 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int textX = offsetX + MARGIN;
const int textWidth = w - MARGIN * 2;
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
// draw stereotype
font.setBold(true);
- QString stereo = m_pObject->getStereotype();
+ TQString stereo = m_pObject->getStereotype();
/* if no stereotype is given we don't want to show the empty << >> */
const bool showStereotype = (m_bShowStereotype && !stereo.isEmpty());
const bool showNameOnly = (!m_bShowOperations && !m_bShowAttributes && !showStereotype);
@@ -592,7 +592,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
// draw name
- QString name;
+ TQString name;
if (m_bShowPackage) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -605,7 +605,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
m_bodyOffsetY += fontHeight;
UMLWidget::setPen(p);
p.drawLine(offsetX, m_bodyOffsetY, offsetX + w - 1, m_bodyOffsetY);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
}
font.setBold(false);
font.setItalic(false);
@@ -626,7 +626,7 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
m_bodyOffsetY += fontHeight * numAtts;
UMLWidget::setPen(p);
p.drawLine(offsetX, m_bodyOffsetY, offsetX + w - 1, m_bodyOffsetY);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
}
// draw operations
@@ -639,12 +639,12 @@ void ClassifierWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::drawSelected(&p, offsetX, offsetY);
}
-void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
+void ClassifierWidget::drawAsCircle(TQPainter& p, int offsetX, int offsetY) {
int w = width();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString name;
+ TQString name;
if ( m_bShowPackage ) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -652,9 +652,9 @@ void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
}
p.drawEllipse(offsetX + w/2 - CIRCLE_SIZE/2, offsetY, CIRCLE_SIZE, CIRCLE_SIZE);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
p.setFont(font);
p.drawText(offsetX, offsetY + CIRCLE_SIZE, w, fontHeight, Qt::AlignCenter, name);
@@ -663,14 +663,14 @@ void ClassifierWidget::drawAsCircle(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize ClassifierWidget::calculateAsCircleSize() {
- const QFontMetrics &fm = UMLWidget::getFontMetrics(UMLWidget::FT_ITALIC_UNDERLINE);
+TQSize ClassifierWidget::calculateAsCircleSize() {
+ const TQFontMetrics &fm = UMLWidget::getFontMetrics(UMLWidget::FT_ITALIC_UNDERLINE);
const int fontHeight = fm.lineSpacing();
int height = CIRCLE_SIZE + fontHeight;
int width = CIRCLE_SIZE;
- QString displayedName;
+ TQString displayedName;
if (m_bShowPackage) {
displayedName = m_pObject->getFullyQualifiedName();
} else {
@@ -681,22 +681,22 @@ QSize ClassifierWidget::calculateAsCircleSize() {
width = nameWidth;
width += MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ClassifierWidget::drawMembers(QPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
+void ClassifierWidget::drawMembers(TQPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
int x, int y, int fontHeight) {
- QFont f = UMLWidget::getFont();
+ TQFont f = UMLWidget::getFont();
f.setBold(false);
UMLClassifierListItemList list = getClassifier()->getFilteredList(ot);
for (UMLClassifierListItem *obj = list.first(); obj; obj = list.next()) {
if (m_bShowPublicOnly && obj->getVisibility() != Uml::Visibility::Public)
continue;
- QString text = obj->toString(sigType);
+ TQString text = obj->toString(sigType);
f.setItalic( obj->getAbstract() );
f.setUnderline( obj->getStatic() );
p.setFont( f );
- QFontMetrics fontMetrics(f);
+ TQFontMetrics fontMetrics(f);
p.drawText(x, y, fontMetrics.size(0,text).width(), fontHeight, Qt::AlignVCenter, text);
f.setItalic(false);
f.setUnderline(false);
@@ -755,8 +755,8 @@ void ClassifierWidget::adjustAssocs(int x, int y) {
m_pAssocWidget->computeAssocClassLine();
}
-void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement conceptElement;
+void ClassifierWidget::saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement conceptElement;
UMLClassifier *umlc = getClassifier();
if (umlc->isInterface())
conceptElement = qDoc.createElement("interfacewidget");
@@ -777,17 +777,17 @@ void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( conceptElement );
}
-bool ClassifierWidget::loadFromXMI(QDomElement & qElement) {
+bool ClassifierWidget::loadFromXMI(TQDomElement & qElement) {
if (!UMLWidget::loadFromXMI(qElement))
return false;
- QString showatts = qElement.attribute( "showattributes", "0" );
- QString showops = qElement.attribute( "showoperations", "1" );
- QString showpubliconly = qElement.attribute( "showpubliconly", "0" );
- QString showattsigs = qElement.attribute( "showattsigs", "600" );
- QString showopsigs = qElement.attribute( "showopsigs", "600" );
- QString showpackage = qElement.attribute( "showpackage", "0" );
- QString showscope = qElement.attribute( "showscope", "0" );
- QString drawascircle = qElement.attribute("drawascircle", "0");
+ TQString showatts = qElement.attribute( "showattributes", "0" );
+ TQString showops = qElement.attribute( "showoperations", "1" );
+ TQString showpubliconly = qElement.attribute( "showpubliconly", "0" );
+ TQString showattsigs = qElement.attribute( "showattsigs", "600" );
+ TQString showopsigs = qElement.attribute( "showopsigs", "600" );
+ TQString showpackage = qElement.attribute( "showpackage", "0" );
+ TQString showscope = qElement.attribute( "showscope", "0" );
+ TQString drawascircle = qElement.attribute("drawascircle", "0");
m_bShowAttributes = (bool)showatts.toInt();
m_bShowOperations = (bool)showops.toInt();
diff --git a/umbrello/umbrello/classifierwidget.h b/umbrello/umbrello/classifierwidget.h
index 17172460..072b9c4e 100644
--- a/umbrello/umbrello/classifierwidget.h
+++ b/umbrello/umbrello/classifierwidget.h
@@ -267,7 +267,7 @@ public:
* Overrides standard method.
* Auxiliary to reimplementations in the derived classes.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Extends base method to adjust also the association of a class
@@ -284,12 +284,12 @@ public:
/**
* Creates the "classwidget" or "interfacewidget" XML element.
*/
- void saveToXMI(QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement);
/**
* Loads the "classwidget" or "interfacewidget" XML element.
*/
- bool loadFromXMI(QDomElement & qElement);
+ bool loadFromXMI(TQDomElement & qElement);
public slots:
/**
@@ -309,28 +309,28 @@ protected:
/**
* Calculcates the size of the templates box in the top left
- * if it exists, returns QSize(0,0) if it doesn't.
+ * if it exists, returns TQSize(0,0) if it doesn't.
*
- * @return QSize of the templates flap.
+ * @return TQSize of the templates flap.
*/
- QSize calculateTemplatesBoxSize();
+ TQSize calculateTemplatesBoxSize();
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Draws the interface as a circle with name underneath.
* Only applies when m_pObject->getBaseType() is ot_Interface.
*/
- void drawAsCircle(QPainter& p, int offsetX, int offsetY);
+ void drawAsCircle(TQPainter& p, int offsetX, int offsetY);
/**
* Calculates the size of the object when drawn as a circle.
* Only applies when m_pObject->getBaseType() is ot_Interface.
*/
- QSize calculateAsCircleSize();
+ TQSize calculateAsCircleSize();
/**
* Updates m_ShowOpSigs to match m_bShowVisibility.
@@ -347,14 +347,14 @@ protected:
* Auxiliary method for draw() of child classes:
* Draw the attributes or operations.
*
- * @param p QPainter to paint to.
+ * @param p TQPainter to paint to.
* @param ot Object type to draw, either ot_Attribute or ot_Operation.
* @param sigType Governs details of the member display.
* @param x X coordinate at which to draw the texts.
* @param y Y coordinate at which text drawing commences.
* @param fontHeight The font height.
*/
- void drawMembers(QPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
+ void drawMembers(TQPainter & p, Uml::Object_Type ot, Uml::Signature_Type sigType,
int x, int y, int fontHeight);
bool m_bShowOperations; ///< Loaded/saved item.
diff --git a/umbrello/umbrello/clipboard/idchangelog.h b/umbrello/umbrello/clipboard/idchangelog.h
index 1d92cd0d..bcb337bd 100644
--- a/umbrello/umbrello/clipboard/idchangelog.h
+++ b/umbrello/umbrello/clipboard/idchangelog.h
@@ -22,8 +22,8 @@
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include "../umlnamespace.h"
@@ -105,15 +105,15 @@ private:
private:
Uml::IDType m_x, m_y;
};
-class PointArray : QValueVector<Point> {
+class PointArray : TQValueVector<Point> {
public:
void setPoint(uint i, const Uml::IDType &x, const Uml::IDType &y) {
Point point(x, y);
- QValueVector<Point>::at(i) = point;
+ TQValueVector<Point>::at(i) = point;
}
- const Point& point( uint i ) const { return QValueVector<Point>::at(i); }
- uint size() const { return QValueVector<Point>::size(); }
- bool resize( uint size ) { QValueVector<Point>::resize(size); return true; }
+ const Point& point( uint i ) const { return TQValueVector<Point>::at(i); }
+ uint size() const { return TQValueVector<Point>::size(); }
+ bool resize( uint size ) { TQValueVector<Point>::resize(size); return true; }
};
PointArray m_LogArray;
diff --git a/umbrello/umbrello/clipboard/umlclipboard.cpp b/umbrello/umbrello/clipboard/umlclipboard.cpp
index c65c576e..069ba84b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.cpp
+++ b/umbrello/umbrello/clipboard/umlclipboard.cpp
@@ -41,7 +41,7 @@ UMLClipboard::UMLClipboard() {
UMLClipboard::~UMLClipboard() {
}
-QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
+TQMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
//Clear previous copied data
m_AssociationList.clear();
m_ItemList.clear();
@@ -49,7 +49,7 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
m_ViewList.clear();
UMLDrag *data = 0;
- QPixmap* png = 0;
+ TQPixmap* png = 0;
UMLListView * listView = UMLApp::app()->getListView();
UMLListViewItemList selectedItems;
@@ -131,10 +131,10 @@ QMimeSource* UMLClipboard::copy(bool fromView/*=false*/) {
break;
}
- return (QMimeSource*)data;
+ return (TQMimeSource*)data;
}
-bool UMLClipboard::paste(QMimeSource* data) {
+bool UMLClipboard::paste(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
bool result = false;
doc->beginPaste();
@@ -337,7 +337,7 @@ void UMLClipboard::CleanAssociations(AssociationWidgetList& associations) {
/** If clipboard has mime type application/x-uml-clip1,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip1(QMimeSource* data) {
+bool UMLClipboard::pasteClip1(TQMimeSource* data) {
UMLObjectList objects;
if (! UMLDrag::decodeClip1(data, objects)) {
return false;
@@ -364,7 +364,7 @@ bool UMLClipboard::pasteClip1(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip2,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip2(QMimeSource* data) {
+bool UMLClipboard::pasteClip2(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLObjectList objects;
@@ -421,7 +421,7 @@ bool UMLClipboard::pasteClip2(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip3,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip3(QMimeSource* data) {
+bool UMLClipboard::pasteClip3(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListViewItemList itemdatalist;
UMLListViewItem* item = 0;
@@ -453,7 +453,7 @@ bool UMLClipboard::pasteClip3(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip4,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip4(QMimeSource* data) {
+bool UMLClipboard::pasteClip4(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLObjectList objects;
@@ -563,7 +563,7 @@ bool UMLClipboard::pasteClip4(QMimeSource* data) {
/** If clipboard has mime type application/x-uml-clip5,
Pastes the data from the clipboard into the current Doc */
-bool UMLClipboard::pasteClip5(QMimeSource* data) {
+bool UMLClipboard::pasteClip5(TQMimeSource* data) {
UMLDoc *doc = UMLApp::app()->getDocument();
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem* lvitem = dynamic_cast<UMLListViewItem *>( listView->currentItem() );
@@ -601,7 +601,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
{
UMLObject *exist = parent->findChildObject(obj->getName(), Uml::ot_Attribute);
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Attribute, obj->getName());
obj->setName(newName);
}
UMLAttribute *att = static_cast<UMLAttribute*>(obj);
@@ -618,7 +618,7 @@ bool UMLClipboard::pasteClip5(QMimeSource* data) {
UMLOperation *op = static_cast<UMLOperation*>(obj);
UMLOperation *exist = parent->checkOperationSignature(op->getName(), op->getParmList());
if (exist) {
- QString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
+ TQString newName = parent->uniqChildName(Uml::ot_Operation, obj->getName());
op->setName(newName);
}
if (parent->addOperation(op, idchanges)) {
diff --git a/umbrello/umbrello/clipboard/umlclipboard.h b/umbrello/umbrello/clipboard/umlclipboard.h
index 9be92111..a4da299b 100644
--- a/umbrello/umbrello/clipboard/umlclipboard.h
+++ b/umbrello/umbrello/clipboard/umlclipboard.h
@@ -31,7 +31,7 @@ class QMimeSource;
* @author Gustavo Madrigal
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLClipboard : public QObject {
+class UMLClipboard : public TQObject {
Q_OBJECT
public:
/**
@@ -50,15 +50,15 @@ public:
* @param Data Pointer to the MIME format clipboard data.
* @return True for successful operation.
*/
- bool paste(QMimeSource* Data);
+ bool paste(TQMimeSource* Data);
/**
* Copies the selected stuff from the list view or current diagram
- * to a QMimeSource ready to be put in the clipboard.
+ * to a TQMimeSource ready to be put in the clipboard.
*
* @return Pointer to the created clipboard data.
*/
- QMimeSource* copy(bool fromView = false);
+ TQMimeSource* copy(bool fromView = false);
/// Enumeration that codes the different types of UML clips.
enum UMLCopyType
@@ -86,7 +86,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip1(QMimeSource* data);
+ bool pasteClip1(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip2,
@@ -95,7 +95,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip2(QMimeSource* data);
+ bool pasteClip2(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip3,
@@ -104,7 +104,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip3(QMimeSource* data);
+ bool pasteClip3(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip4,
@@ -113,7 +113,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip4(QMimeSource* data);
+ bool pasteClip4(TQMimeSource* data);
/**
* If clipboard has mime type application/x-uml-clip5,
@@ -122,7 +122,7 @@ private:
* @param data Pointer to the source clip.
* @return True for successful operation.
*/
- bool pasteClip5(QMimeSource* data);
+ bool pasteClip5(TQMimeSource* data);
/**
* When pasting widgets see if they can be pasted on
diff --git a/umbrello/umbrello/clipboard/umldrag.cpp b/umbrello/umbrello/clipboard/umldrag.cpp
index f9fa6629..27f8dde2 100644
--- a/umbrello/umbrello/clipboard/umldrag.cpp
+++ b/umbrello/umbrello/clipboard/umldrag.cpp
@@ -13,7 +13,7 @@
#include "umldrag.h"
// qt/kde includes
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
// local includes
@@ -34,21 +34,21 @@
#define nfmt 4
class UMLDragPrivate {
public:
- QCString fmt[nfmt];
- QCString subtype;
- QByteArray enc[nfmt];
+ TQCString fmt[nfmt];
+ TQCString subtype;
+ TQByteArray enc[nfmt];
UMLDragPrivate() {
setSubType("clip1", 0);
}
- void setType(const QCString& st, int index) {
+ void setType(const TQCString& st, int index) {
if (index < nfmt) {
fmt[index] = st.lower();
}
}
- void setSubType(const QCString& st, int index) {
+ void setSubType(const TQCString& st, int index) {
if (index < nfmt) {
subtype = st.lower();
fmt[index] = "application/x-uml-";
@@ -64,39 +64,39 @@ public:
}
};
-UMLDrag::UMLDrag(UMLObjectList& objects, QWidget* dragSource /*= 0*/, const char* name /*= 0*/)
- : QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLObjectList& objects, TQWidget* dragSource /*= 0*/, const char* name /*= 0*/)
+ : TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip1(objects);
}
UMLDrag::UMLDrag(UMLObjectList& objects, UMLListViewItemList& umlListViewItems, UMLViewList& diagrams,
- QWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQWidget* dragSource /*= 0*/, const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip2(objects, umlListViewItems, diagrams);
}
-UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, QWidget* dragSource /*= 0*/,
- const char* name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(UMLListViewItemList& umlListViewItems, TQWidget* dragSource /*= 0*/,
+ const char* name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip3(umlListViewItems);
}
UMLDrag::UMLDrag(UMLObjectList& objects,
UMLWidgetList& widgets, AssociationWidgetList& associationDatas,
- QPixmap& pngImage, Uml::Diagram_Type dType, QWidget * dragSource /*= 0*/,
- const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType, TQWidget * dragSource /*= 0*/,
+ const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
setUMLDataClip4(objects, widgets, associationDatas, pngImage, dType);
}
UMLDrag::UMLDrag(UMLObjectList& objects, int,
- QWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
+ TQWidget* /*dragSource = 0*/, const char* /*name = 0*/ ) {
data = new UMLDragPrivate;
setUMLDataClip5(objects);
}
-UMLDrag::UMLDrag(QWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): QDragObject(dragSource, name) {
+UMLDrag::UMLDrag(TQWidget* dragSource /*= 0*/, const char * name /*= 0*/ ): TQDragObject(dragSource, name) {
data = new UMLDragPrivate;
}
@@ -104,22 +104,22 @@ UMLDrag::~UMLDrag() {
delete data;
}
-void UMLDrag::setSubType(const QCString& string, int index) {
+void UMLDrag::setSubType(const TQCString& string, int index) {
data->setSubType(string, index);
}
-void UMLDrag::setEncodedData(const QByteArray& encodedData, int index) {
+void UMLDrag::setEncodedData(const TQByteArray& encodedData, int index) {
data->enc[index] = encodedData.copy();
}
-QByteArray UMLDrag::encodedData(const char* dataName) const {
- QString str(dataName);
+TQByteArray UMLDrag::encodedData(const char* dataName) const {
+ TQString str(dataName);
for (int i = 0; i < 4; i++) {
if ( !qstricmp(dataName,data->fmt[i]) ) {
return data->enc[i];
}
}
- return QByteArray();
+ return TQByteArray();
}
const char* UMLDrag::format(int index) const {
@@ -130,10 +130,10 @@ const char* UMLDrag::format(int index) const {
void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
setSubType("clip1", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -143,7 +143,7 @@ void UMLDrag::setUMLDataClip1(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
@@ -153,10 +153,10 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
UMLViewList& diagrams) {
setSubType("clip2", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -166,7 +166,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement viewsTag = domDoc.createElement("umlviews");
+ TQDomElement viewsTag = domDoc.createElement("umlviews");
xmiclip.appendChild(viewsTag);
UMLViewListIt diagram_it(diagrams);
@@ -176,7 +176,7 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
view->saveToXMI(domDoc, viewsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -191,11 +191,11 @@ void UMLDrag::setUMLDataClip2(UMLObjectList& objects, UMLListViewItemList& umlLi
void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
setSubType("clip3", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
UMLListViewItemListIt item_it2(umlListViewItems);
@@ -208,14 +208,14 @@ void UMLDrag::setUMLDataClip3(UMLListViewItemList& umlListViewItems) {
}
void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, AssociationWidgetList& associations,
- QPixmap& pngImage, Uml::Diagram_Type dType ) {
+ TQPixmap& pngImage, Uml::Diagram_Type dType ) {
setSubType("clip4", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
xmiclip.setAttribute("diagramtype", dType);
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -225,7 +225,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement widgetsTag = domDoc.createElement("widgets");
+ TQDomElement widgetsTag = domDoc.createElement("widgets");
xmiclip.appendChild(widgetsTag);
UMLWidgetListIt widget_it(widgets);
@@ -235,7 +235,7 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
widget->saveToXMI(domDoc, widgetsTag);
}
- QDomElement associationWidgetsTag = domDoc.createElement("associations");
+ TQDomElement associationWidgetsTag = domDoc.createElement("associations");
xmiclip.appendChild(associationWidgetsTag);
AssociationWidgetListIt associations_it(associations);
@@ -245,16 +245,16 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
association->saveToXMI(domDoc, associationWidgetsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
data->setType("image/PNG", 1);
long l_size = (pngImage.convertToImage()).numBytes();
- QByteArray clipdata;
+ TQByteArray clipdata;
clipdata.resize(l_size);
- QDataStream clipstream(clipdata, IO_WriteOnly);
+ TQDataStream clipstream(clipdata, IO_WriteOnly);
clipstream << pngImage;
setEncodedData(clipdata, 1);
}
@@ -262,10 +262,10 @@ void UMLDrag::setUMLDataClip4(UMLObjectList& objects, UMLWidgetList& widgets, As
void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
setSubType("clip5", 0);
- QDomDocument domDoc;
- QDomElement xmiclip = domDoc.createElement("xmiclip");
+ TQDomDocument domDoc;
+ TQDomElement xmiclip = domDoc.createElement("xmiclip");
domDoc.appendChild(xmiclip);
- QDomElement objectsTag = domDoc.createElement("umlobjects");
+ TQDomElement objectsTag = domDoc.createElement("umlobjects");
xmiclip.appendChild(objectsTag);
UMLObjectListIt object_it(objects);
@@ -275,32 +275,32 @@ void UMLDrag::setUMLDataClip5(UMLObjectList& objects) {
obj->saveToXMI(domDoc, objectsTag);
}
- QDomElement itemsTag = domDoc.createElement("umllistviewitems");
+ TQDomElement itemsTag = domDoc.createElement("umllistviewitems");
xmiclip.appendChild(itemsTag);
setEncodedData(domDoc.toString().utf8(), 0);
}
-bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects) {
+bool UMLDrag::decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects) {
UMLDoc* doc = UMLApp::app()->getDocument();
if ( !mimeSource->provides("application/x-uml-clip1") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip1");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -312,16 +312,16 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
UMLListView *listView = UMLApp::app()->getListView();
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type == "UML:Association") {
objectElement = objectElement.nextSibling();
element = objectElement.toElement();
@@ -354,7 +354,7 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return false;
}
Uml::Object_Type type = pObject->getBaseType();
- QString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
+ TQString newName = Model_Utils::uniqObjectName(type, pObject->getUMLPackage(),
pObject->getName());
pObject->setName(newName);
/****************************************************************/
@@ -370,27 +370,27 @@ bool UMLDrag::decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects)
return true;
}
-bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems, UMLViewList& diagrams) {
if ( !mimeSource->provides("application/x-uml-clip2") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip2");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -400,16 +400,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
UMLObject* pObject = 0;
while ( !element.isNull() ) {
pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
if (type != "UML:Association") {
pObject = Object_Factory::makeObjectFromXMI(type);
@@ -428,16 +428,16 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLViews (diagrams)
- QDomNode umlviewsNode = objectsNode.nextSibling();
- QDomNode diagramNode = umlviewsNode.firstChild();
- QDomElement diagramElement = diagramNode.toElement();
+ TQDomNode umlviewsNode = objectsNode.nextSibling();
+ TQDomNode diagramNode = umlviewsNode.firstChild();
+ TQDomElement diagramElement = diagramNode.toElement();
if ( diagramElement.isNull() ) {
kWarning() << "no diagrams in XMI clip" << endl;
return false;
}
UMLListView *listView = UMLApp::app()->getListView();
while ( !diagramElement.isNull() ) {
- QString type = diagramElement.attribute("type", "0");
+ TQString type = diagramElement.attribute("type", "0");
Uml::Diagram_Type dt = (Uml::Diagram_Type)type.toInt();
UMLListViewItem *parent = listView->findFolderForDiagram(dt);
if (parent == NULL)
@@ -456,9 +456,9 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//listviewitems
- QDomNode listItemNode = umlviewsNode.nextSibling();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = umlviewsNode.nextSibling();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -480,28 +480,28 @@ bool UMLDrag::decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
+bool UMLDrag::getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList)
{
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "getClip3Type: Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -510,20 +510,20 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return false;
}
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "getClip3Type: no listitems in XMI clip" << endl;
return false;
}
while ( !listItemElement.isNull() ) {
- QString typeStr = listItemElement.attribute( "type", "-1" );
+ TQString typeStr = listItemElement.attribute( "type", "-1" );
if (typeStr == "-1") {
kDebug() << "getClip3Type: bad type" << endl;
return false;
}
- QString idStr = listItemElement.attribute( "id", "-1" );
+ TQString idStr = listItemElement.attribute( "id", "-1" );
if (idStr == "-1") {
kDebug() << "getClip3Type: bad id" << endl;
return false;
@@ -538,27 +538,27 @@ bool UMLDrag::getClip3TypeAndID(const QMimeSource* mimeSource,
return true;
}
-bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
+bool UMLDrag::decodeClip3(const TQMimeSource* mimeSource, UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView){
if ( !mimeSource->provides("application/x-uml-clip3") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip3");
if ( !payload.size() ) {
return false;
}
- QTextStream clipdata(payload, IO_ReadOnly);
- QString xmiClip = QString::fromUtf8(payload);
+ TQTextStream clipdata(payload, IO_ReadOnly);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -568,9 +568,9 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
}
//listviewitems
- QDomNode listItemNode = xmiClipNode.firstChild();
- QDomNode listItems = listItemNode.firstChild();
- QDomElement listItemElement = listItems.toElement();
+ TQDomNode listItemNode = xmiClipNode.firstChild();
+ TQDomNode listItems = listItemNode.firstChild();
+ TQDomElement listItemElement = listItems.toElement();
if ( listItemElement.isNull() ) {
kWarning() << "no listitems in XMI clip" << endl;
return false;
@@ -578,7 +578,7 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
while ( !listItemElement.isNull() ) {
// Get the ListView_Type beforehand so that we can construct an
// UMLListViewItem instance.
- QString type = listItemElement.attribute( "type", "-1" );
+ TQString type = listItemElement.attribute( "type", "-1" );
if (type == "-1") {
kDebug() << "Pech gehabt" << endl;
continue;
@@ -596,28 +596,28 @@ bool UMLDrag::decodeClip3(const QMimeSource* mimeSource, UMLListViewItemList& um
return true;
}
-bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations, Uml::Diagram_Type & dType) {
if ( !mimeSource->provides("application/x-uml-clip4") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip4");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -629,12 +629,12 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
dType = (Uml::Diagram_Type)(root.attribute("diagramtype", "0").toInt());
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
while ( !element.isNull() ) {
UMLObject* pObject = 0;
- QString type = element.tagName();
+ TQString type = element.tagName();
//FIXME associations don't load
if (type == "UML:Association")
continue;
@@ -656,9 +656,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//widgets
- QDomNode widgetsNode = objectsNode.nextSibling();
- QDomNode widgetNode = widgetsNode.firstChild();
- QDomElement widgetElement = widgetNode.toElement();
+ TQDomNode widgetsNode = objectsNode.nextSibling();
+ TQDomNode widgetNode = widgetsNode.firstChild();
+ TQDomElement widgetElement = widgetNode.toElement();
if ( widgetElement.isNull() ) {
kWarning() << "no widgets in XMI clip" << endl;
return false;
@@ -676,9 +676,9 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//AssociationWidgets
- QDomNode associationWidgetsNode = widgetsNode.nextSibling();
- QDomNode associationWidgetNode = associationWidgetsNode.firstChild();
- QDomElement associationWidgetElement = associationWidgetNode.toElement();
+ TQDomNode associationWidgetsNode = widgetsNode.nextSibling();
+ TQDomNode associationWidgetNode = associationWidgetsNode.firstChild();
+ TQDomElement associationWidgetElement = associationWidgetNode.toElement();
while ( !associationWidgetElement.isNull() ) {
AssociationWidget* associationWidget = new AssociationWidget(view);
if (associationWidget->loadFromXMI(associationWidgetElement, widgets))
@@ -694,26 +694,26 @@ bool UMLDrag::decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+bool UMLDrag::decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier* newParent) {
if ( !mimeSource->provides("application/x-uml-clip5") ) {
return false;
}
- QByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
+ TQByteArray payload = mimeSource->encodedData("application/x-uml-clip5");
if ( !payload.size() ) {
return false;
}
- QString xmiClip = QString::fromUtf8(payload);
+ TQString xmiClip = TQString::fromUtf8(payload);
- QString error;
+ TQString error;
int line;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if( !domDoc.setContent(xmiClip, false, &error, &line) ) {
kWarning() << "Can't set content:" << error << " Line:" << line << endl;
return false;
}
- QDomNode xmiClipNode = domDoc.firstChild();
- QDomElement root = xmiClipNode.toElement();
+ TQDomNode xmiClipNode = domDoc.firstChild();
+ TQDomElement root = xmiClipNode.toElement();
if ( root.isNull() ) {
return false;
}
@@ -723,14 +723,14 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
}
//UMLObjects
- QDomNode objectsNode = xmiClipNode.firstChild();
- QDomNode objectElement = objectsNode.firstChild();
- QDomElement element = objectElement.toElement();
+ TQDomNode objectsNode = xmiClipNode.firstChild();
+ TQDomNode objectElement = objectsNode.firstChild();
+ TQDomElement element = objectElement.toElement();
if ( element.isNull() ) {
return false;//return ok as it means there is no umlobjects
}
while ( !element.isNull() ) {
- QString type = element.tagName();
+ TQString type = element.tagName();
UMLClassifierListItem *pObject = newParent->makeChildObject(type);
if( !pObject ) {
kWarning() << "Given wrong type of umlobject to create:" << type << endl;
@@ -749,7 +749,7 @@ bool UMLDrag::decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
return true;
}
-int UMLDrag::getCodingType(const QMimeSource* mimeSource) {
+int UMLDrag::getCodingType(const TQMimeSource* mimeSource) {
int result = 0;
if (mimeSource->provides("application/x-uml-clip1") ) {
result = 1;
diff --git a/umbrello/umbrello/clipboard/umldrag.h b/umbrello/umbrello/clipboard/umldrag.h
index a56a138e..97cbffb5 100644
--- a/umbrello/umbrello/clipboard/umldrag.h
+++ b/umbrello/umbrello/clipboard/umldrag.h
@@ -12,9 +12,9 @@
#ifndef UMLDRAG_H
#define UMLDRAG_H
-#include <qdragobject.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "../umllistviewitemlist.h"
#include "../associationwidgetlist.h"
@@ -35,7 +35,7 @@ class UMLListView;
class UMLDragPrivate;
class UMLClassifier;
-class Q_EXPORT UMLDrag : public QDragObject {
+class Q_EXPORT UMLDrag : public TQDragObject {
Q_OBJECT
UMLDragPrivate* data;
public:
@@ -45,7 +45,7 @@ public:
* the ListView but no diagrams to be copied, Mime type =
* "application/x-uml-clip1
*/
- explicit UMLDrag(UMLObjectList& Objects,QWidget* dragSource = 0, const char* name = 0 );
+ explicit UMLDrag(UMLObjectList& Objects,TQWidget* dragSource = 0, const char* name = 0 );
/**
* For use when the user selects UML Object and Diagrams
@@ -53,14 +53,14 @@ public:
* "application/x-uml-clip2
*/
UMLDrag(UMLObjectList &Objects, UMLListViewItemList& UMLListViewItems,
- UMLViewList& Diagrams, QWidget * dragSource = 0, const char * name = 0 );
+ UMLViewList& Diagrams, TQWidget * dragSource = 0, const char * name = 0 );
/**
* For use when the user selects only empty folders from
* the ListView to be copied, Mime type =
* "application/x-uml-clip3
*/
- explicit UMLDrag(UMLListViewItemList& UMLListViewItems, QWidget* dragSource = 0,
+ explicit UMLDrag(UMLListViewItemList& UMLListViewItems, TQWidget* dragSource = 0,
const char* name = 0 );
/*
@@ -71,7 +71,7 @@ public:
* "application/x-uml-clip4
*/
UMLDrag(UMLObjectList& Objects, UMLWidgetList& Widgets, AssociationWidgetList& Associations,
- QPixmap& PngImage, Uml::Diagram_Type dType, QWidget* dragSource = 0,
+ TQPixmap& PngImage, Uml::Diagram_Type dType, TQWidget* dragSource = 0,
const char* name = 0 );
/**
@@ -79,12 +79,12 @@ public:
* Attributes from the ListView, Mime type =
* "application/x-uml-clip5
*/
- UMLDrag(UMLObjectList& Objects, int, QWidget* dragSource = 0, const char* name = 0);
+ UMLDrag(UMLObjectList& Objects, int, TQWidget* dragSource = 0, const char* name = 0);
/**
* Constructor
*/
- explicit UMLDrag(QWidget* dragSource = 0, const char* name = 0);
+ explicit UMLDrag(TQWidget* dragSource = 0, const char* name = 0);
/**
* Deconstructor
@@ -118,7 +118,7 @@ public:
*/
void setUMLDataClip4(UMLObjectList& Objects,
UMLWidgetList& WidgetDatas,
- AssociationWidgetList& Associations, QPixmap& PngImage,
+ AssociationWidgetList& Associations, TQPixmap& PngImage,
Uml::Diagram_Type dType);
/**
@@ -131,12 +131,12 @@ public:
* Sets the type of the clip to "application/x-uml-" + sub
* sub should be clip[1-5]
*/
- virtual void setSubType(const QCString& sub, int index);
+ virtual void setSubType(const TQCString& sub, int index);
/**
* Sets the data in the clip
*/
- virtual void setEncodedData(const QByteArray&, int index);
+ virtual void setEncodedData(const TQByteArray&, int index);
/**
* Returns the type set by setSubType
@@ -148,7 +148,7 @@ public:
*
* @param dataName the name of the data type to return
*/
- virtual QByteArray encodedData(const char* dataName) const;
+ virtual TQByteArray encodedData(const char* dataName) const;
/**
* For use when the user selects only UML Objects
@@ -156,14 +156,14 @@ public:
* copied, decodes Mime type =
* "application/x-uml-clip1
*/
- static bool decodeClip1(const QMimeSource* mimeSource, UMLObjectList& objects);
+ static bool decodeClip1(const TQMimeSource* mimeSource, UMLObjectList& objects);
/**
* For use when the user selects UML Object and Diagrams
* from the ListView to be copied, decodes Mime type =
* "application/x-uml-clip2
*/
- static bool decodeClip2(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip2(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLListViewItemList& umlListViewItems,
UMLViewList& diagrams);
@@ -172,7 +172,7 @@ public:
* the ListView to be copied, decodes Mime * type =
* "application/x-uml-clip3
*/
- static bool decodeClip3(const QMimeSource* mimeSource,
+ static bool decodeClip3(const TQMimeSource* mimeSource,
UMLListViewItemList& umlListViewItems,
const UMLListView* parentListView=0);
@@ -180,8 +180,8 @@ public:
Uml::ListView_Type type;
Uml::IDType id;
};
- typedef QPtrList<LvTypeAndID> LvTypeAndID_List;
- typedef QPtrListIterator<LvTypeAndID> LvTypeAndID_It;
+ typedef TQPtrList<LvTypeAndID> LvTypeAndID_List;
+ typedef TQPtrListIterator<LvTypeAndID> LvTypeAndID_It;
/**
* Return just the LvTypeAndID of a Clip3.
@@ -190,7 +190,7 @@ public:
* @param typeAndIdList The LvTypeAndID_List decoded from the source.
* @return True if decoding was successful.
*/
- static bool getClip3TypeAndID(const QMimeSource* mimeSource,
+ static bool getClip3TypeAndID(const TQMimeSource* mimeSource,
LvTypeAndID_List& typeAndIdList);
/**
@@ -200,7 +200,7 @@ public:
* also its respective ListView Items, * decodes Mime
* type = "application/x-uml-clip4
*/
- static bool decodeClip4(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip4(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLWidgetList& widgets,
AssociationWidgetList& associations,
Uml::Diagram_Type & dType);
@@ -210,13 +210,13 @@ public:
* Operations from the ListView * copied, decodes Mime
* type = "application/x-uml-clip5
*/
- static bool decodeClip5(const QMimeSource* mimeSource, UMLObjectList& objects,
+ static bool decodeClip5(const TQMimeSource* mimeSource, UMLObjectList& objects,
UMLClassifier *newParent);
/**
* Converts application/x-uml-clip[1-5] clip type to an integer
*/
- static int getCodingType(const QMimeSource* mimeSource);
+ static int getCodingType(const TQMimeSource* mimeSource);
};
diff --git a/umbrello/umbrello/cmdlineexportallviewsevent.cpp b/umbrello/umbrello/cmdlineexportallviewsevent.cpp
index 7c4b3caa..a4295a20 100644
--- a/umbrello/umbrello/cmdlineexportallviewsevent.cpp
+++ b/umbrello/umbrello/cmdlineexportallviewsevent.cpp
@@ -13,7 +13,7 @@
#include "cmdlineexportallviewsevent.h"
// qt includes
-#include <qstringlist.h>
+#include <tqstringlist.h>
// kde includes
#include <kapplication.h>
@@ -25,24 +25,24 @@
int CmdLineExportAllViewsEvent::getType() {
- return QEvent::User + 1;
+ return TQEvent::User + 1;
}
-CmdLineExportAllViewsEvent::CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders)
- : QCustomEvent(CmdLineExportAllViewsEvent::getType()) {
+CmdLineExportAllViewsEvent::CmdLineExportAllViewsEvent(const TQString &imageType, const KURL &directory, const bool useFolders)
+ : TQCustomEvent(CmdLineExportAllViewsEvent::getType()) {
m_imageType = imageType;
m_directory = directory;
m_useFolders = useFolders;
}
void CmdLineExportAllViewsEvent::exportAllViews() {
- QStringList errors = UMLViewImageExporterModel().exportAllViews(m_imageType, m_directory, m_useFolders);
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(m_imageType, m_directory, m_useFolders);
if (!errors.isEmpty()) {
kError() << "Errors while exporting:" << endl;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
kError() << *it << endl;
}
}
- kapp->sendEvent(UMLApp::app(), new QCloseEvent());
+ kapp->sendEvent(UMLApp::app(), new TQCloseEvent());
}
diff --git a/umbrello/umbrello/cmdlineexportallviewsevent.h b/umbrello/umbrello/cmdlineexportallviewsevent.h
index 8c613bee..8954955a 100644
--- a/umbrello/umbrello/cmdlineexportallviewsevent.h
+++ b/umbrello/umbrello/cmdlineexportallviewsevent.h
@@ -12,7 +12,7 @@
#ifndef CMDLINEEXPORTALLVIEWSEVENT_H
#define CMDLINEEXPORTALLVIEWSEVENT_H
-#include <qevent.h>
+#include <tqevent.h>
#include <kurl.h>
/**
@@ -25,7 +25,7 @@
*
* @see UMLViewImageExporterModel
*/
-class CmdLineExportAllViewsEvent : public QCustomEvent {
+class CmdLineExportAllViewsEvent : public TQCustomEvent {
public:
/**
@@ -41,7 +41,7 @@ public:
* @param useFolders If the tree structure of the views in the document must be created
* in the target directory.
*/
- CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders);
+ CmdLineExportAllViewsEvent(const TQString &imageType, const KURL &directory, const bool useFolders);
/**
* Destructor for CmdLineExportAllViewsEvent
@@ -61,7 +61,7 @@ private:
/**
* The type of the images the views will be exported to.
*/
- QString m_imageType;
+ TQString m_imageType;
/**
* The url of the directory where the images will be saved.
diff --git a/umbrello/umbrello/codeaccessormethod.cpp b/umbrello/umbrello/codeaccessormethod.cpp
index 329bef51..e7890865 100644
--- a/umbrello/umbrello/codeaccessormethod.cpp
+++ b/umbrello/umbrello/codeaccessormethod.cpp
@@ -102,15 +102,15 @@ void CodeAccessorMethod::forceRelease () {
/**
* load params from the appropriate XMI element node.
*/
-void CodeAccessorMethod::loadFromXMI ( QDomElement & root ) {
+void CodeAccessorMethod::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/**
* Save the XMI representation of this object
*/
-void CodeAccessorMethod::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codeaccessormethod" );
+void CodeAccessorMethod::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codeaccessormethod" );
setAttributesOnNode(doc, docElement);
@@ -120,7 +120,7 @@ void CodeAccessorMethod::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem)
+void CodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem)
{
// set super-class attributes
@@ -135,7 +135,7 @@ void CodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement &
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeAccessorMethod::setAttributesFromNode ( QDomElement & root) {
+void CodeAccessorMethod::setAttributesFromNode ( TQDomElement & root) {
// set attributes from the XMI
CodeMethodBlock::setAttributesFromNode(root); // superclass load
@@ -148,7 +148,7 @@ void CodeAccessorMethod::setAttributesFromNode ( QDomElement & root) {
// clipping and pasting of these methods between classes/ classfields
// then we may have problems (ugh.. I cant imagine allowing this, but
// perhaps someone will see a need to allow it. -b.t.)
- QString id = root.attribute("classfield_id","-1");
+ TQString id = root.attribute("classfield_id","-1");
CodeClassField * newCF = 0;
ClassifierCodeDocument * cdoc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
if(cdoc)
@@ -189,7 +189,7 @@ void CodeAccessorMethod::initFields(CodeClassField * parentClassField ) {
m_accessorType = GET;
m_canDelete = false; // we cant delete these with the codeeditor, delete the UML operation instead.
- connect(m_parentclassfield,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentclassfield,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeaccessormethod.moc"
diff --git a/umbrello/umbrello/codeaccessormethod.h b/umbrello/umbrello/codeaccessormethod.h
index 03e8ff67..b03d1524 100644
--- a/umbrello/umbrello/codeaccessormethod.h
+++ b/umbrello/umbrello/codeaccessormethod.h
@@ -18,7 +18,7 @@
#ifndef CODEACCESSORMETHOD_H
#define CODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codemethodblock.h"
class CodeClassField;
@@ -74,12 +74,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -92,12 +92,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration() = 0;
diff --git a/umbrello/umbrello/codeaccessormethodlist.h b/umbrello/umbrello/codeaccessormethodlist.h
index 96693f2f..b722cd43 100644
--- a/umbrello/umbrello/codeaccessormethodlist.h
+++ b/umbrello/umbrello/codeaccessormethodlist.h
@@ -12,12 +12,12 @@
#ifndef _CODEACCESSORMETHODLIST_H
#define _CODEACCESSORMETHODLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeAccessorMethod;
-typedef QPtrList<CodeAccessorMethod> CodeAccessorMethodList;
-typedef QPtrListIterator<CodeAccessorMethod> CodeAccessorMethodListIt;
+typedef TQPtrList<CodeAccessorMethod> CodeAccessorMethodList;
+typedef TQPtrListIterator<CodeAccessorMethod> CodeAccessorMethodListIt;
#endif
diff --git a/umbrello/umbrello/codeblock.cpp b/umbrello/umbrello/codeblock.cpp
index d1705348..e95a728c 100644
--- a/umbrello/umbrello/codeblock.cpp
+++ b/umbrello/umbrello/codeblock.cpp
@@ -21,13 +21,13 @@
// Constructors/Destructors
//
-CodeBlock::CodeBlock ( HierarchicalCodeBlock * hblock , const QString & body )
+CodeBlock::CodeBlock ( HierarchicalCodeBlock * hblock , const TQString & body )
: TextBlock ( hblock->getParentDocument(), body )
{
initFields ( );
}
-CodeBlock::CodeBlock ( CodeDocument * doc, const QString & body )
+CodeBlock::CodeBlock ( CodeDocument * doc, const TQString & body )
: TextBlock ( doc, body )
{
initFields( );
@@ -84,8 +84,8 @@ CodeBlockDialog * CodeBlock::getDialog ( ) {
/**
* Save the XMI representation of this object
*/
-void CodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeblock" );
+void CodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeblock" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -93,7 +93,7 @@ void CodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
root.appendChild( blockElement );
}
-void CodeBlock::setAttributesOnNode( QDomDocument & doc, QDomElement & blockElement)
+void CodeBlock::setAttributesOnNode( TQDomDocument & doc, TQDomElement & blockElement)
{
// call super-class
@@ -108,13 +108,13 @@ void CodeBlock::setAttributesOnNode( QDomDocument & doc, QDomElement & blockElem
/**
* load params from the appropriate XMI element node.
*/
-void CodeBlock::loadFromXMI ( QDomElement & root ) {
+void CodeBlock::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
-void CodeBlock::setAttributesFromNode (QDomElement & elem) {
+void CodeBlock::setAttributesFromNode (TQDomElement & elem) {
// set attributes from the XMI in super-class
TextBlock::setAttributesFromNode(elem);
diff --git a/umbrello/umbrello/codeblock.h b/umbrello/umbrello/codeblock.h
index c01b6c9f..6575d932 100644
--- a/umbrello/umbrello/codeblock.h
+++ b/umbrello/umbrello/codeblock.h
@@ -40,11 +40,11 @@ public:
// Constructors/Destructors
//
- /** constructor with QString so we can create & populate it in
+ /** constructor with TQString so we can create & populate it in
* one step.
*/
- explicit CodeBlock ( CodeDocument * parent, const QString & body = "");
- explicit CodeBlock ( HierarchicalCodeBlock * parent, const QString & body = "" );
+ explicit CodeBlock ( CodeDocument * parent, const TQString & body = "");
+ explicit CodeBlock ( HierarchicalCodeBlock * parent, const TQString & body = "" );
/**
* Empty Destructor
@@ -83,12 +83,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -99,12 +99,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
diff --git a/umbrello/umbrello/codeblockwithcomments.cpp b/umbrello/umbrello/codeblockwithcomments.cpp
index 0e94001f..3538f2c2 100644
--- a/umbrello/umbrello/codeblockwithcomments.cpp
+++ b/umbrello/umbrello/codeblockwithcomments.cpp
@@ -28,13 +28,13 @@
// Constructors/Destructors
//
-CodeBlockWithComments::CodeBlockWithComments ( HierarchicalCodeBlock * hb, const QString & body, const QString & comment)
+CodeBlockWithComments::CodeBlockWithComments ( HierarchicalCodeBlock * hb, const TQString & body, const TQString & comment)
: CodeBlock (hb, body)
{
initFields(hb->getParentDocument(), comment);
}
-CodeBlockWithComments::CodeBlockWithComments ( CodeDocument * parent , const QString & body, const QString & comment)
+CodeBlockWithComments::CodeBlockWithComments ( CodeDocument * parent , const TQString & body, const TQString & comment)
: CodeBlock (parent, body)
{
initFields(parent, comment);
@@ -71,8 +71,8 @@ CodeComment * CodeBlockWithComments::getComment ( ) {
/**
* Save the XMI representation of this object
*/
-void CodeBlockWithComments::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeblockwithcomments" );
+void CodeBlockWithComments::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeblockwithcomments" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -80,7 +80,7 @@ void CodeBlockWithComments::saveToXMI ( QDomDocument & doc, QDomElement & root )
root.appendChild( blockElement );
}
-void CodeBlockWithComments::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void CodeBlockWithComments::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -88,7 +88,7 @@ void CodeBlockWithComments::setAttributesOnNode ( QDomDocument & doc, QDomElemen
// set local attributes now..e.g. a comment
// which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getComment()->saveToXMI(doc, commElement); // comment
blockElement.appendChild( commElement);
@@ -108,12 +108,12 @@ void CodeBlockWithComments::setAttributesFromObject(TextBlock * obj)
/**
* load params from the appropriate XMI element node.
*/
-void CodeBlockWithComments::loadFromXMI ( QDomElement & root )
+void CodeBlockWithComments::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
+void CodeBlockWithComments::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -121,14 +121,14 @@ void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
bool gotComment = false;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getComment()->loadFromXMI(celem);
gotComment = true;
break;
@@ -145,15 +145,15 @@ void CodeBlockWithComments::setAttributesFromNode( QDomElement & root)
/**
* @return QString
*/
-QString CodeBlockWithComments::toString ( ) {
+TQString CodeBlockWithComments::toString ( ) {
- QString string = QString();
+ TQString string = TQString();
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = formatMultiLineText (getText(), indent, endLine);
- QString comment = getComment()->toString();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = formatMultiLineText (getText(), indent, endLine);
+ TQString comment = getComment()->toString();
if(!comment.isEmpty() && getComment()->getWriteOutText())
string.append(comment);
@@ -171,7 +171,7 @@ void CodeBlockWithComments::setOverallIndentationLevel ( int level )
m_comment->setIndentationLevel(level);
}
-void CodeBlockWithComments::initFields(CodeDocument *parent, const QString& comment)
+void CodeBlockWithComments::initFields(CodeDocument *parent, const TQString& comment)
{
CodeComment * codecomment = CodeGenFactory::newCodeComment(parent);
codecomment->setText(comment);
diff --git a/umbrello/umbrello/codeblockwithcomments.h b/umbrello/umbrello/codeblockwithcomments.h
index 85226077..2ebb4676 100644
--- a/umbrello/umbrello/codeblockwithcomments.h
+++ b/umbrello/umbrello/codeblockwithcomments.h
@@ -41,8 +41,8 @@ public:
/**
* Basic Constructor
*/
- explicit CodeBlockWithComments ( CodeDocument * doc , const QString & body = "", const QString & comment = "");
- explicit CodeBlockWithComments ( HierarchicalCodeBlock * hblock, const QString & body = "", const QString & comment = "" );
+ explicit CodeBlockWithComments ( CodeDocument * doc , const TQString & body = "", const TQString & comment = "");
+ explicit CodeBlockWithComments ( HierarchicalCodeBlock * hblock, const TQString & body = "", const TQString & comment = "" );
/**
* Empty Destructor
@@ -63,7 +63,7 @@ public:
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/** A utility method that causes the comment and body of the code block
* to have the same indentation level.
@@ -73,12 +73,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -89,18 +89,18 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
CodeComment * m_comment;
- void initFields(CodeDocument *parent, const QString& comment);
+ void initFields(CodeDocument *parent, const TQString& comment);
};
diff --git a/umbrello/umbrello/codeclassfield.cpp b/umbrello/umbrello/codeclassfield.cpp
index a19e664d..85686a3b 100644
--- a/umbrello/umbrello/codeclassfield.cpp
+++ b/umbrello/umbrello/codeclassfield.cpp
@@ -17,7 +17,7 @@
// own header
#include "codeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "association.h"
@@ -101,7 +101,7 @@ void CodeClassField::setParentUMLObject (UMLObject * obj) {
// Public attribute accessor methods
//
-QString CodeClassField::getTypeName ( ) {
+TQString CodeClassField::getTypeName ( ) {
if (parentIsAttribute())
{
@@ -119,8 +119,8 @@ QString CodeClassField::getTypeName ( ) {
// get the type of object that will be added/removed from lists
// of objects (as per specification of associations)
-QString CodeClassField::getListObjectType() {
- QString type = QString ("");
+TQString CodeClassField::getListObjectType() {
+ TQString type = TQString ("");
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
@@ -156,9 +156,9 @@ CodeClassFieldDialog * CodeClassField::getDialog ( ) {
*/
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString CodeClassField::getUMLObjectName(UMLObject *obj)
+TQString CodeClassField::getUMLObjectName(UMLObject *obj)
{
- return (obj!=0)?obj->getName():QString("NULL");
+ return (obj!=0)?obj->getName():TQString("NULL");
}
/**
@@ -171,7 +171,7 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) {
if(findMethodByType(type))
return false;
/*
- // this wont work as the key for QMap needs to inherit from QObject
+ // this wont work as the key for TQMap needs to inherit from QObject
if(m_methodMap->contains(type))
return false; // return false, we already have some object with this tag in the list
else
@@ -194,7 +194,7 @@ bool CodeClassField::removeMethod ( CodeAccessorMethod * remove_object ) {
/**
* Get the list of Method objects held by m_methodVector
- * @return QPtrList<CodeMethodBlock *> list of Method objects held by
+ * @return TQPtrList<CodeMethodBlock *> list of Method objects held by
* m_methodVector
*/
CodeAccessorMethodList CodeClassField::getMethodList() {
@@ -231,14 +231,14 @@ CodeClassFieldDeclarationBlock * CodeClassField::getDeclarationCodeBlock( )
/**
* load params from the appropriate XMI element node.
*/
-void CodeClassField::loadFromXMI ( QDomElement & root ) {
+void CodeClassField::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfElem)
+void CodeClassField::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & cfElem)
{
// super class
@@ -265,7 +265,7 @@ void CodeClassField::setAttributesOnNode ( QDomDocument & doc, QDomElement & cfE
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeClassField::setAttributesFromNode ( QDomElement & root) {
+void CodeClassField::setAttributesFromNode ( TQDomElement & root) {
// always disconnect
getParentObject()->disconnect(this);
@@ -283,10 +283,10 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) {
// load accessor methods now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "ccfdeclarationcodeblock" ) {
m_declCodeBlock->loadFromXMI(element);
} else
@@ -314,8 +314,8 @@ void CodeClassField::setAttributesFromNode ( QDomElement & root) {
/**
* Save the XMI representation of this object
*/
-void CodeClassField::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codeclassfield" );
+void CodeClassField::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codeclassfield" );
setAttributesOnNode(doc, docElement);
@@ -326,12 +326,12 @@ int CodeClassField::minimumListOccurances( ) {
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
// ush. IF we had a multiplicty object, this would be much easier.
if(!multi.isEmpty())
{
- QString lowerBoundString = multi.remove(QRegExp("\\.\\.\\d+$"));
- if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(QRegExp("^\\d+$")))
+ TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$"));
+ if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$")))
return lowerBoundString.toInt();
}
@@ -343,12 +343,12 @@ int CodeClassField::maximumListOccurances( ) {
if (!parentIsAttribute())
{
UMLRole * role = dynamic_cast<UMLRole*>(getParentObject());
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
// ush. IF we had a multiplicty object, this would be much easier.
if(!multi.isEmpty())
{
- QString upperBoundString = multi.section(QRegExp("(\\.\\.)"),1);
- if(!upperBoundString.isEmpty() && upperBoundString.contains(QRegExp("^\\d+$")))
+ TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1);
+ if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$")))
return upperBoundString.toInt();
else
return -1; // unbounded
@@ -359,13 +359,13 @@ int CodeClassField::maximumListOccurances( ) {
return 1;
}
-QString CodeClassField::cleanName ( const QString &name ) {
+TQString CodeClassField::cleanName ( const TQString &name ) {
return getParentDocument()->cleanName(name);
}
-QString CodeClassField::fixInitialStringDeclValue(const QString& val, const QString &type)
+TQString CodeClassField::fixInitialStringDeclValue(const TQString& val, const TQString &type)
{
- QString value = val;
+ TQString value = val;
// check for strings only<F2>String value = val;
if (!value.isEmpty() && type == "String") {
if (!value.startsWith("\""))
@@ -391,7 +391,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::Acce
{
//if we already know to which file this class was written/should be written, just return it.
/*
- // argh. this wont work because "accessorType' doesn't inherit from QObject.
+ // argh. this wont work because "accessorType' doesn't inherit from TQObject.
if(m_methodMap->contains(type))
return ((*m_methodMap)[type]);
CodeAccessorMethod * obj = NULL;
@@ -583,10 +583,10 @@ bool CodeClassField::fieldIsSingleValue ( )
if(!role)
return true; // its really an attribute
- QString multi = role->getMultiplicity();
+ TQString multi = role->getMultiplicity();
- if(multi.isEmpty() || multi.contains(QRegExp("^(0|1)$"))
- || multi.contains(QRegExp("^0\\.\\.1$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$"))
+ || multi.contains(TQRegExp("^0\\.\\.1$")))
return true;
return false;
@@ -595,11 +595,11 @@ bool CodeClassField::fieldIsSingleValue ( )
void CodeClassField::initFields(bool inConstructor) {
m_writeOutMethods = false;
- m_listClassName = QString ("");
+ m_listClassName = TQString ("");
m_declCodeBlock = NULL;
m_methodVector.setAutoDelete(false);
- // m_methodMap = new QMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
+ // m_methodMap = new TQMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
if (!inConstructor)
finishInitialization();
@@ -610,7 +610,7 @@ void CodeClassField::finishInitialization() {
initAccessorMethods();
updateContent();
- connect(getParentObject(),SIGNAL(modified()),this,SIGNAL(modified())); // child objects will trigger off this signal
+ connect(getParentObject(),TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); // child objects will trigger off this signal
}
diff --git a/umbrello/umbrello/codeclassfield.h b/umbrello/umbrello/codeclassfield.h
index bd651b6e..d5542bd3 100644
--- a/umbrello/umbrello/codeclassfield.h
+++ b/umbrello/umbrello/codeclassfield.h
@@ -83,7 +83,7 @@ public:
// CodeClassFieldDialog getDialog ( );
// Determine if this cf is attribute or some type of association
- QString getTypeName ( );
+ TQString getTypeName ( );
/**
* @return CodeClassFieldDeclarationBlock representing the declaration statement of this class field
@@ -118,7 +118,7 @@ public:
// get the type of object that will be added/removed from lists
// of objects (as per specification of associations)
- QString getListObjectType();
+ TQString getListObjectType();
/** determine if we will *allow* methods to be viewable.
* this flag is often used to toggle autogeneration of accessor
@@ -149,12 +149,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** Force the syncronization of the content (methods and declarations)
* of this class field.
@@ -171,23 +171,23 @@ protected:
/** a little utility method to make life easier for code document programmers
*/
- QString cleanName(const QString &name);
+ TQString cleanName(const TQString &name);
/** another utility method to make life easier for code document programmers
* this one fixes the initial declared value of string attributes so that if
* its empty or lacking quotations, it comes out as ""
*/
- QString fixInitialStringDeclValue(const QString& val, const QString &type);
+ TQString fixInitialStringDeclValue(const TQString& val, const TQString &type);
// set the list class name
- void setListClassName ( const QString &className );
+ void setListClassName ( const TQString &className );
/**
* Add a Method object to the m_methodVector List
*/
bool addMethod ( CodeAccessorMethod * add );
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Remove a Method object from m_methodVector List
@@ -200,7 +200,7 @@ protected:
private:
- QString m_listClassName;
+ TQString m_listClassName;
ClassFieldType m_classFieldType;
CodeClassFieldDeclarationBlock * m_declCodeBlock;
CodeAccessorMethodList m_methodVector; // the list of methods related to this codeclassfield
@@ -215,12 +215,12 @@ private:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** init class fields */
void initFields(bool inConstructor = false);
diff --git a/umbrello/umbrello/codeclassfielddeclarationblock.cpp b/umbrello/umbrello/codeclassfielddeclarationblock.cpp
index d02a83fa..ba7c6878 100644
--- a/umbrello/umbrello/codeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codeclassfielddeclarationblock.cpp
@@ -86,21 +86,21 @@ void CodeClassFieldDeclarationBlock::forceRelease () {
/**
* Save the XMI representation of this object
*/
-void CodeClassFieldDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & elem)
+void CodeClassFieldDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & elem)
{
- QDomElement docElement = doc.createElement( "ccfdeclarationcodeblock" );
+ TQDomElement docElement = doc.createElement( "ccfdeclarationcodeblock" );
setAttributesOnNode(doc, docElement);
elem.appendChild( docElement );
}
-void CodeClassFieldDeclarationBlock::loadFromXMI ( QDomElement & root )
+void CodeClassFieldDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-void CodeClassFieldDeclarationBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void CodeClassFieldDeclarationBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -111,7 +111,7 @@ void CodeClassFieldDeclarationBlock::setAttributesOnNode (QDomDocument & doc, QD
/**
* load params from the appropriate XMI element node.
*/
-void CodeClassFieldDeclarationBlock::setAttributesFromNode( QDomElement & root ) {
+void CodeClassFieldDeclarationBlock::setAttributesFromNode( TQDomElement & root ) {
// set attributes from the XMI
CodeBlockWithComments::setAttributesFromNode(root); // superclass load
@@ -168,7 +168,7 @@ void CodeClassFieldDeclarationBlock::init (CodeClassField * parentCF)
{
m_parentclassfield = parentCF;
m_canDelete = false;
- connect(m_parentclassfield,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentclassfield,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeclassfielddeclarationblock.moc"
diff --git a/umbrello/umbrello/codeclassfielddeclarationblock.h b/umbrello/umbrello/codeclassfielddeclarationblock.h
index f52868e2..62bfb031 100644
--- a/umbrello/umbrello/codeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codeclassfielddeclarationblock.h
@@ -66,12 +66,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** set the class attributes from a passed object
*/
@@ -84,12 +84,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** this is called by syncToParent
*/
diff --git a/umbrello/umbrello/codeclassfieldlist.h b/umbrello/umbrello/codeclassfieldlist.h
index c9ab4892..14660c2e 100644
--- a/umbrello/umbrello/codeclassfieldlist.h
+++ b/umbrello/umbrello/codeclassfieldlist.h
@@ -12,12 +12,12 @@
#ifndef _CODECLASSFIELDLIST_H
#define _CODECLASSFIELDLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeClassField;
-typedef QPtrList<CodeClassField> CodeClassFieldList;
-typedef QPtrListIterator<CodeClassField> CodeClassFieldListIt;
+typedef TQPtrList<CodeClassField> CodeClassFieldList;
+typedef TQPtrListIterator<CodeClassField> CodeClassFieldListIt;
#endif
diff --git a/umbrello/umbrello/codecomment.cpp b/umbrello/umbrello/codecomment.cpp
index b59e52b4..78873e3d 100644
--- a/umbrello/umbrello/codecomment.cpp
+++ b/umbrello/umbrello/codecomment.cpp
@@ -20,7 +20,7 @@
// Constructors/Destructors
//
-CodeComment::CodeComment (CodeDocument * doc, const QString & comment )
+CodeComment::CodeComment (CodeDocument * doc, const TQString & comment )
: TextBlock ( doc, comment )
{
@@ -43,9 +43,9 @@ CodeComment::~CodeComment ( ) { }
/**
* Save the XMI representation of this object
*/
-void CodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
+void CodeComment::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
kDebug() << "CodeComment::saveToXMI is called!" << endl;
- QDomElement blockElement = doc.createElement( "codecomment" );
+ TQDomElement blockElement = doc.createElement( "codecomment" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -54,7 +54,7 @@ void CodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void CodeComment::loadFromXMI ( QDomElement & root ) {
+void CodeComment::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
diff --git a/umbrello/umbrello/codecomment.h b/umbrello/umbrello/codecomment.h
index 18c2cba0..6f8c7ceb 100644
--- a/umbrello/umbrello/codecomment.h
+++ b/umbrello/umbrello/codecomment.h
@@ -18,7 +18,7 @@
#ifndef CODECOMMENT_H
#define CODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "textblock.h"
@@ -40,7 +40,7 @@ public:
/**
* Empty Constructor
*/
- explicit CodeComment ( CodeDocument * doc, const QString & comment = "");
+ explicit CodeComment ( CodeDocument * doc, const TQString & comment = "");
/**
* Empty Destructor
@@ -50,12 +50,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
diff --git a/umbrello/umbrello/codedocument.cpp b/umbrello/umbrello/codedocument.cpp
index e0bf0e73..f6092f09 100644
--- a/umbrello/umbrello/codedocument.cpp
+++ b/umbrello/umbrello/codedocument.cpp
@@ -18,8 +18,8 @@
#include "codedocument.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
#include <kdebug.h>
// local includes
@@ -63,7 +63,7 @@ CodeDocument::~CodeDocument ( ) {
* Set the value of m_filename
* @param new_var the new value of m_filename
*/
-void CodeDocument::setFileName ( const QString &new_var ) {
+void CodeDocument::setFileName ( const TQString &new_var ) {
m_filename = new_var;
}
@@ -71,7 +71,7 @@ void CodeDocument::setFileName ( const QString &new_var ) {
* Get the value of m_filename
* @return the value of m_filename
*/
-QString CodeDocument::getFileName ( ) const {
+TQString CodeDocument::getFileName ( ) const {
return m_filename;
}
@@ -79,7 +79,7 @@ QString CodeDocument::getFileName ( ) const {
* Set the value of m_filename
* @param new_var the new value of m_filename
*/
-void CodeDocument::setFileExtension ( const QString &new_var ) {
+void CodeDocument::setFileExtension ( const TQString &new_var ) {
m_fileExtension = new_var;
updateHeader(); // because we are using new heading file
}
@@ -88,7 +88,7 @@ void CodeDocument::setFileExtension ( const QString &new_var ) {
* Get the value of m_filename
* @return the value of m_filename
*/
-QString CodeDocument::getFileExtension( ) const {
+TQString CodeDocument::getFileExtension( ) const {
return m_fileExtension;
}
@@ -104,19 +104,19 @@ void CodeDocument::setPackage ( UMLPackage *new_var ) {
* Get the value of path for this code document.
* @return the value of the path
*/
-QString CodeDocument::getPath ( ) {
+TQString CodeDocument::getPath ( ) {
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path = path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
// this allows multiple directory paths (ala Java, some other languages)
// in from the package specification
- path.replace(QRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
+ path.replace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language
// dependant and should probably be commented out.
// Still, as a general default it may be useful -b.t.
return path;
@@ -126,17 +126,17 @@ QString CodeDocument::getPath ( ) {
* Get the value of package name.
* @return the value of m_package->getName()
*/
-QString CodeDocument::getPackage ( ) const {
+TQString CodeDocument::getPackage ( ) const {
if (m_package)
return m_package->getName();
- return QString();
+ return TQString();
}
/**
* Set the value of m_ID
* @param new_var the new value of m_ID
*/
-void CodeDocument::setID ( const QString &new_var ) {
+void CodeDocument::setID ( const TQString &new_var ) {
m_ID = new_var;
}
@@ -144,7 +144,7 @@ void CodeDocument::setID ( const QString &new_var ) {
* Get the value of m_ID
* @return the value of m_ID
*/
-QString CodeDocument::getID ( ) const {
+TQString CodeDocument::getID ( ) const {
return m_ID;
}
@@ -186,16 +186,16 @@ CodeComment * CodeDocument::getHeader ( ) {
// Other methods
//
-QString CodeDocument::getUniqueTag ( const QString& prefix )
+TQString CodeDocument::getUniqueTag ( const TQString& prefix )
{
- QString tag = prefix ;
+ TQString tag = prefix ;
if(tag.isEmpty())
tag += "tblock";
tag = tag + "_0";
int number = lastTagIndex;
for ( ; findTextBlockByTag(tag, true); number++) {
- tag = prefix + '_' + QString::number(number);
+ tag = prefix + '_' + TQString::number(number);
}
lastTagIndex = number;
return tag;
@@ -211,7 +211,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
if(!newBlock || !existingBlock)
return false;
- QString tag = existingBlock->getTag();
+ TQString tag = existingBlock->getTag();
if(!findTextBlockByTag(tag, true))
return false;
@@ -233,7 +233,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo
// if we get here.. it was in this object so insert
// check for tag FIRST
- QString new_tag = newBlock->getTag();
+ TQString new_tag = newBlock->getTag();
// assign a tag if one doesn't already exist
if(new_tag.isEmpty())
@@ -268,7 +268,7 @@ CodeDocumentDialog * CodeDocument::getDialog ( ) {
// Other methods
//
-QString CodeDocument::cleanName ( const QString &name ) {
+TQString CodeDocument::cleanName ( const TQString &name ) {
return CodeGenerator::cleanName(name);
}
@@ -276,12 +276,12 @@ QString CodeDocument::cleanName ( const QString &name ) {
void CodeDocument::updateHeader () {
//try to find a heading file (license, coments, etc) then extract its text
- QString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension());
+ TQString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension());
- headingText.replace(QRegExp("%filename%"),getFileName()+getFileExtension());
- headingText.replace(QRegExp("%filepath%"),getPath());
- headingText.replace( QRegExp("%time%"), QTime::currentTime().toString());
- headingText.replace( QRegExp("%date%"), QDate::currentDate().toString());
+ headingText.replace(TQRegExp("%filename%"),getFileName()+getFileExtension());
+ headingText.replace(TQRegExp("%filepath%"),getPath());
+ headingText.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
+ headingText.replace( TQRegExp("%date%"), TQDate::currentDate().toString());
getHeader()->setText(headingText);
@@ -297,14 +297,14 @@ void CodeDocument::updateHeader () {
* create the string representation of this object.
* @return QString
*/
-QString CodeDocument::toString ( ) {
+TQString CodeDocument::toString ( ) {
// IF the whole document is turned "Off" then don't bother
// checking individual code blocks, just send back empty string
if(!getWriteOutCode())
- return QString("");
+ return TQString("");
- QString content = getHeader()->toString();
+ TQString content = getHeader()->toString();
// update the time/date
@@ -313,7 +313,7 @@ QString CodeDocument::toString ( ) {
for (TextBlock *c = items->first(); c; c = items->next())
{
if(c->getWriteOutText()) {
- QString str = c->toString();
+ TQString str = c->toString();
if(!str.isEmpty())
content.append(str);
}
@@ -334,14 +334,14 @@ void CodeDocument::resetTextBlocks() {
/**
* load params from the appropriate XMI element node.
*/
-void CodeDocument::loadFromXMI ( QDomElement & root ) {
+void CodeDocument::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void CodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -359,7 +359,7 @@ void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docEl
// set the a header
// which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getHeader()->saveToXMI(doc, commElement); // comment
docElement.appendChild( commElement);
@@ -372,15 +372,15 @@ void CodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docEl
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeDocument::setAttributesFromNode ( QDomElement & root) {
+void CodeDocument::setAttributesFromNode ( TQDomElement & root) {
// now set local attributes
setFileName(root.attribute("fileName",""));
setFileExtension(root.attribute("fileExt",""));
- QString pkgStr = root.attribute("package","");
+ TQString pkgStr = root.attribute("package","");
if (!pkgStr.isEmpty() && pkgStr != "-1") {
UMLDoc *umldoc = UMLApp::app()->getDocument();
- if (pkgStr.contains( QRegExp("\\D") )) {
+ if (pkgStr.contains( TQRegExp("\\D") )) {
// suspecting pre-1.5.3 file format where the package name was
// saved instead of the package ID.
UMLObject *o = umldoc->findUMLObject(pkgStr);
@@ -396,13 +396,13 @@ void CodeDocument::setAttributesFromNode ( QDomElement & root) {
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getHeader()->loadFromXMI(celem);
break;
}
@@ -417,8 +417,8 @@ void CodeDocument::setAttributesFromNode ( QDomElement & root) {
/**
* Save the XMI representation of this object
*/
-void CodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codedocument" );
+void CodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codedocument" );
setAttributesOnNode(doc, docElement);
@@ -454,17 +454,17 @@ HierarchicalCodeBlock * CodeDocument::newHierarchicalCodeBlock ( ) {
return hb;
}
-void CodeDocument::removeChildTagFromMap ( const QString &tag )
+void CodeDocument::removeChildTagFromMap ( const TQString &tag )
{
m_childTextBlockTagMap.erase(tag);
}
-void CodeDocument::addChildTagToMap ( const QString &tag, TextBlock * tb)
+void CodeDocument::addChildTagToMap ( const TQString &tag, TextBlock * tb)
{
m_childTextBlockTagMap.insert(tag, tb);
}
-TextBlock * CodeDocument::findTextBlockByTag( const QString &tag , bool descendIntoChildren)
+TextBlock * CodeDocument::findTextBlockByTag( const TQString &tag , bool descendIntoChildren)
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.contains(tag))
@@ -481,8 +481,8 @@ void CodeDocument::initDoc () {
m_writeOutCode = true;
m_package = NULL;
- m_fileExtension = QString("");
- m_ID = QString(""); // leave with NO ID as a default
+ m_fileExtension = TQString("");
+ m_ID = TQString(""); // leave with NO ID as a default
//m_textblockVector.setAutoDelete(false);
@@ -494,7 +494,7 @@ void CodeDocument::initDoc () {
}
-TextBlock * CodeDocument::findCodeClassFieldTextBlockByTag ( const QString &tag ) {
+TextBlock * CodeDocument::findCodeClassFieldTextBlockByTag ( const TQString &tag ) {
kWarning()<<"Called findCodeClassFieldMethodByTag("<<tag<<") for a regular CodeDocument"<<endl;
return (TextBlock *) NULL;
}
diff --git a/umbrello/umbrello/codedocument.h b/umbrello/umbrello/codedocument.h
index 609b70c6..96e75ada 100644
--- a/umbrello/umbrello/codedocument.h
+++ b/umbrello/umbrello/codedocument.h
@@ -17,9 +17,9 @@
#ifndef CODEDOCUMENT_H
#define CODEDOCUMENT_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "codegenerationpolicy.h"
#include "codegenobjectwithtextblocks.h"
@@ -42,7 +42,7 @@ class UMLPackage;
// "friend" status is needed for HBlock so it may call addChildTagToMap which
// is protected.
-class CodeDocument : public QObject, public CodeGenObjectWithTextBlocks
+class CodeDocument : public TQObject, public CodeGenObjectWithTextBlocks
{
friend class HierarchicalCodeBlock;
Q_OBJECT
@@ -75,26 +75,26 @@ public:
* Set the value of m_fileExtension
* @param new_var the new value of m_fileExtension
*/
- void setFileExtension ( const QString &new_var );
+ void setFileExtension ( const TQString &new_var );
/**
* Get the value of m_fileExtension
* @return the value of m_fileExtension
*/
- QString getFileExtension ( ) const;
+ TQString getFileExtension ( ) const;
/**
* Set the complete value (name plus any extension) of m_filename
* @param new_var the new value of m_filename
*/
- void setFileName ( const QString &new_var );
+ void setFileName ( const TQString &new_var );
/**
* Get the value of m_filename. This name is the "complete" filename,
* meaning that it contains both the file name plus any extension (e.g. "file.cpp")
* @return the value of m_filename
*/
- QString getFileName ( ) const;
+ TQString getFileName ( ) const;
/**
* Set the value of m_package
@@ -106,25 +106,25 @@ public:
* Get the value of the package of this codedocument.
* @return the value of m_pathName
*/
- QString getPackage ( ) const;
+ TQString getPackage ( ) const;
/**
* Get the value of the path to this codedocument.
* @return the value of m_pathName
*/
- virtual QString getPath ( );
+ virtual TQString getPath ( );
/**
* Set the value of m_ID
* @param new_id the new value of m_ID
*/
- void setID ( const QString &new_id);
+ void setID ( const TQString &new_id);
/**
* Get the value of m_ID
* @return the value of m_ID
*/
- QString getID ( ) const;
+ TQString getID ( ) const;
/**
* Set the value of m_writeOutCode
@@ -163,23 +163,23 @@ public:
* find the TextBlock with such a tag. If descendIntoChildren is true, then
* any child hierarchical textblocks will also be searched for a match.
*/
- TextBlock * findTextBlockByTag( const QString &tag , bool descendIntoChildren = false);
+ TextBlock * findTextBlockByTag( const TQString &tag , bool descendIntoChildren = false);
/**
* create the string representation of this object.
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* create a new CodeBlock object belonging to this CodeDocument.
@@ -200,11 +200,11 @@ public:
virtual CodeBlockWithComments * newCodeBlockWithComments ( );
// return a unique, and currently unallocated, text block tag for this document
- virtual QString getUniqueTag( const QString& prefix = QString("") );
+ virtual TQString getUniqueTag( const TQString& prefix = TQString("") );
/** a little utility method to make life easier for the code document programmer
*/
- QString cleanName ( const QString &name );
+ TQString cleanName ( const TQString &name );
// Cause this code document to synchronize to current generator policy
virtual void synchronize();
@@ -215,20 +215,20 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
// these next 2 are needed by child hierarchical code blocks so
// that when they call getUniqueTag, we really get a unique tag
// Also, it allows 'findTextBlockByTag' To find any tagged text block
// anywhere in the document, whether directly owned by the document OR
// by some child hierarchical textblock
- void addChildTagToMap ( const QString &tag, TextBlock * tb);
- void removeChildTagFromMap ( const QString &tag );
+ void addChildTagToMap ( const TQString &tag, TextBlock * tb);
+ void removeChildTagFromMap ( const TQString &tag );
// update the header text of this codedocument
void updateHeader ();
@@ -243,15 +243,15 @@ protected:
// have to implement this for CodeObjectWithTextBlocks
// doenst actually do anythying fo ra vannilla code document
- virtual TextBlock * findCodeClassFieldTextBlockByTag( const QString &tag );
+ virtual TextBlock * findCodeClassFieldTextBlockByTag( const TQString &tag );
private:
int lastTagIndex;
- QString m_filename;
- QString m_fileExtension;
- QString m_ID;
- QString m_pathName;
+ TQString m_filename;
+ TQString m_fileExtension;
+ TQString m_ID;
+ TQString m_pathName;
UMLPackage *m_package;
bool m_writeOutCode; // Whether or not to write out this code document
@@ -263,10 +263,10 @@ private:
void initDoc ( ) ;
// TextBlockList m_textblockVector;
- // QMap<QString, TextBlock *> m_textBlockTagMap;
+ // TQMap<TQString, TextBlock *> m_textBlockTagMap;
// for recording all of the textblocks held by child hierarchical codeblocks
- QMap<QString, TextBlock *> m_childTextBlockTagMap;
+ TQMap<TQString, TextBlock *> m_childTextBlockTagMap;
};
diff --git a/umbrello/umbrello/codedocumentlist.h b/umbrello/umbrello/codedocumentlist.h
index 7cb28a72..9264a996 100644
--- a/umbrello/umbrello/codedocumentlist.h
+++ b/umbrello/umbrello/codedocumentlist.h
@@ -12,12 +12,12 @@
#ifndef _CODEDOCUMENTLIST_H
#define _CODEDOCUMENTLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class CodeDocument;
-typedef QPtrList<CodeDocument> CodeDocumentList;
-typedef QPtrListIterator<CodeDocument> CodeDocumentListIt;
+typedef TQPtrList<CodeDocument> CodeDocumentList;
+typedef TQPtrListIterator<CodeDocument> CodeDocumentListIt;
#endif
diff --git a/umbrello/umbrello/codegenerationpolicy.cpp b/umbrello/umbrello/codegenerationpolicy.cpp
index df84e837..5f7b9824 100644
--- a/umbrello/umbrello/codegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerationpolicy.cpp
@@ -21,10 +21,10 @@
#include <cstdlib> //to get the user name
// qt includes
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
// kde includes
#include <kconfig.h>
@@ -206,7 +206,7 @@ bool CodeGenerationPolicy::getCodeVerboseDocumentComments ( ) const {
* location of the header file template.
* @param new_var the new value of m_headingFileDir
*/
-void CodeGenerationPolicy::setHeadingFileDir ( const QString & path) {
+void CodeGenerationPolicy::setHeadingFileDir ( const TQString & path) {
m_headingFiles.setPath(path);
}
@@ -215,7 +215,7 @@ void CodeGenerationPolicy::setHeadingFileDir ( const QString & path) {
* location of the header file template.
* @return the value of m_headingFileDir
*/
-QString CodeGenerationPolicy::getHeadingFileDir ( ) const {
+TQString CodeGenerationPolicy::getHeadingFileDir ( ) const {
return m_headingFiles.absPath();
}
@@ -241,7 +241,7 @@ bool CodeGenerationPolicy::getIncludeHeadings ( ) const {
* location of where output files will go.
* @param new_var the new value of m_outputDirectory
*/
-void CodeGenerationPolicy::setOutputDirectory ( QDir new_var ) {
+void CodeGenerationPolicy::setOutputDirectory ( TQDir new_var ) {
m_outputDirectory = new_var;
}
@@ -250,7 +250,7 @@ void CodeGenerationPolicy::setOutputDirectory ( QDir new_var ) {
* location of where output files will go.
* @return the value of m_outputDirectory
*/
-QDir CodeGenerationPolicy::getOutputDirectory ( ) {
+TQDir CodeGenerationPolicy::getOutputDirectory ( ) {
return m_outputDirectory;
}
@@ -263,14 +263,14 @@ void CodeGenerationPolicy::setLineEndingType ( NewLineType type) {
m_lineEndingType = type;
switch (m_lineEndingType) {
case MAC:
- m_lineEndingChars = QString("\r\n");
+ m_lineEndingChars = TQString("\r\n");
break;
case DOS:
- m_lineEndingChars = QString("\r");
+ m_lineEndingChars = TQString("\r");
break;
case UNIX:
default:
- m_lineEndingChars = QString("\n");
+ m_lineEndingChars = TQString("\n");
break;
}
emit modifiedCodeContent();
@@ -287,7 +287,7 @@ CodeGenerationPolicy::NewLineType CodeGenerationPolicy::getLineEndingType ( ) {
/** Utility function to get the actual characters.
*/
-QString CodeGenerationPolicy::getNewLineEndingChars ( ) const {
+TQString CodeGenerationPolicy::getNewLineEndingChars ( ) const {
return m_lineEndingChars;
}
@@ -323,22 +323,22 @@ int CodeGenerationPolicy::getIndentationAmount ( ) {
* Utility method to get the amount (and type of whitespace) to indent with.
* @return the value of the indentation
*/
-QString CodeGenerationPolicy::getIndentation ( ) const {
+TQString CodeGenerationPolicy::getIndentation ( ) const {
return m_indentation;
}
void CodeGenerationPolicy::calculateIndentation ( ) {
- QString indent = "";
+ TQString indent = "";
m_indentation = "";
switch (m_indentationType) {
case NONE:
break;
case TAB:
- indent = QString("\t");
+ indent = TQString("\t");
break;
default:
case SPACE:
- indent = QString(" ");
+ indent = TQString(" ");
break;
}
@@ -401,7 +401,7 @@ CodeGenerationPolicy::ScopePolicy CodeGenerationPolicy::getAssociationFieldScope
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * CodeGenerationPolicy::createPage ( QWidget *pWidget, const char *name ) {
+CodeGenerationPolicyPage * CodeGenerationPolicy::createPage ( TQWidget *pWidget, const char *name ) {
return new CodeGenerationPolicyPage ( pWidget, name, 0 );
}
@@ -462,10 +462,10 @@ void CodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSignal)
setIndentationType( (IndentationType) config->readNumEntry("indentationType",defaultIndentType()) );
setIndentationAmount( config->readNumEntry("indentationAmount",defaultIndentAmount()));
- QString path = config -> readPathEntry("outputDirectory");
+ TQString path = config -> readPathEntry("outputDirectory");
if(path.isEmpty())
- path = QDir::homeDirPath() + "/uml-generated-code/";
- setOutputDirectory ( QDir (path) );
+ path = TQDir::homeDirPath() + "/uml-generated-code/";
+ setOutputDirectory ( TQDir (path) );
path = config -> readPathEntry("headingsDirectory");
if(path.isEmpty()) {
@@ -510,20 +510,20 @@ void CodeGenerationPolicy::writeConfig (KConfig * config) {
}
// return the actual text
-QString CodeGenerationPolicy::getHeadingFile(const QString& str) {
+TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) {
if(!getIncludeHeadings() || str.isEmpty())
- return QString("");
+ return TQString("");
if(str.contains(" ") ||str.contains(";")) {
kWarning() << "File folder must not have spaces or semi colons!" << endl;
- return QString("");
+ return TQString("");
}
//if we only get the extension, then we look for the default
// heading.[extension]. If there is no such file, we try to
// get any file with the same extension
- QString filename;
+ TQString filename;
if(str.startsWith(".")) {
- if(QFile::exists(m_headingFiles.absFilePath("heading"+str)))
+ if(TQFile::exists(m_headingFiles.absFilePath("heading"+str)))
filename = m_headingFiles.absFilePath("heading"+str);
else {
m_headingFiles.setNameFilter('*' + str);
@@ -535,24 +535,24 @@ QString CodeGenerationPolicy::getHeadingFile(const QString& str) {
filename = m_headingFiles.absFilePath(str);
}
- QFile f(filename);
+ TQFile f(filename);
if(!f.open(IO_ReadOnly)) {
// kWarning() << "Error opening heading file: " << f.name() << endl;
// kWarning() << "Headings directory was " << m_headingFiles.absPath() << endl;
- return QString("");
+ return TQString("");
}
- QTextStream ts(&f);
- QString retstr = QString("");
- QString endLine = getNewLineEndingChars();
+ TQTextStream ts(&f);
+ TQString retstr = TQString("");
+ TQString endLine = getNewLineEndingChars();
for(int l = 0; l < MAXLINES && !ts.atEnd(); l++)
retstr += ts.readLine()+endLine;
//do variable substitution
- retstr.replace( QRegExp("%author%"),QString(getenv("USER"))); //get the user name from some where else
- retstr.replace( QRegExp("%headingpath%"),filename );
- retstr.replace( QRegExp("%time%"), QTime::currentTime().toString());
- retstr.replace( QRegExp("%date%"), QDate::currentDate().toString());
+ retstr.replace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else
+ retstr.replace( TQRegExp("%headingpath%"),filename );
+ retstr.replace( TQRegExp("%time%"), TQTime::currentTime().toString());
+ retstr.replace( TQRegExp("%date%"), TQDate::currentDate().toString());
// the replace filepath, time parts are also in the code document updateHeader method
// (which is not a virtual function)...
@@ -576,8 +576,8 @@ void CodeGenerationPolicy::initFields ( ) {
m_associationFieldScope = defaultAssocFieldScope();
m_commentStyle = defaultCommentStyle();
- m_outputDirectory.setPath(QDir::home().absPath() + "/uml-generated-code/");
- m_headingFiles.setPath(QDir::home().absPath() + "/headings/");
+ m_outputDirectory.setPath(TQDir::home().absPath() + "/uml-generated-code/");
+ m_headingFiles.setPath(TQDir::home().absPath() + "/headings/");
calculateIndentation();
diff --git a/umbrello/umbrello/codegenerationpolicy.h b/umbrello/umbrello/codegenerationpolicy.h
index 3293ec6c..eca23d66 100644
--- a/umbrello/umbrello/codegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerationpolicy.h
@@ -19,9 +19,9 @@
#ifndef CODEGENERATIONPOLICY_H
#define CODEGENERATIONPOLICY_H
-#include <qobject.h>
-#include <qdir.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqdir.h>
+#include <tqdom.h>
class QWidget;
class KConfig;
@@ -32,7 +32,7 @@ class CodeGenerationPolicyPage;
* This class describes the code generation policy for this project.
*/
-class CodeGenerationPolicy : public QObject {
+class CodeGenerationPolicy : public TQObject {
Q_OBJECT
public:
@@ -158,14 +158,14 @@ public:
* location of the header file template.
* @param path the new path of m_headingFileDir
*/
- void setHeadingFileDir ( const QString & path);
+ void setHeadingFileDir ( const TQString & path);
/**
* Get the value of m_headingFileDir
* location of the header file template.
* @return the value of m_headingFileDir
*/
- QString getHeadingFileDir ( ) const;
+ TQString getHeadingFileDir ( ) const;
/**
@@ -186,14 +186,14 @@ public:
* location of where output files will go.
* @param new_var the new value of m_outputDirectory
*/
- void setOutputDirectory ( QDir new_var );
+ void setOutputDirectory ( TQDir new_var );
/**
* Get the value of m_outputDirectory
* location of where output files will go.
* @return the value of m_outputDirectory
*/
- QDir getOutputDirectory ( );
+ TQDir getOutputDirectory ( );
/**
* Set the value of m_lineEndingType
@@ -211,7 +211,7 @@ public:
/** Utility function to get the actual characters.
*/
- QString getNewLineEndingChars ( ) const;
+ TQString getNewLineEndingChars ( ) const;
/**
* Set the value of m_indentationType
@@ -235,7 +235,7 @@ public:
* The amount and type of whitespace to indent with.
* @return the value of m_indentationType
*/
- QString getIndentation ( ) const;
+ TQString getIndentation ( ) const;
/**
* Set the value of m_modifyPolicy
@@ -289,7 +289,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- virtual CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ virtual CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
/**
* Gets the heading file (as a string) to be inserted at the
@@ -306,7 +306,7 @@ public:
* %time%
* %filepath%
*/
- QString getHeadingFile(const QString& str);
+ TQString getHeadingFile(const TQString& str);
/**
* set the defaults for this code generator from the passed generator.
@@ -357,9 +357,9 @@ protected:
//code would normally be created at that point in the file.
bool m_codeVerboseDocumentComments;
- QDir m_headingFiles; // location of the header file template.
+ TQDir m_headingFiles; // location of the header file template.
bool m_includeHeadings;
- QDir m_outputDirectory; // location of where output files will go.
+ TQDir m_outputDirectory; // location of where output files will go.
NewLineType m_lineEndingType; // What type of line ending characters to use.
IndentationType m_indentationType; // The amount and type of whitespace to indent with.
int m_indentationAmount; // The amount of units to indent with.
@@ -370,8 +370,8 @@ protected:
ScopePolicy m_associationFieldScope;
// these 2 private fields 'cache' the string values of other fields we may frequently call for
- QString m_lineEndingChars;
- QString m_indentation;
+ TQString m_lineEndingChars;
+ TQString m_indentation;
void calculateIndentation ( );
diff --git a/umbrello/umbrello/codegenerator.cpp b/umbrello/umbrello/codegenerator.cpp
index a8c2ae23..a5b24cee 100644
--- a/umbrello/umbrello/codegenerator.cpp
+++ b/umbrello/umbrello/codegenerator.cpp
@@ -21,10 +21,10 @@
#include <cstdlib> //to get the user name
// qt includes
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqtextstream.h>
// kde includes
#include <kdebug.h>
@@ -55,15 +55,15 @@
//
CodeGenerator::CodeGenerator ()
- : QObject (UMLApp::app()->getDocument())
+ : TQObject (UMLApp::app()->getDocument())
{
initFields();
}
// FIX
// hmm. this should be pure virtual so that implemented in sub-class
-CodeGenerator::CodeGenerator (QDomElement & element )
- : QObject (UMLApp::app()->getDocument()) {
+CodeGenerator::CodeGenerator (TQDomElement & element )
+ : TQObject (UMLApp::app()->getDocument()) {
initFields();
loadFromXMI(element); // hmm. cant call this here.. its 'pure' virtual
}
@@ -85,10 +85,10 @@ CodeGenerator::~CodeGenerator ( ) {
// Accessor methods
//
-QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
+TQString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
{
- QString id = codeDoc->getID();
+ TQString id = codeDoc->getID();
// does this document already exist? then just return its present id
if (!id.isEmpty() && findCodeDocumentByID(id))
@@ -101,11 +101,11 @@ QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
id = ID2STR(c->getID()); // this is supposed to be unique already..
} else {
- QString prefix = "doc";
- QString id = prefix + "_0";
+ TQString prefix = "doc";
+ TQString id = prefix + "_0";
int number = lastIDIndex;
for ( ; findCodeDocumentByID(id); number++) {
- id = prefix + '_' + QString::number(number);
+ id = prefix + '_' + TQString::number(number);
}
lastIDIndex = number;
}
@@ -113,7 +113,7 @@ QString CodeGenerator::getUniqueID(CodeDocument * codeDoc)
return id;
}
-CodeDocument * CodeGenerator::findCodeDocumentByID( const QString &tag ) {
+CodeDocument * CodeGenerator::findCodeDocumentByID( const TQString &tag ) {
//if we already know to which file this class was written/should be written, just return it.
CodeDocument * doc = (CodeDocument*)NULL;
if((doc = m_codeDocumentDictionary.find(tag)))
@@ -124,7 +124,7 @@ CodeDocument * CodeGenerator::findCodeDocumentByID( const QString &tag ) {
bool CodeGenerator::addCodeDocument ( CodeDocument * doc )
{
- QString tag = doc->getID();
+ TQString tag = doc->getID();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -146,7 +146,7 @@ bool CodeGenerator::addCodeDocument ( CodeDocument * doc )
* Remove a CodeDocument object from m_codedocumentVector List
*/
bool CodeGenerator::removeCodeDocument ( CodeDocument * remove_object ) {
- QString tag = remove_object->getID();
+ TQString tag = remove_object->getID();
if(!(tag.isEmpty()))
m_codeDocumentDictionary.remove(tag);
else
@@ -158,7 +158,7 @@ bool CodeGenerator::removeCodeDocument ( CodeDocument * remove_object ) {
/**
* Get the list of CodeDocument objects held by m_codedocumentVector
- * @return QPtrList<CodeDocument *> list of CodeDocument objects held by
+ * @return TQPtrList<CodeDocument *> list of CodeDocument objects held by
* m_codedocumentVector
*/
CodeDocumentList * CodeGenerator::getCodeDocumentList ( ) {
@@ -166,7 +166,7 @@ CodeDocumentList * CodeGenerator::getCodeDocumentList ( ) {
}
// the vanilla version
-CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
return new CodeViewerDialog(parent, doc, state);
@@ -175,31 +175,31 @@ CodeViewerDialog * CodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDoc
// Other methods
//
-void CodeGenerator::loadFromXMI (QDomElement & qElement ) {
+void CodeGenerator::loadFromXMI (TQDomElement & qElement ) {
// don't do anything for simple (compatability) code generators
if(dynamic_cast<SimpleCodeGenerator*>(this))
return;
//now look for our particular child element
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
- QString langType = Model_Utils::progLangToString( getLanguage() );
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
+ TQString langType = Model_Utils::progLangToString( getLanguage() );
if (qElement.tagName() != "codegenerator"
|| qElement.attribute("language", "UNKNOWN") != langType)
return;
// got our code generator element, now load
// codedocuments
- QDomNode codeDocNode = qElement.firstChild();
- QDomElement codeDocElement = codeDocNode.toElement();
+ TQDomNode codeDocNode = qElement.firstChild();
+ TQDomElement codeDocElement = codeDocNode.toElement();
while( !codeDocElement.isNull() ) {
- QString docTag = codeDocElement.tagName();
+ TQString docTag = codeDocElement.tagName();
if( docTag == "codedocument" ||
docTag == "classifiercodedocument"
) {
- QString id = codeDocElement.attribute( "id", "-1" );
+ TQString id = codeDocElement.attribute( "id", "-1" );
CodeDocument * codeDoc = findCodeDocumentByID(id);
if(codeDoc)
codeDoc->loadFromXMI(codeDocElement);
@@ -214,9 +214,9 @@ void CodeGenerator::loadFromXMI (QDomElement & qElement ) {
}
}
-void CodeGenerator::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QString langType = Model_Utils::progLangToString( getLanguage() );
- QDomElement docElement = doc.createElement( "codegenerator" );
+void CodeGenerator::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQString langType = Model_Utils::progLangToString( getLanguage() );
+ TQDomElement docElement = doc.createElement( "codegenerator" );
docElement.setAttribute("language",langType);
CodeDocumentList * docList = getCodeDocumentList();
@@ -343,11 +343,11 @@ void CodeGenerator::writeListedCodeDocsToFile ( CodeDocumentList * docs ) {
// we only write the document, if so requested
if(doc->getWriteOutCode())
{
- QString filename = findFileName(doc);
+ TQString filename = findFileName(doc);
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( openFile(file,filename) ) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream<<doc->toString()<<endl;
file.close();
codeGenSuccess = true; // we wrote the code OK
@@ -377,7 +377,7 @@ CodeDocument * CodeGenerator::newCodeDocument ( ) {
* @param file
*/
-QString CodeGenerator::getHeadingFile( const QString &file ) {
+TQString CodeGenerator::getHeadingFile( const TQString &file ) {
return UMLApp::app()->getCommonPolicy()->getHeadingFile(file);
}
@@ -386,11 +386,11 @@ QString CodeGenerator::getHeadingFile( const QString &file ) {
* @param codeDoc
* @param name
*/
-QString CodeGenerator::overwritableName(const QString& name, const QString &extension ) {
+TQString CodeGenerator::overwritableName(const TQString& name, const TQString &extension ) {
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QDir outputDirectory = pol->getOutputDirectory();
- QString filename = name + extension;
+ TQDir outputDirectory = pol->getOutputDirectory();
+ TQString filename = name + extension;
if (!outputDirectory.exists(filename)) {
return filename;
@@ -416,7 +416,7 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
case KDialogBase::No: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + extension;
+ filename = name + "__" + TQString::number(suffix) + extension;
if (!outputDirectory.exists(filename))
break;
suffix++;
@@ -433,7 +433,7 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
} else {
m_applyToAllRemaining = false;
}
- return QString();
+ return TQString();
break;
}
@@ -441,14 +441,14 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
case CodeGenerationPolicy::Never: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + extension;
+ filename = name + "__" + TQString::number(suffix) + extension;
if (!outputDirectory.exists(filename))
break;
suffix++;
}
break;
case CodeGenerationPolicy::Cancel: //don't output anything
- return QString();
+ return TQString();
break;
}
@@ -461,13 +461,13 @@ QString CodeGenerator::overwritableName(const QString& name, const QString &exte
* @param file
* @param name
*/
-bool CodeGenerator::openFile (QFile & file, const QString &fileName ) {
+bool CodeGenerator::openFile (TQFile & file, const TQString &fileName ) {
//open files for writing.
if(fileName.isEmpty()) {
kWarning() << "cannot find a file name" << endl;
return false;
} else {
- QDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
+ TQDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
file.setName(outputDirectory.absFilePath(fileName));
if(!file.open(IO_WriteOnly)) {
KMessageBox::sorry(0,i18n("Cannot open file %1 for writing. Please make sure the folder exists and you have permissions to write to it.").arg(file.name()),i18n("Cannot Open File"));
@@ -483,23 +483,23 @@ bool CodeGenerator::openFile (QFile & file, const QString &fileName ) {
* @return QString
* @param name
*/
-QString CodeGenerator::cleanName ( const QString &name ) {
- QString retval = name;
- retval.replace(QRegExp("\\W"), "_");
+TQString CodeGenerator::cleanName ( const TQString &name ) {
+ TQString retval = name;
+ retval.replace(TQRegExp("\\W"), "_");
return retval;
}
-QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
+TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
//else, determine the "natural" file name
- QString name;
+ TQString name;
// Get the path name
- QString path = codeDocument->getPath();
+ TQString path = codeDocument->getPath();
// if path is given add this as a directory to the file name
if (!path.isEmpty()) {
- path.replace(QRegExp("::"), "/"); // Simple hack!
+ path.replace(TQRegExp("::"), "/"); // Simple hack!
name = path + '/' + codeDocument->getFileName();
path = '/' + path;
} else {
@@ -507,22 +507,22 @@ QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
// Convert all "::" to "/" : Platform-specific path separator
- name.replace(QRegExp("::"), "/"); // Simple hack!
+ name.replace(TQRegExp("::"), "/"); // Simple hack!
// if a path name exists check the existence of the path directory
if (!path.isEmpty()) {
- QDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
- QDir pathDir(outputDirectory.absPath() + path);
+ TQDir outputDirectory = UMLApp::app()->getCommonPolicy()->getOutputDirectory();
+ TQDir pathDir(outputDirectory.absPath() + path);
// does our complete output directory exist yet? if not, try to create it
if (!pathDir.exists())
{
// ugh. dir separator here is UNIX specific..
- QStringList dirs = QStringList::split("/",pathDir.absPath());
- QString currentDir = "";
+ TQStringList dirs = TQStringList::split("/",pathDir.absPath());
+ TQString currentDir = "";
- QStringList::iterator end(dirs.end());
- for (QStringList::iterator dir(dirs.begin()); dir != end; ++dir)
+ TQStringList::iterator end(dirs.end());
+ for (TQStringList::iterator dir(dirs.begin()); dir != end; ++dir)
{
currentDir += '/' + *dir;
if (! (pathDir.exists(currentDir)
@@ -539,7 +539,7 @@ QString CodeGenerator::findFileName ( CodeDocument * codeDocument ) {
}
name.simplifyWhiteSpace();
- name.replace(QRegExp(" "),"_");
+ name.replace(TQRegExp(" "),"_");
return overwritableName( name, codeDocument->getFileExtension() );
}
@@ -627,14 +627,14 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
* @param lineprefix
* @param linewidth
*/
-QString CodeGenerator::formatDoc(const QString &text, const QString &linePrefix, int lineWidth) {
- QString output;
-
- const QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QStringList lines = QStringList::split(endLine, text);
- for (QStringList::ConstIterator lit = lines.begin(); lit != lines.end(); ++lit) {
- QString input = *lit;
- input.remove( QRegExp("\\s+$") );
+TQString CodeGenerator::formatDoc(const TQString &text, const TQString &linePrefix, int lineWidth) {
+ TQString output;
+
+ const TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQStringList lines = TQStringList::split(endLine, text);
+ for (TQStringList::ConstIterator lit = lines.begin(); lit != lines.end(); ++lit) {
+ TQString input = *lit;
+ input.remove( TQRegExp("\\s+$") );
if (input.length() < (uint)lineWidth) {
output += linePrefix + input + endLine;
continue;
@@ -669,13 +669,13 @@ void CodeGenerator::initFields() {
void CodeGenerator::connect_newcodegen_slots() {
UMLDoc *doc = UMLApp::app()->getDocument();
- connect(doc, SIGNAL(sigObjectCreated(UMLObject*)),
- this, SLOT(checkAddUMLObject(UMLObject*)));
- connect(doc, SIGNAL(sigObjectRemoved(UMLObject*)),
- this, SLOT(checkRemoveUMLObject(UMLObject*)));
+ connect(doc, TQT_SIGNAL(sigObjectCreated(UMLObject*)),
+ this, TQT_SLOT(checkAddUMLObject(UMLObject*)));
+ connect(doc, TQT_SIGNAL(sigObjectRemoved(UMLObject*)),
+ this, TQT_SLOT(checkRemoveUMLObject(UMLObject*)));
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- connect(commonPolicy, SIGNAL(modifiedCodeContent()),
- this, SLOT(syncCodeToDocument()));
+ connect(commonPolicy, TQT_SIGNAL(modifiedCodeContent()),
+ this, TQT_SLOT(syncCodeToDocument()));
}
// these are utility methods for accessing the default
@@ -697,20 +697,20 @@ bool CodeGenerator::forceSections() const {
return UMLApp::app()->getCommonPolicy()->getCodeVerboseSectionComments();
}
-QStringList CodeGenerator::defaultDatatypes() {
- return QStringList();
+TQStringList CodeGenerator::defaultDatatypes() {
+ return TQStringList();
//empty by default, override in your code generator
}
-bool CodeGenerator::isReservedKeyword(const QString & keyword) {
+bool CodeGenerator::isReservedKeyword(const TQString & keyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
return keywords.contains(keyword);
}
-const QStringList CodeGenerator::reservedKeywords() const {
- static QStringList emptyList;
+const TQStringList CodeGenerator::reservedKeywords() const {
+ static TQStringList emptyList;
return emptyList;
}
diff --git a/umbrello/umbrello/codegenerator.h b/umbrello/umbrello/codegenerator.h
index 0928dbba..d47fd73f 100644
--- a/umbrello/umbrello/codegenerator.h
+++ b/umbrello/umbrello/codegenerator.h
@@ -19,8 +19,8 @@
#ifndef CODEGENERATOR_H
#define CODEGENERATOR_H
-#include <qdict.h>
-#include <qdir.h>
+#include <tqdict.h>
+#include <tqdir.h>
#include "codegenerators/codegenpolicyext.h"
#include "codegenerationpolicy.h"
@@ -79,7 +79,7 @@ class KConfig;
*/
-class CodeGenerator : public QObject {
+class CodeGenerator : public TQObject {
Q_OBJECT
public:
@@ -102,7 +102,7 @@ public:
* @return CodeGenerator
* @param element an element from an XMI document
*/
- CodeGenerator (QDomElement & element );
+ CodeGenerator (TQDomElement & element );
/**
* Empty Destructor
@@ -142,18 +142,18 @@ public:
CodeDocumentList * getCodeDocumentList ( );
// get a unique id for this codedocument
- QString getUniqueID ( CodeDocument * codeDoc );
+ TQString getUniqueID ( CodeDocument * codeDoc );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* Find a code document by the given id string.
* @return CodeDocument
*/
- CodeDocument * findCodeDocumentByID (const QString &id );
+ CodeDocument * findCodeDocumentByID (const TQString &id );
/**
* Write out all code documents to file as appropriate.
@@ -175,8 +175,8 @@ public:
void setIncludeHeadings(bool i);
bool includeHeadings() const;
- void setHeadingFileDir(const QString &);
- QString headingFileDir() const;
+ void setHeadingFileDir(const TQString &);
+ TQString headingFileDir() const;
void setForceDoc(bool f);
bool forceDoc() const;
@@ -203,7 +203,7 @@ public:
* @return QString
* @param file
*/
- virtual QString getHeadingFile (const QString &file );
+ virtual TQString getHeadingFile (const TQString &file );
/**
* Finds an appropriate file name for the given CodeDocument, taking into
@@ -214,14 +214,14 @@ public:
* @return the file name that should be used. (with extension) or
* NULL if none to be used
*/
- virtual QString findFileName(CodeDocument * doc);
+ virtual TQString findFileName(CodeDocument * doc);
/**
* Replaces spaces with underscores and capitalises as defined in m_modname
* @return QString
* @param name
*/
- static QString cleanName ( const QString &name );
+ static TQString cleanName ( const TQString &name );
/** Format documentation for output in source files
*
@@ -231,7 +231,7 @@ public:
*
* @return the formatted documentation text
*/
- QString formatDoc (const QString & text, const QString & linePrefix = " *", int lineWidth = 80 );
+ TQString formatDoc (const TQString & text, const TQString & linePrefix = " *", int lineWidth = 80 );
/**
* Finds all classes in the current document to which objects of class c
@@ -250,7 +250,7 @@ public:
/**
* @param element
*/
- virtual void loadFromXMI (QDomElement & element );
+ virtual void loadFromXMI (TQDomElement & element );
/**
* Create a new Code document belonging to this package.
@@ -276,11 +276,11 @@ public:
* Return the default datatypes for your language (bool, int etc)
* Default implementation returns empty list.
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
/**
@@ -290,12 +290,12 @@ public:
* @param rPossiblyReservedKeyword is the string to check
*
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* Create the default stereotypes for your language (constructor, int etc)
@@ -339,9 +339,9 @@ protected:
* @param name the proposed output file name
* @param extension the extension to use
* @return the real file name that should be used (including extension) or
- * QString::null if none to be used
+ * TQString::null if none to be used
*/
- QString overwritableName (const QString& name, const QString &extension );
+ TQString overwritableName (const TQString& name, const TQString &extension );
/** Opens a file named "name" for writing in the outputDirectory.
* If something goes wrong, it informs the user
@@ -350,7 +350,7 @@ protected:
* @param file
* @param name
*/
- bool openFile (QFile& file, const QString &name);
+ bool openFile (TQFile& file, const TQString &name);
/** the actual internal routine which writes code documents
*/
@@ -359,7 +359,7 @@ protected:
static const char * hierarchicalCodeBlockNodeName;
// map of what code documents we currently have in this generator.
- QDict<CodeDocument> m_codeDocumentDictionary;
+ TQDict<CodeDocument> m_codeDocumentDictionary;
/**
* used by overwriteDialogue to know if the apply to all
@@ -379,7 +379,7 @@ private:
* each class was written to.
*/
// this seems silly and overkill now. -b.t.
- // QMap<CodeDocument*,QString> *m_fileMap;
+ // TQMap<CodeDocument*,TQString> *m_fileMap;
CodeDocumentList m_codedocumentVector;
int lastIDIndex;
diff --git a/umbrello/umbrello/codegenerators/adawriter.cpp b/umbrello/umbrello/codegenerators/adawriter.cpp
index e1c79839..ec2bf59a 100644
--- a/umbrello/umbrello/codegenerators/adawriter.cpp
+++ b/umbrello/umbrello/codegenerators/adawriter.cpp
@@ -18,9 +18,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../uml.h"
@@ -36,7 +36,7 @@
#include "../template.h"
#include "../umlnamespace.h"
-const QString AdaWriter::defaultPackageSuffix = "_Holder";
+const TQString AdaWriter::defaultPackageSuffix = "_Holder";
AdaWriter::AdaWriter() {
}
@@ -61,7 +61,7 @@ bool AdaWriter::isOOClass(UMLClassifier *c) {
kDebug() << "AdaWriter::isOOClass: unknown object type " << ot << endl;
return false;
}
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBATypedef" ||
stype == "CORBAStruct" || stype == "CORBAUnion")
return false;
@@ -70,13 +70,13 @@ bool AdaWriter::isOOClass(UMLClassifier *c) {
return true;
}
-QString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
+TQString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
// If the class has an enclosing package then it is assumed that
// the class name is the type name; if the class does not have an
// enclosing package then the class name acts as the Ada package
// name.
- QString retval;
- QString className = cleanName(c->getName());
+ TQString retval;
+ TQString className = cleanName(c->getName());
UMLPackage *umlPkg = c->getUMLPackage();
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical)) {
if (! inOwnScope)
@@ -90,14 +90,14 @@ QString AdaWriter::className(UMLClassifier *c, bool inOwnScope) {
return retval;
}
-QString AdaWriter::packageName(UMLPackage *p) {
+TQString AdaWriter::packageName(UMLPackage *p) {
// If the class has an enclosing package then it is assumed that
// the class name is the type name; if the class does not have an
// enclosing package then the class name acts as the Ada package
// name.
UMLPackage *umlPkg = p->getUMLPackage();
- QString className = cleanName(p->getName());
- QString retval;
+ TQString className = cleanName(p->getName());
+ TQString retval;
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical))
umlPkg = NULL;
@@ -115,21 +115,21 @@ QString AdaWriter::packageName(UMLPackage *p) {
void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c,
UMLAssociation *a,
- QString& typeName, QString& roleName) {
+ TQString& typeName, TQString& roleName) {
UMLClassifier* assocEnd = dynamic_cast<UMLClassifier*>(a->getObject(Uml::B));
if (assocEnd == NULL)
return;
const Uml::Association_Type assocType = a->getAssocType();
if (assocType != Uml::at_Aggregation && assocType != Uml::at_Composition)
return;
- const QString multi = a->getMulti(Uml::B);
+ const TQString multi = a->getMulti(Uml::B);
bool hasNonUnityMultiplicity = (!multi.isEmpty() && multi != "1");
- hasNonUnityMultiplicity &= !multi.contains(QRegExp("^1 *\\.\\. *1$"));
+ hasNonUnityMultiplicity &= !multi.contains(TQRegExp("^1 *\\.\\. *1$"));
roleName = cleanName(a->getRoleName(Uml::B));
if (roleName.isEmpty())
roleName = cleanName(a->getName());
if (roleName.isEmpty()) {
- QString artificialName = cleanName(assocEnd->getName());
+ TQString artificialName = cleanName(assocEnd->getName());
if (hasNonUnityMultiplicity) {
roleName = artificialName;
roleName.append("_Vector");
@@ -152,8 +152,8 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
- QString fileName = packageName(c).lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = packageName(c).lower();
fileName.replace('.', '-');
//find an appropriate name for our file
@@ -163,7 +163,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -171,13 +171,13 @@ void AdaWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream ada(&file);
+ TQTextStream ada(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".ads");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
ada << str << endl;
}
@@ -198,8 +198,8 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "generic" << m_endl;
m_indentLevel++;
for (UMLTemplate *t = template_params.first(); t; t = template_params.next()) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
if (typeName == "class") {
ada << getIndent() << "type " << formalName << " is tagged private;"
<< m_endl;
@@ -225,7 +225,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
// Here comes the package proper.
- QString pkg = packageName(c);
+ TQString pkg = packageName(c);
ada << getIndent() << "package " << pkg << " is" << m_endl << m_endl;
m_indentLevel++;
if (c->getBaseType() == Uml::ot_Enum) {
@@ -235,7 +235,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "type " << classname << " is (" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
ada << getIndent() << enumLiteral;
if (++i < litList.count())
ada << "," << m_endl;
@@ -247,7 +247,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
return;
}
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
ada << getIndent() << "-- " << stype << " is Not Yet Implemented" << m_endl << m_endl;
} else if(stype == "CORBAStruct") {
@@ -257,10 +257,10 @@ void AdaWriter::writeClass(UMLClassifier *c) {
ada << getIndent() << "type " << classname << " is record" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
- QString typeName = at->getTypeName();
+ TQString name = cleanName(at->getName());
+ TQString typeName = at->getTypeName();
ada << getIndent() << name << " : " << typeName;
- QString initialVal = at->getInitialValue();
+ TQString initialVal = at->getInitialValue();
if (initialVal.latin1() && ! initialVal.isEmpty())
ada << " := " << initialVal;
ada << ";" << m_endl;
@@ -290,7 +290,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
UMLClassifierList superclasses = c->getSuperClasses();
- const QString name = className(c);
+ const TQString name = className(c);
ada << getIndent() << "type " << name << " is ";
if (c->getAbstract())
ada << "abstract ";
@@ -322,7 +322,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
if (forceSections() || atpub.count())
ada << getIndent() << "-- Accessors for public attributes:" << m_endl << m_endl;
for (at = atpub.first(); at; at = atpub.next()) {
- QString member = cleanName(at->getName());
+ TQString member = cleanName(at->getName());
ada << getIndent() << "procedure Set_" << member << " (";
if (! at->getStatic())
ada << "Self : access " << name << "; ";
@@ -374,7 +374,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
for (UMLAssociation *a = aggregations.first(); a; a = aggregations.next()) {
if (c != a->getObject(Uml::A))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(c, a, typeName, roleName);
ada << getIndent() << roleName << " : " << typeName << ";" << m_endl;
}
@@ -385,7 +385,7 @@ void AdaWriter::writeClass(UMLClassifier *c) {
for (UMLAssociation *a = compositions.first(); a; a = compositions.next()) {
if (c != a->getObject(Uml::A))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(c, a, typeName, roleName);
ada << getIndent() << roleName << " : " << typeName << ";" << m_endl;
}
@@ -468,9 +468,9 @@ void AdaWriter::writeClass(UMLClassifier *c) {
}
-void AdaWriter::writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment) {
+void AdaWriter::writeOperation(UMLOperation *op, TQTextStream &ada, bool is_comment) {
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
bool use_procedure = (rettype.isEmpty() || rettype == "void");
ada << getIndent();
@@ -521,8 +521,8 @@ void AdaWriter::writeOperation(UMLOperation *op, QTextStream &ada, bool is_comme
ada << ";" << m_endl << m_endl;
}
-QStringList AdaWriter::defaultDatatypes() {
- QStringList l;
+TQStringList AdaWriter::defaultDatatypes() {
+ TQStringList l;
l.append("Boolean");
l.append("Character");
l.append("Positive");
@@ -543,11 +543,11 @@ QStringList AdaWriter::defaultDatatypes() {
*
* @param rPossiblyReservedKeyword The string to check.
*/
-bool AdaWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
+bool AdaWriter::isReservedKeyword(const TQString & rPossiblyReservedKeyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = keywords.begin(); it != keywords.end(); ++it)
if ((*it).lower() == rPossiblyReservedKeyword.lower())
return true;
@@ -558,9 +558,9 @@ bool AdaWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
/**
* get list of reserved keywords
*/
-const QStringList AdaWriter::reservedKeywords() const {
+const TQStringList AdaWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords.append( "abort" );
diff --git a/umbrello/umbrello/codegenerators/adawriter.h b/umbrello/umbrello/codegenerators/adawriter.h
index ca5d9f67..779fc7d5 100644
--- a/umbrello/umbrello/codegenerators/adawriter.h
+++ b/umbrello/umbrello/codegenerators/adawriter.h
@@ -55,7 +55,7 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Check whether the given string is a reserved word for the
@@ -64,12 +64,12 @@ public:
* @param rPossiblyReservedKeyword The string to check.
* @return true if the keyword is reserved
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -78,7 +78,7 @@ private:
* @param op the class for which we are generating code
* @param ada the stream associated with the output file
*/
- void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
+ void writeOperation (UMLOperation *op, TQTextStream &ada, bool is_comment = false);
/**
* Compute the type and role name from the given association.
@@ -90,15 +90,15 @@ private:
*/
void computeAssocTypeAndRole (UMLClassifier *c,
UMLAssociation *a,
- QString& typeName, QString& roleName);
+ TQString& typeName, TQString& roleName);
bool isOOClass (UMLClassifier *c);
- QString className(UMLClassifier *c, bool inOwnScope = true);
+ TQString className(UMLClassifier *c, bool inOwnScope = true);
- QString packageName(UMLPackage *p);
+ TQString packageName(UMLPackage *p);
- static const QString defaultPackageSuffix;
+ static const TQString defaultPackageSuffix;
};
diff --git a/umbrello/umbrello/codegenerators/aswriter.cpp b/umbrello/umbrello/codegenerators/aswriter.cpp
index ad55839d..e973a55e 100644
--- a/umbrello/umbrello/codegenerators/aswriter.cpp
+++ b/umbrello/umbrello/codegenerators/aswriter.cpp
@@ -21,8 +21,8 @@
#include "../attribute.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
ASWriter::ASWriter() {
}
@@ -38,8 +38,8 @@ void ASWriter::writeClass(UMLClassifier *c)
return;
}
- QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = c->getName().lower();
//find an appropriate name for our file
fileName = findFileName(c,".as");
@@ -49,13 +49,13 @@ void ASWriter::writeClass(UMLClassifier *c)
return;
}
- QFile fileas;
+ TQFile fileas;
if(!openFile(fileas,fileName))
{
emit codeGenerated(c, false);
return;
}
- QTextStream as(&fileas);
+ TQTextStream as(&fileas);
//////////////////////////////
//Start generating the code!!
@@ -63,12 +63,12 @@ void ASWriter::writeClass(UMLClassifier *c)
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".as");
if(!str.isEmpty())
{
- str.replace(QRegExp("%filename%"),fileName+".as");
- str.replace(QRegExp("%filepath%"),fileas.name());
+ str.replace(TQRegExp("%filename%"),fileName+".as");
+ str.replace(TQRegExp("%filepath%"),fileas.name());
as << str << m_endl;
}
@@ -78,7 +78,7 @@ void ASWriter::writeClass(UMLClassifier *c)
findObjectsRelated(c,includes);
for (UMLPackage *conc = includes.first(); conc; conc = includes.next())
{
- QString headerName = findFileName(conc, ".as");
+ TQString headerName = findFileName(conc, ".as");
if ( !headerName.isEmpty() )
{
as << "#include \"" << findFileName(conc,".as") << "\"" << m_endl;
@@ -126,7 +126,7 @@ void ASWriter::writeClass(UMLClassifier *c)
UMLAttributeList atl = c->getAttributeList();
as << "/**" << m_endl;
- QString temp = "_init sets all " + classname +
+ TQString temp = "_init sets all " + classname +
" attributes to their default values. " +
"Make sure to call this method within your class constructor";
as << formatDoc(temp, " * ");
@@ -229,14 +229,14 @@ void ASWriter::writeClass(UMLClassifier *c)
// Helper Methods
-void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocList , QTextStream &as )
+void ASWriter::writeAssociation(TQString& classname, UMLAssociationList& assocList , TQTextStream &as )
{
for(UMLAssociation *a = assocList.first(); a; a = assocList.next())
{
// association side
Uml::Role_Type role = a->getObject(Uml::A)->getName() == classname ? Uml::B:Uml::A;
- QString roleName(cleanName(a->getRoleName(role)));
+ TQString roleName(cleanName(a->getRoleName(role)));
if (!roleName.isEmpty()) {
@@ -258,7 +258,7 @@ void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
int nMulti = a->getMulti(role).toInt(&okCvt,10);
bool isNotMulti = a->getMulti(role).isEmpty() || (okCvt && nMulti == 1);
- QString typeName(cleanName(a->getObject(role)->getName()));
+ TQString typeName(cleanName(a->getObject(role)->getName()));
if (isNotMulti)
as << m_indentation << "this.m_" << roleName << " = new " << typeName << "();" << m_endl;
@@ -278,7 +278,7 @@ void ASWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
}
}
-void ASWriter::writeOperations(QString classname, UMLOperationList *opList, QTextStream &as)
+void ASWriter::writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &as)
{
UMLOperation *op;
UMLAttributeList atl;
@@ -314,7 +314,7 @@ void ASWriter::writeOperations(QString classname, UMLOperationList *opList, QTex
for (at = atl.first(); at; at = atl.next(),j++)
{
as << cleanName(at->getName())
- << (!(at->getInitialValue().isEmpty()) ? (QString(" = ")+at->getInitialValue()) : QString(""))
+ << (!(at->getInitialValue().isEmpty()) ? (TQString(" = ")+at->getInitialValue()) : TQString(""))
<< ((j < i-1)?", ":"");
}
as << ")" << m_endl << "{" << m_endl <<
@@ -330,9 +330,9 @@ Uml::Programming_Language ASWriter::getLanguage() {
return Uml::pl_ActionScript;
}
-const QStringList ASWriter::reservedKeywords() const {
+const TQStringList ASWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/aswriter.h b/umbrello/umbrello/codegenerators/aswriter.h
index 51a4a922..75399f13 100644
--- a/umbrello/umbrello/codegenerators/aswriter.h
+++ b/umbrello/umbrello/codegenerators/aswriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -64,7 +64,7 @@ private:
* @param opList the list of operations
* @param as output stream for the AS file
*/
- void writeOperations(QString classname, UMLOperationList *opList, QTextStream &as);
+ void writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &as);
/**
* write a list of associations
@@ -73,7 +73,7 @@ private:
* @param assocList the list of associations
* @param as output stream for the AS file
*/
- void writeAssociation(QString& classname, UMLAssociationList& assoclist , QTextStream &as);
+ void writeAssociation(TQString& classname, UMLAssociationList& assoclist , TQTextStream &as);
};
diff --git a/umbrello/umbrello/codegenerators/classifierinfo.h b/umbrello/umbrello/codegenerators/classifierinfo.h
index 53b7c02b..981dc8be 100644
--- a/umbrello/umbrello/codegenerators/classifierinfo.h
+++ b/umbrello/umbrello/codegenerators/classifierinfo.h
@@ -20,7 +20,7 @@
#include "../umlassociationlist.h"
#include "../umlattributelist.h"
-#include <qstring.h>
+#include <tqstring.h>
class UMLClassifier;
@@ -90,8 +90,8 @@ public:
/**
* Class and File names
*/
- QString className;
- QString fileName;
+ TQString className;
+ TQString fileName;
/**
* utility functions to allow easy determination of what classifiers
diff --git a/umbrello/umbrello/codegenerators/codegen_utils.cpp b/umbrello/umbrello/codegenerators/codegen_utils.cpp
index cb94cdde..dad11e14 100644
--- a/umbrello/umbrello/codegenerators/codegen_utils.cpp
+++ b/umbrello/umbrello/codegenerators/codegen_utils.cpp
@@ -17,8 +17,8 @@
namespace Codegen_Utils {
-QStringList cppDatatypes() {
- QStringList l;
+TQStringList cppDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("bool");
@@ -33,9 +33,9 @@ QStringList cppDatatypes() {
return l;
}
-const QStringList reservedCppKeywords() {
+const TQStringList reservedCppKeywords() {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords.append( "and" );
@@ -404,8 +404,8 @@ void createCppStereotypes() {
umldoc->findOrCreateStereotype("virtual");
}
-QString capitalizeFirstLetter(const QString &string) {
- QChar firstChar = string.at(0);
+TQString capitalizeFirstLetter(const TQString &string) {
+ TQChar firstChar = string.at(0);
return firstChar.upper() + string.mid(1);
}
diff --git a/umbrello/umbrello/codegenerators/codegen_utils.h b/umbrello/umbrello/codegenerators/codegen_utils.h
index aaa7d117..e84c61e1 100644
--- a/umbrello/umbrello/codegenerators/codegen_utils.h
+++ b/umbrello/umbrello/codegenerators/codegen_utils.h
@@ -12,19 +12,19 @@
#ifndef CODEGEN_UTILS_H
#define CODEGEN_UTILS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace Codegen_Utils {
/**
* Return list of C++ datatypes
*/
-QStringList cppDatatypes();
+TQStringList cppDatatypes();
/**
* Get list of C++ reserved keywords
*/
-const QStringList reservedCppKeywords();
+const TQStringList reservedCppKeywords();
/**
* Add C++ stereotypes
@@ -34,7 +34,7 @@ void createCppStereotypes();
/**
* Return the input string with the first letter capitalized.
*/
-QString capitalizeFirstLetter(const QString &string);
+TQString capitalizeFirstLetter(const TQString &string);
}
diff --git a/umbrello/umbrello/codegenerators/codegenpolicyext.h b/umbrello/umbrello/codegenerators/codegenpolicyext.h
index 97ace9f2..b9113c9d 100644
--- a/umbrello/umbrello/codegenerators/codegenpolicyext.h
+++ b/umbrello/umbrello/codegenerators/codegenpolicyext.h
@@ -12,7 +12,7 @@
#ifndef CODEGENPOLICYEXT_H
#define CODEGENPOLICYEXT_H
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class KConfig;
@@ -27,7 +27,7 @@ class CodeGenerationPolicyPage;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class CodeGenPolicyExt : public QObject {
+class CodeGenPolicyExt : public TQObject {
public:
CodeGenPolicyExt() {}
virtual ~CodeGenPolicyExt() {}
@@ -36,7 +36,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- virtual CodeGenerationPolicyPage * createPage(QWidget *parent = 0, const char *name = 0) = 0;
+ virtual CodeGenerationPolicyPage * createPage(TQWidget *parent = 0, const char *name = 0) = 0;
/**
* set the defaults from a config file for this code generator from the passed KConfig pointer.
diff --git a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
index b6b2fb72..4742cd6d 100644
--- a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp
@@ -54,7 +54,7 @@ CPPCodeClassField::~CPPCodeClassField ( ) { }
// Other methods
//
-QString CPPCodeClassField::getFieldName() {
+TQString CPPCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -63,7 +63,7 @@ QString CPPCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -72,13 +72,13 @@ QString CPPCodeClassField::getFieldName() {
}
}
-QString CPPCodeClassField::getListFieldClassName () {
+TQString CPPCodeClassField::getListFieldClassName () {
CodeGenPolicyExt * p = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy *policy = dynamic_cast<CPPCodeGenerationPolicy*>(p);
return policy->getVectorClassName();
}
-QString CPPCodeClassField::getInitialValue() {
+TQString CPPCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
diff --git a/umbrello/umbrello/codegenerators/cppcodeclassfield.h b/umbrello/umbrello/codegenerators/cppcodeclassfield.h
index d9c20255..929e5178 100644
--- a/umbrello/umbrello/codegenerators/cppcodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/cppcodeclassfield.h
@@ -19,7 +19,7 @@
#ifndef CPPCODECLASSFIELD_H
#define CPPCODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -44,13 +44,13 @@ public:
*/
virtual ~CPPCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
/** get the name of the class which holds lists, e.g. "QPtrlist" or
* "Vector" or "List" and so on.
*/
- QString getListFieldClassName();
+ TQString getListFieldClassName();
protected:
diff --git a/umbrello/umbrello/codegenerators/cppcodecomment.cpp b/umbrello/umbrello/codegenerators/cppcodecomment.cpp
index 8d480e93..d0e386c0 100644
--- a/umbrello/umbrello/codegenerators/cppcodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodecomment.cpp
@@ -19,12 +19,12 @@
#include "cppcodecomment.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-CPPCodeComment::CPPCodeComment ( CodeDocument * doc, const QString & text )
+CPPCodeComment::CPPCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -50,8 +50,8 @@ CPPCodeComment::~CPPCodeComment ( ) { }
/**
* Save the XMI representation of this object
*/
-void CPPCodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppcodecomment" );
+void CPPCodeComment::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppcodecomment" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -60,38 +60,38 @@ void CPPCodeComment::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* @return QString
*/
-QString CPPCodeComment::toString ( )
+TQString CPPCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText (getText()+endLine, indent +"// ", endLine));
}
return output;
}
-QString CPPCodeComment::getNewEditorLine ( int amount ) {
- QString line = getIndentationString(amount) + "// ";
+TQString CPPCodeComment::getNewEditorLine ( int amount ) {
+ TQString line = getIndentationString(amount) + "// ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString CPPCodeComment::unformatText ( const QString & text , const QString & indent)
+TQString CPPCodeComment::unformatText ( const TQString & text , const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading slashes
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/cppcodecomment.h b/umbrello/umbrello/codegenerators/cppcodecomment.h
index 085e1a7f..28fb4004 100644
--- a/umbrello/umbrello/codegenerators/cppcodecomment.h
+++ b/umbrello/umbrello/codegenerators/cppcodecomment.h
@@ -18,7 +18,7 @@
#ifndef CPPCODECOMMENT_H
#define CPPCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit CPPCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit CPPCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -56,23 +56,23 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "//" sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp b/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
index 833e648e..6328fd3b 100644
--- a/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodedocumentation.cpp
@@ -17,7 +17,7 @@
// own header
#include "cppcodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "../codedocument.h"
@@ -28,7 +28,7 @@
// Constructors/Destructors
//
-CPPCodeDocumentation::CPPCodeDocumentation ( CodeDocument * doc, const QString & text )
+CPPCodeDocumentation::CPPCodeDocumentation ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -50,8 +50,8 @@ CPPCodeDocumentation::~CPPCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void CPPCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppcodedocumentation" );
+void CPPCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppcodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -60,10 +60,10 @@ void CPPCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString CPPCodeDocumentation::toString ( )
+TQString CPPCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -75,9 +75,9 @@ QString CPPCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useDoubleDashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if(useDoubleDashOutput)
{
if(!body.isEmpty())
@@ -92,7 +92,7 @@ QString CPPCodeDocumentation::toString ( )
return output;
}
-QString CPPCodeDocumentation::getNewEditorLine ( int amount )
+TQString CPPCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -120,20 +120,20 @@ int CPPCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString CPPCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString CPPCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^\\/\\*\\*\\s*\n?"));
- mytext.remove(QRegExp("\\s*\\*\\/\\s*\n?$"));
- mytext.remove(QRegExp("^\\s*\\*\\s*"));
+ mytext.remove(TQRegExp("^\\/\\*\\*\\s*\n?"));
+ mytext.remove(TQRegExp("\\s*\\*\\/\\s*\n?$"));
+ mytext.remove(TQRegExp("^\\s*\\*\\s*"));
} else
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/cppcodedocumentation.h b/umbrello/umbrello/codegenerators/cppcodedocumentation.h
index 79bc4fe0..505fc8bb 100644
--- a/umbrello/umbrello/codegenerators/cppcodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/cppcodedocumentation.h
@@ -19,7 +19,7 @@
#ifndef CPPCODEDOCUMENTATION_H
#define CPPCODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class CodeDocument;
@@ -42,7 +42,7 @@ public:
/**
* Constructors
*/
- explicit CPPCodeDocumentation ( CodeDocument * doc, const QString & text = "");
+ explicit CPPCodeDocumentation ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -58,23 +58,23 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the " * " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
index a4acf713..f5d8ec42 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationform.cpp
@@ -18,9 +18,9 @@
#include "cppcodegenerationform.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qlistview.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqlistview.h>
#include <kfiledialog.h>
#include <kdebug.h>
#include <klocale.h>
@@ -28,38 +28,38 @@
#include <kmessagebox.h>
-CPPCodeGenerationForm::CPPCodeGenerationForm( QWidget *parent, const char *name )
+CPPCodeGenerationForm::CPPCodeGenerationForm( TQWidget *parent, const char *name )
: CPPCodeGenerationFormBase (parent,name)
{
init();
GeneralOptionsListView->addColumn(tr2i18n("General Options"));
- pOptionPackageIsANamespace = new QCheckListItem( GeneralOptionsListView,
+ pOptionPackageIsANamespace = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Package is a namespace"),
- QCheckListItem::CheckBox );
- pOptionVirtualDestructors = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionVirtualDestructors = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Virtual destructors"),
- QCheckListItem::CheckBox );
- pOptionGenerateEmptyConstructors = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionGenerateEmptyConstructors = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Generate empty constructors"),
- QCheckListItem::CheckBox );
- pOptionGenerateAccessorMethods = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionGenerateAccessorMethods = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Generate accessor methods"),
- QCheckListItem::CheckBox );
- pOptionOperationsAreInline = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionOperationsAreInline = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Operations are inline"),
- QCheckListItem::CheckBox );
- pOptionAccessorsAreInline = new QCheckListItem( GeneralOptionsListView,
+ TQCheckListItem::CheckBox );
+ pOptionAccessorsAreInline = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Accessors are inline"),
- QCheckListItem::CheckBox );
+ TQCheckListItem::CheckBox );
- pOptionAccessorsArePublic = new QCheckListItem( GeneralOptionsListView,
+ pOptionAccessorsArePublic = new TQCheckListItem( GeneralOptionsListView,
tr2i18n("Accessors are public"),
- QCheckListItem::CheckBox );
+ TQCheckListItem::CheckBox );
connect(GeneralOptionsListView,
- SIGNAL(clicked(QListViewItem *)), this,
- SLOT(generalOptionsListViewClicked(QListViewItem *))
+ TQT_SIGNAL(clicked(TQListViewItem *)), this,
+ TQT_SLOT(generalOptionsListViewClicked(TQListViewItem *))
);
}
@@ -70,8 +70,8 @@ CPPCodeGenerationForm::~CPPCodeGenerationForm()
void CPPCodeGenerationForm::browseClicked()
{
- QString button = sender()->name();
- QString file = KFileDialog::getOpenFileName( QString::null, "*.h", this, "Get Header File");
+ TQString button = sender()->name();
+ TQString file = KFileDialog::getOpenFileName( TQString::null, "*.h", this, "Get Header File");
if(file.isEmpty())
return;
@@ -86,7 +86,7 @@ void CPPCodeGenerationForm::browseClicked()
}
}
-void CPPCodeGenerationForm::generalOptionsListViewClicked(QListViewItem *pSender) {
+void CPPCodeGenerationForm::generalOptionsListViewClicked(TQListViewItem *pSender) {
// operations are inline and accessors are operations :)
if (pOptionOperationsAreInline->isOn() && pOptionGenerateAccessorMethods->isOn())
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationform.h b/umbrello/umbrello/codegenerators/cppcodegenerationform.h
index 73441a82..68cbea1f 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationform.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationform.h
@@ -30,7 +30,7 @@ public:
/**
* std ctor
*/
- explicit CPPCodeGenerationForm (QWidget *parent=0, const char *name=0);
+ explicit CPPCodeGenerationForm (TQWidget *parent=0, const char *name=0);
/**
* std dtor
@@ -124,20 +124,20 @@ public slots:
virtual void browseClicked();
private slots:
- virtual void generalOptionsListViewClicked(QListViewItem *);
+ virtual void generalOptionsListViewClicked(TQListViewItem *);
private:
/*
* check boxes for the available options
*/
- QCheckListItem *pOptionPackageIsANamespace;
- QCheckListItem *pOptionVirtualDestructors;
- QCheckListItem *pOptionGenerateEmptyConstructors;
- QCheckListItem *pOptionGenerateAccessorMethods;
- QCheckListItem *pOptionOperationsAreInline;
- QCheckListItem *pOptionAccessorsAreInline;
- QCheckListItem *pOptionAccessorsArePublic;
+ TQCheckListItem *pOptionPackageIsANamespace;
+ TQCheckListItem *pOptionVirtualDestructors;
+ TQCheckListItem *pOptionGenerateEmptyConstructors;
+ TQCheckListItem *pOptionGenerateAccessorMethods;
+ TQCheckListItem *pOptionOperationsAreInline;
+ TQCheckListItem *pOptionAccessorsAreInline;
+ TQCheckListItem *pOptionAccessorsArePublic;
/**
* initialize all attributes
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
index d0359603..8aec0351 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp
@@ -17,7 +17,7 @@
// own header
#include "cppcodegenerationpolicy.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kconfig.h>
// app includes
@@ -166,38 +166,38 @@ bool CPPCodeGenerationPolicy::getAutoGenerateAccessors( ){
return m_autoGenerateAccessors;
}
-QString CPPCodeGenerationPolicy::getStringClassName() {
+TQString CPPCodeGenerationPolicy::getStringClassName() {
return m_stringClassName;
}
-QString CPPCodeGenerationPolicy::getStringClassNameInclude() {
+TQString CPPCodeGenerationPolicy::getStringClassNameInclude() {
return m_stringClassNameInclude;
}
-QString CPPCodeGenerationPolicy::getVectorClassName() {
+TQString CPPCodeGenerationPolicy::getVectorClassName() {
return m_vectorClassName;
}
-QString CPPCodeGenerationPolicy::getVectorClassNameInclude() {
+TQString CPPCodeGenerationPolicy::getVectorClassNameInclude() {
return m_vectorClassNameInclude;
}
-void CPPCodeGenerationPolicy::setStringClassName(const QString &value) {
+void CPPCodeGenerationPolicy::setStringClassName(const TQString &value) {
m_stringClassName = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setStringClassNameInclude(const QString &value) {
+void CPPCodeGenerationPolicy::setStringClassNameInclude(const TQString &value) {
m_stringClassNameInclude = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setVectorClassName(const QString &value) {
+void CPPCodeGenerationPolicy::setVectorClassName(const TQString &value) {
m_vectorClassName = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-void CPPCodeGenerationPolicy::setVectorClassNameInclude(const QString &value) {
+void CPPCodeGenerationPolicy::setVectorClassNameInclude(const TQString &value) {
m_vectorClassNameInclude = value;
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
@@ -221,43 +221,43 @@ void CPPCodeGenerationPolicy::setVectorIncludeIsGlobal(bool value) {
UMLApp::app()->getCommonPolicy()->emitModifiedCodeContentSig();
}
-QString CPPCodeGenerationPolicy::getVectorMethodAppend(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodAppendBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodAppend(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodAppendBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getVectorMethodRemove(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodRemoveBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodRemove(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodRemoveBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getVectorMethodInit(const QString & variableName, const QString & itemClassName) {
- QString value = m_vectorMethodInitBase;
+TQString CPPCodeGenerationPolicy::getVectorMethodInit(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_vectorMethodInitBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
-QString CPPCodeGenerationPolicy::getObjectMethodInit(const QString & variableName, const QString & itemClassName) {
- QString value = m_objectMethodInitBase;
+TQString CPPCodeGenerationPolicy::getObjectMethodInit(const TQString & variableName, const TQString & itemClassName) {
+ TQString value = m_objectMethodInitBase;
if(!variableName.isEmpty())
- value.replace(QRegExp("%VARNAME%"),variableName);
- value.replace(QRegExp("%VECTORTYPENAME%"), m_vectorClassName);
+ value.replace(TQRegExp("%VARNAME%"),variableName);
+ value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName);
if(!itemClassName.isEmpty())
- value.replace(QRegExp("%ITEMCLASS%"),itemClassName);
+ value.replace(TQRegExp("%ITEMCLASS%"),itemClassName);
return value;
}
@@ -359,7 +359,7 @@ void CPPCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSign
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * CPPCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * CPPCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new CPPCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
index cda5d1f8..69d3490f 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.h
@@ -17,7 +17,7 @@
#ifndef CPPCODEGENERATIONPOLICY_H
#define CPPCODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -142,20 +142,20 @@ public:
* of the CPP code. In the next 4 methods, we give accessors that allow getting
* the names of the classes, and their include files for string and vectors.
*/
- QString getStringClassName();
- QString getStringClassNameInclude();
- QString getVectorClassName();
- QString getVectorClassNameInclude();
+ TQString getStringClassName();
+ TQString getStringClassNameInclude();
+ TQString getVectorClassName();
+ TQString getVectorClassNameInclude();
/** determine if the string include is global one */
bool stringIncludeIsGlobal ();
bool vectorIncludeIsGlobal ();
/** also allow setting these parameters! */
- void setStringClassName(const QString &value);
- void setStringClassNameInclude(const QString &value);
- void setVectorClassName(const QString &value);
- void setVectorClassNameInclude(const QString &value);
+ void setStringClassName(const TQString &value);
+ void setStringClassNameInclude(const TQString &value);
+ void setVectorClassName(const TQString &value);
+ void setVectorClassNameInclude(const TQString &value);
/** allow setting of these params */
void setStringIncludeIsGlobal (bool value);
@@ -164,14 +164,14 @@ public:
/** More flexible generation. We want to allow the user to specify how the
* bodies of the vector methods should be auto-generated.
*/
- QString getVectorMethodAppend(const QString & variableName ="", const QString & itemClassName = "");
- QString getVectorMethodRemove(const QString & variableName ="", const QString & itemClassName = "");
- QString getVectorMethodInit(const QString & variableName ="", const QString & itemClassName = "");
+ TQString getVectorMethodAppend(const TQString & variableName ="", const TQString & itemClassName = "");
+ TQString getVectorMethodRemove(const TQString & variableName ="", const TQString & itemClassName = "");
+ TQString getVectorMethodInit(const TQString & variableName ="", const TQString & itemClassName = "");
/** Be somewhat flexible about how new object classes are initialized.
* Not sure if this should be user configureable. For now, it isnt.
*/
- QString getObjectMethodInit(const QString & variableName ="", const QString & itemClassName = "");
+ TQString getObjectMethodInit(const TQString & variableName ="", const TQString & itemClassName = "");
/**
* set the defaults for this code generator from the passed generator.
@@ -192,7 +192,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
@@ -213,14 +213,14 @@ private:
bool m_stringIncludeIsGlobal;
bool m_vectorIncludeIsGlobal;
- QString m_stringClassName;
- QString m_stringClassNameInclude;
- QString m_vectorClassName;
- QString m_vectorClassNameInclude;
- QString m_vectorMethodAppendBase;
- QString m_vectorMethodRemoveBase;
- QString m_vectorMethodInitBase;
- QString m_objectMethodInitBase;
+ TQString m_stringClassName;
+ TQString m_stringClassNameInclude;
+ TQString m_vectorClassName;
+ TQString m_vectorClassNameInclude;
+ TQString m_vectorMethodAppendBase;
+ TQString m_vectorMethodRemoveBase;
+ TQString m_vectorMethodInitBase;
+ TQString m_objectMethodInitBase;
};
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
index f05833dc..60d37bac 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.cpp
@@ -19,14 +19,14 @@
// qt/kde includes
#include <kdebug.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kcombobox.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
// app includes
#include "cppcodegenerationformbase.h"
#include "../uml.h"
-CPPCodeGenerationPolicyPage::CPPCodeGenerationPolicyPage( QWidget *parent, const char *name, CPPCodeGenerationPolicy * policy )
+CPPCodeGenerationPolicyPage::CPPCodeGenerationPolicyPage( TQWidget *parent, const char *name, CPPCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
index a1d6633b..eb7aa9ce 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicypage.h
@@ -30,7 +30,7 @@ class CPPCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit CPPCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CPPCodeGenerationPolicy * policy = 0);
+ explicit CPPCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, CPPCodeGenerationPolicy * policy = 0);
virtual ~CPPCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
index 1130107b..b5c12dd6 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp
@@ -18,7 +18,7 @@
#include "cppcodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -86,7 +86,7 @@ bool CPPCodeGenerator::getCreateProjectMakefile ( ) {
bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc )
{
- QString tag = doc->getID();
+ TQString tag = doc->getID();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -108,7 +108,7 @@ bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc )
* Remove a header CodeDocument object from m_headercodedocumentVector List
*/
bool CPPCodeGenerator::removeHeaderCodeDocument ( CPPHeaderCodeDocument * remove_object ) {
- QString tag = remove_object->getID();
+ TQString tag = remove_object->getID();
if(!(tag.isEmpty()))
m_codeDocumentDictionary.remove(tag);
else
@@ -120,7 +120,7 @@ bool CPPCodeGenerator::removeHeaderCodeDocument ( CPPHeaderCodeDocument * remove
// In the C++ version, we need to make both source and header files as well
// as the makefile available.
-CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
@@ -157,14 +157,14 @@ CodeViewerDialog * CPPCodeGenerator::getCodeViewerDialog ( QWidget* parent, Code
// Change the following dataTypes to the ones the user really
// wants in their code. Not yet complete.
-QString CPPCodeGenerator::fixTypeName(const QString &string)
+TQString CPPCodeGenerator::fixTypeName(const TQString &string)
{
return cleanName(string);
}
// special method needed so that we write out the header code documents
-void CPPCodeGenerator::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codegenerator" );
+void CPPCodeGenerator::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codegenerator" );
docElement.setAttribute("language", "C++");
CodeDocumentList * docList = getCodeDocumentList();
@@ -351,11 +351,11 @@ void CPPCodeGenerator::initAttributes ( )
//initFromParentDocument();
}
-QStringList CPPCodeGenerator::defaultDatatypes() {
+TQStringList CPPCodeGenerator::defaultDatatypes() {
return Codegen_Utils::cppDatatypes();
}
-const QStringList CPPCodeGenerator::reservedKeywords() const {
+const TQStringList CPPCodeGenerator::reservedKeywords() const {
return Codegen_Utils::reservedCppKeywords();
}
diff --git a/umbrello/umbrello/codegenerators/cppcodegenerator.h b/umbrello/umbrello/codegenerators/cppcodegenerator.h
index 7104d403..2290c6e3 100644
--- a/umbrello/umbrello/codegenerators/cppcodegenerator.h
+++ b/umbrello/umbrello/codegenerators/cppcodegenerator.h
@@ -18,7 +18,7 @@
#ifndef CPPCODEGENERATOR_H
#define CPPCODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codedocumentlist.h"
#include "../codeviewerstate.h"
#include "../codegenerator.h"
@@ -65,7 +65,7 @@ public:
// Public attribute accessor methods
//
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
/**
* Add a header CodeDocument object from m_headercodedocumentVector List
@@ -88,7 +88,7 @@ public:
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
/**
@@ -104,17 +104,17 @@ public:
/**
* Add C++ primitives as datatypes
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* Add the default stereotypes for c++ (constructor, int etc)
diff --git a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
index ea5612c9..868dea41 100644
--- a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.cpp
@@ -25,7 +25,7 @@
//
CPPHeaderClassDeclarationBlock::CPPHeaderClassDeclarationBlock
- ( CPPHeaderCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( CPPHeaderCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -40,7 +40,7 @@ CPPHeaderClassDeclarationBlock::~CPPHeaderClassDeclarationBlock ( ) { }
/**
* load params from the appropriate XMI element node.
*/
-void CPPHeaderClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void CPPHeaderClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -55,8 +55,8 @@ void CPPHeaderClassDeclarationBlock::setAttributesFromObject (TextBlock * obj)
/**
* Save the XMI representation of this object
*/
-void CPPHeaderClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "cppheaderclassdeclarationblock" );
+void CPPHeaderClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "cppheaderclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -77,9 +77,9 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
CPPHeaderCodeDocument *parentDoc = dynamic_cast<CPPHeaderCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString CPPHeaderClassName = CodeGenerator::cleanName(c->getName());
+ TQString CPPHeaderClassName = CodeGenerator::cleanName(c->getName());
bool forceDoc = UMLApp::app()->getCommonPolicy()->getCodeVerboseDocumentComments();
// COMMENT
@@ -106,7 +106,7 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
/*
*/
@@ -144,7 +144,7 @@ void CPPHeaderClassDeclarationBlock::updateContent ( )
}
-void CPPHeaderClassDeclarationBlock::init (CPPHeaderCodeDocument *parentDoc, const QString &comment)
+void CPPHeaderClassDeclarationBlock::init (CPPHeaderCodeDocument *parentDoc, const TQString &comment)
{
setComment(new CPPCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
index 683f0475..0710560f 100644
--- a/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppheaderclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef CPPHEADERCLASSDECLARATIONBLOCK_H
#define CPPHEADERCLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "cppheadercodedocument.h"
#include "../ownedhierarchicalcodeblock.h"
@@ -33,7 +33,7 @@ public:
/**
* Empty Constructor
*/
- explicit CPPHeaderClassDeclarationBlock ( CPPHeaderCodeDocument * parentDoc, const QString &start = "", const QString &endText = "}", const QString &comment = "");
+ explicit CPPHeaderClassDeclarationBlock ( CPPHeaderCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "}", const TQString &comment = "");
/**
* Empty Destructor
@@ -43,9 +43,9 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -60,7 +60,7 @@ protected:
private:
- void init (CPPHeaderCodeDocument * parent, const QString &comment);
+ void init (CPPHeaderCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
index 0ab67b85..d96ad398 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.cpp
@@ -62,9 +62,9 @@ void CPPHeaderCodeAccessorMethod::updateContent( )
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
Uml::Visibility scope = parentField->getVisibility();
- QString variableName = cppfield->getFieldName();
- QString itemClassName = cppfield->getTypeName();
- QString text;
+ TQString variableName = cppfield->getFieldName();
+ TQString itemClassName = cppfield->getTypeName();
+ TQString text;
if(isInlineMethod) {
switch(getType()) {
@@ -100,18 +100,18 @@ void CPPHeaderCodeAccessorMethod::updateMethodDeclaration()
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString vectorClassName = policy->getVectorClassName();
- QString fieldName = cppfield->getFieldName();
- QString fieldType = cppfield->getTypeName();
- QString objectType = cppfield->getListObjectType();
+ TQString vectorClassName = policy->getVectorClassName();
+ TQString fieldName = cppfield->getFieldName();
+ TQString fieldType = cppfield->getTypeName();
+ TQString objectType = cppfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString methodReturnType = "void";
- QString methodName;
- QString methodParams;
- QString headerText;
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString methodReturnType = "void";
+ TQString methodName;
+ TQString methodParams;
+ TQString headerText;
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
switch(getType()) {
case CodeAccessorMethod::ADD:
@@ -152,12 +152,12 @@ void CPPHeaderCodeAccessorMethod::updateMethodDeclaration()
setComment(header);
// set start/end method text
- QString startText = methodReturnType + ' ' + methodName + " (" + methodParams +')';
+ TQString startText = methodReturnType + ' ' + methodName + " (" + methodParams +')';
if (isInlineMethod)
startText += " {";
else
startText += ';';
- QString endText = (isInlineMethod ? "}" : "");
+ TQString endText = (isInlineMethod ? "}" : "");
setStartMethodText(startText);
setEndMethodText(endText);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
index 7b39fc6d..dea417fc 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeaccessormethod.h
@@ -18,7 +18,7 @@
#include "../codeaccessormethod.h"
-#include <qstring.h>
+#include <tqstring.h>
class CodeClassField;
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
index 0fdfeb0a..3f15d05b 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.cpp
@@ -50,7 +50,7 @@ void CPPHeaderCodeClassFieldDeclarationBlock::updateContent( )
CPPCodeClassField * hcppcf = dynamic_cast<CPPCodeClassField*>(cf);
// Set the comment
- QString notes = umlparent->getDoc();
+ TQString notes = umlparent->getDoc();
getComment()->setText(notes);
if(notes.isEmpty())
getComment()->setWriteOutText(false);
@@ -59,15 +59,15 @@ void CPPHeaderCodeClassFieldDeclarationBlock::updateContent( )
// Set the body
- QString staticValue = umlparent->getStatic() ? "static " : "";
- QString typeName = hcppcf->getTypeName();
- QString fieldName = hcppcf->getFieldName();
+ TQString staticValue = umlparent->getStatic() ? "static " : "";
+ TQString typeName = hcppcf->getTypeName();
+ TQString fieldName = hcppcf->getFieldName();
// Ugh. Sloppy exception.
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = hcppcf->getListFieldClassName();
- QString body = staticValue + ' ' + typeName + ' ' + fieldName + ';';
+ TQString body = staticValue + ' ' + typeName + ' ' + fieldName + ';';
setText(body);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
index 755507c6..6a77047c 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H
#define CPPHEADERCODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
index fe909c5d..2c471667 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp
@@ -30,7 +30,7 @@
#include "cppheadercodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -106,25 +106,25 @@ CPPHeaderClassDeclarationBlock * CPPHeaderCodeDocument::getClassDecl()
// is so we can create the CPPHeaderClassDeclarationBlock.
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
-void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new CPPCodeDocumentation(this);
@@ -139,7 +139,7 @@ void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -185,7 +185,7 @@ void CPPHeaderCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -315,9 +315,9 @@ bool CPPHeaderCodeDocument::addCodeOperation (CodeOperation * op )
* @return bool status of save
*/
/*
-void CPPHeaderCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root )
+void CPPHeaderCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root )
{
- QDomElement docElement = doc.createElement( "" );
+ TQDomElement docElement = doc.createElement( "" );
setAttributesOnNode(doc, docElement);
@@ -373,7 +373,7 @@ void CPPHeaderCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasclassFields = hasClassFields();
bool forcedoc = UMLApp::app()->getCommonPolicy()->getCodeVerboseDocumentComments();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
UMLClassifierList superclasses = c->findSuperClassConcepts();
@@ -382,9 +382,9 @@ void CPPHeaderCodeDocument::updateContent( )
//
// Write the hash define stuff to prevent multiple parsing/inclusion of header
- QString cppClassName = CodeGenerator::cleanName(c->getName());
- QString hashDefine = CodeGenerator::cleanName(c->getName().upper().simplifyWhiteSpace());
- QString defText = "#ifndef "+hashDefine + "_H"+ endLine + "#define "+ hashDefine + "_H";
+ TQString cppClassName = CodeGenerator::cleanName(c->getName());
+ TQString hashDefine = CodeGenerator::cleanName(c->getName().upper().simplifyWhiteSpace());
+ TQString defText = "#ifndef "+hashDefine + "_H"+ endLine + "#define "+ hashDefine + "_H";
addOrUpdateTaggedCodeBlockWithComments("hashDefBlock", defText, "", 0, false);
// INCLUDE CODEBLOCK
@@ -392,23 +392,23 @@ void CPPHeaderCodeDocument::updateContent( )
// Q: Why all utils? Isnt just List and Vector the only classes we are using?
// A: doesn't matter at all; its more readable to just include '*' and cpp compilers
// don't slow down or anything. (TZ)
- QString includeStatement = "";
+ TQString includeStatement = "";
bool stringGlobal = policy->stringIncludeIsGlobal();
- QString sStartBrak = stringGlobal ? "<" : "\"";
- QString sEndBrak = stringGlobal ? ">" : "\"";
+ TQString sStartBrak = stringGlobal ? "<" : "\"";
+ TQString sEndBrak = stringGlobal ? ">" : "\"";
includeStatement.append("#include "+sStartBrak+policy->getStringClassNameInclude()+sEndBrak+endLine);
if ( hasObjectVectorClassFields() )
{
bool vecGlobal = policy->vectorIncludeIsGlobal();
- QString vStartBrak = vecGlobal ? "<" : "\"";
- QString vEndBrak = vecGlobal ? ">" : "\"";
- QString value ="#include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak;
+ TQString vStartBrak = vecGlobal ? "<" : "\"";
+ TQString vEndBrak = vecGlobal ? ">" : "\"";
+ TQString value ="#include "+vStartBrak+policy->getVectorClassNameInclude()+vEndBrak;
includeStatement.append(value+endLine);
}
//only include classes in a different package from this class
UMLPackageList includes;
- QMap<UMLPackage *,QString> packageMap; // so we don't repeat packages
+ TQMap<UMLPackage *,TQString> packageMap; // so we don't repeat packages
CodeGenerator::findObjectsRelated(c,includes);
for(UMLPackage *con = includes.first(); con ; con = includes.next())
@@ -419,14 +419,14 @@ void CPPHeaderCodeDocument::updateContent( )
includeStatement.append("#include \""+CodeGenerator::cleanName(con->getName().lower())+".h\""+endLine);
}
// now, add/update the includes codeblock
- CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+ CodeBlockWithComments * inclBlock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, TQString::null, 0, false);
if(includeStatement.isEmpty() && inclBlock->getContentType() == CodeBlock::AutoGenerated)
inclBlock->setWriteOutText(false);
else
inclBlock->setWriteOutText(true);
// Using
- QString usingStatement;
+ TQString usingStatement;
for(UMLClassifier *classifier = superclasses.first(); classifier ; classifier = superclasses.next()) {
if(classifier->getPackage()!=c->getPackage() && !classifier->getPackage().isEmpty()) {
usingStatement.append("using "+CodeGenerator::cleanName(c->getPackage())+"::"+cleanName(c->getName())+';'+endLine);
@@ -452,13 +452,13 @@ void CPPHeaderCodeDocument::updateContent( )
namespaceBlock = getHierarchicalCodeBlock("namespace", "Namespace", 0);
if(hasNamespace) {
UMLPackageList pkgList = c->getPackages();
- QString pkgs;
+ TQString pkgs;
UMLPackage *pkg;
for (pkg = pkgList.first(); pkg != NULL; pkg = pkgList.next()) {
pkgs += "namespace " + CodeGenerator::cleanName(pkg->getName()) + " { ";
}
namespaceBlock->setStartText(pkgs);
- QString closingBraces;
+ TQString closingBraces;
for (pkg = pkgList.first(); pkg != NULL; pkg = pkgList.next()) {
closingBraces += "} ";
}
@@ -472,8 +472,8 @@ void CPPHeaderCodeDocument::updateContent( )
// Enum types for include
if (!isInterface) {
- QString enumStatement;
- QString indent = UMLApp::app()->getCommonPolicy()->getIndentation();
+ TQString enumStatement;
+ TQString indent = UMLApp::app()->getCommonPolicy()->getIndentation();
UMLEnum* e = dynamic_cast<UMLEnum*>(c);
if (e) {
enumStatement.append(indent + "enum " + cppClassName + " {" + endLine);
@@ -659,7 +659,7 @@ void CPPHeaderCodeDocument::updateContent( )
// meta-data to state what the scope of this method is, we will make it
// "public" as a default. This might present problems if the user wants
// to move the block into the "private" or "protected" blocks.
- QString emptyConstStatement = cppClassName + " ( ) { }";
+ TQString emptyConstStatement = cppClassName + " ( ) { }";
// search for this first in the entire document. IF not present, put
// it in the public constructor method block
@@ -804,7 +804,7 @@ void CPPHeaderCodeDocument::updateContent( )
// in the right place using the "addCodeOperation" method we defined in this class
// FINISH up with hash def block close
- QString defTextEnd = "#endif //"+hashDefine + "_H";
+ TQString defTextEnd = "#endif //"+hashDefine + "_H";
addOrUpdateTaggedCodeBlockWithComments("hashDefBlockEnd", defTextEnd, "", 0, false);
}
diff --git a/umbrello/umbrello/codegenerators/cppheadercodedocument.h b/umbrello/umbrello/codegenerators/cppheadercodedocument.h
index ca75627f..ed7723d0 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodedocument.h
@@ -17,7 +17,7 @@
#ifndef CPPHEADERCODEDOCUMENT_H
#define CPPHEADERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -57,7 +57,7 @@ public:
/**
* Save the XMI representation of this object
*/
- //virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ //virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
protected:
@@ -68,7 +68,7 @@ protected:
* need to overwrite this for cpp header since we need to pick up the
* header class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, CPPHeaderClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp b/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
index ca8ad727..471c7734 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/cppheadercodeoperation.cpp
@@ -26,7 +26,7 @@
//
CPPHeaderCodeOperation::CPPHeaderCodeOperation
- ( CPPHeaderCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+ ( CPPHeaderCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -75,10 +75,10 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getOperationsAreInline( );
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// first, the comment on the operation, IF its autogenerated/empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if(comment.isEmpty() && getContentType() == CodeBlock::AutoGenerated)
{
UMLAttributeList parameters = o->getParmList();
@@ -90,9 +90,9 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
}
// no return type for constructors
- QString methodReturnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
+ TQString methodReturnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -100,9 +100,9 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
- QString initialValue = parm->getInitialValue();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
+ TQString initialValue = parm->getInitialValue();
paramStr += rType + ' ' + paramName;
if(!initialValue.isEmpty())
paramStr += '=' + initialValue;
@@ -117,13 +117,13 @@ void CPPHeaderCodeOperation::updateMethodDeclaration()
if (o->isLifeOperation()) // constructor/destructor has no type
methodReturnType = "";
else if (methodReturnType.isEmpty()) // this operation should be 'void'
- methodReturnType = QString("void");
+ methodReturnType = TQString("void");
// set start/end method text
- QString prototype = methodReturnType+' '+methodName+" ("+paramStr+')';
+ TQString prototype = methodReturnType+' '+methodName+" ("+paramStr+')';
- QString startText;
- QString endText;
+ TQString startText;
+ TQString endText;
applyStereotypes (prototype, o, isInlineMethod, isInterface, startText, endText);
@@ -140,9 +140,9 @@ int CPPHeaderCodeOperation::lastEditableLine() {
return 0;
}
-void CPPHeaderCodeOperation::applyStereotypes (QString& prototype, UMLOperation * pOp,
+void CPPHeaderCodeOperation::applyStereotypes (TQString& prototype, UMLOperation * pOp,
bool inlinePolicy, bool interface,
- QString& start, QString& end)
+ TQString& start, TQString& end)
{
// if the class is an interface, all methods will be declared as pure
// virtual functions
diff --git a/umbrello/umbrello/codegenerators/cppheadercodeoperation.h b/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
index 1d4fbca7..18b7f33f 100644
--- a/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
+++ b/umbrello/umbrello/codegenerators/cppheadercodeoperation.h
@@ -18,7 +18,7 @@
#ifndef CPPHEADERCODEOPERATION_H
#define CPPHEADERCODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class CPPHeaderCodeDocument;
@@ -35,7 +35,7 @@ public:
* Constructor
*/
CPPHeaderCodeOperation ( CPPHeaderCodeDocument * doc, UMLOperation * op,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -52,7 +52,7 @@ protected:
/**
* Check to see if we have a valid stereotype to apply in the operation
*/
- virtual void applyStereotypes (QString&, UMLOperation *, bool, bool, QString&, QString&);
+ virtual void applyStereotypes (TQString&, UMLOperation *, bool, bool, TQString&, TQString&);
};
diff --git a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
index d13152b4..33f945ae 100644
--- a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp
@@ -17,7 +17,7 @@
#include "cppcodegenerator.h"
-#include <qregexp.h>
+#include <tqregexp.h>
const char * CPPMakefileCodeDocument::DOCUMENT_ID_VALUE = "Makefile_DOC";
@@ -49,24 +49,24 @@ void CPPMakefileCodeDocument::updateContent( ) {
/**
* @return QString
*/
-QString CPPMakefileCodeDocument::toString ( ) {
+TQString CPPMakefileCodeDocument::toString ( ) {
return "# cpp make build document";
}
// We overwritten by CPP language implementation to get lowercase path
-QString CPPMakefileCodeDocument::getPath ( )
+TQString CPPMakefileCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"),"/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"),"/");
path.lower();
diff --git a/umbrello/umbrello/codegenerators/cppmakecodedocument.h b/umbrello/umbrello/codegenerators/cppmakecodedocument.h
index 98efe272..1b1c109b 100644
--- a/umbrello/umbrello/codegenerators/cppmakecodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppmakecodedocument.h
@@ -20,7 +20,7 @@
#define CPPMAKECODEDOCUMENT_H
#include "../codedocument.h"
-#include <qstring.h>
+#include <tqstring.h>
/**
* class CPPMakefileCodeDocument
@@ -50,9 +50,9 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
- QString getPath ( );
+ TQString getPath ( );
void updateContent();
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
index da2a86cb..c71f6d2a 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.cpp
@@ -62,9 +62,9 @@ void CPPSourceCodeAccessorMethod::updateContent( )
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString variableName = cppfield->getFieldName();
- QString itemClassName = cppfield->getTypeName();
- QString text;
+ TQString variableName = cppfield->getFieldName();
+ TQString itemClassName = cppfield->getTypeName();
+ TQString text;
if(isInlineMethod) {
switch(getType()) {
@@ -101,19 +101,19 @@ void CPPSourceCodeAccessorMethod::updateMethodDeclaration()
bool isInlineMethod = policy->getAccessorsAreInline( );
- QString vectorClassName = policy->getVectorClassName();
- QString fieldName = cppfield->getFieldName();
- QString fieldType = cppfield->getTypeName();
- QString objectType = cppfield->getListObjectType();
+ TQString vectorClassName = policy->getVectorClassName();
+ TQString fieldName = cppfield->getFieldName();
+ TQString fieldType = cppfield->getTypeName();
+ TQString objectType = cppfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString methodReturnType = "void";
- QString methodName;
- QString methodParams;
- QString headerText;
- QString className = CodeGenerator::cleanName(c->getName());
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString methodReturnType = "void";
+ TQString methodName;
+ TQString methodParams;
+ TQString headerText;
+ TQString className = CodeGenerator::cleanName(c->getName());
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
switch(getType()) {
case CodeAccessorMethod::ADD:
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
index 60d9c369..7c4088e9 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeaccessormethod.h
@@ -16,7 +16,7 @@
#ifndef CPPSOURCECODEACCESSORMETHOD_H
#define CPPSOURCECODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
index 7d60b1c3..016249e5 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.cpp
@@ -48,18 +48,18 @@ void CPPSourceCodeClassFieldDeclarationBlock::updateContent( )
CPPClassifierCodeDocument* jdoc = dynamic_cast<CPPClassifierCodeDocument*>(doc);
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = getParentObject()->getVisibility().toString();
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = getParentObject()->getVisibility().toString();
- QString typeName = jcf->getTypeName();
- QString fieldName = jcf->getFieldName();
- QString initialV = jcf->getInitialValue();
+ TQString typeName = jcf->getTypeName();
+ TQString fieldName = jcf->getFieldName();
+ TQString initialV = jcf->getInitialValue();
- QString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
+ TQString body = staticValue+scopeStr+" "+typeName+" "+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
setText(body+";");
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
index e5b908a0..a27c0684 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H
#define CPPSOURCECODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp b/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
index be054937..3caefe82 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodedocument.cpp
@@ -29,7 +29,7 @@
#include "cppsourcecodedocument.h"
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// app includes
#include "cppcodegenerator.h"
#include "cppcodegenerationpolicy.h"
@@ -58,7 +58,7 @@ CPPSourceCodeDocument::~CPPSourceCodeDocument ( ) { }
// Other methods
//
-QString CPPSourceCodeDocument::getCPPClassName (const QString &name) {
+TQString CPPSourceCodeDocument::getCPPClassName (const TQString &name) {
return CodeGenerator::cleanName(name);
}
@@ -119,7 +119,7 @@ void CPPSourceCodeDocument::updateContent( )
//UMLClassifier * c = getParentClassifier();
CodeGenPolicyExt *pe = UMLApp::app()->getPolicyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
// first, set the global flag on whether or not to show classfield info
CodeClassFieldList * cfList = getCodeClassFieldList();
@@ -140,11 +140,11 @@ void CPPSourceCodeDocument::updateContent( )
//
// INCLUDE CODEBLOCK
- QString includeStatement = "";
+ TQString includeStatement = "";
// Include own header file
- QString myOwnName( getParentClassifier()->getName() );
+ TQString myOwnName( getParentClassifier()->getName() );
includeStatement.append("#include \""+CodeGenerator::cleanName(myOwnName.lower())+".h\""+endLine);
- CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, QString::null, 0, false);
+ CodeBlockWithComments * iblock = addOrUpdateTaggedCodeBlockWithComments("includes", includeStatement, TQString::null, 0, false);
iblock->setWriteOutText(true);
// After the includes we have just 2 big blocks basically, the "constructor" block and the
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodedocument.h b/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
index 8ca59c95..09ee93e6 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodedocument.h
@@ -17,7 +17,7 @@
#ifndef CPPSOURCECODEDOCUMENT_H
#define CPPSOURCECODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../classifiercodedocument.h"
#include "../hierarchicalcodeblock.h"
@@ -57,7 +57,7 @@ protected:
void resetTextBlocks();
// a little utility method to save us some work
- QString getCPPClassName (const QString &name);
+ TQString getCPPClassName (const TQString &name);
void updateContent();
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
index 0d8115b6..61b1950e 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp
@@ -25,7 +25,7 @@
// Constructors/Destructors
//
-CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -45,13 +45,13 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
bool isInlineMethod = policy->getOperationsAreInline( );
// first, the comment on the operation
- QString cmnt = o->getDoc();
+ TQString cmnt = o->getDoc();
getComment()->setText(cmnt);
- QString returnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
- QString className = CodeGenerator::cleanName(c->getName());
+ TQString returnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
+ TQString className = CodeGenerator::cleanName(c->getName());
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -59,8 +59,8 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
@@ -74,9 +74,9 @@ CPPSourceCodeOperation::CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UM
// if an operation isn't a constructor/destructor and it has no return type
// this operation should be void
else if (returnType.isEmpty())
- returnType = QString("void");
+ returnType = TQString("void");
- QString startText = returnType + ' ';
+ TQString startText = returnType + ' ';
// if a property has a friend stereotype, the operation should
// not be a class name
@@ -135,13 +135,13 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
bool isInlineMethod = policy->getOperationsAreInline( );
// first, the comment on the operation
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
getComment()->setText(comment);
- QString returnType = o->getTypeName();
- QString methodName = o->getName();
- QString paramStr = QString("");
- QString className = CodeGenerator::cleanName(c->getName());
+ TQString returnType = o->getTypeName();
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
+ TQString className = CodeGenerator::cleanName(c->getName());
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -149,8 +149,8 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
@@ -164,9 +164,9 @@ void CPPSourceCodeOperation::updateMethodDeclaration()
// if an operation isn't a constructor/destructor and it has no return type
// this operation should be void
else if (returnType.isEmpty())
- returnType = QString("void");
+ returnType = TQString("void");
- QString startText = returnType + ' ';
+ TQString startText = returnType + ' ';
// if a property has a friend stereotype, the operation should
// not be a class name
diff --git a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
index e2112178..95073eea 100644
--- a/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
+++ b/umbrello/umbrello/codegenerators/cppsourcecodeoperation.h
@@ -18,7 +18,7 @@
#ifndef CPPSOURCECODEOPERATION_H
#define CPPSOURCECODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class CPPSourceCodeDocument;
@@ -34,7 +34,7 @@ public:
/**
* Empty Constructor
*/
- CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ CPPSourceCodeOperation ( CPPSourceCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/cppwriter.cpp b/umbrello/umbrello/codegenerators/cppwriter.cpp
index b24c12b0..ab2b8fcb 100644
--- a/umbrello/umbrello/codegenerators/cppwriter.cpp
+++ b/umbrello/umbrello/codegenerators/cppwriter.cpp
@@ -19,9 +19,9 @@
// own header
#include "cppwriter.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifierinfo.h"
@@ -50,7 +50,7 @@ CppWriter::CppWriter()
// and "%ITEMCLASS%", if needed, where the class of the item is declared.
VECTOR_METHOD_APPEND = "%VARNAME%.push_back(add_object);"; // for std::vector
VECTOR_METHOD_REMOVE = "int i, size = %VARNAME%.size();\nfor ( i = 0; i < size; i++) {\n\t%ITEMCLASS% item = %VARNAME%.at(i);\n\tif(item == remove_object) {\n\t\tvector<%ITEMCLASS%>::iterator it = %VARNAME%.begin() + i;\n\t\t%VARNAME%.erase(it);\n\t\treturn;\n\t}\n }"; // for std::vector
- VECTOR_METHOD_INIT = QString(); // nothing to be done
+ VECTOR_METHOD_INIT = TQString(); // nothing to be done
/*
VECTOR_METHOD_APPEND = "%VARNAME%.append(&add_object);"; // Qt lib implementation
VECTOR_METHOD_REMOVE = "%VARNAME%.removeRef(&remove_object);"; // Qt lib implementation
@@ -82,10 +82,10 @@ void CppWriter::writeClass(UMLClassifier *c)
return;
}
- QFile fileh, filecpp;
+ TQFile fileh, filecpp;
// find an appropriate name for our file
- QString fileName = findFileName(c, ".h");
+ TQString fileName = findFileName(c, ".h");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
@@ -113,7 +113,7 @@ void CppWriter::writeClass(UMLClassifier *c)
need_impl = false;
}
if (need_impl) {
- fileName.replace( QRegExp(".h$"), ".cpp");
+ fileName.replace( TQRegExp(".h$"), ".cpp");
if( !openFile(filecpp, fileName)) {
emit codeGenerated(c, false);
return;
@@ -130,24 +130,24 @@ void CppWriter::writeClass(UMLClassifier *c)
}
-void CppWriter::writeHeaderFile (UMLClassifier *c, QFile &fileh) {
+void CppWriter::writeHeaderFile (UMLClassifier *c, TQFile &fileh) {
// open stream for writing
- QTextStream h (&fileh);
+ TQTextStream h (&fileh);
// up the indent level to one
m_indentLevel = 1;
// write header blurb
- QString str = getHeadingFile(".h");
+ TQString str = getHeadingFile(".h");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),m_classifierInfo->fileName + ".h");
- str.replace(QRegExp("%filepath%"),fileh.name());
+ str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h");
+ str.replace(TQRegExp("%filepath%"),fileh.name());
h << str<< m_endl;
}
// Write the hash define stuff to prevent multiple parsing/inclusion of header
- QString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(QRegExp(" "), "_");
+ TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(TQRegExp(" "), "_");
writeBlankLine(h);
h << "#ifndef "<< hashDefine + "_H" << m_endl;
h << "#define "<< hashDefine + "_H" << m_endl;
@@ -159,7 +159,7 @@ void CppWriter::writeHeaderFile (UMLClassifier *c, QFile &fileh) {
}
-void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream)
+void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream)
{
// attributes
@@ -180,7 +180,7 @@ void CppWriter::writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility
}
-void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream)
+void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream)
{
// attributes
writeAttributeDecls(permitScope, true, stream); // write static attributes first
@@ -194,20 +194,20 @@ void CppWriter::writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitSco
}
-void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
+void CppWriter::writeSourceFile (UMLClassifier *c, TQFile &filecpp ) {
// open stream for writing
- QTextStream cpp (&filecpp);
+ TQTextStream cpp (&filecpp);
// set the starting indentation at zero
m_indentLevel = 0;
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".cpp");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
- str.replace(QRegExp("%filepath%"),filecpp.name());
+ str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp");
+ str.replace(TQRegExp("%filepath%"),filecpp.name());
cpp << str << m_endl;
}
@@ -233,7 +233,7 @@ void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
//
// write comment for section IF needed
- QString indent = getIndent();
+ TQString indent = getIndent();
if (forceDoc() || m_classifierInfo->hasAccessorMethods || m_classifierInfo->hasOperationMethods)
{
@@ -323,11 +323,11 @@ void CppWriter::writeSourceFile (UMLClassifier *c, QFile &filecpp ) {
}
-void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
+void CppWriter::writeClassDecl(UMLClassifier *c, TQTextStream &cpp)
{
UMLClassifierList superclasses = m_classifierInfo->superclasses;
for(UMLClassifier *classifier = superclasses.first(); classifier ;classifier = superclasses.next()) {
- QString headerName = findFileName(classifier, ".h");
+ TQString headerName = findFileName(classifier, ".h");
if (!headerName.isEmpty()) {
cpp << "#include \"" << headerName << "\"" << m_endl;
}
@@ -386,7 +386,7 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
uint i = 0;
cpp << "enum " << m_classifierInfo->className << " {" << m_endl;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
cpp << getIndent() << enumLiteral;
if (++i < litList.count())
cpp << ",";
@@ -403,8 +403,8 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
if (template_params.count()) {
cpp << "template<";
for (UMLTemplate *t = template_params.first(); t; ) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
cpp << typeName << " " << formalName;
if ((t = template_params.next()) != NULL)
cpp << ", ";
@@ -471,7 +471,7 @@ void CppWriter::writeClassDecl(UMLClassifier *c, QTextStream &cpp)
}
-void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, QTextStream &stream )
+void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream )
{
if(m_classifierInfo->isInterface)
@@ -506,8 +506,8 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
//write documentation
if(forceDoc() || list->count() > 0)
{
- QString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
- QString strStatic = writeStatic ? "Static ":"";
+ TQString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
+ TQString strStatic = writeStatic ? "Static ":"";
writeComment(strStatic + strVis + " attributes",getIndent(), stream);
writeComment(" ",getIndent(), stream);
writeBlankLine(stream);
@@ -517,7 +517,7 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
// write attrib declarations now
bool isFirstAttrib = true;
- QString documentation;
+ TQString documentation;
for(UMLAttribute *at=list->first(); at; at=list->next())
{
@@ -531,10 +531,10 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
isFirstAttrib = false;
- QString varName = getAttributeVariableName(at);
+ TQString varName = getAttributeVariableName(at);
- QString staticValue = at->getStatic() ? "static " : "";
- QString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString typeName = fixTypeName(at->getTypeName());
if(!documentation.isEmpty())
writeComment(documentation, getIndent(), stream);
stream << getIndent() << staticValue << typeName << " " << varName << ";" << m_endl;
@@ -550,7 +550,7 @@ void CppWriter::writeAttributeDecls (Uml::Visibility visibility, bool writeStati
}
-void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, QTextStream &stream )
+void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream )
{
// check the current policy about generate accessors as public
UMLAttributeList * list;
@@ -596,7 +596,7 @@ void CppWriter::writeHeaderAttributeAccessorMethods (Uml::Visibility visibility,
void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
Uml::Visibility visibility, bool isHeaderMethod,
bool isStatic,
- bool writeMethodBody, QTextStream &stream)
+ bool writeMethodBody, TQTextStream &stream)
{
if (!policyExt()->getAutoGenerateAccessors())
@@ -604,8 +604,8 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
if (forceDoc() || attribs->count() > 0)
{
- QString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
- QString strStatic = (isStatic ? " static" : "");
+ TQString strVis = Codegen_Utils::capitalizeFirstLetter(visibility.toString());
+ TQString strStatic = (isStatic ? " static" : "");
writeBlankLine(stream);
writeComment(strVis + strStatic + " attribute accessor methods",getIndent(),stream);
writeComment(" ",getIndent(), stream);
@@ -620,8 +620,8 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
for(at=attribs->first(); at; at=attribs->next())
{
- QString varName = getAttributeVariableName(at);
- QString methodBaseName = cleanName(at->getName());
+ TQString varName = getAttributeVariableName(at);
+ TQString methodBaseName = cleanName(at->getName());
// force capitalizing the field name, this is silly,
// from what I can tell, this IS the default behavior for
@@ -636,14 +636,14 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs,
}
-void CppWriter::writeComment(const QString &comment, const QString &myIndent, QTextStream &cpp)
+void CppWriter::writeComment(const TQString &comment, const TQString &myIndent, TQTextStream &cpp)
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
{
cpp << myIndent << "// " << lines[i] << m_endl;
@@ -655,10 +655,10 @@ void CppWriter::writeComment(const QString &comment, const QString &myIndent, QT
}
}
-void CppWriter::writeDocumentation(QString header, QString body, QString end, QTextStream &cpp)
+void CppWriter::writeDocumentation(TQString header, TQString body, TQString end, TQTextStream &cpp)
{
writeBlankLine(cpp);
- QString indent = getIndent();
+ TQString indent = getIndent();
cpp << indent << "/**" << m_endl;
if (!header.isEmpty())
@@ -667,14 +667,14 @@ void CppWriter::writeDocumentation(QString header, QString body, QString end, QT
cpp << formatDoc(body, indent + " * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for(uint i= 0; i < lines.count(); i++)
cpp << formatDoc(lines[i], indent + " * ");
}
cpp << indent << " */" << m_endl;
}
-void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permitScope, Uml::IDType id, QTextStream &h)
+void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permitScope, Uml::IDType id, TQTextStream &h)
{
if( forceSections() || !associations.isEmpty() )
@@ -699,14 +699,14 @@ void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visi
if (printRoleB && a->getVisibility(Uml::B) == permitScope)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), h);
}
// print RoleA decl
if (printRoleA && a->getVisibility(Uml::A) == permitScope)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), h);
}
@@ -717,15 +717,15 @@ void CppWriter::writeAssociationDecls(UMLAssociationList associations, Uml::Visi
}
}
-void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, QTextStream &stream)
+void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, TQTextStream &stream)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty())
return;
- QString indent = getIndent();
+ TQString indent = getIndent();
// always put space between this and prior decl, if any
writeBlankLine(stream);
@@ -736,14 +736,14 @@ void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleNam
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.lower();
+ TQString fieldVarName = "m_" + roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if(ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
- multi.contains(QRegExp("^1$"))
+ multi.contains(TQRegExp("^1$"))
)
{
// ugh. UGLY. Storing variable name and its class in pairs.
@@ -755,7 +755,7 @@ void CppWriter::writeAssociationRoleDecl(QString fieldClassName, QString roleNam
}
else
{
- QString fieldVarName = "m_" + roleName.lower() + "Vector";
+ TQString fieldVarName = "m_" + roleName.lower() + "Vector";
// record unique occurrences for later when we want to check
// for initialization of this vector
@@ -773,7 +773,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
bool isHeaderMethod,
bool writeMethodBody,
bool writePointerVar,
- Uml::IDType myID, QTextStream &stream)
+ Uml::IDType myID, TQTextStream &stream)
{
if( forceSections() || !associations.isEmpty() )
{
@@ -786,7 +786,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B)) + (writePointerVar ? " *":"");
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B)) + (writePointerVar ? " *":"");
writeAssociationRoleMethod(fieldClassName,
isHeaderMethod,
writeMethodBody,
@@ -800,7 +800,7 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A)) + (writePointerVar ? " *":"");
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A)) + (writePointerVar ? " *":"");
writeAssociationRoleMethod(fieldClassName,
isHeaderMethod,
writeMethodBody,
@@ -816,39 +816,39 @@ void CppWriter::writeAssociationMethods (UMLAssociationList associations,
}
}
-void CppWriter::writeAssociationRoleMethod (const QString &fieldClassName,
+void CppWriter::writeAssociationRoleMethod (const TQString &fieldClassName,
bool isHeaderMethod,
bool writeMethodBody,
- const QString &roleName, const QString &multi,
- const QString &description, Uml::Changeability_Type change,
- QTextStream &stream)
+ const TQString &roleName, const TQString &multi,
+ const TQString &description, Uml::Changeability_Type change,
+ TQTextStream &stream)
{
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.lower();
+ TQString fieldVarName = "m_" + roleName.lower();
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, change, isHeaderMethod, false, writeMethodBody, stream);
}
else
{
- QString fieldVarName = "m_" + roleName.lower() + "Vector";
+ TQString fieldVarName = "m_" + roleName.lower() + "Vector";
writeVectorAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, change, isHeaderMethod, writeMethodBody, stream);
}
}
void CppWriter::writeVectorAttributeAccessorMethods (
- const QString &fieldClassName, const QString &fieldVarName,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &fieldVarName,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type changeType,
bool isHeaderMethod,
bool writeMethodBody,
- QTextStream &stream)
+ TQTextStream &stream)
{
- QString className = fixTypeName(fieldClassName);
- QString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString indent = getIndent();
+ TQString className = fixTypeName(fieldClassName);
+ TQString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString indent = getIndent();
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen)
@@ -859,10 +859,10 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << m_classifierInfo->className << "::";
stream << "add" << fldName << " ( " << className << " add_object )";
if (writeMethodBody) {
- QString method = VECTOR_METHOD_APPEND;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
- method.replace(QRegExp("%ITEMCLASS%"),className);
+ TQString method = VECTOR_METHOD_APPEND;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@@ -882,10 +882,10 @@ void CppWriter::writeVectorAttributeAccessorMethods (
stream << m_classifierInfo->className << "::";
stream << "remove" << fldName << " ( " << className << " remove_object )";
if (writeMethodBody) {
- QString method = VECTOR_METHOD_REMOVE;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
- method.replace(QRegExp("%ITEMCLASS%"),className);
+ TQString method = VECTOR_METHOD_REMOVE;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ method.replace(TQRegExp("%ITEMCLASS%"),className);
stream << indent << " {" << m_endl;
m_indentLevel++;
printTextAsSeparateLinesWithIndent(method,getIndent(),stream);
@@ -896,7 +896,7 @@ void CppWriter::writeVectorAttributeAccessorMethods (
}
// always allow getting the list of stuff
- QString returnVarName = policyExt()->getVectorClassName() + '<' + className + '>';
+ TQString returnVarName = policyExt()->getVectorClassName() + '<' + className + '>';
writeDocumentation("Get the list of " + fldName + " objects held by " + fieldVarName,
description,
"@return " + returnVarName + " list of " + fldName + " objects held by " + fieldVarName,
@@ -918,22 +918,22 @@ void CppWriter::writeVectorAttributeAccessorMethods (
void CppWriter::writeSingleAttributeAccessorMethods(
- const QString& fieldClassName, const QString& fieldVarName,
- const QString& fieldName, const QString &description,
+ const TQString& fieldClassName, const TQString& fieldVarName,
+ const TQString& fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
bool isStatic,
bool writeMethodBody,
- QTextStream &stream)
+ TQTextStream &stream)
{
// DON'T write this IF its a source method AND writeMethodBody is "false"
if(!isHeaderMethod && !writeMethodBody)
return;
- QString className = fixTypeName(fieldClassName);
- QString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString indent = getIndent();
+ TQString className = fixTypeName(fieldClassName);
+ TQString fldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString indent = getIndent();
// set method
if (change == Uml::chg_Changeable && !isStatic) {
@@ -979,7 +979,7 @@ void CppWriter::writeSingleAttributeAccessorMethods(
}
// one day, this should print out non-empty constructor operations too.
-void CppWriter::writeConstructorDecls(QTextStream &stream)
+void CppWriter::writeConstructorDecls(TQTextStream &stream)
{
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
@@ -1000,22 +1000,22 @@ void CppWriter::writeConstructorDecls(QTextStream &stream)
writeBlankLine(stream);
}
-void CppWriter::writeInitAttibuteDecl (QTextStream &stream)
+void CppWriter::writeInitAttibuteDecl (TQTextStream &stream)
{
if (UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors() &&
m_classifierInfo->hasAttributes)
stream << getIndent() << "void initAttributes ( ) ;" << m_endl;
}
-void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
+void CppWriter::writeInitAttibuteMethod (TQTextStream &stream)
{
// only need to do this under certain conditions
if (!UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors() ||
!m_classifierInfo->hasAttributes)
return;
- QString className = m_classifierInfo->className;
- QString indent = getIndent();
+ TQString className = m_classifierInfo->className;
+ TQString indent = getIndent();
stream << indent << "void " << className << "::" << "initAttributes ( ) {" << m_endl;
@@ -1024,31 +1024,31 @@ void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
UMLAttributeList atl = m_classifierInfo->getAttList();
for(UMLAttribute *at = atl.first(); at ; at = atl.next()) {
if(!at->getInitialValue().isEmpty()) {
- QString varName = getAttributeVariableName(at);
+ TQString varName = getAttributeVariableName(at);
stream << getIndent() << varName << " = " << at->getInitialValue() << ";" << m_endl;
}
}
// Now initialize the association related fields (e.g. vectors)
if (!VECTOR_METHOD_INIT.isEmpty()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = VectorFieldVariables.begin(); it != VectorFieldVariables.end(); ++it ) {
- QString fieldVarName = *it;
- QString method = VECTOR_METHOD_INIT;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
+ TQString fieldVarName = *it;
+ TQString method = VECTOR_METHOD_INIT;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName());
stream << getIndent() << method << m_endl;
}
}
if (!OBJECT_METHOD_INIT.isEmpty()) {
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = ObjectFieldVariables.begin(); it != ObjectFieldVariables.end(); ++it ) {
- QString fieldVarName = *it;
+ TQString fieldVarName = *it;
it++;
- QString fieldClassName = *it;
- QString method = OBJECT_METHOD_INIT;
- method.replace(QRegExp("%VARNAME%"),fieldVarName);
- method.replace(QRegExp("%ITEMCLASS%"),fieldClassName);
+ TQString fieldClassName = *it;
+ TQString method = OBJECT_METHOD_INIT;
+ method.replace(TQRegExp("%VARNAME%"),fieldVarName);
+ method.replace(TQRegExp("%ITEMCLASS%"),fieldClassName);
stream << getIndent() << method << m_endl;
}
}
@@ -1063,7 +1063,7 @@ void CppWriter::writeInitAttibuteMethod (QTextStream &stream)
}
// one day, this should print out non-empty constructor operations too.
-void CppWriter::writeConstructorMethods(QTextStream &stream)
+void CppWriter::writeConstructorMethods(TQTextStream &stream)
{
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
@@ -1076,9 +1076,9 @@ void CppWriter::writeConstructorMethods(QTextStream &stream)
if (!generateEmptyConstructors)
return;
- QString className = m_classifierInfo->className;
+ TQString className = m_classifierInfo->className;
// empty constructor
- QString indent = getIndent();
+ TQString indent = getIndent();
stream << indent << className << "::" << className << " ( ) {" << m_endl;
if(m_classifierInfo->hasAttributes)
stream << indent << indent << "initAttributes();" << m_endl;
@@ -1092,7 +1092,7 @@ void CppWriter::writeConstructorMethods(QTextStream &stream)
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
-QString CppWriter::fixTypeName(const QString &string)
+TQString CppWriter::fixTypeName(const TQString &string)
{
if (string.isEmpty())
return "void";
@@ -1102,7 +1102,7 @@ QString CppWriter::fixTypeName(const QString &string)
}
void CppWriter::writeOperations(UMLClassifier *c, bool isHeaderMethod,
- Uml::Visibility permitScope, QTextStream &cpp) {
+ Uml::Visibility permitScope, TQTextStream &cpp) {
UMLOperationList oplist;
@@ -1128,16 +1128,16 @@ void CppWriter::writeOperations(UMLClassifier *c, bool isHeaderMethod,
// write operation in either header or
// a source file
-void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, QTextStream &cpp) {
- QString className = m_classifierInfo->className;
+void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, TQTextStream &cpp) {
+ TQString className = m_classifierInfo->className;
const bool generateEmptyConstructors =
UMLApp::app()->getCommonPolicy()->getAutoGenerateConstructors();
// generate method decl for each operation given
for (UMLOperation *op = oplist.first(); op; op = oplist.next()) {
- QString returnStr; // buffer for documentation
- QString methodReturnType;
+ TQString returnStr; // buffer for documentation
+ TQString methodReturnType;
UMLAttributeList atl = op->getParmList(); // method parameters
if (op->isConstructorOperation()) {
@@ -1152,7 +1152,7 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
returnStr += "@return " + methodReturnType + '\n';
}
- QString str;
+ TQString str;
if (op->getAbstract() || m_classifierInfo->isInterface) {
if (isHeaderMethod) {
// declare abstract method as 'virtual'
@@ -1175,10 +1175,10 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
// generate parameters
uint j = 0;
for (UMLAttribute *at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName;
- const QString initVal = at->getInitialValue();
+ const TQString initVal = at->getInitialValue();
if (! initVal.isEmpty())
str += " = " + initVal;
if (j < atl.count() - 1)
@@ -1207,7 +1207,7 @@ void CppWriter::writeOperations(UMLOperationList &oplist, bool isHeaderMethod, Q
// of an association have roles we need to have forward declaration of
// the other class...but only IF its not THIS class (as could happen
// in self-association relationship).
-void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType myId, QTextStream &stream)
+void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType myId, TQTextStream &stream)
{
for (UMLAssociation *a = list.first(); a; a = list.next()) {
@@ -1233,9 +1233,9 @@ void CppWriter::printAssociationIncludeDecl (UMLAssociationList list, Uml::IDTyp
}
}
-QString CppWriter::fixInitialStringDeclValue(const QString &value, const QString &type)
+TQString CppWriter::fixInitialStringDeclValue(const TQString &value, const TQString &type)
{
- QString val = value;
+ TQString val = value;
// check for strings only
if (!val.isEmpty() && type == policyExt()->getStringClassName()) {
if (!val.startsWith("\""))
@@ -1247,37 +1247,37 @@ QString CppWriter::fixInitialStringDeclValue(const QString &value, const QString
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString CppWriter::getUMLObjectName(UMLObject *obj)
+TQString CppWriter::getUMLObjectName(UMLObject *obj)
{
- return(obj!=0)?obj->getName():QString("NULL");
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-void CppWriter::writeBlankLine(QTextStream &stream)
+void CppWriter::writeBlankLine(TQTextStream &stream)
{
stream << m_endl;
}
-void CppWriter::printTextAsSeparateLinesWithIndent (const QString &text, const QString &indent, QTextStream &stream)
+void CppWriter::printTextAsSeparateLinesWithIndent (const TQString &text, const TQString &indent, TQTextStream &stream)
{
if(text.isEmpty())
return;
- QStringList lines = QStringList::split( "\n", text);
+ TQStringList lines = TQStringList::split( "\n", text);
for(uint i= 0; i < lines.count(); i++)
stream << indent << lines[i] << m_endl;
}
-QString CppWriter::getAttributeVariableName (UMLAttribute *at)
+TQString CppWriter::getAttributeVariableName (UMLAttribute *at)
{
- QString fieldName = "m_" + cleanName(at->getName());
+ TQString fieldName = "m_" + cleanName(at->getName());
return fieldName;
}
-QStringList CppWriter::defaultDatatypes() {
+TQStringList CppWriter::defaultDatatypes() {
return Codegen_Utils::cppDatatypes();
}
-const QStringList CppWriter::reservedKeywords() const {
+const TQStringList CppWriter::reservedKeywords() const {
return Codegen_Utils::reservedCppKeywords();
}
diff --git a/umbrello/umbrello/codegenerators/cppwriter.h b/umbrello/umbrello/codegenerators/cppwriter.h
index 8ae58226..06f914e4 100644
--- a/umbrello/umbrello/codegenerators/cppwriter.h
+++ b/umbrello/umbrello/codegenerators/cppwriter.h
@@ -62,12 +62,12 @@ public:
/**
* Add C++ primitives as datatypes
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -75,25 +75,25 @@ private:
* Writes class's documentation to the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &cpp);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &cpp);
/**
* Writes the comment and class constructor declaration or methods
*/
- void writeConstructorDecls(QTextStream &h);
- void writeConstructorMethods(QTextStream &cpp);
+ void writeConstructorDecls(TQTextStream &h);
+ void writeConstructorMethods(TQTextStream &cpp);
/**
* write all field declarations, for both attributes and associations for the
* given permitted scope.
*/
- void writeFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeFieldDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* write all method declarations, for attributes and associations
* for the given permitted scope.
*/
- void writeAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* write all operations for a given class
@@ -102,7 +102,7 @@ private:
* @param permitScope what type of method to write (by Scope)
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, bool isHeaderMethod, Uml::Visibility permitScope, QTextStream &j);
+ void writeOperations(UMLClassifier *c, bool isHeaderMethod, Uml::Visibility permitScope, TQTextStream &j);
/**
* write a list of operations for a given class
@@ -110,14 +110,14 @@ private:
* @param isHeaderMethod true when writing to a header file, false for body file
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, bool isHeaderMethod, QTextStream &j);
+ void writeOperations(UMLOperationList &list, bool isHeaderMethod, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* writes the Attribute declarations
@@ -125,143 +125,143 @@ private:
* @param writeStatic whether to write static or non-static attributes out
* @param stream text stream
*/
- void writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, QTextStream &stream );
+ void writeAttributeDecls (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream );
/**
* Write out fields and operations for this class selected on a particular
* visibility.
*/
- void writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitVisibility, QTextStream &stream);
+ void writeHeaderFieldDecl(UMLClassifier *c, Uml::Visibility permitVisibility, TQTextStream &stream);
- void writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, QTextStream &stream );
+ void writeHeaderAttributeAccessorMethods (Uml::Visibility visibility, bool writeStatic, TQTextStream &stream );
- void writeHeaderAttributeAccessorMethodDecls(UMLClassifier *c, Uml::Visibility permitVisibility, QTextStream &stream);
- void writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, QTextStream &stream);
+ void writeHeaderAttributeAccessorMethodDecls(UMLClassifier *c, Uml::Visibility permitVisibility, TQTextStream &stream);
+ void writeHeaderAccessorMethodDecl(UMLClassifier *c, Uml::Visibility permitScope, TQTextStream &stream);
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permit, Uml::IDType id, QTextStream &stream);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::Visibility permit, Uml::IDType id, TQTextStream &stream);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, QTextStream &stream);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, TQTextStream &stream);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
*/
void writeAttributeMethods(UMLAttributeList *attribs, Uml::Visibility visib, bool isHeaderMethod,
bool isStatic,
- bool writeMethodBody, QTextStream &stream);
+ bool writeMethodBody, TQTextStream &stream);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, Uml::Visibility permitVisib,
bool isHeaderMethod,
- bool writeMethodBody, bool writePointerVar, Uml::IDType id, QTextStream &stream);
+ bool writeMethodBody, bool writePointerVar, Uml::IDType id, TQTextStream &stream);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the association
* role
*/
- void writeAssociationRoleMethod(const QString &fieldClassName, bool isHeaderMethod, bool writeMethodBody,
- const QString &roleName, const QString &multi,
- const QString &description, Uml::Changeability_Type change,
- QTextStream &stream);
+ void writeAssociationRoleMethod(const TQString &fieldClassName, bool isHeaderMethod, bool writeMethodBody,
+ const TQString &roleName, const TQString &multi,
+ const TQString &description, Uml::Changeability_Type change,
+ TQTextStream &stream);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
void writeSingleAttributeAccessorMethods(
- const QString &fieldClassName, const QString &Name,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &Name,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
- bool isStatic, bool writeMethodBody, QTextStream &cpp);
+ bool isStatic, bool writeMethodBody, TQTextStream &cpp);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
void writeVectorAttributeAccessorMethods(
- const QString &fieldClassName, const QString &fieldVarName,
- const QString &fieldName, const QString &description,
+ const TQString &fieldClassName, const TQString &fieldVarName,
+ const TQString &fieldName, const TQString &description,
Uml::Changeability_Type change,
bool isHeaderMethod,
bool writeMethodBody,
- QTextStream &cpp);
+ TQTextStream &cpp);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &cpp);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &cpp);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QTextStream &cpp);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQTextStream &cpp);
/**
* write the header file for this classifier.
*/
- void writeHeaderFile (UMLClassifier *c, QFile &file);
+ void writeHeaderFile (UMLClassifier *c, TQFile &file);
/**
* write the source code body file for this classifier.
*/
- void writeSourceFile (UMLClassifier *c, QFile &file);
+ void writeSourceFile (UMLClassifier *c, TQFile &file);
/**
* utility method to break up a block of text, which has embedded newline chars,
* and print them to a stream as separate lines of text, indented as directed.
*/
- void printTextAsSeparateLinesWithIndent (const QString &text, const QString &indent,
- QTextStream &stream);
+ void printTextAsSeparateLinesWithIndent (const TQString &text, const TQString &indent,
+ TQTextStream &stream);
/**
* Intellegently print out header include/forward decl. for associated classes.
*/
- void printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType this_id, QTextStream &stream);
+ void printAssociationIncludeDecl (UMLAssociationList list, Uml::IDType this_id, TQTextStream &stream);
/**
* If needed, write out the method to initialize attributes of our class.
*/
- void writeInitAttibuteMethod (QTextStream &stream);
+ void writeInitAttibuteMethod (TQTextStream &stream);
/**
* If needed, write out the declaration for the method to initialize attributes of our class.
*/
- void writeInitAttibuteDecl (QTextStream &stream);
+ void writeInitAttibuteDecl (TQTextStream &stream);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Replaces `string' with STRING_TYPENAME.
*/
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(const QString &value, const QString &type);
+ TQString fixInitialStringDeclValue(const TQString &value, const TQString &type);
/**
* Determine what the variable name of this attribute should be.
*/
- QString getAttributeVariableName (UMLAttribute *at);
+ TQString getAttributeVariableName (UMLAttribute *at);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream &stream);
+ void writeBlankLine(TQTextStream &stream);
/**
* Return the policy object
@@ -273,18 +273,18 @@ private:
*/
ClassifierInfo * m_classifierInfo;
- QString VECTOR_METHOD_APPEND;
- QString VECTOR_METHOD_REMOVE;
- QString VECTOR_METHOD_INIT;
- QString OBJECT_METHOD_INIT;
+ TQString VECTOR_METHOD_APPEND;
+ TQString VECTOR_METHOD_REMOVE;
+ TQString VECTOR_METHOD_INIT;
+ TQString OBJECT_METHOD_INIT;
/**
* Create association methods for class attributes/associations/operations as inline decl in header.
*/
bool INLINE_ASSOCIATION_METHODS;
- QStringList ObjectFieldVariables;
- QStringList VectorFieldVariables;
+ TQStringList ObjectFieldVariables;
+ TQStringList VectorFieldVariables;
};
diff --git a/umbrello/umbrello/codegenerators/csharpwriter.cpp b/umbrello/umbrello/codegenerators/csharpwriter.cpp
index 73975b48..42b055e5 100644
--- a/umbrello/umbrello/codegenerators/csharpwriter.cpp
+++ b/umbrello/umbrello/codegenerators/csharpwriter.cpp
@@ -15,8 +15,8 @@
#include "csharpwriter.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../uml.h"
#include "../umldoc.h"
@@ -116,8 +116,8 @@ CSharpWriter::~CSharpWriter()
{
}
-QStringList CSharpWriter::defaultDatatypes() {
- QStringList l;
+TQStringList CSharpWriter::defaultDatatypes() {
+ TQStringList l;
l.append("bool");
l.append("byte");
l.append("char");
@@ -145,20 +145,20 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".cs");
+ TQString fileName = findFileName(c, ".cs");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filecs;
+ TQFile filecs;
if (!openFile(filecs, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream cs(&filecs);
+ TQTextStream cs(&filecs);
//////////////////////////////
//Start generating the code!!
@@ -166,11 +166,11 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".cs");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filecs.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filecs.name());
cs<<str<<m_endl;
}
@@ -314,7 +314,7 @@ void CSharpWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void CSharpWriter::writeOperations(UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeOperations(UMLClassifier *c, TQTextStream &cs) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -382,7 +382,7 @@ void CSharpWriter::writeOperations(UMLClassifier *c, QTextStream &cs) {
}
-void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs) {
+void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, TQTextStream &cs) {
// oplist for implemented abstract operations
UMLOperationList opabstract;
opabstract.setAutoDelete(false);
@@ -413,7 +413,7 @@ void CSharpWriter::writeOverridesRecursive(UMLClassifierList *superclasses, QTex
}
}
}
-void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs) {
+void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, TQTextStream &cs) {
UMLAssociation *a;
for (a = realizations->first(); a; a = realizations->next()) {
@@ -442,7 +442,7 @@ void CSharpWriter::writeRealizationsRecursive(UMLClassifier *currentClass, UMLAs
}
void CSharpWriter::writeOperations(UMLOperationList opList,
- QTextStream &cs, bool isInterface /* = false */,
+ TQTextStream &cs, bool isInterface /* = false */,
bool isOverride /* = false */,
bool generateErrorStub /* = false */) {
@@ -470,7 +470,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
if (forceDoc() || !at->getDoc().isEmpty()) {
cs << m_container_indent << m_indentation << "/// <param name=\"" << cleanName(at->getName()) << "\">";
//removing newlines from parameter doc
- cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(QRegExp(" $"), "");
+ cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(TQRegExp(" $"), "");
cs << "</param>" << m_endl;
}
}
@@ -521,8 +521,8 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
// no initial values in C#
//<< (!(at->getInitialValue().isEmpty()) ?
- // (QString(" = ")+at->getInitialValue()) :
- // QString(""))
+ // (TQString(" = ")+at->getInitialValue()) :
+ // TQString(""))
cs << ((j < i-1)?", ":"");
}
cs << ")";
@@ -543,7 +543,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList,
}
}
-void CSharpWriter::writeAttributes(UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeAttributes(UMLClassifier *c, TQTextStream &cs) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
@@ -597,7 +597,7 @@ void CSharpWriter::writeAttributes(UMLClassifier *c, QTextStream &cs) {
}
-void CSharpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &cs) {
+void CSharpWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &cs) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
@@ -613,7 +613,7 @@ void CSharpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &cs) {
return;
}
-void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs) {
+void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, TQTextStream &cs) {
UMLAssociation *a;
for (a = associated.first(); a ; a = associated.next()) {
@@ -626,12 +626,12 @@ void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UML
continue;
}
// Take name and documentaton from Role, take type name from the referenced object
- QString roleName = cleanName(a->getRoleName(Uml::B));
- QString typeName = cleanName(o->getName());
+ TQString roleName = cleanName(a->getRoleName(Uml::B));
+ TQString typeName = cleanName(o->getName());
if (roleName.isEmpty()) {
- roleName = QString("UnnamedRoleB_%1").arg(m_unnamedRoles++);
+ roleName = TQString("UnnamedRoleB_%1").arg(m_unnamedRoles++);
}
- QString roleDoc = a->getRoleDoc(Uml::B);
+ TQString roleDoc = a->getRoleDoc(Uml::B);
//FIXME:is this simple condition enough?
if (a->getMulti(Uml::B).isEmpty() || a->getMulti(Uml::B) == "1") {
@@ -645,7 +645,7 @@ void CSharpWriter::writeAssociatedAttributes(UMLAssociationList &associated, UML
}
}
-void CSharpWriter::writeAttribute(QString doc, Uml::Visibility visibility, bool isStatic, QString typeName, QString name, QString initialValue, bool asProperty, QTextStream &cs) {
+void CSharpWriter::writeAttribute(TQString doc, Uml::Visibility visibility, bool isStatic, TQString typeName, TQString name, TQString initialValue, bool asProperty, TQTextStream &cs) {
if (forceDoc() || !doc.isEmpty()) {
@@ -691,7 +691,7 @@ void CSharpWriter::writeAttribute(QString doc, Uml::Visibility visibility, bool
cs << ";" << m_endl << m_endl;
}
-QString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) {
+TQString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) {
UMLPackage *p = cl->getType()->getUMLPackage();
if (m_seenIncludes.findRef(p) != -1) {
return cl->getType()->getName();
@@ -709,9 +709,9 @@ Uml::Programming_Language CSharpWriter::getLanguage() {
return Uml::pl_CSharp;
}
-const QStringList CSharpWriter::reservedKeywords() const {
+const TQStringList CSharpWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; reserved_words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/csharpwriter.h b/umbrello/umbrello/codegenerators/csharpwriter.h
index a6d20f2d..ef09bac5 100644
--- a/umbrello/umbrello/codegenerators/csharpwriter.h
+++ b/umbrello/umbrello/codegenerators/csharpwriter.h
@@ -49,12 +49,12 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
/**
* get list of predefined data types
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -66,7 +66,7 @@ private:
/**
* Adds extra indenting if the class is in a container (namespace)
*/
- QString m_container_indent;
+ TQString m_container_indent;
/**
* Collection of included namespaces, to skip them from variable types.
@@ -87,7 +87,7 @@ private:
*/
void writeRealizationsRecursive(UMLClassifier *currentClass,
UMLAssociationList *realizations,
- QTextStream &cs);
+ TQTextStream &cs);
/**
* write all operations for a given class
@@ -95,7 +95,7 @@ private:
* @param c the concept we are generating code for
* @param cs output stream
*/
- void writeOperations(UMLClassifier *c, QTextStream &cs);
+ void writeOperations(UMLClassifier *c, TQTextStream &cs);
/**
* write a list of class operations
@@ -106,7 +106,7 @@ private:
* @param isOverride implementation of an inherited abstract function
*/
void writeOperations(UMLOperationList opList,
- QTextStream &cs,
+ TQTextStream &cs,
bool interface = false,
bool isOverride = false,
bool generateErrorStub = false);
@@ -117,19 +117,19 @@ private:
* @param superclasses List of superclasses to start recursing on
* @param cs output stream
*/
- void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs);
+ void writeOverridesRecursive(UMLClassifierList *superclasses, TQTextStream &cs);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param cs output stream
*/
- void writeAttributes(UMLClassifier *c, QTextStream &cs);
+ void writeAttributes(UMLClassifier *c, TQTextStream &cs);
/** write a list of class attributes
* @param atList the list of attributes
* @param cs output stream
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &cs);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &cs);
/**
* write attributes from associated objects (compositions, aggregations)
@@ -137,7 +137,7 @@ private:
* @param c currently written class, to see association direction
* @param cs output stream
*/
- void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs);
+ void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, TQTextStream &cs);
/**
* write a single attribute to the output stream
@@ -150,13 +150,13 @@ private:
* @param asProperty true writes as property (get/set), false writes single line variable
* @param cs output stream
*/
- void writeAttribute(QString doc, Uml::Visibility visibility, bool isStatic, QString typeName, QString name, QString initialValue, bool asProperty, QTextStream &cs);
+ void writeAttribute(TQString doc, Uml::Visibility visibility, bool isStatic, TQString typeName, TQString name, TQString initialValue, bool asProperty, TQTextStream &cs);
/** find the type in used namespaces, if namespace found return short name, complete otherwise.
*
* @param at Operation or Attribute to check type
*/
- QString makeLocalTypeName(UMLClassifierListItem *cl);
+ TQString makeLocalTypeName(UMLClassifierListItem *cl);
};
diff --git a/umbrello/umbrello/codegenerators/dwriter.cpp b/umbrello/umbrello/codegenerators/dwriter.cpp
index 3e16b136..088ab9c1 100644
--- a/umbrello/umbrello/codegenerators/dwriter.cpp
+++ b/umbrello/umbrello/codegenerators/dwriter.cpp
@@ -19,9 +19,9 @@
// own header
#include "dwriter.h"
// qt includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
// kde includes
#include <kdebug.h>
// app includes
@@ -45,14 +45,14 @@ Uml::Programming_Language DWriter::getLanguage() {
}
// FIXME: doesn't work yet
-void DWriter::writeModuleDecl(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeModuleDecl(UMLClassifier *c, TQTextStream &d) {
if(!c->getPackage().isEmpty())
d << "module " << c->getPackage() << ";" << m_endl;
writeBlankLine(d);
}
-void DWriter::writeModuleImports(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeModuleImports(UMLClassifier *c, TQTextStream &d) {
// another preparation, determine what we have
UMLAssociationList associations = c->getSpecificAssocs(Uml::at_Association); // BAD! only way to get "general" associations.
UMLAssociationList uniAssociations = c->getUniAssociationToBeImplemented();
@@ -74,7 +74,7 @@ void DWriter::writeModuleImports(UMLClassifier *c, QTextStream &d) {
for (UMLPackage *con = imports.first(); con; con = imports.next()) {
if (con->getBaseType() == Uml::ot_Datatype)
continue;
- QString pkg = con->getPackage();
+ TQString pkg = con->getPackage();
if (!pkg.isEmpty() && pkg != c->getPackage())
d << "import " << pkg << "." << cleanName(con->getName()) << ";"
<< m_endl;
@@ -91,7 +91,7 @@ void DWriter::writeClass(UMLClassifier *c) {
isInterface = c->isInterface();
- QString fileName = cleanName(c->getName().lower());
+ TQString fileName = cleanName(c->getName().lower());
//find an appropriate name for our file
fileName = findFileName(c, ".d");
@@ -101,21 +101,21 @@ void DWriter::writeClass(UMLClassifier *c) {
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
}
// open text stream to file
- QTextStream d(&file);
+ TQTextStream d(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".d");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
d<<str<<m_endl;
}
@@ -278,7 +278,7 @@ void DWriter::writeClass(UMLClassifier *c) {
emit codeGenerated(c, true);
}
-void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeClassDecl(UMLClassifier *c, TQTextStream &d) {
// class documentation
if (!c->getDoc().isEmpty()) {
@@ -311,7 +311,7 @@ void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
}
// (c) class name
- QString classname = cleanName(c->getName()); // our class name
+ TQString classname = cleanName(c->getName()); // our class name
d << classname;
// (d) template parameters
@@ -367,11 +367,11 @@ void DWriter::writeClassDecl(UMLClassifier *c, QTextStream &d) {
}
}
-void DWriter::writeProtectionMod(Uml::Visibility visibility, QTextStream &d) {
+void DWriter::writeProtectionMod(Uml::Visibility visibility, TQTextStream &d) {
d << m_indentation << scopeToDDecl(visibility) << ":" << m_endl << m_endl;
}
-void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, QTextStream &d) {
+void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, TQTextStream &d) {
if (atlist.count()==0) return;
writeProtectionMod(visibility, d);
@@ -400,14 +400,14 @@ void DWriter::writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &a
d << cleanName(at->getName());
// initial value
- QString initVal = fixInitialStringDeclValue(at->getInitialValue(), at->getTypeName());
+ TQString initVal = fixInitialStringDeclValue(at->getInitialValue(), at->getTypeName());
if (!initVal.isEmpty()) d << " = " << initVal;
d << ";" << m_endl << m_endl;
}
}
void DWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &d ) {
+ UMLAttributeList &atpriv, TQTextStream &d ) {
writeAttributeDecl(Uml::Visibility::Public, atpub, d);
writeAttributeDecl(Uml::Visibility::Protected, atprot, d);
@@ -415,31 +415,31 @@ void DWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atp
//TODO: export and package
}
-void DWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &d) {
+void DWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &d) {
if (atpub.count()==0) return;
writeProtectionMod(visibility, d);
for(UMLAttribute *at=atpub.first(); at; at=atpub.next()) {
- QString fieldName = cleanName(at->getName());
+ TQString fieldName = cleanName(at->getName());
writeSingleAttributeAccessorMethods(
at->getTypeName(), "m_" + fieldName, fieldName, at->getDoc(),
visibility, Uml::chg_Changeable, at->getStatic(), d);
}
}
-void DWriter::writeComment(const QString &comment, const QString &myIndent,
- QTextStream &d, bool dDocStyle) {
+void DWriter::writeComment(const TQString &comment, const TQString &myIndent,
+ TQTextStream &d, bool dDocStyle) {
if(dDocStyle) {
d << myIndent << "/**" << m_endl;
}
- QStringList lines = QStringList::split("\n", comment);
+ TQStringList lines = TQStringList::split("\n", comment);
if (lines.count() == 0) lines << comment;
for (uint i = 0; i < lines.count(); ++i) {
- QString tmp = lines[i];
+ TQString tmp = lines[i];
while (tmp.length() > 77) {
uint l = tmp.left(77).findRev(' ');
@@ -460,7 +460,7 @@ void DWriter::writeComment(const QString &comment, const QString &myIndent,
}
}
-void DWriter::writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &d) {
+void DWriter::writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &d) {
d << indent << "/**" << m_endl;
if (!header.isEmpty())
d << formatDoc(header, indent+" * ");
@@ -468,14 +468,14 @@ void DWriter::writeDocumentation(QString header, QString body, QString end, QStr
d << formatDoc(body, indent+" * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for (uint i= 0; i < lines.count(); i++)
d << formatDoc(lines[i], indent + " * ");
}
d<<indent<< " */" << m_endl;
}
-void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &d) {
+void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &d) {
if( forceSections() || !associations.isEmpty() )
{
@@ -497,23 +497,23 @@ void DWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType
// print RoleB decl
if (printRoleB)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), a->getVisibility(Uml::B), d);
}
// print RoleA decl
if (printRoleA)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), a->getVisibility(Uml::A), d);
}
}
}
}
-void DWriter::writeAssociationRoleDecl(QString fieldClassName,
- QString roleName, QString multi,
- QString doc, Uml::Visibility /*visib*/, QTextStream &d) {
+void DWriter::writeAssociationRoleDecl(TQString fieldClassName,
+ TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility /*visib*/, TQTextStream &d) {
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty()) return;
@@ -527,7 +527,7 @@ void DWriter::writeAssociationRoleDecl(QString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
d << m_indentation << fieldClassName << " ";
if (hasAccessors) d << "m_";
@@ -548,7 +548,7 @@ void DWriter::writeAssociationRoleDecl(QString fieldClassName,
writeBlankLine(d);
}
-void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, QTextStream &d) {
+void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, TQTextStream &d) {
if( forceSections() || !associations.isEmpty() ) {
for(UMLAssociation *a = associations.first(); a; a = associations.next()) {
// insert the methods to access the role of the other
@@ -556,7 +556,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
if (a->getObjectId(Uml::A) == thisClass->getID()) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
writeAssociationRoleMethod(fieldClassName,
a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -568,7 +568,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
if (a->getObjectId(Uml::B) == thisClass->getID()) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
writeAssociationRoleMethod(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A),
a->getRoleDoc(Uml::A),
@@ -581,30 +581,30 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass
}
}
-void DWriter::writeAssociationRoleMethod (QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &d) {
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName);
+void DWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &d) {
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName);
writeSingleAttributeAccessorMethods(
fieldClassName, fieldVarName, roleName, description, visib, change, false, d);
} else {
- QString fieldVarName = "m_" + pluralize(deCapitaliseFirstLetter(roleName));
+ TQString fieldVarName = "m_" + pluralize(deCapitaliseFirstLetter(roleName));
writeVectorAttributeAccessorMethods(
fieldClassName, fieldVarName, pluralize(roleName), description, visib, change, d);
}
}
-void DWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void DWriter::writeVectorAttributeAccessorMethods (TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility /*visibility*/, Uml::Changeability_Type changeType,
- QTextStream &d) {
+ TQTextStream &d) {
fieldClassName = fixTypeName(fieldClassName);
- QString fieldNameUP = unPluralize(fieldName);
- QString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldNameUP);
+ TQString fieldNameUP = unPluralize(fieldName);
+ TQString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldNameUP);
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen) {
@@ -646,12 +646,12 @@ void DWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QStri
}
-void DWriter::writeSingleAttributeAccessorMethods(QString fieldClassName,
- QString fieldVarName, QString fieldName, QString description, Uml::Visibility /*visibility*/,
- Uml::Changeability_Type change, bool isFinal, QTextStream &d) {
+void DWriter::writeSingleAttributeAccessorMethods(TQString fieldClassName,
+ TQString fieldVarName, TQString fieldName, TQString description, Uml::Visibility /*visibility*/,
+ Uml::Changeability_Type change, bool isFinal, TQTextStream &d) {
fieldClassName = fixTypeName(fieldClassName);
- QString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldName);
+ TQString fieldNameUC = Codegen_Utils::capitalizeFirstLetter(fieldName);
if (fieldName.left(2) == "m_") fieldName = fieldName.right(fieldName.length()-2);
// set method
@@ -676,7 +676,7 @@ void DWriter::writeSingleAttributeAccessorMethods(QString fieldClassName,
d << startline << "}" << m_endl << m_endl;
}
-void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeConstructor(UMLClassifier *c, TQTextStream &d) {
if (forceDoc())
{
@@ -688,7 +688,7 @@ void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
}
// write the first constructor
- QString className = cleanName(c->getName());
+ TQString className = cleanName(c->getName());
d << m_indentation << "public this("<<") { }";
}
@@ -696,7 +696,7 @@ void DWriter::writeConstructor(UMLClassifier *c, QTextStream &d) {
// IF the type is "string" we need to declare it as
// the D Object "String" (there is no string primative in D).
// Same thing again for "bool" to "boolean"
-QString DWriter::fixTypeName(const QString& string) {
+TQString DWriter::fixTypeName(const TQString& string) {
if (string.isEmpty())
return "void";
if (string == "string")
@@ -710,8 +710,8 @@ QString DWriter::fixTypeName(const QString& string) {
return string;
}
-QStringList DWriter::defaultDatatypes() {
- QStringList l;
+TQStringList DWriter::defaultDatatypes() {
+ TQStringList l;
l << "void"
<< "bool"
<< "byte"
@@ -805,7 +805,7 @@ void DWriter::getInterfacesOperationsToBeImplemented(UMLClassifier *c, UMLOperat
}
}
-void DWriter::writeOperations(UMLClassifier *c, QTextStream &d) {
+void DWriter::writeOperations(UMLClassifier *c, TQTextStream &d) {
UMLOperationList opl;
UMLOperationList oppub,opprot,oppriv;
oppub.setAutoDelete(false);
@@ -862,16 +862,16 @@ void DWriter::writeOperations(UMLClassifier *c, QTextStream &d) {
}
-void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
+void DWriter::writeOperations(UMLOperationList &oplist, TQTextStream &d) {
UMLAttributeList atl;
- QString str;
+ TQString str;
// generate method decl for each operation given
for(UMLOperation *op=oplist.first(); op; op=oplist.next()) {
- QString returnStr = "";
+ TQString returnStr = "";
// write documentation
- QString methodReturnType = fixTypeName(op->getTypeName());
+ TQString methodReturnType = fixTypeName(op->getTypeName());
//TODO: return type comment
if(methodReturnType != "void") {
@@ -888,12 +888,12 @@ void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
int i = atl.count();
int j = 0;
for (UMLAttribute *at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName +
(!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
+ ((j < i-1)?", ":"");
returnStr += "@param " + atName+' '+at->getDoc() + m_endl;
}
@@ -912,7 +912,7 @@ void DWriter::writeOperations(UMLOperationList &oplist, QTextStream &d) {
}
}
-QString DWriter::fixInitialStringDeclValue(QString value, QString type) {
+TQString DWriter::fixInitialStringDeclValue(TQString value, TQString type) {
// check for strings only
if (!value.isEmpty() && type == "String") {
if (!value.startsWith("\""))
@@ -923,8 +923,8 @@ QString DWriter::fixInitialStringDeclValue(QString value, QString type) {
return value;
}
-QString DWriter::scopeToDDecl(Uml::Visibility scope) {
- QString scopeString;
+TQString DWriter::scopeToDDecl(Uml::Visibility scope) {
+ TQString scopeString;
switch(scope) {
case Uml::Visibility::Public: scopeString = "public"; break;
@@ -937,20 +937,20 @@ QString DWriter::scopeToDDecl(Uml::Visibility scope) {
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString DWriter::getUMLObjectName(UMLObject *obj) {
- return(obj!=0)?obj->getName():QString("NULL");
+TQString DWriter::getUMLObjectName(UMLObject *obj) {
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-QString DWriter::deCapitaliseFirstLetter(QString string) {
+TQString DWriter::deCapitaliseFirstLetter(TQString string) {
string.replace( 0, 1, string[0].lower());
return string;
}
-QString DWriter::pluralize(QString string) {
+TQString DWriter::pluralize(TQString string) {
return string + (string.right(1) == "s" ? "es" : "s");
}
-QString DWriter::unPluralize(QString string) {
+TQString DWriter::unPluralize(TQString string) {
// does not handle special cases liek datum -> data, etc.
if (string.length() > 2 && string.right(3) == "ses") {
@@ -964,7 +964,7 @@ QString DWriter::unPluralize(QString string) {
return string;
}
-void DWriter::writeBlankLine(QTextStream &d) {
+void DWriter::writeBlankLine(TQTextStream &d) {
d << m_endl;
}
diff --git a/umbrello/umbrello/codegenerators/dwriter.h b/umbrello/umbrello/codegenerators/dwriter.h
index 38828359..2a738d01 100644
--- a/umbrello/umbrello/codegenerators/dwriter.h
+++ b/umbrello/umbrello/codegenerators/dwriter.h
@@ -59,30 +59,30 @@ public:
/**
* Overrides method from class CodeGenerator
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
/**
* Writes the module declaration.
*/
- void writeModuleDecl(UMLClassifier *c, QTextStream &d);
+ void writeModuleDecl(UMLClassifier *c, TQTextStream &d);
/**
* Writes the module imports.
*/
- void writeModuleImports(UMLClassifier *c, QTextStream &d);
+ void writeModuleImports(UMLClassifier *c, TQTextStream &d);
/**
* Writes class's documentation then the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &d);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &d);
/**
* Writes the comment and class constructor
*/
- void writeConstructor(UMLClassifier *c, QTextStream &d);
+ void writeConstructor(UMLClassifier *c, TQTextStream &d);
/**
* return true if the two operations have the same name and the same parameters
@@ -120,28 +120,28 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, QTextStream &j);
+ void writeOperations(UMLClassifier *c, TQTextStream &j);
/**
* write a list of operations for a given class
* @param list the list of operations you want to write
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, QTextStream &j);
+ void writeOperations(UMLOperationList &list, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* Writes the protection modifier line.
* @param visibility protection modifier
* @param d text stream
*/
- void writeProtectionMod(Uml::Visibility visibility, QTextStream &d);
+ void writeProtectionMod(Uml::Visibility visibility, TQTextStream &d);
/**
* Writes attribute declarations with a specific
@@ -150,7 +150,7 @@ private:
* @param atlist attribute list
* @param d text stream
*/
- void writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, QTextStream &d);
+ void writeAttributeDecl(Uml::Visibility visibility, UMLAttributeList &atlist, TQTextStream &d);
/**
* writes the Attribute declarations
@@ -160,109 +160,109 @@ private:
* @param d text stream
*/
void writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &d );
+ UMLAttributeList &atpriv, TQTextStream &d );
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &d);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &d);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &d);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &d);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in atpub
*/
- void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &d);
+ void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &d);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, UMLClassifier *thisClass,
- QTextStream &d);
+ TQTextStream &d);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the assocaition
* role
*/
- void writeAssociationRoleMethod(QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &d);
+ void writeAssociationRoleMethod(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &d);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
- void writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &d);
+ bool isFinal, TQTextStream &d);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
- void writeVectorAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeVectorAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- QTextStream &d);
+ TQTextStream &d);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &d, bool dDocStyle=false);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &d, bool dDocStyle=false);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &d);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &d);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Lowers the case of the first letter in the given string
*/
- QString deCapitaliseFirstLetter(QString string);
+ TQString deCapitaliseFirstLetter(TQString string);
/**
* Returns the plural form of a subject.
*/
- QString pluralize(QString string);
+ TQString pluralize(TQString string);
/**
* Returns the non-plural form of a subject.
*/
- QString unPluralize(QString string);
+ TQString unPluralize(TQString string);
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(QString value, QString type);
+ TQString fixInitialStringDeclValue(TQString value, TQString type);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream& d);
+ void writeBlankLine(TQTextStream& d);
/**
* a little method for converting scope to string value
*/
- QString scopeToDDecl(Uml::Visibility scope);
+ TQString scopeToDDecl(Uml::Visibility scope);
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* Whether or not this concept is an interface.
diff --git a/umbrello/umbrello/codegenerators/idlwriter.cpp b/umbrello/umbrello/codegenerators/idlwriter.cpp
index a893acc3..dc367f50 100644
--- a/umbrello/umbrello/codegenerators/idlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/idlwriter.cpp
@@ -13,9 +13,9 @@
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -34,7 +34,7 @@ IDLWriter::IDLWriter() : SimpleCodeGenerator(false) {
IDLWriter::~IDLWriter() {}
bool IDLWriter::isOOClass(UMLClassifier *c) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBAEnum" ||
stype == "CORBAStruct" || stype == "CORBAUnion" ||
stype == "CORBASequence" || stype == "CORBAArray" ||
@@ -59,7 +59,7 @@ Uml::Programming_Language IDLWriter::getLanguage() {
}
void IDLWriter::computeAssocTypeAndRole
-(UMLAssociation *a, UMLClassifier *c, QString& typeName, QString& roleName)
+(UMLAssociation *a, UMLClassifier *c, TQString& typeName, TQString& roleName)
{
// Determine which is the "remote" end of the association:
bool IAmRoleA = true;
@@ -70,9 +70,9 @@ void IDLWriter::computeAssocTypeAndRole
at == Uml::at_UniAssociation) {
// Assuming unidirectional association, and we are
// at the "wrong" side.
- // Returning roleName = QString::null tells caller to
+ // Returning roleName = TQString::null tells caller to
// skip this association at this side.
- roleName = QString();
+ roleName = TQString();
return;
}
IAmRoleA = false;
@@ -80,7 +80,7 @@ void IDLWriter::computeAssocTypeAndRole
}
// Construct the type name:
typeName = cleanName(other->getName());
- QString multiplicity;
+ TQString multiplicity;
if (IAmRoleA)
multiplicity = a->getMulti(Uml::B);
else
@@ -107,16 +107,16 @@ void IDLWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".idl");
+ TQString fileName = findFileName(c, ".idl");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -124,13 +124,13 @@ void IDLWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream idl(&file);
+ TQTextStream idl(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".idl");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
idl << str << m_endl;
}
@@ -141,7 +141,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
for (UMLPackage *conc = includes.first(); conc; conc = includes.next()) {
if (conc->getBaseType() == Uml::ot_Datatype)
continue;
- QString incName = findFileName(conc, ".idl");
+ TQString incName = findFileName(conc, ".idl");
if (!incName.isEmpty())
idl << "#include \"" << incName << "\"" << m_endl;
}
@@ -171,7 +171,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
idl << getIndent() << "enum " << classname << " {" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
idl << getIndent() << enumLiteral;
if (++i < litList.count())
idl << ",";
@@ -187,7 +187,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
return;
}
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
kError() << "The stereotype " << stype << " cannot be applied to "
<< c->getName() << ", but only to attributes." << endl;
@@ -206,7 +206,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
m_indentLevel++;
uint i = 0;
for (at = atl.first(); at; at = atl.next()) {
- QString enumLiteral = cleanName(at->getName());
+ TQString enumLiteral = cleanName(at->getName());
idl << getIndent() << enumLiteral;
if (++i < atl.count())
idl << ",";
@@ -220,7 +220,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
idl << getIndent() << "struct " << classname << " {" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
+ TQString name = cleanName(at->getName());
idl << getIndent() << at->getTypeName() << " " << name << ";" << m_endl;
// Initial value not possible in IDL.
}
@@ -228,7 +228,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (!compositions.isEmpty()) {
idl << getIndent() << "// Compositions." << m_endl;
for (UMLAssociation *a = compositions.first(); a; a = compositions.next()) {
- QString memberType, memberName;
+ TQString memberType, memberName;
computeAssocTypeAndRole(a, c, memberType, memberName);
idl << getIndent() << memberType << " " << memberName << ";" << m_endl;
}
@@ -237,7 +237,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (!aggregations.isEmpty()) {
idl << getIndent() << "// Aggregations." << m_endl;
for (UMLAssociation *a = aggregations.first(); a; a = aggregations.next()) {
- QString memberType, memberName;
+ TQString memberType, memberName;
computeAssocTypeAndRole(a, c, memberType, memberName);
idl << getIndent() << memberType << " " << memberName << ";" << m_endl;
}
@@ -294,7 +294,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
for (a = assocs.first(); a; a = assocs.next()) {
if (! assocTypeIsMappableToAttribute(a->getAssocType()))
continue;
- QString multiplicity = a->getMulti(Uml::A);
+ TQString multiplicity = a->getMulti(Uml::A);
if (multiplicity.isEmpty() || multiplicity == "1")
continue;
if (!didComment) {
@@ -302,7 +302,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
didComment = true;
}
UMLClassifier* other = (UMLClassifier*)a->getObject(Uml::A);
- QString bareName = cleanName(other->getName());
+ TQString bareName = cleanName(other->getName());
idl << getIndent() << "typedef sequence<" << other->getFullyQualifiedName("::")
<< "> " << bareName << "Vector;" << m_endl << m_endl;
}
@@ -313,7 +313,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
if (forceSections() || atl.count()) {
idl << getIndent() << "// Attributes:" << m_endl << m_endl;
for (UMLAttribute *at = atl.first(); at; at = atl.next()) {
- QString attName = cleanName(at->getName());
+ TQString attName = cleanName(at->getName());
Uml::Visibility scope = at->getVisibility();
idl << getIndent();
if (isValuetype) {
@@ -358,7 +358,7 @@ void IDLWriter::writeClass(UMLClassifier *c) {
Uml::Association_Type at = a->getAssocType();
if (! assocTypeIsMappableToAttribute(at))
continue;
- QString typeName, roleName;
+ TQString typeName, roleName;
computeAssocTypeAndRole(a, c, typeName, roleName);
if (roleName.isEmpty()) // presumably because we are at the "wrong" end
continue;
@@ -386,9 +386,9 @@ void IDLWriter::writeClass(UMLClassifier *c) {
}
-void IDLWriter::writeOperation(UMLOperation *op, QTextStream &idl, bool is_comment) {
+void IDLWriter::writeOperation(UMLOperation *op, TQTextStream &idl, bool is_comment) {
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
if (rettype.isEmpty())
rettype = "void";
@@ -420,8 +420,8 @@ void IDLWriter::writeOperation(UMLOperation *op, QTextStream &idl, bool is_comme
idl << ");" << m_endl << m_endl;
}
-QStringList IDLWriter::defaultDatatypes() {
- QStringList l;
+TQStringList IDLWriter::defaultDatatypes() {
+ TQStringList l;
l.append("boolean");
l.append("char");
l.append("octet");
@@ -436,9 +436,9 @@ QStringList IDLWriter::defaultDatatypes() {
return l;
}
-const QStringList IDLWriter::reservedKeywords() const {
+const TQStringList IDLWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "any"
diff --git a/umbrello/umbrello/codegenerators/idlwriter.h b/umbrello/umbrello/codegenerators/idlwriter.h
index c44cabd6..25e427dd 100644
--- a/umbrello/umbrello/codegenerators/idlwriter.h
+++ b/umbrello/umbrello/codegenerators/idlwriter.h
@@ -46,12 +46,12 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -60,10 +60,10 @@ private:
* @param op the class for which we are generating code
* @param idl the stream associated with the output file
*/
- void writeOperation(UMLOperation* op, QTextStream& idl, bool is_comment = false);
+ void writeOperation(UMLOperation* op, TQTextStream& idl, bool is_comment = false);
void computeAssocTypeAndRole(UMLAssociation* a, UMLClassifier *c,
- QString& typeName, QString& roleName);
+ TQString& typeName, TQString& roleName);
static bool isOOClass(UMLClassifier* c);
diff --git a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
index a3a174a3..cc9e394b 100644
--- a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp
@@ -18,7 +18,7 @@
#include "javaantcodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -67,25 +67,25 @@ HierarchicalCodeBlock * JavaANTCodeDocument::newHierarchicalCodeBlock ( ) {
// is so we can create the XMLNodes, if needed.
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
-void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void JavaANTCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new XMLCodeComment(this);
@@ -100,7 +100,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -146,7 +146,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -165,7 +165,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
kError()<<"Unable to find operation create codeoperation for:"<<this<<endl;
} else
if( name == "xmlelementblock" ) {
- QString xmltag = element.attribute("nodeName","UNKNOWN");
+ TQString xmltag = element.attribute("nodeName","UNKNOWN");
XMLElementCodeBlock * block = new XMLElementCodeBlock(this,xmltag);
block->loadFromXMI(element);
if(!addTextBlock(block))
@@ -211,7 +211,7 @@ void JavaANTCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
/** set the class attributes of this object from
* the passed element node.
*/
-void JavaANTCodeDocument::setAttributesFromNode ( QDomElement & root)
+void JavaANTCodeDocument::setAttributesFromNode ( TQDomElement & root)
{
// superclass save
@@ -225,14 +225,14 @@ void JavaANTCodeDocument::setAttributesFromNode ( QDomElement & root)
/**
* load params from the appropriate XMI element node.
*/
-void JavaANTCodeDocument::loadFromXMI ( QDomElement & root ) {
+void JavaANTCodeDocument::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void JavaANTCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void JavaANTCodeDocument::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -245,8 +245,8 @@ void JavaANTCodeDocument::setAttributesOnNode ( QDomDocument & doc, QDomElement
/**
* Save the XMI representation of this object
*/
-void JavaANTCodeDocument::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement docElement = doc.createElement( "codedocument" );
+void JavaANTCodeDocument::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement docElement = doc.createElement( "codedocument" );
setAttributesOnNode(doc, docElement);
@@ -288,19 +288,19 @@ void JavaANTCodeDocument::updateContent( ) {
}
// We overwritten by Java language implementation to get lowercase path
-QString JavaANTCodeDocument::getPath ( )
+TQString JavaANTCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
diff --git a/umbrello/umbrello/codegenerators/javaantcodedocument.h b/umbrello/umbrello/codegenerators/javaantcodedocument.h
index 9d7372f3..97d19c50 100644
--- a/umbrello/umbrello/codegenerators/javaantcodedocument.h
+++ b/umbrello/umbrello/codegenerators/javaantcodedocument.h
@@ -19,8 +19,8 @@
#ifndef JAVAANTCODEDOCUMENT_H
#define JAVAANTCODEDOCUMENT_H
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include "../codedocument.h"
@@ -47,19 +47,19 @@ public:
*/
virtual ~JavaANTCodeDocument ( );
- QString getPath ( );
+ TQString getPath ( );
void updateContent();
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* create a new HierarchicalCodeBlock object belonging to this CodeDocument.
@@ -78,18 +78,18 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/**
* need to overwrite this for java since we need to pick up the
* xml declaration blocks.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
private:
diff --git a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
index 0e4ccdbf..e1966001 100644
--- a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.cpp
@@ -23,7 +23,7 @@
//
JavaClassDeclarationBlock::JavaClassDeclarationBlock
- ( JavaClassifierCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( JavaClassifierCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -38,8 +38,8 @@ JavaClassDeclarationBlock::~JavaClassDeclarationBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void JavaClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "javaclassdeclarationblock" );
+void JavaClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "javaclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -49,7 +49,7 @@ void JavaClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & ro
/**
* load params from the appropriate XMI element node.
*/
-void JavaClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void JavaClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -69,9 +69,9 @@ void JavaClassDeclarationBlock::updateContent ( )
JavaClassifierCodeDocument *parentDoc = dynamic_cast<JavaClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- QString endLine = commonPolicy->getNewLineEndingChars();
+ TQString endLine = commonPolicy->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString JavaClassName = parentDoc->getJavaClassName(c->getName());
+ TQString JavaClassName = parentDoc->getJavaClassName(c->getName());
// COMMENT
if(isInterface)
@@ -87,7 +87,7 @@ void JavaClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
// In Java, we need declare abstract only on classes
if (c->getAbstract() && !isInterface)
startText.append("abstract ");
@@ -153,7 +153,7 @@ void JavaClassDeclarationBlock::updateContent ( )
}
-void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const QString &comment)
+void JavaClassDeclarationBlock::init (JavaClassifierCodeDocument *parentDoc, const TQString &comment)
{
setComment(new JavaCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
index 136df809..08e639c7 100644
--- a/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/javaclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef JAVACLASSDECLARATIONBLOCK_H
#define JAVACLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "javaclassifiercodedocument.h"
#include "../ownedhierarchicalcodeblock.h"
@@ -33,7 +33,7 @@ public:
/**
* Empty Constructor
*/
- explicit JavaClassDeclarationBlock ( JavaClassifierCodeDocument * parentDoc, const QString &start = "", const QString &endText = "}", const QString &comment = "");
+ explicit JavaClassDeclarationBlock ( JavaClassifierCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "}", const TQString &comment = "");
/**
* Empty Destructor
@@ -43,12 +43,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -59,7 +59,7 @@ protected:
private:
- void init (JavaClassifierCodeDocument * parent, const QString &comment);
+ void init (JavaClassifierCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
index 44e6f242..426c6d9a 100644
--- a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp
@@ -29,7 +29,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "javacodegenerator.h"
@@ -80,19 +80,19 @@ bool JavaClassifierCodeDocument::forceDoc () {
}
// We overwritten by Java language implementation to get lowercase path
-QString JavaClassifierCodeDocument::getPath ( )
+TQString JavaClassifierCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
@@ -104,7 +104,7 @@ QString JavaClassifierCodeDocument::getPath ( )
// Other methods
//
-QString JavaClassifierCodeDocument::getJavaClassName (const QString &name) {
+TQString JavaClassifierCodeDocument::getJavaClassName (const TQString &name) {
return Codegen_Utils::capitalizeFirstLetter(CodeGenerator::cleanName(name));
}
@@ -143,25 +143,25 @@ bool JavaClassifierCodeDocument::addCodeOperation (CodeOperation * op ) {
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
// for "javaclassdeclarationblock"
-void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new JavaCodeComment(this);
@@ -176,7 +176,7 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -222,7 +222,7 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -283,9 +283,9 @@ void JavaClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
}
-QString JavaClassifierCodeDocument::scopeToJavaDecl(Uml::Visibility scope)
+TQString JavaClassifierCodeDocument::scopeToJavaDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -361,7 +361,7 @@ void JavaClassifierCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasOperationMethods = c->getOpList().last() ? true : false;
- QString endLine = commonPolicy->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
+ TQString endLine = commonPolicy->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
//
// START GENERATING CODE/TEXT BLOCKS and COMMENTS FOR THE DOCUMENT
@@ -370,9 +370,9 @@ void JavaClassifierCodeDocument::updateContent( )
//
// PACKAGE CODE BLOCK
//
- QString pkgs = getPackage();
- pkgs.replace(QRegExp("::"), ".");
- QString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine;
+ TQString pkgs = getPackage();
+ pkgs.replace(TQRegExp("::"), ".");
+ TQString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine;
CodeBlockWithComments * pblock = addOrUpdateTaggedCodeBlockWithComments("packages", packageText, "", 0, false);
if(packageText.isEmpty() && pblock->getContentType() == CodeBlock::AutoGenerated)
pblock->setWriteOutText(false);
@@ -384,13 +384,13 @@ void JavaClassifierCodeDocument::updateContent( )
// Q: Why all utils? Isnt just List and Vector the only classes we are using?
// A: doesn't matter at all; its more readable to just include '*' and java compilers
// don't slow down or anything. (TZ)
- QString importStatement = "";
+ TQString importStatement = "";
if ( hasObjectVectorClassFields() )
importStatement.append("import java.util.*;");
//only import classes in a different package from this class
UMLPackageList imports;
- QMap<UMLPackage*, QString> packageMap; // so we don't repeat packages
+ TQMap<UMLPackage*, TQString> packageMap; // so we don't repeat packages
CodeGenerator::findObjectsRelated(c,imports);
for(UMLPackage *con = imports.first(); con ; con = imports.next())
@@ -526,8 +526,8 @@ void JavaClassifierCodeDocument::updateContent( )
constComment->setWriteOutText(true);
// add/get the empty constructor
- QString JavaClassName = getJavaClassName(c->getName());
- QString emptyConstStatement = "public "+JavaClassName+" ( ) { }";
+ TQString JavaClassName = getJavaClassName(c->getName());
+ TQString emptyConstStatement = "public "+JavaClassName+" ( ) { }";
CodeBlockWithComments * emptyConstBlock =
constBlock->addOrUpdateTaggedCodeBlockWithComments("emptyconstructor", emptyConstStatement, "Empty Constructor", 1, false);
// Now, as an additional condition we only show the empty constructor block
diff --git a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
index ddad6e1a..831e0555 100644
--- a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
+++ b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.h
@@ -19,7 +19,7 @@
#ifndef JAVACLASSIFIERCODEDOCUMENT_H
#define JAVACLASSIFIERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -62,14 +62,14 @@ public:
*/
//CodeDocumentDialog getDialog ( );
- QString scopeToJavaDecl(Uml::Visibility scope);
+ TQString scopeToJavaDecl(Uml::Visibility scope);
// Make it easier on ourselves
JavaCodeGenerationPolicy * getJavaPolicy();
- QString getJavaClassName (const QString &name);
+ TQString getJavaClassName (const TQString &name);
- QString getPath();
+ TQString getPath();
/** add a code operation to this java classifier code document.
* @return bool which is true IF the code operation was added successfully
@@ -85,7 +85,7 @@ protected:
* need to overwrite this for java since we need to pick up the
* java class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, JavaClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
index 524e6a48..6c883952 100644
--- a/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeaccessormethod.cpp
@@ -52,7 +52,7 @@ JavaCodeAccessorMethod::~JavaCodeAccessorMethod ( ) { }
// Other methods
//
-void JavaCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void JavaCodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -61,7 +61,7 @@ void JavaCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// set local attributes now
}
-void JavaCodeAccessorMethod::setAttributesFromNode( QDomElement & root)
+void JavaCodeAccessorMethod::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -76,18 +76,18 @@ void JavaCodeAccessorMethod::updateContent( )
CodeClassField * parentField = getParentClassField();
JavaCodeClassField * javafield = dynamic_cast<JavaCodeClassField*>(parentField);
- QString fieldName = javafield->getFieldName();
+ TQString fieldName = javafield->getFieldName();
- QString text = "";
+ TQString text = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
{
int maxOccurs = javafield->maximumListOccurances();
- QString fieldType = javafield->getTypeName();
- QString indent = getIndentation();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString fieldType = javafield->getTypeName();
+ TQString indent = getIndentation();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
if(maxOccurs > 0)
- text += "if ("+fieldName+".size() < "+ QString::number(maxOccurs)+") {"+endLine+indent;
+ text += "if ("+fieldName+".size() < "+ TQString::number(maxOccurs)+") {"+endLine+indent;
text += fieldName+".add(value);";
if(maxOccurs > 0)
{
@@ -105,12 +105,12 @@ void JavaCodeAccessorMethod::updateContent( )
case CodeAccessorMethod::REMOVE:
{
int minOccurs = javafield->minimumListOccurances();
- QString fieldType = javafield->getTypeName();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString indent = getIndentation();
+ TQString fieldType = javafield->getTypeName();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString indent = getIndentation();
if(minOccurs > 0)
- text += "if ("+fieldName+".size() >= "+ QString::number(minOccurs)+") {"+endLine+indent;
+ text += "if ("+fieldName+".size() >= "+ TQString::number(minOccurs)+") {"+endLine+indent;
text += fieldName+".remove(value);";
if(minOccurs > 0)
{
@@ -140,13 +140,13 @@ void JavaCodeAccessorMethod::updateMethodDeclaration()
// gather defs
CodeGenerationPolicy::ScopePolicy scopePolicy = commonpolicy->getAttributeAccessorScope();
- QString strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
- QString fieldName = javafield->getFieldName();
- QString fieldType = javafield->getTypeName();
- QString objectType = javafield->getListObjectType();
+ TQString strVis = javadoc->scopeToJavaDecl(javafield->getVisibility());
+ TQString fieldName = javafield->getFieldName();
+ TQString fieldType = javafield->getTypeName();
+ TQString objectType = javafield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
// set scope of this accessor appropriately..if its an attribute,
// we need to be more sophisticated
@@ -164,10 +164,10 @@ void JavaCodeAccessorMethod::updateMethodDeclaration()
}
// some variables we will need to populate
- QString headerText = "";
- QString methodReturnType = "";
- QString methodName = "";
- QString methodParams = "";
+ TQString headerText = "";
+ TQString methodReturnType = "";
+ TQString methodName = "";
+ TQString methodParams = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
diff --git a/umbrello/umbrello/codegenerators/javacodeaccessormethod.h b/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
index 5a109b59..e26ef033 100644
--- a/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/javacodeaccessormethod.h
@@ -16,7 +16,7 @@
#ifndef JAVACODEACCESSORMETHOD_H
#define JAVACODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
@@ -50,12 +50,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration();
virtual void updateContent();
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
index 627b9b3e..0777cf1d 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp
@@ -18,7 +18,7 @@
#include "javacodeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -57,7 +57,7 @@ JavaCodeClassField::~JavaCodeClassField ( ) { }
// Other methods
//
-QString JavaCodeClassField::getFieldName() {
+TQString JavaCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -66,7 +66,7 @@ QString JavaCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -76,7 +76,7 @@ QString JavaCodeClassField::getFieldName() {
}
-QString JavaCodeClassField::getInitialValue() {
+TQString JavaCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
@@ -95,7 +95,7 @@ QString JavaCodeClassField::getInitialValue() {
if(fieldIsSingleValue()) {
// FIX : IF the multiplicity is "1" then we should init a new object here, if its 0 or 1,
// then we can just return 'empty' string (minor problem).
- return QString("");
+ return TQString("");
} else {
return " new "+JavaCodeGenerator::getListFieldClassName()+"( )";
}
@@ -103,7 +103,7 @@ QString JavaCodeClassField::getInitialValue() {
}
-QString JavaCodeClassField::getTypeName ( )
+TQString JavaCodeClassField::getTypeName ( )
{
return JavaCodeGenerator::fixTypeName(CodeClassField::getTypeName());
}
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfield.h b/umbrello/umbrello/codegenerators/javacodeclassfield.h
index 5ed1cea4..b381796c 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/javacodeclassfield.h
@@ -18,7 +18,7 @@
#ifndef JAVACODECLASSFIELD_H
#define JAVACODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -43,11 +43,11 @@ public:
*/
virtual ~JavaCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
- QString getTypeName ( );
+ TQString getTypeName ( );
protected:
private:
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
index 87ebf78a..5507c314 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.cpp
@@ -59,12 +59,12 @@ void JavaCodeClassFieldDeclarationBlock::updateContent( )
CodeGenerationPolicy::ScopePolicy scopePolicy = commonpolicy->getAssociationFieldScope();
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = jdoc->scopeToJavaDecl(getParentObject()->getVisibility());
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = jdoc->scopeToJavaDecl(getParentObject()->getVisibility());
// IF this is from an association, then scope taken as appropriate to policy
if(!jcf->parentIsAttribute())
@@ -82,14 +82,14 @@ void JavaCodeClassFieldDeclarationBlock::updateContent( )
}
}
- QString typeName = jcf->getTypeName();
- QString fieldName = jcf->getFieldName();
- QString initialV = jcf->getInitialValue();
+ TQString typeName = jcf->getTypeName();
+ TQString fieldName = jcf->getFieldName();
+ TQString initialV = jcf->getInitialValue();
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = "List";
- QString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
+ TQString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
else if (!cf->parentIsAttribute())
diff --git a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
index 8166fced..1ed37a43 100644
--- a/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/javacodeclassfielddeclarationblock.h
@@ -16,7 +16,7 @@
#ifndef JAVACODECLASSFIELDDECLARATIONBLOCK_H
#define JAVACODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/javacodecomment.cpp b/umbrello/umbrello/codegenerators/javacodecomment.cpp
index bec0e87b..588a0acc 100644
--- a/umbrello/umbrello/codegenerators/javacodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/javacodecomment.cpp
@@ -14,12 +14,12 @@
*/
#include "javacodecomment.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-JavaCodeComment::JavaCodeComment ( CodeDocument * doc, const QString & text )
+JavaCodeComment::JavaCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -42,38 +42,38 @@ JavaCodeComment::~JavaCodeComment ( ) { }
// Other methods
//
-QString JavaCodeComment::getNewEditorLine ( int amount ) {
- QString line = getIndentationString(amount) + "// ";
+TQString JavaCodeComment::getNewEditorLine ( int amount ) {
+ TQString line = getIndentationString(amount) + "// ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString JavaCodeComment::unformatText ( const QString & text , const QString & indent)
+TQString JavaCodeComment::unformatText ( const TQString & text , const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading slashes
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
/**
* @return QString
*/
-QString JavaCodeComment::toString ( )
+TQString JavaCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText (getText(), indent +"// ", endLine));
}
diff --git a/umbrello/umbrello/codegenerators/javacodecomment.h b/umbrello/umbrello/codegenerators/javacodecomment.h
index 1f9b1d8d..468b2a7c 100644
--- a/umbrello/umbrello/codegenerators/javacodecomment.h
+++ b/umbrello/umbrello/codegenerators/javacodecomment.h
@@ -18,7 +18,7 @@
#ifndef JAVACODECOMMENT_H
#define JAVACODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit JavaCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit JavaCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -56,17 +56,17 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "//" sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodedocumentation.cpp b/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
index e831d885..662b88c9 100644
--- a/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/javacodedocumentation.cpp
@@ -18,7 +18,7 @@
#include "javacodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -29,7 +29,7 @@
// Constructors/Destructors
//
-JavaCodeDocumentation::JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const QString & text )
+JavaCodeDocumentation::JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const TQString & text )
: CodeComment(doc, text)
{
@@ -51,8 +51,8 @@ JavaCodeDocumentation::~JavaCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void JavaCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "javacodedocumentation" );
+void JavaCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "javacodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -61,10 +61,10 @@ void JavaCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString JavaCodeDocumentation::toString ( )
+TQString JavaCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -76,9 +76,9 @@ QString JavaCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useDoubleDashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if(useDoubleDashOutput)
{
if(!body.isEmpty())
@@ -93,7 +93,7 @@ QString JavaCodeDocumentation::toString ( )
return output;
}
-QString JavaCodeDocumentation::getNewEditorLine ( int amount )
+TQString JavaCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -121,20 +121,20 @@ int JavaCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString JavaCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString JavaCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^\\/\\*\\*\\s*\n?"));
- mytext.remove(QRegExp("\\s*\\*\\/\\s*\n?$"));
- mytext.remove(QRegExp("^\\s*\\*\\s*"));
+ mytext.remove(TQRegExp("^\\/\\*\\*\\s*\n?"));
+ mytext.remove(TQRegExp("\\s*\\*\\/\\s*\n?$"));
+ mytext.remove(TQRegExp("^\\s*\\*\\s*"));
} else
- mytext.remove(QRegExp("^\\/\\/\\s*"));
+ mytext.remove(TQRegExp("^\\/\\/\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/javacodedocumentation.h b/umbrello/umbrello/codegenerators/javacodedocumentation.h
index 246b87a6..acc386c1 100644
--- a/umbrello/umbrello/codegenerators/javacodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/javacodedocumentation.h
@@ -18,7 +18,7 @@
#ifndef JAVACODEDOCUMENTATION_H
#define JAVACODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class JavaClassifierCodeDocument;
@@ -42,7 +42,7 @@ public:
/**
* Constructors
*/
- explicit JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const QString & text = "");
+ explicit JavaCodeDocumentation ( JavaClassifierCodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -58,22 +58,22 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the " * " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
index 2dcc834e..6225485f 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.cpp
@@ -174,7 +174,7 @@ void JavaCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSig
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * JavaCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * JavaCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new JavaCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
index 2a40cb57..e72c5161 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicy.h
@@ -17,7 +17,7 @@
#ifndef JAVACODEGENERATIONPOLICY_H
#define JAVACODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -96,7 +96,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
index fd6d2ae3..c7bfbf0b 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.cpp
@@ -17,16 +17,16 @@
// own header
#include "javacodegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
// app includes
#include "javacodegenerationformbase.h"
#include "../uml.h"
-JavaCodeGenerationPolicyPage::JavaCodeGenerationPolicyPage( QWidget *parent, const char *name, JavaCodeGenerationPolicy * policy )
+JavaCodeGenerationPolicyPage::JavaCodeGenerationPolicyPage( TQWidget *parent, const char *name, JavaCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
index 3b6f85e0..01b739b9 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerationpolicypage.h
@@ -30,7 +30,7 @@ class JavaCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit JavaCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, JavaCodeGenerationPolicy * policy = 0);
+ explicit JavaCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, JavaCodeGenerationPolicy * policy = 0);
virtual ~JavaCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/javacodegenerator.cpp b/umbrello/umbrello/codegenerators/javacodegenerator.cpp
index 167804af..0f78a0fb 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/javacodegenerator.cpp
@@ -18,7 +18,7 @@
#include "javacodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
@@ -34,7 +34,7 @@ const bool JavaCodeGenerator::DEFAULT_BUILD_ANT_DOC = false;
// Constructors/Destructors
//
-JavaCodeGenerator::JavaCodeGenerator (QDomElement & elem)
+JavaCodeGenerator::JavaCodeGenerator (TQDomElement & elem)
: CodeGenerator(elem)
{
init();
@@ -79,7 +79,7 @@ bool JavaCodeGenerator::getCreateANTBuildFile ( ) {
}
// In the Java version, we make the ANT build file also available.
-CodeViewerDialog * JavaCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * JavaCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
CodeViewerDialog *dialog = new CodeViewerDialog(parent, doc, state);
@@ -103,8 +103,8 @@ bool JavaCodeGenerator::getAutoGenerateAssocAccessors ( )
return getJavaPolicy()->getAutoGenerateAssocAccessors ();
}
-QString JavaCodeGenerator::getListFieldClassName () {
- return QString("Vector");
+TQString JavaCodeGenerator::getListFieldClassName () {
+ return TQString("Vector");
}
// Other methods
@@ -113,9 +113,9 @@ QString JavaCodeGenerator::getListFieldClassName () {
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
// Same thing again for "bool" to "boolean"
-QString JavaCodeGenerator::fixTypeName(const QString &string)
+TQString JavaCodeGenerator::fixTypeName(const TQString &string)
{
- if (string.isEmpty() || string.contains(QRegExp("^\\s+$")))
+ if (string.isEmpty() || string.contains(TQRegExp("^\\s+$")))
return "void";
if (string == "string")
return "String";
@@ -154,8 +154,8 @@ void JavaCodeGenerator::init() {
setCreateANTBuildFile(DEFAULT_BUILD_ANT_DOC);
}
-QStringList JavaCodeGenerator::defaultDatatypes() {
- QStringList l;
+TQStringList JavaCodeGenerator::defaultDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("boolean");
@@ -168,9 +168,9 @@ QStringList JavaCodeGenerator::defaultDatatypes() {
return l;
}
-const QStringList JavaCodeGenerator::reservedKeywords() const {
+const TQStringList JavaCodeGenerator::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abstract"
diff --git a/umbrello/umbrello/codegenerators/javacodegenerator.h b/umbrello/umbrello/codegenerators/javacodegenerator.h
index 29edb16f..3d94ad5f 100644
--- a/umbrello/umbrello/codegenerators/javacodegenerator.h
+++ b/umbrello/umbrello/codegenerators/javacodegenerator.h
@@ -19,7 +19,7 @@
#ifndef JAVACODEGENERATOR_H
#define JAVACODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeviewerstate.h"
#include "../codegenerator.h"
#include "../codeblockwithcomments.h"
@@ -47,7 +47,7 @@ public:
* Empty Constructor
*/
JavaCodeGenerator ();
- JavaCodeGenerator (QDomElement & element);
+ JavaCodeGenerator (TQDomElement & element);
/**
* Empty Destructor
@@ -87,11 +87,11 @@ public:
/**
* Get the list variable class name to use. For Java, we have set this to "Vector".
*/
- static QString getListFieldClassName();
+ static TQString getListFieldClassName();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
// Other methods
@@ -114,19 +114,19 @@ public:
/**
* Adds Java's primitives as datatypes
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/**
* IF the type is "string" we need to declare it as
* the Java Object "String" (there is no string primative in Java).
* Same thing again for "bool" to "boolean".
*/
- static QString fixTypeName(const QString &string);
+ static TQString fixTypeName(const TQString &string);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
protected:
diff --git a/umbrello/umbrello/codegenerators/javacodeoperation.cpp b/umbrello/umbrello/codegenerators/javacodeoperation.cpp
index 84ce0331..c7e7d162 100644
--- a/umbrello/umbrello/codegenerators/javacodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/javacodeoperation.cpp
@@ -25,7 +25,7 @@
//
JavaCodeOperation::JavaCodeOperation
- ( JavaClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+ ( JavaClassifierCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -52,15 +52,15 @@ void JavaCodeOperation::updateMethodDeclaration()
JavaClassifierCodeDocument * javadoc = dynamic_cast<JavaClassifierCodeDocument*>(doc);
UMLOperation * o = getParentOperation();
bool isInterface = javadoc->getParentClassifier()->isInterface();
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// now, the starting text.
- QString strVis = javadoc->scopeToJavaDecl(o->getVisibility());
+ TQString strVis = javadoc->scopeToJavaDecl(o->getVisibility());
// no return type for constructors
- QString fixedReturn = JavaCodeGenerator::fixTypeName(o->getTypeName());
- QString returnType = o->isConstructorOperation() ? QString("") : (fixedReturn + QString(" "));
- QString methodName = o->getName();
- QString paramStr = QString("");
+ TQString fixedReturn = JavaCodeGenerator::fixTypeName(o->getTypeName());
+ TQString returnType = o->isConstructorOperation() ? TQString("") : (fixedReturn + TQString(" "));
+ TQString methodName = o->getName();
+ TQString paramStr = TQString("");
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -68,18 +68,18 @@ void JavaCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm=list.next())
{
- QString rType = parm->getTypeName();
- QString paramName = parm->getName();
+ TQString rType = parm->getTypeName();
+ TQString paramName = parm->getName();
paramStr += rType + ' ' + paramName;
paramNum++;
if (paramNum != nrofParam )
paramStr += ", ";
}
- QString maybeStatic;
+ TQString maybeStatic;
if (o->getStatic())
maybeStatic = "static ";
- QString startText = strVis + ' ' + maybeStatic + returnType + methodName + " (" + paramStr + ')';
+ TQString startText = strVis + ' ' + maybeStatic + returnType + methodName + " (" + paramStr + ')';
// IF the parent is an interface, our operations look different
// e.g. they have no body
@@ -95,7 +95,7 @@ void JavaCodeOperation::updateMethodDeclaration()
// Lastly, for text content generation, we fix the comment on the
// operation, IF the codeop is autogenerated & currently empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if(comment.isEmpty() && getContentType() == CodeBlock::AutoGenerated)
{
UMLAttributeList parameters = o->getParmList();
diff --git a/umbrello/umbrello/codegenerators/javacodeoperation.h b/umbrello/umbrello/codegenerators/javacodeoperation.h
index 08a555d8..50087fd7 100644
--- a/umbrello/umbrello/codegenerators/javacodeoperation.h
+++ b/umbrello/umbrello/codegenerators/javacodeoperation.h
@@ -18,7 +18,7 @@
#ifndef JAVACODEOPERATION_H
#define JAVACODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class JavaClassifierCodeDocument;
@@ -34,7 +34,7 @@ public:
/**
* Empty Constructor
*/
- JavaCodeOperation ( JavaClassifierCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ JavaCodeOperation ( JavaClassifierCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/javawriter.cpp b/umbrello/umbrello/codegenerators/javawriter.cpp
index 3e945c60..db6d6515 100644
--- a/umbrello/umbrello/codegenerators/javawriter.cpp
+++ b/umbrello/umbrello/codegenerators/javawriter.cpp
@@ -20,9 +20,9 @@
// own header
#include "javawriter.h"
// qt includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
// kde includes
#include <kdebug.h>
// app includes
@@ -55,7 +55,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
isInterface = c->isInterface();
- QString fileName = cleanName(c->getName().lower());
+ TQString fileName = cleanName(c->getName().lower());
//find an appropriate name for our file
fileName = findFileName(c,".java");
@@ -65,7 +65,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
@@ -131,14 +131,14 @@ void JavaWriter::writeClass(UMLClassifier *c)
bool hasVectorFields = hasAssociations ? true : false;
// open text stream to file
- QTextStream java(&file);
+ TQTextStream java(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".java");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
java<<str<<m_endl;
}
@@ -161,7 +161,7 @@ void JavaWriter::writeClass(UMLClassifier *c)
for (UMLPackage *con = imports.first(); con; con = imports.next()) {
if (con->getBaseType() == Uml::ot_Datatype)
continue;
- QString pkg = con->getPackage();
+ TQString pkg = con->getPackage();
if (!pkg.isEmpty() && pkg != c->getPackage())
java << "import " << pkg << "." << cleanName(con->getName()) << ";"
<< m_endl;
@@ -260,10 +260,10 @@ void JavaWriter::writeClass(UMLClassifier *c)
emit codeGenerated(c, true);
}
-void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
+void JavaWriter::writeClassDecl(UMLClassifier *c, TQTextStream &java)
{
- QString classname = cleanName(c->getName()); // our class name
+ TQString classname = cleanName(c->getName()); // our class name
// write documentation for class, if any, first
if(forceDoc() || !c->getDoc().isEmpty())
@@ -277,7 +277,7 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
}
// Now write the actual class declaration
- QString scope = ""; // = scopeToJavaDecl(c->getVisibility());
+ TQString scope = ""; // = scopeToJavaDecl(c->getVisibility());
if (c->getVisibility() != Uml::Visibility::Public) {
// We should emit a warning in here .. java doesn't like to allow
// private/protected classes. The best we can do (I believe)
@@ -287,7 +287,7 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
} else
scope = "public ";
- java<<((c->getAbstract() && !isInterface) ? QString("abstract ") : QString(""))<<scope;
+ java<<((c->getAbstract() && !isInterface) ? TQString("abstract ") : TQString(""))<<scope;
if(isInterface)
java<<"interface ";
else
@@ -300,9 +300,9 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
if (template_params.count()) {
java << "<";
for (UMLTemplate *t = template_params.first(); t; ) {
- QString formalName = t->getName();
+ TQString formalName = t->getName();
java << formalName;
- QString typeName = t->getTypeName();
+ TQString typeName = t->getTypeName();
if (typeName != "class") {
java << " extends " << typeName;
}
@@ -355,55 +355,55 @@ void JavaWriter::writeClassDecl(UMLClassifier *c, QTextStream &java)
}
void JavaWriter::writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &java )
+ UMLAttributeList &atpriv, TQTextStream &java )
{
UMLAttribute *at;
for(at=atpub.first(); at; at=atpub.next())
{
- QString documentation = at->getDoc();
- QString staticValue = at->getStatic() ? "static " : "";
- QString typeName = fixTypeName(at->getTypeName());
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"public "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
for(at=atprot.first();at;at=atprot.next())
{
- QString documentation = at->getDoc();
- QString typeName = fixTypeName(at->getTypeName());
- QString staticValue = at->getStatic() ? "static " : "";
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"protected "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
for(at=atpriv.first();at;at=atpriv.next())
{
- QString documentation = at->getDoc();
- QString typeName = fixTypeName(at->getTypeName());
- QString staticValue = at->getStatic() ? "static " : "";
- QString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
+ TQString documentation = at->getDoc();
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString staticValue = at->getStatic() ? "static " : "";
+ TQString initialValue = fixInitialStringDeclValue(at->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, m_indentation, java, true);
java<<startline<<staticValue<<"private "<<typeName<<" "<<cleanName(at->getName())
- <<(initialValue.isEmpty()?QString(""):QString(" = ") + initialValue)<<";";
+ <<(initialValue.isEmpty()?TQString(""):TQString(" = ") + initialValue)<<";";
}
}
-void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &java)
+void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &java)
{
UMLAttribute *at;
for(at=atpub.first(); at; at=atpub.next())
{
- QString fieldName = cleanName(at->getName());
+ TQString fieldName = cleanName(at->getName());
// force capitalizing the field name, this is silly,
// from what I can tell, this IS the default behavior for
// cleanName. I dunno why its not working -b.t.
@@ -419,17 +419,17 @@ void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility
}
-void JavaWriter::writeComment(const QString &comment, const QString &myIndent,
- QTextStream &java, bool javaDocStyle)
+void JavaWriter::writeComment(const TQString &comment, const TQString &myIndent,
+ TQTextStream &java, bool javaDocStyle)
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
if(javaDocStyle)
java << myIndent << "/**" << m_endl;
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
{
writeBlankLine(java);
@@ -456,7 +456,7 @@ void JavaWriter::writeComment(const QString &comment, const QString &myIndent,
}
}
-void JavaWriter::writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &java)
+void JavaWriter::writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &java)
{
writeBlankLine(java);
java<<indent<<"/**"<<m_endl;
@@ -466,14 +466,14 @@ void JavaWriter::writeDocumentation(QString header, QString body, QString end, Q
java<<formatDoc(body, indent+" * ");
if (!end.isEmpty())
{
- QStringList lines = QStringList::split( "\n", end);
+ TQStringList lines = TQStringList::split( "\n", end);
for(uint i= 0; i < lines.count(); i++)
java<<formatDoc(lines[i], indent+" * ");
}
java<<indent<<" */";
}
-void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &java)
+void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &java)
{
if( forceSections() || !associations.isEmpty() )
@@ -496,30 +496,30 @@ void JavaWriter::writeAssociationDecls(UMLAssociationList associations, Uml::IDT
// print RoleB decl
if (printRoleB)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B), a->getMulti(Uml::B), a->getRoleDoc(Uml::B), a->getVisibility(Uml::B), java);
}
// print RoleA decl
if (printRoleA)
{
- QString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
+ TQString fieldClassName = cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A), a->getMulti(Uml::A), a->getRoleDoc(Uml::A), a->getVisibility(Uml::A), java);
}
}
}
}
-void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
- QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &java)
+void JavaWriter::writeAssociationRoleDecl(TQString fieldClassName,
+ TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &java)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
if (roleName.isEmpty())
return;
- QString scope = scopeToJavaDecl(visib);
+ TQString scope = scopeToJavaDecl(visib);
// always put space between this and prior decl, if any
writeBlankLine(java);
@@ -530,14 +530,14 @@ void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
+ TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
java<<startline<<scope<<" "<<fieldClassName<<" "<<fieldVarName<<";";
}
else
{
- QString fieldVarName = roleName.lower() + "Vector";
+ TQString fieldVarName = roleName.lower() + "Vector";
java<<startline<<scope<<" Vector "<<fieldVarName<<" = new Vector();";
// from here we could initialize default values, or put in an init() section
// of the constructors
@@ -545,7 +545,7 @@ void JavaWriter::writeAssociationRoleDecl(QString fieldClassName,
}
-void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, QTextStream &java)
+void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLClassifier *thisClass, TQTextStream &java)
{
if( forceSections() || !associations.isEmpty() )
{
@@ -558,7 +558,7 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::B));
writeAssociationRoleMethod(fieldClassName,
a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -571,7 +571,7 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
{
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
- QString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
+ TQString fieldClassName = getUMLObjectName(a->getObject(Uml::A));
writeAssociationRoleMethod(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A),
a->getRoleDoc(Uml::A),
@@ -585,33 +585,33 @@ void JavaWriter::writeAssociationMethods (UMLAssociationList associations, UMLCl
}
}
-void JavaWriter::writeAssociationRoleMethod (QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &java)
+void JavaWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &java)
{
- if(multi.isEmpty() || multi.contains(QRegExp("^[01]$")))
+ if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$")))
{
- QString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
+ TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower());
writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, visib, change, false, java);
}
else
{
- QString fieldVarName = roleName.lower() + "Vector";
+ TQString fieldVarName = roleName.lower() + "Vector";
writeVectorAttributeAccessorMethods(fieldClassName, fieldVarName, roleName,
description, visib, change, java);
}
}
-void JavaWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void JavaWriter::writeVectorAttributeAccessorMethods (TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type changeType,
- QTextStream &java)
+ TQTextStream &java)
{
fieldClassName = fixTypeName(fieldClassName);
fieldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
- QString strVis = scopeToJavaDecl(visibility);
+ TQString strVis = scopeToJavaDecl(visibility);
// ONLY IF changeability is NOT Frozen
if (changeType != Uml::chg_Frozen)
@@ -641,13 +641,13 @@ void JavaWriter::writeVectorAttributeAccessorMethods (QString fieldClassName, QS
}
-void JavaWriter::writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+void JavaWriter::writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &java)
+ bool isFinal, TQTextStream &java)
{
- QString strVis = scopeToJavaDecl(visibility);
+ TQString strVis = scopeToJavaDecl(visibility);
fieldClassName = fixTypeName(fieldClassName);
fieldName = Codegen_Utils::capitalizeFirstLetter(fieldName);
@@ -667,7 +667,7 @@ void JavaWriter::writeSingleAttributeAccessorMethods(QString fieldClassName, QSt
writeBlankLine(java);
}
-void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
+void JavaWriter::writeConstructor(UMLClassifier *c, TQTextStream &java)
{
if (forceDoc())
@@ -680,7 +680,7 @@ void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
}
// write the first constructor
- QString className = cleanName(c->getName());
+ TQString className = cleanName(c->getName());
java<<m_indentation<<"public "<<className<<" () { };";
}
@@ -688,7 +688,7 @@ void JavaWriter::writeConstructor(UMLClassifier *c, QTextStream &java)
// IF the type is "string" we need to declare it as
// the Java Object "String" (there is no string primative in Java).
// Same thing again for "bool" to "boolean"
-QString JavaWriter::fixTypeName(const QString& string)
+TQString JavaWriter::fixTypeName(const TQString& string)
{
if (string.isEmpty())
return "void";
@@ -699,8 +699,8 @@ QString JavaWriter::fixTypeName(const QString& string)
return string;
}
-QStringList JavaWriter::defaultDatatypes() {
- QStringList l;
+TQStringList JavaWriter::defaultDatatypes() {
+ TQStringList l;
l.append("int");
l.append("char");
l.append("boolean");
@@ -783,7 +783,7 @@ void JavaWriter::getInterfacesOperationsToBeImplemented(UMLClassifier *c, UMLOpe
}
}
-void JavaWriter::writeOperations(UMLClassifier *c, QTextStream &java) {
+void JavaWriter::writeOperations(UMLClassifier *c, TQTextStream &java) {
UMLOperationList opl;
UMLOperationList oppub,opprot,oppriv;
oppub.setAutoDelete(false);
@@ -841,21 +841,21 @@ void JavaWriter::writeOperations(UMLClassifier *c, QTextStream &java) {
}
-void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
+void JavaWriter::writeOperations(UMLOperationList &oplist, TQTextStream &java) {
UMLOperation *op;
UMLAttributeList atl;
UMLAttribute *at;
int i,j;
- QString str;
+ TQString str;
// generate method decl for each operation given
for( op=oplist.first(); op ;op=oplist.next())
{
- QString returnStr = "";
+ TQString returnStr = "";
// write documentation
- QString methodReturnType = fixTypeName(op->getTypeName());
+ TQString methodReturnType = fixTypeName(op->getTypeName());
if(methodReturnType != "void")
returnStr += "@return "+methodReturnType+"\n";
@@ -869,12 +869,12 @@ void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
i= atl.count();
j=0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
str += typeName + ' ' + atName +
(!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
+ ((j < i-1)?", ":"");
returnStr += "@param "+atName+' '+at->getDoc()+"\n";
}
@@ -892,7 +892,7 @@ void JavaWriter::writeOperations(UMLOperationList &oplist, QTextStream &java) {
}
}
-QString JavaWriter::fixInitialStringDeclValue(QString value, QString type)
+TQString JavaWriter::fixInitialStringDeclValue(TQString value, TQString type)
{
// check for strings only
if (!value.isEmpty() && type == "String") {
@@ -904,9 +904,9 @@ QString JavaWriter::fixInitialStringDeclValue(QString value, QString type)
return value;
}
-QString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
+TQString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -924,12 +924,12 @@ QString JavaWriter::scopeToJavaDecl(Uml::Visibility scope)
}
// methods like this _shouldn't_ be needed IF we properly did things thruought the code.
-QString JavaWriter::getUMLObjectName(UMLObject *obj)
+TQString JavaWriter::getUMLObjectName(UMLObject *obj)
{
- return(obj!=0)?obj->getName():QString("NULL");
+ return(obj!=0)?obj->getName():TQString("NULL");
}
-void JavaWriter::writeBlankLine(QTextStream &java)
+void JavaWriter::writeBlankLine(TQTextStream &java)
{
java<<m_endl;
}
diff --git a/umbrello/umbrello/codegenerators/javawriter.h b/umbrello/umbrello/codegenerators/javawriter.h
index 2469f6d0..69dada17 100644
--- a/umbrello/umbrello/codegenerators/javawriter.h
+++ b/umbrello/umbrello/codegenerators/javawriter.h
@@ -60,7 +60,7 @@ public:
/**
* Overrides method from class CodeGenerator
*/
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -68,12 +68,12 @@ private:
* Writes class's documentation then the class header
* public abstract class Foo extents {
*/
- void writeClassDecl(UMLClassifier *c, QTextStream &java);
+ void writeClassDecl(UMLClassifier *c, TQTextStream &java);
/**
* Writes the comment and class constructor
*/
- void writeConstructor(UMLClassifier *c, QTextStream &java);
+ void writeConstructor(UMLClassifier *c, TQTextStream &java);
/**
* return true if the two operations have the same name and the same parameters
@@ -111,21 +111,21 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeOperations(UMLClassifier *c, QTextStream &j);
+ void writeOperations(UMLClassifier *c, TQTextStream &j);
/**
* write a list of operations for a given class
* @param list the list of operations you want to write
* @param j the stream associated with the output file
*/
- void writeOperations(UMLOperationList &list, QTextStream &j);
+ void writeOperations(UMLOperationList &list, TQTextStream &j);
/**
* write all attributes for a given class
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* writes the Attribute declarations
@@ -135,94 +135,94 @@ private:
* @param java text stream
*/
void writeAttributeDecls(UMLAttributeList &atpub, UMLAttributeList &atprot,
- UMLAttributeList &atpriv, QTextStream &java );
+ UMLAttributeList &atpriv, TQTextStream &java );
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
- void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, QTextStream &java);
+ void writeAssociationDecls(UMLAssociationList associations, Uml::IDType id, TQTextStream &java);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(QString fieldClassName, QString roleName, QString multi,
- QString doc, Uml::Visibility visib, QTextStream &java);
+ void writeAssociationRoleDecl(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString doc, Uml::Visibility visib, TQTextStream &java);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in atpub
*/
- void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, QTextStream &java);
+ void writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility visibility, TQTextStream &java);
/**
* calls @ref writeAssociationRoleMethod() on each of the associations in the given list
*/
void writeAssociationMethods(UMLAssociationList associations, UMLClassifier *thisClass,
- QTextStream &java);
+ TQTextStream &java);
/**
* calls @ref writeSingleAttributeAccessorMethods() or @ref
* writeVectorAttributeAccessorMethods() on the assocaition
* role
*/
- void writeAssociationRoleMethod(QString fieldClassName, QString roleName, QString multi,
- QString description, Uml::Visibility visib, Uml::Changeability_Type change,
- QTextStream &java);
+ void writeAssociationRoleMethod(TQString fieldClassName, TQString roleName, TQString multi,
+ TQString description, Uml::Visibility visib, Uml::Changeability_Type change,
+ TQTextStream &java);
/**
* Writes getFoo() and setFoo() accessor methods for the attribute
*/
- void writeSingleAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeSingleAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- bool isFinal, QTextStream &java);
+ bool isFinal, TQTextStream &java);
/**
* Writes addFoo() and removeFoo() accessor methods for the Vector attribute
*/
- void writeVectorAttributeAccessorMethods(QString fieldClassName, QString fieldVarName,
- QString fieldName, QString description,
+ void writeVectorAttributeAccessorMethods(TQString fieldClassName, TQString fieldVarName,
+ TQString fieldName, TQString description,
Uml::Visibility visibility, Uml::Changeability_Type change,
- QTextStream &java);
+ TQTextStream &java);
/**
* Writes a // style comment
*/
- void writeComment(const QString &text, const QString &indent, QTextStream &java, bool javaDocStyle=false);
+ void writeComment(const TQString &text, const TQString &indent, TQTextStream &java, bool javaDocStyle=false);
/**
* Writes a documentation comment
*/
- void writeDocumentation(QString header, QString body, QString end, QString indent, QTextStream &java);
+ void writeDocumentation(TQString header, TQString body, TQString end, TQString indent, TQTextStream &java);
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject *obj);
+ TQString getUMLObjectName(UMLObject *obj);
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings have quotes around them
*/
- QString fixInitialStringDeclValue(QString value, QString type);
+ TQString fixInitialStringDeclValue(TQString value, TQString type);
/**
* Write a blank line
*/
- void writeBlankLine(QTextStream& java);
+ void writeBlankLine(TQTextStream& java);
/**
* a little method for converting scope to string value
*/
- QString scopeToJavaDecl(Uml::Visibility scope);
+ TQString scopeToJavaDecl(Uml::Visibility scope);
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* Whether or not this concept is an interface.
diff --git a/umbrello/umbrello/codegenerators/jswriter.cpp b/umbrello/umbrello/codegenerators/jswriter.cpp
index 1dbb45d6..ea4cc2e1 100644
--- a/umbrello/umbrello/codegenerators/jswriter.cpp
+++ b/umbrello/umbrello/codegenerators/jswriter.cpp
@@ -22,8 +22,8 @@
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
JSWriter::JSWriter() {
}
@@ -39,8 +39,8 @@ void JSWriter::writeClass(UMLClassifier *c)
return;
}
- QString classname = cleanName(c->getName());
- QString fileName = c->getName().lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = c->getName().lower();
//find an appropriate name for our file
fileName = findFileName(c,".js");
@@ -50,13 +50,13 @@ void JSWriter::writeClass(UMLClassifier *c)
return;
}
- QFile filejs;
+ TQFile filejs;
if(!openFile(filejs, fileName))
{
emit codeGenerated(c, false);
return;
}
- QTextStream js(&filejs);
+ TQTextStream js(&filejs);
//////////////////////////////
//Start generating the code!!
@@ -64,12 +64,12 @@ void JSWriter::writeClass(UMLClassifier *c)
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".js");
if(!str.isEmpty())
{
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filejs.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filejs.name());
js << str << m_endl;
}
@@ -79,7 +79,7 @@ void JSWriter::writeClass(UMLClassifier *c)
findObjectsRelated(c,includes);
for (UMLPackage *conc = includes.first(); conc; conc = includes.next())
{
- QString headerName = findFileName(conc, ".js");
+ TQString headerName = findFileName(conc, ".js");
if ( !headerName.isEmpty() )
{
js << "#include \"" << headerName << "\"" << m_endl;
@@ -123,7 +123,7 @@ void JSWriter::writeClass(UMLClassifier *c)
UMLAttributeList atl = c->getAttributeList();
js << "/**" << m_endl;
- QString temp = "_init sets all " + classname + " attributes to their default value."
+ TQString temp = "_init sets all " + classname + " attributes to their default value."
" Make sure to call this method within your class constructor";
js << formatDoc(temp, " * ");
js << " */" << m_endl;
@@ -183,13 +183,13 @@ void JSWriter::writeClass(UMLClassifier *c)
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocList , QTextStream &js)
+void JSWriter::writeAssociation(TQString& classname, UMLAssociationList& assocList , TQTextStream &js)
{
for (UMLAssociation *a = assocList.first(); a; a = assocList.next()) {
// association side
Uml::Role_Type role = (a->getObject(Uml::A)->getName() == classname ? Uml::B : Uml::A);
- QString roleName(cleanName(a->getRoleName(role)));
+ TQString roleName(cleanName(a->getRoleName(role)));
if (!roleName.isEmpty()) {
@@ -213,7 +213,7 @@ void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
int nMulti = a->getMulti(role).toInt(&okCvt,10);
bool isNotMulti = a->getMulti(role).isEmpty() || (okCvt && nMulti == 1);
- QString typeName(cleanName(a->getObject(role)->getName()));
+ TQString typeName(cleanName(a->getObject(role)->getName()));
if (isNotMulti)
js << m_indentation << "this.m_" << roleName << " = new " << typeName << "();" << m_endl;
@@ -225,7 +225,7 @@ void JSWriter::writeAssociation(QString& classname, UMLAssociationList& assocLis
}
}
-void JSWriter::writeOperations(QString classname, UMLOperationList *opList, QTextStream &js)
+void JSWriter::writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &js)
{
UMLOperation *op;
UMLAttribute *at;
@@ -260,7 +260,7 @@ void JSWriter::writeOperations(QString classname, UMLOperationList *opList, QTex
for (at = atl.first(); at ;at = atl.next(),j++)
{
js << cleanName(at->getName())
- << (!(at->getInitialValue().isEmpty()) ? (QString(" = ")+at->getInitialValue()) : QString(""))
+ << (!(at->getInitialValue().isEmpty()) ? (TQString(" = ")+at->getInitialValue()) : TQString(""))
<< ((j < i-1)?", ":"");
}
js << ")" << m_endl << "{" << m_endl <<
@@ -276,9 +276,9 @@ Uml::Programming_Language JSWriter::getLanguage() {
return Uml::pl_JavaScript;
}
-const QStringList JSWriter::reservedKeywords() const {
+const TQStringList JSWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "break"
diff --git a/umbrello/umbrello/codegenerators/jswriter.h b/umbrello/umbrello/codegenerators/jswriter.h
index a9c5ebde..679222b3 100644
--- a/umbrello/umbrello/codegenerators/jswriter.h
+++ b/umbrello/umbrello/codegenerators/jswriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -63,7 +63,7 @@ private:
* @param opList the list of operations
* @param js output stream for the JS file
*/
- void writeOperations(QString classname, UMLOperationList *opList, QTextStream &js);
+ void writeOperations(TQString classname, UMLOperationList *opList, TQTextStream &js);
/**
* write a list of associations
@@ -72,7 +72,7 @@ private:
* @param assocList the list of associations
* @param as output stream for the AS file
*/
- void writeAssociation(QString& classname, UMLAssociationList& assoclist , QTextStream &js);
+ void writeAssociation(TQString& classname, UMLAssociationList& assoclist , TQTextStream &js);
};
#endif //JSWRITER
diff --git a/umbrello/umbrello/codegenerators/pascalwriter.cpp b/umbrello/umbrello/codegenerators/pascalwriter.cpp
index 92a45bd2..766ea6df 100644
--- a/umbrello/umbrello/codegenerators/pascalwriter.cpp
+++ b/umbrello/umbrello/codegenerators/pascalwriter.cpp
@@ -14,9 +14,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../uml.h"
@@ -33,7 +33,7 @@
#include "../umlnamespace.h"
#include "classifierinfo.h"
-const QString PascalWriter::defaultPackageSuffix = "_Holder";
+const TQString PascalWriter::defaultPackageSuffix = "_Holder";
PascalWriter::PascalWriter() {
}
@@ -58,7 +58,7 @@ bool PascalWriter::isOOClass(UMLClassifier *c) {
kDebug() << "PascalWriter::isOOClass: unknown object type " << ot << endl;
return false;
}
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant" || stype == "CORBATypedef" ||
stype == "CORBAStruct" || stype == "CORBAUnion")
return false;
@@ -67,10 +67,10 @@ bool PascalWriter::isOOClass(UMLClassifier *c) {
return true;
}
-QString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue) {
+TQString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue) {
UMLPackage *umlPkg = p->getUMLPackage();
- QString className = cleanName(p->getName());
- QString retval;
+ TQString className = cleanName(p->getName());
+ TQString retval;
if (umlPkg == UMLApp::app()->getDocument()->getRootFolder(Uml::mt_Logical))
umlPkg = NULL;
@@ -101,7 +101,7 @@ QString PascalWriter::qualifiedName(UMLPackage *p, bool withType, bool byValue)
}
void PascalWriter::computeAssocTypeAndRole
-(UMLAssociation *a, QString& typeName, QString& roleName) {
+(UMLAssociation *a, TQString& typeName, TQString& roleName) {
roleName = a->getRoleName(Uml::A);
if (roleName.isEmpty()) {
if (a->getMulti(Uml::A).isEmpty()) {
@@ -127,8 +127,8 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
- QString fileName = qualifiedName(c).lower();
+ TQString classname = cleanName(c->getName());
+ TQString fileName = qualifiedName(c).lower();
fileName.replace('.', '-');
//find an appropriate name for our file
@@ -138,7 +138,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
return;
}
- QFile file;
+ TQFile file;
if (!openFile(file, fileName)) {
emit codeGenerated(c, false);
return;
@@ -146,17 +146,17 @@ void PascalWriter::writeClass(UMLClassifier *c) {
// Start generating the code.
- QTextStream pas(&file);
+ TQTextStream pas(&file);
//try to find a heading file(license, comments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".pas");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), file.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), file.name());
pas << str << endl;
}
- QString unit = qualifiedName(c);
+ TQString unit = qualifiedName(c);
pas << "unit " << unit << ";" << m_endl << m_endl;
pas << "INTERFACE" << m_endl << m_endl;
// Use referenced classes.
@@ -186,7 +186,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
pas << getIndent() << classname << " = (" << m_endl;
m_indentLevel++;
for (UMLClassifierListItem *lit = litList.first(); lit; lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
pas << getIndent() << enumLiteral;
if (++i < litList.count())
pas << "," << m_endl;
@@ -199,7 +199,7 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
UMLAttributeList atl = c->getAttributeList();
if (! isOOClass(c)) {
- QString stype = c->getStereotype();
+ TQString stype = c->getStereotype();
if (stype == "CORBAConstant") {
pas << getIndent() << "// " << stype << " is Not Yet Implemented" << m_endl << m_endl;
} else if(stype == "CORBAStruct") {
@@ -208,10 +208,10 @@ void PascalWriter::writeClass(UMLClassifier *c) {
pas << getIndent() << classname << " = record" << m_endl;
m_indentLevel++;
for (at = atl.first(); at; at = atl.next()) {
- QString name = cleanName(at->getName());
- QString typeName = at->getTypeName();
+ TQString name = cleanName(at->getName());
+ TQString typeName = at->getTypeName();
pas << getIndent() << name << " : " << typeName;
- QString initialVal = at->getInitialValue();
+ TQString initialVal = at->getInitialValue();
if (initialVal.latin1() && ! initialVal.isEmpty())
pas << " := " << initialVal;
pas << ";" << m_endl;
@@ -321,13 +321,13 @@ void PascalWriter::writeClass(UMLClassifier *c) {
}
-void PascalWriter::writeOperation(UMLOperation *op, QTextStream &pas, bool is_comment) {
+void PascalWriter::writeOperation(UMLOperation *op, TQTextStream &pas, bool is_comment) {
if (op->getStatic()) {
pas << "// TODO: generate status method " << op->getName() << m_endl;
return;
}
UMLAttributeList atl = op->getParmList();
- QString rettype = op->getTypeName();
+ TQString rettype = op->getTypeName();
bool use_procedure = (rettype.isEmpty() || rettype == "void");
pas << getIndent();
@@ -366,8 +366,8 @@ void PascalWriter::writeOperation(UMLOperation *op, QTextStream &pas, bool is_co
// for generating meaningful implementations.
}
-QStringList PascalWriter::defaultDatatypes() {
- QStringList l;
+TQStringList PascalWriter::defaultDatatypes() {
+ TQStringList l;
l.append("AnsiString");
l.append("Boolean");
l.append("Byte");
@@ -400,11 +400,11 @@ QStringList PascalWriter::defaultDatatypes() {
*
* @param rPossiblyReservedKeyword The string to check.
*/
-bool PascalWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
+bool PascalWriter::isReservedKeyword(const TQString & rPossiblyReservedKeyword) {
- const QStringList keywords = reservedKeywords();
+ const TQStringList keywords = reservedKeywords();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = keywords.begin(); it != keywords.end(); ++it)
if ((*it).lower() == rPossiblyReservedKeyword.lower())
return true;
@@ -415,9 +415,9 @@ bool PascalWriter::isReservedKeyword(const QString & rPossiblyReservedKeyword) {
/**
* get list of reserved keywords
*/
-const QStringList PascalWriter::reservedKeywords() const {
+const TQStringList PascalWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if ( keywords.isEmpty() ) {
keywords.append( "absolute" );
diff --git a/umbrello/umbrello/codegenerators/pascalwriter.h b/umbrello/umbrello/codegenerators/pascalwriter.h
index bc34d762..0e1f93ca 100644
--- a/umbrello/umbrello/codegenerators/pascalwriter.h
+++ b/umbrello/umbrello/codegenerators/pascalwriter.h
@@ -47,7 +47,7 @@ public:
*/
virtual Uml::Programming_Language getLanguage();
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
/**
* Check whether the given string is a reserved word for the
@@ -55,12 +55,12 @@ public:
*
* @param rPossiblyReservedKeyword The string to check.
*/
- virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
+ virtual bool isReservedKeyword(const TQString & rPossiblyReservedKeyword);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -69,16 +69,16 @@ private:
* @param op the class for which we are generating code
* @param ada the stream associated with the output file
*/
- void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
+ void writeOperation (UMLOperation *op, TQTextStream &ada, bool is_comment = false);
- void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName);
+ void computeAssocTypeAndRole (UMLAssociation *a, TQString& typeName, TQString& roleName);
bool isOOClass (UMLClassifier *c);
- QString qualifiedName
+ TQString qualifiedName
(UMLPackage *p, bool withType = false, bool byValue = false);
- static const QString defaultPackageSuffix;
+ static const TQString defaultPackageSuffix;
};
diff --git a/umbrello/umbrello/codegenerators/perlwriter.cpp b/umbrello/umbrello/codegenerators/perlwriter.cpp
index 7c8360fa..42563ec4 100644
--- a/umbrello/umbrello/codegenerators/perlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/perlwriter.cpp
@@ -23,11 +23,11 @@
#include "../uml.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqtextstream.h>
PerlWriter::PerlWriter()
{
@@ -35,8 +35,8 @@ PerlWriter::PerlWriter()
PerlWriter::~PerlWriter() {}
-bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
- QString &ThisPkgName){
+bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret,
+ TQString &ThisPkgName){
if(!c){
return(false);
@@ -45,17 +45,17 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
UMLPackageList includes;
findObjectsRelated(c,includes);
UMLPackage *conc;
- QString AV = "@";
- QString SV = "$";
- QString HV = "%";
+ TQString AV = "@";
+ TQString SV = "$";
+ TQString HV = "%";
for(conc = includes.first(); conc ;conc = includes.next()) {
if (conc->getBaseType() == Uml::ot_Datatype)
continue;
- QString neatName = cleanName(conc->getName());
+ TQString neatName = cleanName(conc->getName());
if (neatName != AV && neatName != SV && neatName != HV) {
- QString OtherPkgName = conc->getPackage(".");
- OtherPkgName.replace(QRegExp("\\."),"::");
- QString OtherName = OtherPkgName + "::" + cleanName(conc->getName());
+ TQString OtherPkgName = conc->getPackage(".");
+ OtherPkgName.replace(TQRegExp("\\."),"::");
+ TQString OtherName = OtherPkgName + "::" + cleanName(conc->getName());
// Only print out the use statement if the other package isn't the
// same as the one we are working on. (This happens for the
@@ -74,8 +74,8 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, QString &Ret,
Ret += "use base qw( ";
for (UMLClassifier *obj = superclasses.first();
obj; obj = superclasses.next()) {
- QString packageName = obj->getPackage(".");
- packageName.replace(QRegExp("\\."),"::");
+ TQString packageName = obj->getPackage(".");
+ packageName.replace(TQRegExp("\\."),"::");
Ret += packageName + "::" + cleanName(obj->getName()) + ' ';
}
@@ -92,22 +92,22 @@ void PerlWriter::writeClass(UMLClassifier *c) {
return;
}
*/
- QString classname = cleanName(c->getName());// this is fine: cleanName is "::-clean"
- QString packageName = c->getPackage(".");
- QString fileName;
+ TQString classname = cleanName(c->getName());// this is fine: cleanName is "::-clean"
+ TQString packageName = c->getPackage(".");
+ TQString fileName;
// Replace all white spaces with blanks
packageName.simplifyWhiteSpace();
// Replace all blanks with underscore
- packageName.replace(QRegExp(" "), "_");
+ packageName.replace(TQRegExp(" "), "_");
// Replace all dots (".") with double colon scope resolution operators
// ("::")
- packageName.replace(QRegExp("\\."),"::");
+ packageName.replace(TQRegExp("\\."),"::");
// Store complete package name
- QString ThisPkgName = packageName + "::" + classname;
+ TQString ThisPkgName = packageName + "::" + classname;
fileName = findFileName(c, ".pm");
// the above lower-cases my nice class names. That is bad.
@@ -117,14 +117,14 @@ void PerlWriter::writeClass(UMLClassifier *c) {
// actual solution: shameful ".pm" hack in codegenerator
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QString curDir = pol->getOutputDirectory().absPath();
+ TQString curDir = pol->getOutputDirectory().absPath();
if (fileName.contains("::")) {
// create new directories for each level
- QString newDir;
+ TQString newDir;
newDir = curDir;
- QString fragment = fileName;
- QDir* existing = new QDir (curDir);
- QRegExp regEx("(.*)(::)");
+ TQString fragment = fileName;
+ TQDir* existing = new TQDir (curDir);
+ TQRegExp regEx("(.*)(::)");
regEx.setMinimal(true);
while (regEx.search(fragment) > -1) {
newDir = regEx.cap(1);
@@ -145,14 +145,14 @@ void PerlWriter::writeClass(UMLClassifier *c) {
emit codeGenerated(c, false);
return;
}
- QString oldDir = pol->getOutputDirectory().absPath();
+ TQString oldDir = pol->getOutputDirectory().absPath();
pol->setOutputDirectory(curDir);
- QFile fileperl;
+ TQFile fileperl;
if(!openFile(fileperl, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream perl(&fileperl);
+ TQTextStream perl(&fileperl);
pol->setOutputDirectory(oldDir);
//======================================================================
@@ -160,20 +160,20 @@ void PerlWriter::writeClass(UMLClassifier *c) {
//======================================================================
// try to find a heading file (license, comments, etc)
- QString str;
+ TQString str;
bool bPackageDeclared = false;
bool bUseStmsWritten = false;
str = getHeadingFile(".pm"); // what this mean?
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),fileperl.name());
- str.replace(QRegExp("%year%"),QDate::currentDate().toString("yyyy"));
- str.replace(QRegExp("%date%"),QDate::currentDate().toString());
- str.replace(QRegExp("%time%"),QTime::currentTime().toString());
- str.replace(QRegExp("%package-name%"),ThisPkgName);
- if(str.find(QRegExp("%PACKAGE-DECLARE%"))){
- str.replace(QRegExp("%PACKAGE-DECLARE%"),
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),fileperl.name());
+ str.replace(TQRegExp("%year%"),TQDate::currentDate().toString("yyyy"));
+ str.replace(TQRegExp("%date%"),TQDate::currentDate().toString());
+ str.replace(TQRegExp("%time%"),TQTime::currentTime().toString());
+ str.replace(TQRegExp("%package-name%"),ThisPkgName);
+ if(str.find(TQRegExp("%PACKAGE-DECLARE%"))){
+ str.replace(TQRegExp("%PACKAGE-DECLARE%"),
"package " + ThisPkgName + ';'
+ m_endl + m_endl
+ "#UML_MODELER_BEGIN_PERSONAL_VARS_" + classname
@@ -184,10 +184,10 @@ void PerlWriter::writeClass(UMLClassifier *c) {
bPackageDeclared = true;
}
- if(str.find(QRegExp("%USE-STATEMENTS%"))){
- QString UseStms;
+ if(str.find(TQRegExp("%USE-STATEMENTS%"))){
+ TQString UseStms;
if(GetUseStatements(c,UseStms,ThisPkgName)){
- str.replace(QRegExp("%USE-STATEMENTS%"), UseStms);
+ str.replace(TQRegExp("%USE-STATEMENTS%"), UseStms);
bUseStmsWritten = true;
}
}
@@ -208,7 +208,7 @@ void PerlWriter::writeClass(UMLClassifier *c) {
}
if(! bUseStmsWritten){
- QString UseStms;
+ TQString UseStms;
if(GetUseStatements(c,UseStms,ThisPkgName)){
perl<<UseStms<<m_endl;
}
@@ -260,7 +260,7 @@ Uml::Programming_Language PerlWriter::getLanguage() {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
+void PerlWriter::writeOperations(UMLClassifier *c, TQTextStream &perl) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -288,7 +288,7 @@ void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -333,7 +333,7 @@ void PerlWriter::writeOperations(UMLClassifier *c, QTextStream &perl) {
perl << m_endl << m_endl;
}
-void PerlWriter::writeOperations(const QString &/* classname */, UMLOperationList &opList, QTextStream &perl) {
+void PerlWriter::writeOperations(const TQString &/* classname */, UMLOperationList &opList, TQTextStream &perl) {
UMLOperation *op;
UMLAttribute *at;
@@ -395,7 +395,7 @@ void PerlWriter::writeOperations(const QString &/* classname */, UMLOperationLis
}
-void PerlWriter::writeAttributes(UMLClassifier *c, QTextStream &perl) {
+void PerlWriter::writeAttributes(UMLClassifier *c, TQTextStream &perl) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -439,7 +439,7 @@ void PerlWriter::writeAttributes(UMLClassifier *c, QTextStream &perl) {
}
-void PerlWriter::writeAttributes(UMLAttributeList &atList, QTextStream &perl)
+void PerlWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &perl)
{
perl << m_endl << "=head1 PUBLIC ATTRIBUTES" << m_endl << m_endl;
perl << "=pod " << m_endl << m_endl ;
@@ -455,17 +455,17 @@ void PerlWriter::writeAttributes(UMLAttributeList &atList, QTextStream &perl)
return;
}
-QStringList PerlWriter::defaultDatatypes() {
- QStringList l;
+TQStringList PerlWriter::defaultDatatypes() {
+ TQStringList l;
l.append("$");
l.append("@");
l.append("%");
return l;
}
-const QStringList PerlWriter::reservedKeywords() const {
+const TQStringList PerlWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/perlwriter.h b/umbrello/umbrello/codegenerators/perlwriter.h
index 9dac4e56..4d5fdabd 100644
--- a/umbrello/umbrello/codegenerators/perlwriter.h
+++ b/umbrello/umbrello/codegenerators/perlwriter.h
@@ -51,9 +51,9 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
- QStringList defaultDatatypes();
+ TQStringList defaultDatatypes();
private:
@@ -69,7 +69,7 @@ private:
* @param c the concept we are generating code for
* @param perl output stream for the Perl file
*/
- void writeOperations(UMLClassifier *c, QTextStream &perl);
+ void writeOperations(UMLClassifier *c, TQTextStream &perl);
/**
* write a list of class operations
@@ -78,23 +78,23 @@ private:
* @param opList the list of operations
* @param perl output stream for the Perl file
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- QTextStream &perl);
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ TQTextStream &perl);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param perl output stream for the Perl file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &perl);
+ void writeAttributes(UMLClassifier *c, TQTextStream &perl);
/** write a list of class attributes
* @param atList the list of attributes
* @param perl output stream for the Perl file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &perl);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &perl);
- bool GetUseStatements(UMLClassifier *c, QString &Ret,
- QString &ThisPkgName);
+ bool GetUseStatements(UMLClassifier *c, TQString &Ret,
+ TQString &ThisPkgName);
};
diff --git a/umbrello/umbrello/codegenerators/php5writer.cpp b/umbrello/umbrello/codegenerators/php5writer.cpp
index 044d3afe..64a01b47 100644
--- a/umbrello/umbrello/codegenerators/php5writer.cpp
+++ b/umbrello/umbrello/codegenerators/php5writer.cpp
@@ -18,8 +18,8 @@
#include "php5writer.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -3000,20 +3000,20 @@ void Php5Writer::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".php");
+ TQString fileName = findFileName(c, ".php");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filephp;
+ TQFile filephp;
if(!openFile(filephp, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream php(&filephp);
+ TQTextStream php(&filephp);
//////////////////////////////
//Start generating the code!!
@@ -3021,11 +3021,11 @@ void Php5Writer::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filephp.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}
@@ -3035,7 +3035,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage *conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".php");
+ TQString headerName = findFileName(conc, ".php");
if (!headerName.isEmpty()) {
php << "require_once '" << headerName << "';" << m_endl;
}
@@ -3078,7 +3078,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
int ri = rc;
for (a = realizations.first(); a; a = realizations.next()) {
UMLObject *o = a->getObject(Uml::B);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if(ri == rc)
php << m_endl << m_indentation << m_indentation << m_indentation << "implements ";
php << typeName << (--rc == 0 ? "" : ", ");
@@ -3099,7 +3099,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
kError() << "aggregation role A object is NULL" << endl;
continue;
}
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ';' << m_endl;
} else {
@@ -3117,7 +3117,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
kError() << "composition role A object is NULL" << endl;
continue;
}
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ';' << m_endl;
} else {
@@ -3147,7 +3147,7 @@ void Php5Writer::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
+void Php5Writer::writeOperations(UMLClassifier *c, TQTextStream &php) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -3177,7 +3177,7 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -3222,8 +3222,8 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) {
}
-void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationList &opList,
- QTextStream &php, bool isInterface /* = false */,
+void Php5Writer::writeOperations(const TQString &/* classname */, UMLOperationList &opList,
+ TQTextStream &php, bool isInterface /* = false */,
bool generateErrorStub /* = false */) {
for (UMLOperation *op=opList.first(); op ; op=opList.next()) {
UMLAttributeList atl = op->getParmList();
@@ -3287,8 +3287,8 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis
for (at = atl.first(); at; at = atl.next(), j++) {
php << " $" << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
<< ((j < i-1)?", ":"");
}
php <<" )";
@@ -3306,7 +3306,7 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis
}//end for
}
-void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) {
+void Php5Writer::writeAttributes(UMLClassifier *c, TQTextStream &php) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -3351,7 +3351,7 @@ void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) {
}
-void Php5Writer::writeAttributes(UMLAttributeList &atList, QTextStream &php) {
+void Php5Writer::writeAttributes(UMLAttributeList &atList, TQTextStream &php) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
bool isStatic = at->getStatic();
if (forceDoc() || !at->getDoc().isEmpty()) {
@@ -3402,9 +3402,9 @@ Uml::Programming_Language Php5Writer::getLanguage() {
return Uml::pl_PHP5;
}
-const QStringList Php5Writer::reservedKeywords() const {
+const TQStringList Php5Writer::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; php5words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/php5writer.h b/umbrello/umbrello/codegenerators/php5writer.h
index 3adc983c..ea2a7862 100644
--- a/umbrello/umbrello/codegenerators/php5writer.h
+++ b/umbrello/umbrello/codegenerators/php5writer.h
@@ -49,7 +49,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -64,7 +64,7 @@ private:
* @param c the concept we are generating code for
* @param php output stream for the PHP file
*/
- void writeOperations(UMLClassifier *c, QTextStream &php);
+ void writeOperations(UMLClassifier *c, TQTextStream &php);
/**
* write a list of class operations
@@ -74,21 +74,21 @@ private:
* @param php output stream for the PHP file
* @param interface indicates if the operation is an interface member
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- QTextStream &php,
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ TQTextStream &php,
bool interface = false, bool generateErrorStub = false);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &php);
+ void writeAttributes(UMLClassifier *c, TQTextStream &php);
/** write a list of class attributes
* @param atList the list of attributes
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &php);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &php);
};
#endif //PHP5WRITER
diff --git a/umbrello/umbrello/codegenerators/phpwriter.cpp b/umbrello/umbrello/codegenerators/phpwriter.cpp
index 6d71c102..e9dba103 100644
--- a/umbrello/umbrello/codegenerators/phpwriter.cpp
+++ b/umbrello/umbrello/codegenerators/phpwriter.cpp
@@ -17,8 +17,8 @@
#include "phpwriter.h"
#include <kdebug.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -2996,20 +2996,20 @@ void PhpWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".php");
+ TQString fileName = findFileName(c, ".php");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile filephp;
+ TQFile filephp;
if(!openFile(filephp, fileName)) {
emit codeGenerated(c, false);
return;
}
- QTextStream php(&filephp);
+ TQTextStream php(&filephp);
//////////////////////////////
//Start generating the code!!
@@ -3017,11 +3017,11 @@ void PhpWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".php");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),filephp.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),filephp.name());
php<<str<<m_endl;
}
@@ -3031,7 +3031,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage *conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".php");
+ TQString headerName = findFileName(conc, ".php");
if (headerName.isEmpty()) {
php << "include '" << headerName << "';" << m_endl;
}
@@ -3075,7 +3075,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
//maybe we should parse the string here and take multiplicity into account to decide
//which container to use.
UMLObject *o = a->getObject(Uml::A);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ";" << m_endl;
} else {
@@ -3089,7 +3089,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
for (a = compositions.first(); a ; a = compositions.next()) {
// see comment on Aggregation about multiplicity...
UMLObject *o = a->getObject(Uml::A);
- QString typeName = cleanName(o->getName());
+ TQString typeName = cleanName(o->getName());
if (a->getMulti(Uml::A).isEmpty()) {
php << m_indentation << "var $m_" << ";" << m_endl;
} else {
@@ -3112,7 +3112,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
php << m_endl;
php << m_indentation << "/**" << m_endl;
- QString temp = "initAttributes sets all " + classname + " attributes to its default value."
+ TQString temp = "initAttributes sets all " + classname + " attributes to its default value."
" Make sure to call this method within your class constructor";
php << formatDoc(temp,m_indentation + " * ");
php << m_indentation << " */" << m_endl;
@@ -3141,7 +3141,7 @@ void PhpWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
+void PhpWriter::writeOperations(UMLClassifier *c, TQTextStream &php) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -3168,7 +3168,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -3187,7 +3187,7 @@ void PhpWriter::writeOperations(UMLClassifier *c, QTextStream &php) {
}
}
-void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opList, QTextStream &php) {
+void PhpWriter::writeOperations(TQString /* classname */, UMLOperationList &opList, TQTextStream &php) {
UMLOperation *op;
UMLAttribute *at;
@@ -3236,8 +3236,8 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis
for (at = atl.first(); at; at = atl.next(), j++) {
php << " $" << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""))
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""))
<< ((j < i-1)?", ":"");
}
php <<" )" << m_endl << m_indentation << "{" << m_endl << m_indentation << m_indentation << m_endl << m_indentation << "} // end of member function " + cleanName(op->getName()) + m_endl;
@@ -3245,7 +3245,7 @@ void PhpWriter::writeOperations(QString /* classname */, UMLOperationList &opLis
}//end for
}
-void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) {
+void PhpWriter::writeAttributes(UMLClassifier *c, TQTextStream &php) {
UMLAttributeList atpub, atprot, atpriv, atdefval;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -3290,7 +3290,7 @@ void PhpWriter::writeAttributes(UMLClassifier *c, QTextStream &php) {
}
-void PhpWriter::writeAttributes(UMLAttributeList &atList, QTextStream &php) {
+void PhpWriter::writeAttributes(UMLAttributeList &atList, TQTextStream &php) {
for (UMLAttribute *at = atList.first(); at ; at = atList.next()) {
if (forceDoc() || !at->getDoc().isEmpty()) {
php << m_indentation << "/**" << m_endl << formatDoc(at->getDoc(), m_indentation + " * ");
@@ -3323,9 +3323,9 @@ Uml::Programming_Language PhpWriter::getLanguage() {
return Uml::pl_PHP;
}
-const QStringList PhpWriter::reservedKeywords() const {
+const TQStringList PhpWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
for (int i = 0; words[i]; i++)
diff --git a/umbrello/umbrello/codegenerators/phpwriter.h b/umbrello/umbrello/codegenerators/phpwriter.h
index a3acb68b..e03699f1 100644
--- a/umbrello/umbrello/codegenerators/phpwriter.h
+++ b/umbrello/umbrello/codegenerators/phpwriter.h
@@ -47,7 +47,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -62,7 +62,7 @@ private:
* @param c the concept we are generating code for
* @param php output stream for the PHP file
*/
- void writeOperations(UMLClassifier *c, QTextStream &php);
+ void writeOperations(UMLClassifier *c, TQTextStream &php);
/**
* write a list of class operations
@@ -71,20 +71,20 @@ private:
* @param opList the list of operations
* @param php output stream for the PHP file
*/
- void writeOperations(QString classname, UMLOperationList &opList,
- QTextStream &php);
+ void writeOperations(TQString classname, UMLOperationList &opList,
+ TQTextStream &php);
/** write all the attributes of a class
* @param c the class we are generating code for
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &php);
+ void writeAttributes(UMLClassifier *c, TQTextStream &php);
/** write a list of class attributes
* @param atList the list of attributes
* @param php output stream for the PHP file
*/
- void writeAttributes(UMLAttributeList &atList, QTextStream &php);
+ void writeAttributes(UMLAttributeList &atList, TQTextStream &php);
};
#endif //PHPWRITER
diff --git a/umbrello/umbrello/codegenerators/pythonwriter.cpp b/umbrello/umbrello/codegenerators/pythonwriter.cpp
index a5ac2b28..f243ab2c 100644
--- a/umbrello/umbrello/codegenerators/pythonwriter.cpp
+++ b/umbrello/umbrello/codegenerators/pythonwriter.cpp
@@ -21,9 +21,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../umldoc.h"
#include "../umlattributelist.h"
@@ -45,7 +45,7 @@ void PythonWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
UMLClassifierList superclasses = c->getSuperClasses();
UMLAssociationList aggregations = c->getAggregations();
@@ -54,24 +54,24 @@ void PythonWriter::writeClass(UMLClassifier *c) {
m_bNeedPass = true;
//find an appropriate name for our file
- QString fileName = findFileName(c, ".py");
+ TQString fileName = findFileName(c, ".py");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QChar first = fileName.at(0);
+ TQChar first = fileName.at(0);
//Replace the first letter of the filename because
//python class begin with an upper caracter (convention)
first = first.upper();
fileName = fileName.replace(0, 1, first);
- QFile fileh;
+ TQFile fileh;
if( !openFile(fileh, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream h(&fileh);
+ TQTextStream h(&fileh);
//////////////////////////////
//Start generating the code!!
@@ -79,21 +79,21 @@ void PythonWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".py");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
// generate import statement for superclasses and take packages into account
str = cleanName(c->getName());
- QString pkg = cleanName(c->getPackage());
+ TQString pkg = cleanName(c->getPackage());
if (!pkg.isEmpty())
str.prepend(pkg + '.');
- QStringList includesList = QStringList(str); //save imported classes
+ TQStringList includesList = TQStringList(str); //save imported classes
int i = superclasses.count();
for (UMLClassifier *classifier = superclasses.first();
classifier && i; classifier = superclasses.next(), i--) {
@@ -110,13 +110,13 @@ void PythonWriter::writeClass(UMLClassifier *c) {
findObjectsRelated(c,includes);
UMLPackage* conc;
for(conc = includes.first(); conc ;conc = includes.next()) {
- QString headerName = findFileName(conc, ".py");
+ TQString headerName = findFileName(conc, ".py");
if ( !headerName.isEmpty() ) {
- headerName.remove(QRegExp(".py$"));
+ headerName.remove(TQRegExp(".py$"));
first = headerName.at(0);
first = first.upper();
headerName = headerName.replace(0, 1, first);
- str = headerName.replace(QChar('/'),QChar('.'));
+ str = headerName.replace(TQChar('/'),TQChar('.'));
if (includesList.findIndex(str) < 0) // not yet imported
h << "from " << str << " import *" << m_endl;
}
@@ -165,7 +165,7 @@ void PythonWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-void PythonWriter::writeAttributes(UMLAttributeList atList, QTextStream &py) {
+void PythonWriter::writeAttributes(UMLAttributeList atList, TQTextStream &py) {
if (!forceDoc() || atList.count() == 0)
return;
py << m_indentation << "\"\"\" ATTRIBUTES" << m_endl << m_endl;
@@ -178,7 +178,7 @@ void PythonWriter::writeAttributes(UMLAttributeList atList, QTextStream &py) {
py << m_indentation << "\"\"\"" << m_endl << m_endl;
}
-void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
+void PythonWriter::writeOperations(UMLClassifier *c, TQTextStream &h) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -205,7 +205,7 @@ void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -222,23 +222,23 @@ void PythonWriter::writeOperations(UMLClassifier *c, QTextStream &h) {
}
-void PythonWriter::writeOperations(const QString& /*classname*/, UMLOperationList &opList,
- QTextStream &h, Access access) {
+void PythonWriter::writeOperations(const TQString& /*classname*/, UMLOperationList &opList,
+ TQTextStream &h, Access access) {
UMLOperation *op;
UMLAttribute *at;
- QString sAccess;
+ TQString sAccess;
switch (access) {
case PUBLIC:
- sAccess = QString("");
+ sAccess = TQString("");
break;
case PRIVATE:
- sAccess = QString("__");
+ sAccess = TQString("__");
break;
case PROTECTED:
- sAccess = QString("_");
+ sAccess = TQString("_");
break;
}
@@ -256,8 +256,8 @@ void PythonWriter::writeOperations(const QString& /*classname*/, UMLOperationLis
for (at = atl.first(); at; at = atl.next(), j++) {
h << ", " << cleanName(at->getName())
<< (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ")+at->getInitialValue()) :
- QString(""));
+ (TQString(" = ")+at->getInitialValue()) :
+ TQString(""));
}
h<<"):"<<m_endl;
@@ -291,9 +291,9 @@ Uml::Programming_Language PythonWriter::getLanguage() {
return Uml::pl_Python;
}
-const QStringList PythonWriter::reservedKeywords() const {
+const TQStringList PythonWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "abs"
diff --git a/umbrello/umbrello/codegenerators/pythonwriter.h b/umbrello/umbrello/codegenerators/pythonwriter.h
index f9e5b31a..c9dddc23 100644
--- a/umbrello/umbrello/codegenerators/pythonwriter.h
+++ b/umbrello/umbrello/codegenerators/pythonwriter.h
@@ -50,7 +50,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -60,7 +60,7 @@ private:
* @param c the concept we are generating code for
* @param py output stream for the header file
*/
- void writeAttributes(UMLAttributeList atList, QTextStream &py);
+ void writeAttributes(UMLAttributeList atList, TQTextStream &py);
/**
* write all operations for a given class
@@ -68,7 +68,7 @@ private:
* @param c the concept we are generating code for
* @param h output stream for the header file
*/
- void writeOperations(UMLClassifier *c, QTextStream &h);
+ void writeOperations(UMLClassifier *c, TQTextStream &h);
/**
* write a list of class operations
@@ -77,8 +77,8 @@ private:
* @param opList the list of operations
* @param h output stream for the header file
*/
- void writeOperations(const QString& classname, UMLOperationList &opList,
- QTextStream &h, Access access);
+ void writeOperations(const TQString& classname, UMLOperationList &opList,
+ TQTextStream &h, Access access);
bool m_bNeedPass; ///< True as long as no "pass" has been written
};
diff --git a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
index cae5d322..f75ff165 100644
--- a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp
@@ -26,7 +26,7 @@
//
RubyClassDeclarationBlock::RubyClassDeclarationBlock
- ( RubyClassifierCodeDocument * parentDoc, const QString &startText, const QString &endText, const QString &comment)
+ ( RubyClassifierCodeDocument * parentDoc, const TQString &startText, const TQString &endText, const TQString &comment)
: OwnedHierarchicalCodeBlock(parentDoc->getParentClassifier(), parentDoc, startText, endText, comment)
{
init(parentDoc, comment);
@@ -41,8 +41,8 @@ RubyClassDeclarationBlock::~RubyClassDeclarationBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void RubyClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "rubyclassdeclarationblock" );
+void RubyClassDeclarationBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "rubyclassdeclarationblock" );
setAttributesOnNode(doc, blockElement);
@@ -52,7 +52,7 @@ void RubyClassDeclarationBlock::saveToXMI ( QDomDocument & doc, QDomElement & ro
/**
* load params from the appropriate XMI element node.
*/
-void RubyClassDeclarationBlock::loadFromXMI ( QDomElement & root )
+void RubyClassDeclarationBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -72,13 +72,13 @@ void RubyClassDeclarationBlock::updateContent ( )
RubyClassifierCodeDocument *parentDoc = dynamic_cast<RubyClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy * p = UMLApp::app()->getCommonPolicy();
- QString endLine = p->getNewLineEndingChars();
+ TQString endLine = p->getNewLineEndingChars();
bool isInterface = parentDoc->parentIsInterface(); // a little shortcut
- QString RubyClassName = parentDoc->getRubyClassName(c->getName());
+ TQString RubyClassName = parentDoc->getRubyClassName(c->getName());
bool forceDoc = p->getCodeVerboseDocumentComments();
// COMMENT
- QString comment = c->getDoc();
+ TQString comment = c->getDoc();
comment.replace("@ref ", "");
comment.replace("@see", "_See_");
comment.replace("@short", "_Summary_");
@@ -96,7 +96,7 @@ void RubyClassDeclarationBlock::updateContent ( )
// Now set START/ENDING Text
- QString startText = "";
+ TQString startText = "";
if (parentDoc->parentIsInterface()) {
startText.append("module ");
@@ -113,7 +113,7 @@ void RubyClassDeclarationBlock::updateContent ( )
int i = 0;
for (UMLClassifier * concept= superclasses.first(); concept; concept = superclasses.next()) {
if (i == 0) {
- startText.append(QString(" < ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
+ startText.append(TQString(" < ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
} else {
// After the first superclass name in the list, assume the classes
// are ruby modules that can be mixed in,
@@ -124,14 +124,14 @@ void RubyClassDeclarationBlock::updateContent ( )
// Write out the interfaces we 'implement'. Are these modules to be mixed in, in Ruby?
for (UMLClassifier * concept= superinterfaces.first(); concept; concept = superinterfaces.next()) {
- startText.append(QString("include ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
+ startText.append(TQString("include ") + RubyCodeGenerator::cppToRubyType(concept->getName()) + endLine);
}
// Set the header and end text for the hier.codeblock
setStartText(startText);
}
-void RubyClassDeclarationBlock::init (RubyClassifierCodeDocument *parentDoc, const QString &comment)
+void RubyClassDeclarationBlock::init (RubyClassifierCodeDocument *parentDoc, const TQString &comment)
{
setComment(new RubyCodeDocumentation(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
index a7732662..63e43702 100644
--- a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.h
@@ -17,7 +17,7 @@
#ifndef RUBYCLASSDECLARATIONBLOCK_H
#define RUBYCLASSDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
/***************************************************************************
rubyclassdeclarationblock.h
@@ -41,7 +41,7 @@ public:
/**
* Empty Constructor
*/
- explicit RubyClassDeclarationBlock ( RubyClassifierCodeDocument * parentDoc, const QString &start = "", const QString &endText = "end", const QString &comment = "");
+ explicit RubyClassDeclarationBlock ( RubyClassifierCodeDocument * parentDoc, const TQString &start = "", const TQString &endText = "end", const TQString &comment = "");
/**
* Empty Destructor
@@ -51,12 +51,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
protected:
@@ -67,7 +67,7 @@ protected:
private:
- void init (RubyClassifierCodeDocument * parent, const QString &comment);
+ void init (RubyClassifierCodeDocument * parent, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
index 1c136df8..ada4b0bb 100644
--- a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
+++ b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp
@@ -29,7 +29,7 @@
#include "rubyclassifiercodedocument.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -77,19 +77,19 @@ CodeDocumentDialog RubyClassifierCodeDocument::getDialog ( ) {
*/
// We overwritten by Ruby language implementation to get lowercase path
-QString RubyClassifierCodeDocument::getPath ( )
+TQString RubyClassifierCodeDocument::getPath ( )
{
- QString path = getPackage();
+ TQString path = getPackage();
// Replace all white spaces with blanks
path.simplifyWhiteSpace();
// Replace all blanks with underscore
- path.replace(QRegExp(" "), "_");
+ path.replace(TQRegExp(" "), "_");
- path.replace(QRegExp("\\."),"/");
- path.replace(QRegExp("::"), "/");
+ path.replace(TQRegExp("\\."),"/");
+ path.replace(TQRegExp("::"), "/");
path.lower();
@@ -101,7 +101,7 @@ QString RubyClassifierCodeDocument::getPath ( )
// Other methods
//
-QString RubyClassifierCodeDocument::getRubyClassName (const QString &name) {
+TQString RubyClassifierCodeDocument::getRubyClassName (const TQString &name) {
CodeGenerator *g = UMLApp::app()->getGenerator();
return Codegen_Utils::capitalizeFirstLetter(g->cleanName(name));
}
@@ -173,25 +173,25 @@ bool RubyClassifierCodeDocument::addCodeOperation (CodeOperation * op )
// would be better if we could create a handler interface that each
// codeblock used so all we have to do here is add the handler
// for "rubyclassdeclarationblock"
-void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & root)
+void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = new RubyCodeComment(this);
@@ -206,7 +206,7 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -252,7 +252,7 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
@@ -313,9 +313,9 @@ void RubyClassifierCodeDocument::loadChildTextBlocksFromNode ( QDomElement & roo
}
-QString RubyClassifierCodeDocument::scopeToRubyDecl(Uml::Visibility scope)
+TQString RubyClassifierCodeDocument::scopeToRubyDecl(Uml::Visibility scope)
{
- QString scopeString;
+ TQString scopeString;
switch(scope)
{
case Uml::Visibility::Public:
@@ -402,7 +402,7 @@ void RubyClassifierCodeDocument::updateContent( )
bool isInterface = parentIsInterface();
bool hasOperationMethods = c->getOpList().last() ? true : false;
CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy();
- QString endLine = pol->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
+ TQString endLine = pol->getNewLineEndingChars(); // a shortcut..so we don't have to call this all the time
//
// START GENERATING CODE/TEXT BLOCKS and COMMENTS FOR THE DOCUMENT
diff --git a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
index c5f89d07..cfaa66fe 100644
--- a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
+++ b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.h
@@ -21,7 +21,7 @@
#ifndef RUBYCLASSIFIERCODEDOCUMENT_H
#define RUBYCLASSIFIERCODEDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfieldlist.h"
#include "../classifiercodedocument.h"
@@ -64,14 +64,14 @@ public:
*/
//CodeDocumentDialog getDialog ( );
- QString scopeToRubyDecl(Uml::Visibility scope);
+ TQString scopeToRubyDecl(Uml::Visibility scope);
// Make it easier on ourselves
RubyCodeGenerationPolicy * getRubyPolicy();
- QString getRubyClassName (const QString &name);
+ TQString getRubyClassName (const TQString &name);
- QString getPath();
+ TQString getPath();
/** add a code operation to this ruby classifier code document.
* @return bool which is true IF the code operation was added successfully
@@ -87,7 +87,7 @@ protected:
* need to overwrite this for ruby since we need to pick up the
* ruby class declaration block.
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
void addOrUpdateCodeClassFieldMethodsInCodeBlock(CodeClassFieldList &list, RubyClassDeclarationBlock * codeBlock);
diff --git a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
index a3f55c44..43986061 100644
--- a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp
@@ -21,7 +21,7 @@
#include "rubycodeaccessormethod.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -56,7 +56,7 @@ RubyCodeAccessorMethod::~RubyCodeAccessorMethod ( ) { }
// Other methods
//
-void RubyCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void RubyCodeAccessorMethod::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
// set super-class attributes
@@ -65,7 +65,7 @@ void RubyCodeAccessorMethod::setAttributesOnNode ( QDomDocument & doc, QDomEleme
// set local attributes now
}
-void RubyCodeAccessorMethod::setAttributesFromNode( QDomElement & root)
+void RubyCodeAccessorMethod::setAttributesFromNode( TQDomElement & root)
{
// set attributes from superclass method the XMI
@@ -80,18 +80,18 @@ void RubyCodeAccessorMethod::updateContent( )
CodeClassField * parentField = getParentClassField();
RubyCodeClassField * rubyfield = dynamic_cast<RubyCodeClassField*>(parentField);
- QString fieldName = rubyfield->getFieldName();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString fieldName = rubyfield->getFieldName();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString text = "";
+ TQString text = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
{
int maxOccurs = rubyfield->maximumListOccurances();
- QString fieldType = rubyfield->getTypeName();
- QString indent = getIndentation();
+ TQString fieldType = rubyfield->getTypeName();
+ TQString indent = getIndentation();
if(maxOccurs > 0)
- text += "if "+fieldName+".size() < "+ QString::number(maxOccurs)+' '+endLine+indent;
+ text += "if "+fieldName+".size() < "+ TQString::number(maxOccurs)+' '+endLine+indent;
text += fieldName+".push(value)";
if(maxOccurs > 0)
{
@@ -110,11 +110,11 @@ void RubyCodeAccessorMethod::updateContent( )
{
int minOccurs = rubyfield->minimumListOccurances();
RubyClassifierCodeDocument * rubydoc = dynamic_cast<RubyClassifierCodeDocument*>(rubyfield->getParentDocument());
- QString fieldType = rubyfield->getTypeName();
- QString indent = getIndentation();
+ TQString fieldType = rubyfield->getTypeName();
+ TQString indent = getIndentation();
if(minOccurs > 0)
- text += "if "+fieldName+".size() >= "+ QString::number(minOccurs)+endLine+indent;
+ text += "if "+fieldName+".size() >= "+ TQString::number(minOccurs)+endLine+indent;
text += fieldName+".delete(value)";
if(minOccurs > 0)
{
@@ -144,18 +144,18 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
// gather defs
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
CodeGenerationPolicy::ScopePolicy scopePolicy = p->getAttributeAccessorScope();
- QString strVis = rubydoc->scopeToRubyDecl(rubyfield->getVisibility());
- QString fieldName = RubyCodeGenerator::cppToRubyName(rubyfield->getFieldName());
- QString fieldType = RubyCodeGenerator::cppToRubyType(rubyfield->getTypeName());
- QString objectType = rubyfield->getListObjectType();
+ TQString strVis = rubydoc->scopeToRubyDecl(rubyfield->getVisibility());
+ TQString fieldName = RubyCodeGenerator::cppToRubyName(rubyfield->getFieldName());
+ TQString fieldType = RubyCodeGenerator::cppToRubyType(rubyfield->getTypeName());
+ TQString objectType = rubyfield->getListObjectType();
if(objectType.isEmpty())
objectType = fieldName;
- QString endLine = p->getNewLineEndingChars();
+ TQString endLine = p->getNewLineEndingChars();
- QString description = getParentObject()->getDoc();
- description.replace(QRegExp("m_[npb](?=[A-Z])"), "");
+ TQString description = getParentObject()->getDoc();
+ description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
- description.replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine);
+ description.replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine);
// set scope of this accessor appropriately..if its an attribute,
// we need to be more sophisticated
@@ -173,10 +173,10 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
}
// some variables we will need to populate
- QString headerText = "";
- QString methodReturnType = "";
- QString methodName = "";
- QString methodParams = "";
+ TQString headerText = "";
+ TQString methodReturnType = "";
+ TQString methodName = "";
+ TQString methodParams = "";
switch(getType()) {
case CodeAccessorMethod::ADD:
@@ -189,7 +189,7 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
break;
case CodeAccessorMethod::GET:
headerText = "Get the value of " + fieldName + endLine + description;
- setStartMethodText(QString("attr_reader :") + fieldName);
+ setStartMethodText(TQString("attr_reader :") + fieldName);
setEndMethodText("");
break;
case CodeAccessorMethod::LIST:
@@ -209,7 +209,7 @@ void RubyCodeAccessorMethod::updateMethodDeclaration()
break;
case CodeAccessorMethod::SET:
headerText = "Set the value of " + fieldName + endLine + description;
- setStartMethodText(QString("attr_writer :") + fieldName);
+ setStartMethodText(TQString("attr_writer :") + fieldName);
setEndMethodText("");
break;
default:
diff --git a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
index 7eb9c892..0e61a978 100644
--- a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
+++ b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.h
@@ -23,7 +23,7 @@
#ifndef RUBYCODEACCESSORMETHOD_H
#define RUBYCODEACCESSORMETHOD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeaccessormethod.h"
#include "rubycodeclassfield.h"
@@ -56,12 +56,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration();
virtual void updateContent();
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
index 35438abd..b3b723b9 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp
@@ -21,7 +21,7 @@
#include "rubycodeclassfield.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -59,7 +59,7 @@ RubyCodeClassField::~RubyCodeClassField ( ) { }
// Other methods
//
-QString RubyCodeClassField::getFieldName() {
+TQString RubyCodeClassField::getFieldName() {
if (parentIsAttribute())
{
UMLAttribute * at = (UMLAttribute*) getParentObject();
@@ -68,7 +68,7 @@ QString RubyCodeClassField::getFieldName() {
else
{
UMLRole * role = (UMLRole*) getParentObject();
- QString roleName = role->getName();
+ TQString roleName = role->getName();
if(fieldIsSingleValue()) {
return roleName.replace(0, 1, roleName.left(1).lower());
} else {
@@ -78,7 +78,7 @@ QString RubyCodeClassField::getFieldName() {
}
-QString RubyCodeClassField::getInitialValue() {
+TQString RubyCodeClassField::getInitialValue() {
if (parentIsAttribute())
{
@@ -97,7 +97,7 @@ QString RubyCodeClassField::getInitialValue() {
if(fieldIsSingleValue()) {
// FIX : IF the multiplicity is "1" then we should init a new object here, if its 0 or 1,
// then we can just return 'empty' string (minor problem).
- return QString("");
+ return TQString("");
} else {
return RubyCodeGenerator::getListFieldClassName()+".new()";
}
@@ -105,7 +105,7 @@ QString RubyCodeClassField::getInitialValue() {
}
-QString RubyCodeClassField::getTypeName ( )
+TQString RubyCodeClassField::getTypeName ( )
{
return RubyCodeGenerator::cppToRubyType(CodeClassField::getTypeName());
}
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfield.h b/umbrello/umbrello/codegenerators/rubycodeclassfield.h
index 384f0b5d..50269729 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfield.h
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfield.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECLASSFIELD_H
#define RUBYCODECLASSFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfield.h"
@@ -45,11 +45,11 @@ public:
*/
virtual ~RubyCodeClassField ( );
- QString getFieldType();
- QString getFieldName();
- QString getInitialValue();
+ TQString getFieldType();
+ TQString getFieldName();
+ TQString getInitialValue();
- QString getTypeName ( );
+ TQString getTypeName ( );
protected:
private:
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
index 380c05e0..e99ca774 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.cpp
@@ -53,12 +53,12 @@ void RubyCodeClassFieldDeclarationBlock::updateContent( )
CodeGenerationPolicy::ScopePolicy scopePolicy = p->getAssociationFieldScope();
// Set the comment
- QString notes = getParentObject()->getDoc();
+ TQString notes = getParentObject()->getDoc();
getComment()->setText(notes);
// Set the body
- QString staticValue = getParentObject()->getStatic() ? "static " : "";
- QString scopeStr = rdoc->scopeToRubyDecl(getParentObject()->getVisibility());
+ TQString staticValue = getParentObject()->getStatic() ? "static " : "";
+ TQString scopeStr = rdoc->scopeToRubyDecl(getParentObject()->getVisibility());
// IF this is from an association, then scope taken as appropriate to policy
if(!rcf->parentIsAttribute())
@@ -76,14 +76,14 @@ void RubyCodeClassFieldDeclarationBlock::updateContent( )
}
}
- QString typeName = rcf->getTypeName();
- QString fieldName = rcf->getFieldName();
- QString initialV = rcf->getInitialValue();
+ TQString typeName = rcf->getTypeName();
+ TQString fieldName = rcf->getFieldName();
+ TQString initialV = rcf->getInitialValue();
if (!cf->parentIsAttribute() && !cf->fieldIsSingleValue())
typeName = "Array";
- QString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
+ TQString body = staticValue+scopeStr+' '+typeName+' '+fieldName;
if (!initialV.isEmpty())
body.append(" = " + initialV);
else if (!cf->parentIsAttribute())
diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
index c3e18a68..beba96c2 100644
--- a/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
+++ b/umbrello/umbrello/codegenerators/rubycodeclassfielddeclarationblock.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECLASSFIELDDECLARATIONBLOCK_H
#define RUBYCODECLASSFIELDDECLARATIONBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeclassfielddeclarationblock.h"
diff --git a/umbrello/umbrello/codegenerators/rubycodecomment.cpp b/umbrello/umbrello/codegenerators/rubycodecomment.cpp
index 46374128..89508b63 100644
--- a/umbrello/umbrello/codegenerators/rubycodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodecomment.cpp
@@ -18,12 +18,12 @@
***************************************************************************/
#include "rubycodecomment.h"
-#include <qregexp.h>
+#include <tqregexp.h>
// Constructors/Destructors
//
-RubyCodeComment::RubyCodeComment(CodeDocument * doc, const QString & text)
+RubyCodeComment::RubyCodeComment(CodeDocument * doc, const TQString & text)
: CodeComment(doc, text)
{
@@ -46,35 +46,35 @@ RubyCodeComment::~RubyCodeComment( ) { }
// Other methods
//
-QString RubyCodeComment::getNewEditorLine( int amount ) {
- QString line = getIndentationString(amount) + "# ";
+TQString RubyCodeComment::getNewEditorLine( int amount ) {
+ TQString line = getIndentationString(amount) + "# ";
return line;
}
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString RubyCodeComment::unformatText(const QString & text, const QString & indent)
+TQString RubyCodeComment::unformatText(const TQString & text, const TQString & indent)
{
// remove leading or trailing comment stuff
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
// now leading hash
- mytext.remove(QRegExp("^#\\s*"));
+ mytext.remove(TQRegExp("^#\\s*"));
return mytext;
}
/**
* @return QString
*/
-QString RubyCodeComment::toString( )
+TQString RubyCodeComment::toString( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if (getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
output.append(formatMultiLineText(getText(), indent + "# ", endLine + endLine));
}
diff --git a/umbrello/umbrello/codegenerators/rubycodecomment.h b/umbrello/umbrello/codegenerators/rubycodecomment.h
index 35fb87a8..0646cd33 100644
--- a/umbrello/umbrello/codegenerators/rubycodecomment.h
+++ b/umbrello/umbrello/codegenerators/rubycodecomment.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODECOMMENT_H
#define RUBYCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
/**
@@ -38,7 +38,7 @@ public:
/**
* Constructors
*/
- explicit RubyCodeComment ( CodeDocument * doc, const QString & text = "");
+ explicit RubyCodeComment ( CodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -48,17 +48,17 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "#" as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp b/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
index 6c69530a..e19f4daa 100644
--- a/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodedocumentation.cpp
@@ -21,7 +21,7 @@
#include "rubycodedocumentation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// local includes
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-RubyCodeDocumentation::RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const QString & text )
+RubyCodeDocumentation::RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const TQString & text )
: CodeComment ((CodeDocument*) doc, text)
{
@@ -54,8 +54,8 @@ RubyCodeDocumentation::~RubyCodeDocumentation ( ) { }
/**
* Save the XMI representation of this object
*/
-void RubyCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "rubycodedocumentation" );
+void RubyCodeDocumentation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "rubycodedocumentation" );
setAttributesOnNode(doc, blockElement); // as we added no additional fields to this class we may
// just use parent TextBlock method
root.appendChild( blockElement );
@@ -64,10 +64,10 @@ void RubyCodeDocumentation::saveToXMI ( QDomDocument & doc, QDomElement & root )
/**
* @return QString
*/
-QString RubyCodeDocumentation::toString ( )
+TQString RubyCodeDocumentation::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
@@ -79,9 +79,9 @@ QString RubyCodeDocumentation::toString ( )
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
useHashOutput = false;
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
if( useHashOutput)
{
if(!body.isEmpty())
@@ -96,7 +96,7 @@ QString RubyCodeDocumentation::toString ( )
return output;
}
-QString RubyCodeDocumentation::getNewEditorLine ( int amount )
+TQString RubyCodeDocumentation::getNewEditorLine ( int amount )
{
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
@@ -124,19 +124,19 @@ int RubyCodeDocumentation::lastEditableLine() {
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
-QString RubyCodeDocumentation::unformatText ( const QString & text , const QString & indent)
+TQString RubyCodeDocumentation::unformatText ( const TQString & text , const TQString & indent)
{
- QString mytext = TextBlock::unformatText(text, indent);
+ TQString mytext = TextBlock::unformatText(text, indent);
CodeGenerationPolicy *p = UMLApp::app()->getCommonPolicy();
// remove leading or trailing comment stuff
- mytext.remove(QRegExp('^'+indent));
+ mytext.remove(TQRegExp('^'+indent));
if(p->getCommentStyle() == CodeGenerationPolicy::MultiLine)
{
- mytext.remove(QRegExp("^=begin\\s*(rdoc)?\\s*\n?"));
- mytext.remove(QRegExp("^=end\\s*\n?$"));
+ mytext.remove(TQRegExp("^=begin\\s*(rdoc)?\\s*\n?"));
+ mytext.remove(TQRegExp("^=end\\s*\n?$"));
} else
- mytext.remove(QRegExp("^#\\s*"));
+ mytext.remove(TQRegExp("^#\\s*"));
return mytext;
}
diff --git a/umbrello/umbrello/codegenerators/rubycodedocumentation.h b/umbrello/umbrello/codegenerators/rubycodedocumentation.h
index 72908f78..0d210419 100644
--- a/umbrello/umbrello/codegenerators/rubycodedocumentation.h
+++ b/umbrello/umbrello/codegenerators/rubycodedocumentation.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEDOCUMENTATION_H
#define RUBYCODEDOCUMENTATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class RubyClassifierCodeDocument;
@@ -44,7 +44,7 @@ public:
/**
* Constructors
*/
- explicit RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const QString & text = "");
+ explicit RubyCodeDocumentation ( RubyClassifierCodeDocument * doc, const TQString & text = "");
/**
* Empty Destructor
@@ -60,22 +60,22 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "" );
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "" );
/** a special version here because we want to not only indent
* the new line, but to add the "# " sequence as well.
*/
- virtual QString getNewEditorLine ( int amount );
+ virtual TQString getNewEditorLine ( int amount );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
index 1a01421a..8e58fdf0 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.cpp
@@ -156,7 +156,7 @@ void RubyCodeGenerationPolicy::setDefaults( KConfig * config, bool emitUpdateSig
* Create a new dialog interface for this object.
* @return dialog object
*/
-CodeGenerationPolicyPage * RubyCodeGenerationPolicy::createPage ( QWidget *parent, const char *name ) {
+CodeGenerationPolicyPage * RubyCodeGenerationPolicy::createPage ( TQWidget *parent, const char *name ) {
return new RubyCodeGenerationPolicyPage ( parent, name, this );
}
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
index aa1a7146..56c051e2 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicy.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEGENERATIONPOLICY_H
#define RUBYCODEGENERATIONPOLICY_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codegenpolicyext.h"
#include "../codegenerationpolicy.h"
@@ -98,7 +98,7 @@ public:
* Create a new dialog interface for this object.
* @return dialog object
*/
- CodeGenerationPolicyPage * createPage ( QWidget *parent = 0, const char * name = 0);
+ CodeGenerationPolicyPage * createPage ( TQWidget *parent = 0, const char * name = 0);
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
index 1e9080c9..5c890b4f 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.cpp
@@ -20,9 +20,9 @@
// own header
#include "rubycodegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
// app includes
@@ -30,7 +30,7 @@
#include "../codegenerationpolicy.h"
#include "../uml.h"
-RubyCodeGenerationPolicyPage::RubyCodeGenerationPolicyPage( QWidget *parent, const char *name, RubyCodeGenerationPolicy * policy )
+RubyCodeGenerationPolicyPage::RubyCodeGenerationPolicyPage( TQWidget *parent, const char *name, RubyCodeGenerationPolicy * policy )
: CodeGenerationPolicyPage(parent, name, policy)
{
CodeGenerationPolicy *common = UMLApp::app()->getCommonPolicy();
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
index 6fc06aed..1637843b 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerationpolicypage.h
@@ -33,7 +33,7 @@ class RubyCodeGenerationPolicyPage : public CodeGenerationPolicyPage {
Q_OBJECT
public:
- explicit RubyCodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, RubyCodeGenerationPolicy * policy = 0);
+ explicit RubyCodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, RubyCodeGenerationPolicy * policy = 0);
virtual ~RubyCodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
index 3e20ce50..4acfd65a 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp
@@ -21,7 +21,7 @@
#include "rubycodegenerator.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
// Constructors/Destructors
//
-RubyCodeGenerator::RubyCodeGenerator (QDomElement & elem )
+RubyCodeGenerator::RubyCodeGenerator (TQDomElement & elem )
: CodeGenerator(elem)
{
}
@@ -59,7 +59,7 @@ Uml::Programming_Language RubyCodeGenerator::getLanguage() {
}
// In the Java version, we make the ANT build file also available.
-CodeViewerDialog * RubyCodeGenerator::getCodeViewerDialog ( QWidget* parent, CodeDocument *doc,
+CodeViewerDialog * RubyCodeGenerator::getCodeViewerDialog ( TQWidget* parent, CodeDocument *doc,
Settings::CodeViewerState state)
{
CodeViewerDialog *dialog = new CodeViewerDialog(parent, doc, state);
@@ -81,34 +81,34 @@ bool RubyCodeGenerator::getAutoGenerateAssocAccessors ( )
return getRubyPolicy()->getAutoGenerateAssocAccessors ();
}
-QString RubyCodeGenerator::getListFieldClassName () {
- return QString("Array");
+TQString RubyCodeGenerator::getListFieldClassName () {
+ return TQString("Array");
}
// Other methods
//
-QString RubyCodeGenerator::cppToRubyType(const QString &typeStr) {
- QString type = cleanName(typeStr);
+TQString RubyCodeGenerator::cppToRubyType(const TQString &typeStr) {
+ TQString type = cleanName(typeStr);
type.replace("const ", "");
- type.replace(QRegExp("[*&\\s]"), "");
- type.replace(QRegExp("[<>]"), "_");
- type.replace("QStringList", "Array");
- type.replace(QRegExp("^string$"),"String");
- type.replace("QString", "String");
+ type.replace(TQRegExp("[*&\\s]"), "");
+ type.replace(TQRegExp("[<>]"), "_");
+ type.replace("TQStringList", "Array");
+ type.replace(TQRegExp("^string$"),"String");
+ type.replace("TQString", "String");
type.replace("bool", "true|false");
- type.replace(QRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
- type.replace(QRegExp("^(float|double)$"), "Float");
- type.replace(QRegExp("^Q(?=[A-Z])"), "Qt::");
- type.replace(QRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
+ type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
+ type.replace(TQRegExp("^(float|double)$"), "Float");
+ type.replace(TQRegExp("^Q(?=[A-Z])"), "Qt::");
+ type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
-QString RubyCodeGenerator::cppToRubyName(const QString &nameStr) {
- QString name = cleanName(nameStr);
- name.replace(QRegExp("^m_"), "");
- name.replace(QRegExp("^[pbn](?=[A-Z])"), "");
+TQString RubyCodeGenerator::cppToRubyName(const TQString &nameStr) {
+ TQString name = cleanName(nameStr);
+ name.replace(TQRegExp("^m_"), "");
+ name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}
@@ -132,9 +132,9 @@ void RubyCodeGenerator::initFields() {
}
*/
-const QStringList RubyCodeGenerator::reservedKeywords() const {
+const TQStringList RubyCodeGenerator::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "__FILE__"
diff --git a/umbrello/umbrello/codegenerators/rubycodegenerator.h b/umbrello/umbrello/codegenerators/rubycodegenerator.h
index 9cc878f0..611338ca 100644
--- a/umbrello/umbrello/codegenerators/rubycodegenerator.h
+++ b/umbrello/umbrello/codegenerators/rubycodegenerator.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEGENERATOR_H
#define RUBYCODEGENERATOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeviewerstate.h"
#include "../codegenerator.h"
#include "../codeblockwithcomments.h"
@@ -45,7 +45,7 @@ public:
* Empty Constructor
*/
RubyCodeGenerator ();
- RubyCodeGenerator (QDomElement & element);
+ RubyCodeGenerator (TQDomElement & element);
/**
* Empty Destructor
@@ -72,11 +72,11 @@ public:
/**
* Get the list variable class name to use. For Ruby, we have set this to "Array".
*/
- static QString getListFieldClassName();
+ static TQString getListFieldClassName();
/** Get the editing dialog for this code document
*/
- virtual CodeViewerDialog * getCodeViewerDialog( QWidget* parent, CodeDocument * doc,
+ virtual CodeViewerDialog * getCodeViewerDialog( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state);
// Other methods
@@ -102,7 +102,7 @@ public:
*
* @param cppType the C++ type to be converted
*/
- static QString cppToRubyType(const QString &cppType);
+ static TQString cppToRubyType(const TQString &cppType);
/**
* Convert C++ names such as 'm_foobar' or pFoobar to
@@ -110,12 +110,12 @@ public:
*
* @param cppName the C++ name to be converted
*/
- static QString cppToRubyName(const QString &cppName);
+ static TQString cppToRubyName(const TQString &cppName);
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
protected:
diff --git a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
index 6f16fb96..7354281b 100644
--- a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
+++ b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
@@ -21,7 +21,7 @@
#include "rubycodeoperation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "rubyclassifiercodedocument.h"
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-RubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const QString & body, const QString & comment )
+RubyCodeOperation::RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation *parent, const TQString & body, const TQString & comment )
: CodeOperation (doc, parent, body, comment)
{
// lets not go with the default comment and instead use
@@ -61,21 +61,21 @@ void RubyCodeOperation::updateMethodDeclaration()
UMLClassifier *c = rubydoc->getParentClassifier();
UMLOperation * o = getParentOperation();
bool isInterface = rubydoc->getParentClassifier()->isInterface();
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
// now, the starting text.
- QString strVis = rubydoc->scopeToRubyDecl(o->getVisibility());
+ TQString strVis = rubydoc->scopeToRubyDecl(o->getVisibility());
// no return type for constructors
- QString fixedReturn = RubyCodeGenerator::cppToRubyType(o->getTypeName());
- QString returnType = o->isConstructorOperation() ? QString("") : (fixedReturn + QString(" "));
- QString methodName = o->getName();
+ TQString fixedReturn = RubyCodeGenerator::cppToRubyType(o->getTypeName());
+ TQString returnType = o->isConstructorOperation() ? TQString("") : (fixedReturn + TQString(" "));
+ TQString methodName = o->getName();
- QString RubyClassName = rubydoc->getRubyClassName(c->getName());
+ TQString RubyClassName = rubydoc->getRubyClassName(c->getName());
// Skip destructors, and operator methods which
// can't be defined in ruby
if ( methodName.startsWith("~")
- || QRegExp("operator\\s*(=|--|\\+\\+|!=)$").exactMatch(methodName) )
+ || TQRegExp("operator\\s*(=|--|\\+\\+|!=)$").exactMatch(methodName) )
{
getComment()->setText("");
return;
@@ -85,11 +85,11 @@ void RubyCodeOperation::updateMethodDeclaration()
methodName = "initialize";
}
- methodName.replace(QRegExp("operator\\s*"), "");
+ methodName.replace(TQRegExp("operator\\s*"), "");
methodName = methodName.mid(0, 1).lower() + methodName.mid(1);
- QString paramStr = QString("");
- QStringList commentedParams;
+ TQString paramStr = TQString("");
+ TQStringList commentedParams;
// assemble parameters
UMLAttributeList list = getParentOperation()->getParmList();
@@ -97,10 +97,10 @@ void RubyCodeOperation::updateMethodDeclaration()
int paramNum = 0;
for(UMLAttribute* parm = list.first(); parm; parm = list.next())
{
- QString paramName = RubyCodeGenerator::cppToRubyName(parm->getName());
+ TQString paramName = RubyCodeGenerator::cppToRubyName(parm->getName());
paramStr += paramName;
if (! parm->getInitialValue().isEmpty()) {
- paramStr += QString(" = ") + RubyCodeGenerator::cppToRubyType(parm->getInitialValue());
+ paramStr += TQString(" = ") + RubyCodeGenerator::cppToRubyType(parm->getInitialValue());
}
paramNum++;
@@ -108,7 +108,7 @@ void RubyCodeOperation::updateMethodDeclaration()
paramStr += ", ";
}
- QString startText;
+ TQString startText;
if (isInterface) {
// Assume 'isInterface' means a module in Ruby, so
// generate module methods
@@ -124,32 +124,32 @@ void RubyCodeOperation::updateMethodDeclaration()
// Lastly, for text content generation, we fix the comment on the
// operation, IF the codeop is autogenerated & currently empty
- QString comment = o->getDoc();
+ TQString comment = o->getDoc();
if (comment.isEmpty()) {
if (getContentType() == CodeBlock::AutoGenerated) {
UMLAttributeList parameters = o->getParmList();
for(UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) {
comment += endLine + "* _" + iterator.current()->getName() + "_ ";
- comment += (' ' + iterator.current()->getDoc().replace( QRegExp("[\\n\\r]+[\\t ]*"),
+ comment += (' ' + iterator.current()->getDoc().replace( TQRegExp("[\\n\\r]+[\\t ]*"),
endLine + " " ) );
}
// add a returns statement too
- if(!returnType.isEmpty() && !QRegExp("^void\\s*$").exactMatch(returnType))
+ if(!returnType.isEmpty() && !TQRegExp("^void\\s*$").exactMatch(returnType))
comment += endLine + "* _returns_ " + returnType + ' ';
getComment()->setText(comment);
}
} else {
- comment.replace(QRegExp("[\\n\\r]+ *"), endLine);
- comment.replace(QRegExp("[\\n\\r]+\\t*"), endLine);
+ comment.replace(TQRegExp("[\\n\\r]+ *"), endLine);
+ comment.replace(TQRegExp("[\\n\\r]+\\t*"), endLine);
comment.replace(" m_", " ");
- comment.replace(QRegExp("\\s[npb](?=[A-Z])"), " ");
- QRegExp re_params("@param (\\w)(\\w*)");
+ comment.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
+ TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(comment);
while (pos != -1) {
comment.replace( re_params.cap(0),
- QString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
+ TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
pos += re_params.matchedLength() + 3;
@@ -165,7 +165,7 @@ void RubyCodeOperation::updateMethodDeclaration()
if (iterator.current()->getDoc().isEmpty()) {
comment += (' ' + RubyCodeGenerator::cppToRubyType(iterator.current()->getTypeName()));
} else {
- comment += (' ' + iterator.current()->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
+ comment += (' ' + iterator.current()->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " "));
}
}
}
@@ -194,9 +194,9 @@ void RubyCodeOperation::updateMethodDeclaration()
pos = comment.find(endLine, pos);
}
- QString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
+ TQString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName());
if ( !typeStr.isEmpty()
- && !QRegExp("^void\\s*$").exactMatch(typeStr)
+ && !TQRegExp("^void\\s*$").exactMatch(typeStr)
&& comment.contains("_returns_") == 0 )
{
comment += endLine + "* _returns_ " + typeStr;
diff --git a/umbrello/umbrello/codegenerators/rubycodeoperation.h b/umbrello/umbrello/codegenerators/rubycodeoperation.h
index c8e8cea4..fab1d239 100644
--- a/umbrello/umbrello/codegenerators/rubycodeoperation.h
+++ b/umbrello/umbrello/codegenerators/rubycodeoperation.h
@@ -20,7 +20,7 @@
#ifndef RUBYCODEOPERATION_H
#define RUBYCODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codeoperation.h"
class RubyClassifierCodeDocument;
@@ -36,7 +36,7 @@ public:
/**
* Empty Constructor
*/
- RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation * op, const QString & body = "", const QString & comment = "");
+ RubyCodeOperation ( RubyClassifierCodeDocument * doc, UMLOperation * op, const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
diff --git a/umbrello/umbrello/codegenerators/rubywriter.cpp b/umbrello/umbrello/codegenerators/rubywriter.cpp
index aa9a5271..571634a5 100644
--- a/umbrello/umbrello/codegenerators/rubywriter.cpp
+++ b/umbrello/umbrello/codegenerators/rubywriter.cpp
@@ -21,9 +21,9 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "classifierinfo.h"
#include "../umldoc.h"
@@ -45,25 +45,25 @@ void RubyWriter::writeClass(UMLClassifier *c) {
return;
}
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
UMLClassifierList superclasses = c->getSuperClasses();
UMLAssociationList aggregations = c->getAggregations();
UMLAssociationList compositions = c->getCompositions();
//find an appropriate name for our file
- QString fileName = findFileName(c, ".rb");
+ TQString fileName = findFileName(c, ".rb");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile fileh;
+ TQFile fileh;
if( !openFile(fileh, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream h(&fileh);
+ TQTextStream h(&fileh);
// preparations
classifierInfo = new ClassifierInfo(c);
@@ -76,18 +76,18 @@ void RubyWriter::writeClass(UMLClassifier *c) {
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".rb");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
h<<str<<m_endl;
}
if(forceDoc() || !c->getDoc().isEmpty()) {
- QString docStr = c->getDoc();
- docStr.replace(QRegExp("\\n"), "\n# ");
+ TQString docStr = c->getDoc();
+ docStr.replace(TQRegExp("\\n"), "\n# ");
docStr.replace("@ref ", "");
docStr.replace("@see", "_See_");
docStr.replace("@short", "_Summary_");
@@ -144,31 +144,31 @@ void RubyWriter::writeClass(UMLClassifier *c) {
////////////////////////////////////////////////////////////////////////////////////
// Helper Methods
-QString RubyWriter::cppToRubyType(const QString &typeStr) {
- QString type = cleanName(typeStr);
+TQString RubyWriter::cppToRubyType(const TQString &typeStr) {
+ TQString type = cleanName(typeStr);
type.replace("const ", "");
- type.replace(QRegExp("[*&\\s]"), "");
- type.replace(QRegExp("[<>]"), "_");
- type.replace("QStringList", "Array");
- type.replace("QString", "String");
+ type.replace(TQRegExp("[*&\\s]"), "");
+ type.replace(TQRegExp("[<>]"), "_");
+ type.replace("TQStringList", "Array");
+ type.replace("TQString", "String");
type.replace("bool", "true|false");
- type.replace(QRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
- type.replace(QRegExp("^(float|double)$"), "Float");
- type.replace(QRegExp("^Q(?=[A-Z])"), "Qt::");
- type.replace(QRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
+ type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer");
+ type.replace(TQRegExp("^(float|double)$"), "Float");
+ type.replace(TQRegExp("^Q(?=[A-Z])"), "Qt::");
+ type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::");
return type;
}
-QString RubyWriter::cppToRubyName(const QString &nameStr) {
- QString name = cleanName(nameStr);
- name.replace(QRegExp("^m_"), "");
- name.replace(QRegExp("^[pbn](?=[A-Z])"), "");
+TQString RubyWriter::cppToRubyName(const TQString &nameStr) {
+ TQString name = cleanName(nameStr);
+ name.replace(TQRegExp("^m_"), "");
+ name.replace(TQRegExp("^[pbn](?=[A-Z])"), "");
name = name.mid(0, 1).lower() + name.mid(1);
return name;
}
-void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
+void RubyWriter::writeOperations(UMLClassifier *c,TQTextStream &h) {
//Lists to store operations sorted by scope
UMLOperationList oppub,opprot,oppriv;
@@ -195,7 +195,7 @@ void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
}
}
- QString classname(cleanName(c->getName()));
+ TQString classname(cleanName(c->getName()));
//write operations to file
if(forceSections() || !oppub.isEmpty()) {
@@ -212,8 +212,8 @@ void RubyWriter::writeOperations(UMLClassifier *c,QTextStream &h) {
}
-void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opList,
- Uml::Visibility permitScope, QTextStream &h)
+void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &opList,
+ Uml::Visibility permitScope, TQTextStream &h)
{
UMLOperation *op;
UMLAttribute *at;
@@ -233,8 +233,8 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
}
for (op=opList.first(); op ; op=opList.next()) {
- QString methodName = cleanName(op->getName());
- QStringList commentedParams;
+ TQString methodName = cleanName(op->getName());
+ TQStringList commentedParams;
// Skip destructors, and operator methods which
// can't be defined in ruby
@@ -265,25 +265,25 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
if (writeDoc) {
h << m_indentation << "#" << m_endl;
- QString docStr = op->getDoc();
+ TQString docStr = op->getDoc();
- docStr.replace(QRegExp("[\\n\\r]+ *"), m_endl);
- docStr.replace(QRegExp("[\\n\\r]+\\t*"), m_endl);
+ docStr.replace(TQRegExp("[\\n\\r]+ *"), m_endl);
+ docStr.replace(TQRegExp("[\\n\\r]+\\t*"), m_endl);
docStr.replace(" m_", " ");
- docStr.replace(QRegExp("\\s[npb](?=[A-Z])"), " ");
- QRegExp re_params("@param (\\w)(\\w*)");
+ docStr.replace(TQRegExp("\\s[npb](?=[A-Z])"), " ");
+ TQRegExp re_params("@param (\\w)(\\w*)");
int pos = re_params.search(docStr);
while (pos != -1) {
docStr.replace( re_params.cap(0),
- QString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
+ TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' );
commentedParams.append(re_params.cap(1).lower() + re_params.cap(2));
pos += re_params.matchedLength() + 3;
pos = re_params.search(docStr, pos);
}
- docStr.replace("\n", QString("\n") + m_indentation + "# ");
+ docStr.replace("\n", TQString("\n") + m_indentation + "# ");
// Write parameter documentation
for (at = atl.first(); at ; at = atl.next()) {
@@ -294,7 +294,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
if (at->getDoc().isEmpty()) {
docStr += (' ' + cppToRubyType(at->getTypeName()));
} else {
- docStr += (' ' + at->getDoc().replace(QRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
+ docStr += (' ' + at->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " "));
}
}
}
@@ -308,7 +308,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
// item starting with '# *', then indent the text with
// three spaces, '# ', to line up with the list item.
pos = docStr.find("# *");
- QRegExp re_linestart("# (?!\\*)");
+ TQRegExp re_linestart("# (?!\\*)");
pos = re_linestart.search(docStr, pos);
while (pos > 0) {
docStr.insert(pos + 1, " ");
@@ -319,7 +319,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
h << m_indentation << "# "<< docStr << m_endl;
- QString typeStr = cppToRubyType(op->getTypeName());
+ TQString typeStr = cppToRubyType(op->getTypeName());
if (!typeStr.isEmpty() && typeStr != "void" && docStr.contains("_returns_") == 0) {
h << m_indentation << "# * _returns_ " << typeStr << m_endl;
}
@@ -329,15 +329,15 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
int j=0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString nameStr = cppToRubyName(at->getName());
+ TQString nameStr = cppToRubyName(at->getName());
if (j > 0) {
h << ", " << nameStr;
} else {
h << nameStr;
}
h << (!(at->getInitialValue().isEmpty()) ?
- (QString(" = ") + cppToRubyType(at->getInitialValue())) :
- QString(""));
+ (TQString(" = ") + cppToRubyType(at->getInitialValue())) :
+ TQString(""));
}
h <<")" << m_endl;
@@ -353,7 +353,7 @@ void RubyWriter::writeOperations(const QString &classname, UMLOperationList &opL
// this is for writing file attribute methods
//
void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
- Uml::Visibility visibility, QTextStream &stream)
+ Uml::Visibility visibility, TQTextStream &stream)
{
// return now if NO attributes to work on
if (attribs->count() == 0 || visibility == Uml::Visibility::Private)
@@ -362,7 +362,7 @@ void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
UMLAttribute *at;
for(at=attribs->first(); at; at=attribs->next())
{
- QString varName = cppToRubyName(cleanName(at->getName()));
+ TQString varName = cppToRubyName(cleanName(at->getName()));
writeSingleAttributeAccessorMethods(varName, at->getDoc(), stream);
}
@@ -370,14 +370,14 @@ void RubyWriter::writeAttributeMethods(UMLAttributeList *attribs,
}
void RubyWriter::writeSingleAttributeAccessorMethods(
- const QString &fieldName,
- const QString &descr,
- QTextStream &h)
+ const TQString &fieldName,
+ const TQString &descr,
+ TQTextStream &h)
{
- QString description = descr;
- description.replace(QRegExp("m_[npb](?=[A-Z])"), "");
+ TQString description = descr;
+ description.replace(TQRegExp("m_[npb](?=[A-Z])"), "");
description.replace("m_", "");
- description.replace("\n", QString("\n") + m_indentation + "# ");
+ description.replace("\n", TQString("\n") + m_indentation + "# ");
if (!description.isEmpty()) {
h << m_indentation << "# " << description << m_endl;
@@ -395,9 +395,9 @@ Uml::Programming_Language RubyWriter::getLanguage() {
return Uml::pl_Ruby;
}
-const QStringList RubyWriter::reservedKeywords() const {
+const TQStringList RubyWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "__FILE__"
diff --git a/umbrello/umbrello/codegenerators/rubywriter.h b/umbrello/umbrello/codegenerators/rubywriter.h
index 8f1547ad..c1a69775 100644
--- a/umbrello/umbrello/codegenerators/rubywriter.h
+++ b/umbrello/umbrello/codegenerators/rubywriter.h
@@ -23,7 +23,7 @@
#include "../umloperationlist.h"
#include "../umlattributelist.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class ClassifierInfo;
@@ -52,7 +52,7 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
@@ -61,7 +61,7 @@ private:
*
* @param cppType the C++ type to be converted
*/
- QString cppToRubyType(const QString &cppType);
+ TQString cppToRubyType(const TQString &cppType);
/**
* Convert C++ names such as 'm_foobar' or pFoobar to
@@ -69,22 +69,22 @@ private:
*
* @param cppName the C++ name to be converted
*/
- QString cppToRubyName(const QString &cppName);
+ TQString cppToRubyName(const TQString &cppName);
/**
* calls @ref writeSingleAttributeAccessorMethods() on each of the attributes in attribs list.
*/
void writeAttributeMethods(UMLAttributeList *attribs,
- Uml::Visibility visibility, QTextStream &stream);
+ Uml::Visibility visibility, TQTextStream &stream);
/**
* write all method declarations, for attributes and associations
* for the given permitted scope.
*/
- void writeSingleAttributeAccessorMethods(const QString &fieldName,
- const QString &description,
- QTextStream &h);
+ void writeSingleAttributeAccessorMethods(const TQString &fieldName,
+ const TQString &description,
+ TQTextStream &h);
/**
* write all operations for a given class
@@ -92,7 +92,7 @@ private:
* @param c the concept we are generating code for
* @param h output stream for the header file
*/
- void writeOperations(UMLClassifier *c, QTextStream &h);
+ void writeOperations(UMLClassifier *c, TQTextStream &h);
/**
* write a list of class operations
@@ -101,8 +101,8 @@ private:
* @param opList the list of operations
* @param h output stream for the header file
*/
- void writeOperations(const QString &classname, UMLOperationList &opList,
- Uml::Visibility permitScope, QTextStream &h);
+ void writeOperations(const TQString &classname, UMLOperationList &opList,
+ Uml::Visibility permitScope, TQTextStream &h);
/**
* Summary information about current classifier.
diff --git a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
index 98477f15..6b7ac992 100644
--- a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
+++ b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp
@@ -19,9 +19,9 @@
// system includes
#include <cstdlib> //to get the user name
// qt includes
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqdir.h>
// kde includes
#include <klocale.h>
#include <kdebug.h>
@@ -66,39 +66,39 @@ SimpleCodeGenerator::~SimpleCodeGenerator ( ) { }
// Other methods
//
-QString SimpleCodeGenerator::getIndent ()
+TQString SimpleCodeGenerator::getIndent ()
{
- QString myIndent;
+ TQString myIndent;
for (int i = 0 ; i < m_indentLevel ; i++)
myIndent.append(m_indentation);
return myIndent;
}
-QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ext) {
+TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &ext) {
//if we already know to which file this class was written/should be written, just return it.
if (m_fileMap.contains(concept))
return m_fileMap[concept];
//else, determine the "natural" file name
- QString name;
+ TQString name;
// Get the package name
- QString package = concept->getPackage(".");
+ TQString package = concept->getPackage(".");
// Replace all white spaces with blanks
package.simplifyWhiteSpace();
// Replace all blanks with underscore
- package.replace(QRegExp(" "), "_");
+ package.replace(TQRegExp(" "), "_");
// Convert all "::" to "/" : Platform-specific path separator
- // package.replace(QRegExp("::"), "/");
+ // package.replace(TQRegExp("::"), "/");
// if package is given add this as a directory to the file name
if (!package.isEmpty() && m_createDirHierarchyForPackages) {
name = package + '.' + concept->getName();
- name.replace(QRegExp("\\."),"/");
- package.replace(QRegExp("\\."), "/");
+ name.replace(TQRegExp("\\."),"/");
+ package.replace(TQRegExp("\\."), "/");
package = '/' + package;
} else {
name = concept->getFullyQualifiedName("-");
@@ -111,15 +111,15 @@ QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ex
// if a package name exists check the existence of the package directory
if (!package.isEmpty() && m_createDirHierarchyForPackages) {
- QDir pathDir(UMLApp::app()->getCommonPolicy()->getOutputDirectory().absPath() + package);
+ TQDir pathDir(UMLApp::app()->getCommonPolicy()->getOutputDirectory().absPath() + package);
// does our complete output directory exist yet? if not, try to create it
if (!pathDir.exists())
{
- QStringList dirs = QStringList::split("/",pathDir.absPath());
- QString currentDir = "";
+ TQStringList dirs = TQStringList::split("/",pathDir.absPath());
+ TQString currentDir = "";
- QStringList::iterator end(dirs.end());
- for (QStringList::iterator dir(dirs.begin()); dir != end; ++dir)
+ TQStringList::iterator end(dirs.end());
+ for (TQStringList::iterator dir(dirs.begin()); dir != end; ++dir)
{
currentDir += '/' + *dir;
if (! (pathDir.exists(currentDir)
@@ -136,19 +136,19 @@ QString SimpleCodeGenerator::findFileName(UMLPackage* concept, const QString &ex
name.simplifyWhiteSpace();
- name.replace(QRegExp(" "),"_");
+ name.replace(TQRegExp(" "),"_");
- QString extension = ext.simplifyWhiteSpace();
+ TQString extension = ext.simplifyWhiteSpace();
extension.replace(' ', '_');
return overwritableName(concept, name, extension);
}
-QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString &name, const QString &ext) {
+TQString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const TQString &name, const TQString &ext) {
//check if a file named "name" with extension "ext" already exists
CodeGenerationPolicy *commonPolicy = UMLApp::app()->getCommonPolicy();
- QDir outputDir = commonPolicy->getOutputDirectory();
- QString filename = name + ext;
+ TQDir outputDir = commonPolicy->getOutputDirectory();
+ TQString filename = name + ext;
if(!outputDir.exists(filename)) {
m_fileMap.insert(concept,filename);
return filename; //if not, "name" is OK and we have not much to to
@@ -172,7 +172,7 @@ QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString
case KDialogBase::No: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + ext;
+ filename = name + "__" + TQString::number(suffix) + ext;
if (!outputDir.exists(filename))
break;
suffix++;
@@ -197,7 +197,7 @@ QString SimpleCodeGenerator::overwritableName(UMLPackage* concept, const QString
case CodeGenerationPolicy::Never: //generate similar name
suffix = 1;
while (1) {
- filename = name + "__" + QString::number(suffix) + ext;
+ filename = name + "__" + TQString::number(suffix) + ext;
if (!outputDir.exists(filename))
break;
suffix++;
diff --git a/umbrello/umbrello/codegenerators/simplecodegenerator.h b/umbrello/umbrello/codegenerators/simplecodegenerator.h
index d75a0660..c9d4a32d 100644
--- a/umbrello/umbrello/codegenerators/simplecodegenerator.h
+++ b/umbrello/umbrello/codegenerators/simplecodegenerator.h
@@ -19,9 +19,9 @@
#ifndef SIMPLECODEGENERATOR_H
#define SIMPLECODEGENERATOR_H
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include "../codegenerator.h"
#include "../umlnamespace.h"
@@ -72,21 +72,21 @@ public:
protected:
// compatability methods..
- QString findFileName(UMLPackage* concept, const QString &ext);
- QString overwritableName(UMLPackage* concept, const QString &name, const QString &ext);
+ TQString findFileName(UMLPackage* concept, const TQString &ext);
+ TQString overwritableName(UMLPackage* concept, const TQString &name, const TQString &ext);
bool hasDefaultValueAttr(UMLClassifier *c);
bool hasAbstractOps(UMLClassifier *c);
/**
* Returns the current indent string based on m_indentLevel and m_indentation.
*/
- QString getIndent ();
+ TQString getIndent ();
/**
* Maps UMLObjects to filenames. Used for finding out which file
* each class was written to.
*/
- QMap<UMLPackage*,QString> m_fileMap;
+ TQMap<UMLPackage*,TQString> m_fileMap;
// the parent document
UMLDoc *m_doc;
@@ -100,9 +100,9 @@ protected:
bool m_createDirHierarchyForPackages;
/* Old Attributes writers will look for */
- QString m_indentation;
+ TQString m_indentation;
int m_indentLevel;
- QString m_endl;
+ TQString m_endl;
// override parent method..we need special handling
void initFromParentDocument( );
diff --git a/umbrello/umbrello/codegenerators/sqlwriter.cpp b/umbrello/umbrello/codegenerators/sqlwriter.cpp
index f01e8bbe..8582ec93 100644
--- a/umbrello/umbrello/codegenerators/sqlwriter.cpp
+++ b/umbrello/umbrello/codegenerators/sqlwriter.cpp
@@ -20,9 +20,9 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../classifier.h"
#include "../operation.h"
@@ -43,16 +43,16 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
const bool isClass = !c->isInterface();
- QString classname = cleanName(c->getName());
+ TQString classname = cleanName(c->getName());
//find an appropriate name for our file
- QString fileName = findFileName(c, ".sql");
+ TQString fileName = findFileName(c, ".sql");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
}
- QFile file;
+ TQFile file;
if( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
@@ -60,13 +60,13 @@ void SQLWriter::writeClass(UMLClassifier *c) {
//Start generating the code!!
- QTextStream sql(&file);
+ TQTextStream sql(&file);
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".sql");
if(!str.isEmpty()) {
- str.replace(QRegExp("%filename%"),fileName);
- str.replace(QRegExp("%filepath%"),file.name());
+ str.replace(TQRegExp("%filename%"),fileName);
+ str.replace(TQRegExp("%filepath%"),file.name());
sql<<str<<m_endl;
}
@@ -85,7 +85,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
sql << m_endl << ");" << m_endl;
- QMap<UMLAssociation*,UMLAssociation*> constraintMap; // so we don't repeat constraint
+ TQMap<UMLAssociation*,UMLAssociation*> constraintMap; // so we don't repeat constraint
UMLAssociationList aggregations = c->getAggregations();
if( forceSections() || !aggregations.isEmpty() ) {
for(UMLAssociation* a = aggregations.first(); a; a = aggregations.next()) {
@@ -97,7 +97,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
}
- QMap<UMLAssociation*,UMLAssociation*>::Iterator itor = constraintMap.begin();
+ TQMap<UMLAssociation*,UMLAssociation*>::Iterator itor = constraintMap.begin();
for (;itor != constraintMap.end();itor++) {
UMLAssociation* a = itor.data();
sql << "ALTER TABLE "<< classname
@@ -113,7 +113,7 @@ void SQLWriter::writeClass(UMLClassifier *c) {
}
-void SQLWriter::writeAttributes(UMLClassifier *c, QTextStream &sql) {
+void SQLWriter::writeAttributes(UMLClassifier *c, TQTextStream &sql) {
UMLAttributeList atpub, atprot, atpriv, atimp;
atpub.setAutoDelete(false);
atprot.setAutoDelete(false);
@@ -171,8 +171,8 @@ void SQLWriter::writeAttributes(UMLClassifier *c, QTextStream &sql) {
return;
}
-void SQLWriter::printAttributes(QTextStream& sql, UMLAttributeList attributeList, bool first) {
- QString attrDoc = "";
+void SQLWriter::printAttributes(TQTextStream& sql, UMLAttributeList attributeList, bool first) {
+ TQString attrDoc = "";
UMLAttribute* at;
for (at=attributeList.first();at;at=attributeList.next())
@@ -194,7 +194,7 @@ void SQLWriter::printAttributes(QTextStream& sql, UMLAttributeList attributeList
// write the attribute
sql << m_indentation << cleanName(at->getName()) << " " << at->getTypeName() << " "
- << (at->getInitialValue().isEmpty()?QString(""):QString(" DEFAULT ")+at->getInitialValue());
+ << (at->getInitialValue().isEmpty()?TQString(""):TQString(" DEFAULT ")+at->getInitialValue());
// now get documentation/comment of current attribute
attrDoc = at->getDoc();
@@ -215,8 +215,8 @@ Uml::Programming_Language SQLWriter::getLanguage() {
return Uml::pl_SQL;
}
-QStringList SQLWriter::defaultDatatypes() {
- QStringList l;
+TQStringList SQLWriter::defaultDatatypes() {
+ TQStringList l;
l.append("varchar");
l.append("tinyint");
l.append("smallint");
@@ -244,9 +244,9 @@ QStringList SQLWriter::defaultDatatypes() {
return l;
}
-const QStringList SQLWriter::reservedKeywords() const {
+const TQStringList SQLWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "access"
diff --git a/umbrello/umbrello/codegenerators/sqlwriter.h b/umbrello/umbrello/codegenerators/sqlwriter.h
index c500e2e7..42271af0 100644
--- a/umbrello/umbrello/codegenerators/sqlwriter.h
+++ b/umbrello/umbrello/codegenerators/sqlwriter.h
@@ -48,12 +48,12 @@ public:
/**
* Reimplement method from CodeGenerator.
*/
- virtual QStringList defaultDatatypes();
+ virtual TQStringList defaultDatatypes();
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
@@ -62,7 +62,7 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* Prints out attributes as columns in the table
@@ -71,7 +71,7 @@ private:
* @param attributeList the attributes to be printed
* @param first if the attributes are the first one
*/
- void printAttributes(QTextStream& sql, UMLAttributeList attributeList, bool first);
+ void printAttributes(TQTextStream& sql, UMLAttributeList attributeList, bool first);
};
#endif // SQLWRITER_H
diff --git a/umbrello/umbrello/codegenerators/tclwriter.cpp b/umbrello/umbrello/codegenerators/tclwriter.cpp
index d8607aa7..f443e8f1 100644
--- a/umbrello/umbrello/codegenerators/tclwriter.cpp
+++ b/umbrello/umbrello/codegenerators/tclwriter.cpp
@@ -17,9 +17,9 @@
// own header
#include "tclwriter.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "classifierinfo.h"
@@ -99,10 +99,10 @@ TclWriter::writeClass(UMLClassifier * c)
kDebug() << "Cannot write class of NULL concept!\n";
return;
}
- QFile fileh, filetcl;
+ TQFile fileh, filetcl;
// find an appropriate name for our file
- QString fileName = findFileName(c, ".tcl");
+ TQString fileName = findFileName(c, ".tcl");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
return;
@@ -153,20 +153,20 @@ TclWriter::writeClass(UMLClassifier * c)
}
void
-TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
+TclWriter::writeHeaderFile(UMLClassifier * c, TQFile & fileh)
{
// open stream for writing
- QTextStream stream(&fileh);
+ TQTextStream stream(&fileh);
mStream = &stream;
// reset the indent level
m_indentLevel = 0;
// write header blurb
- QString str = getHeadingFile(".tcl");
+ TQString str = getHeadingFile(".tcl");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), classifierInfo->fileName);
- str.replace(QRegExp("%filepath%"), fileh.name());
+ str.replace(TQRegExp("%filename%"), classifierInfo->fileName);
+ str.replace(TQRegExp("%filepath%"), fileh.name());
writeCode(str);
}
// set current namespace
@@ -216,7 +216,7 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
m_indentLevel++;
for (UMLClassifierListItem * lit = litList.first(); lit;
lit = litList.next()) {
- QString enumLiteral = cleanName(lit->getName());
+ TQString enumLiteral = cleanName(lit->getName());
writeCode(enumLiteral + "\\");
}
m_indentLevel--;
@@ -232,8 +232,8 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
writeCode("#TODO template<");
for (UMLTemplate * t = template_params.first(); t;
t = template_params.next()) {
- QString formalName = t->getName();
- QString typeName = t->getTypeName();
+ TQString formalName = t->getName();
+ TQString typeName = t->getTypeName();
writeCode(typeName + "# " + formalName);
}
}
@@ -241,7 +241,7 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
writeCode("class " + mClass + " {");
m_indentLevel++;
if (classifierInfo->superclasses.count() > 0) {
- QString code = "inherit";
+ TQString code = "inherit";
for (UMLClassifier * superClass = classifierInfo->superclasses.first();
superClass; superClass = classifierInfo->superclasses.next()) {
/*
@@ -324,21 +324,21 @@ TclWriter::writeHeaderFile(UMLClassifier * c, QFile & fileh)
}
void
-TclWriter::writeSourceFile(UMLClassifier * c, QFile & filetcl)
+TclWriter::writeSourceFile(UMLClassifier * c, TQFile & filetcl)
{
// open stream for writing
- QTextStream stream(&filetcl);
+ TQTextStream stream(&filetcl);
mStream = &stream;
// set the starting indentation at zero
m_indentLevel = 0;
//try to find a heading file (license, coments, etc)
- QString str;
+ TQString str;
str = getHeadingFile(".tclbody");
if (!str.isEmpty()) {
- str.replace(QRegExp("%filename%"), classifierInfo->fileName + "body");
- str.replace(QRegExp("%filepath%"), filetcl.name());
+ str.replace(TQRegExp("%filename%"), classifierInfo->fileName + "body");
+ str.replace(TQRegExp("%filepath%"), filetcl.name());
writeCode(str);
}
// Start body of class
@@ -363,24 +363,24 @@ TclWriter::writeSourceFile(UMLClassifier * c, QFile & filetcl)
}
void
-TclWriter::writeCode(const QString &text)
+TclWriter::writeCode(const TQString &text)
{
*mStream << getIndent() << text << m_endl;
}
void
-TclWriter::writeComm(const QString &text)
+TclWriter::writeComm(const TQString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ TQStringList lines = TQStringList::split("\n", text, true);
for (uint i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "# " << lines[i] << m_endl;
}
}
void
-TclWriter::writeDocu(const QString &text)
+TclWriter::writeDocu(const TQString &text)
{
- QStringList lines = QStringList::split("\n", text, true);
+ TQStringList lines = TQStringList::split("\n", text, true);
for (uint i = 0; i < lines.count(); i++) {
*mStream << getIndent() << "## " << lines[i] << m_endl;
}
@@ -392,7 +392,7 @@ TclWriter::writeDocu(const QString &text)
// in self-association relationship).
void
TclWriter::writeAssociationIncl(UMLAssociationList list, Uml::IDType myId,
- const QString &type)
+ const TQString &type)
{
for (UMLAssociation * a = list.first(); a; a = list.next()) {
UMLClassifier *classifier = NULL;
@@ -422,7 +422,7 @@ TclWriter::writeAssociationIncl(UMLAssociationList list, Uml::IDType myId,
void
TclWriter::writeUse(UMLClassifier * c)
{
- QString myNs;
+ TQString myNs;
if (!c->getPackage().isEmpty()) {
myNs = cleanName(c->getPackage());
@@ -492,8 +492,8 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
if (classifierInfo->isInterface)
return;
- QString scope = visibility.toString();
- QString type;
+ TQString scope = visibility.toString();
+ TQString type;
if (writeStatic) {
type = "common";
} else {
@@ -531,11 +531,11 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
if (list && list->count() > 0) {
writeComm(m_endl + scope + ' ' + type + " attributes" + m_endl);
// write attrib declarations now
- QString documentation;
+ TQString documentation;
for (UMLAttribute * at = list->first(); at; at = list->next()) {
documentation = at->getDoc();
- QString varName = cleanName(at->getName());
- QString typeName = fixTypeName(at->getTypeName());
+ TQString varName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
writeDocu(m_endl + "@var " + scope + ' ' + type + ' ' + typeName + ' ' +
varName + m_endl + documentation);
writeCode(scope + ' ' + type + ' ' + varName + m_endl);
@@ -546,7 +546,7 @@ TclWriter::writeAttributeDecl(Uml::Visibility visibility, bool writeStatic)
void
TclWriter::writeAssociationDecl(UMLAssociationList associations,
Uml::Visibility permitScope, Uml::IDType id,
- const QString &/*type*/)
+ const TQString &/*type*/)
{
if (forceSections() || !associations.isEmpty()) {
bool printRoleA = false, printRoleB = false;
@@ -565,7 +565,7 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
// print RoleB decl
if (printRoleB && a->getVisibility(Uml::B) == permitScope) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::B),
a->getMulti(Uml::B), a->getRoleDoc(Uml::B),
@@ -573,7 +573,7 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
}
// print RoleA decl
if (printRoleA && a->getVisibility(Uml::A) == permitScope) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleDecl(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A), a->getRoleDoc(Uml::A),
@@ -587,8 +587,8 @@ TclWriter::writeAssociationDecl(UMLAssociationList associations,
}
void
-TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName,
- const QString &multi, const QString &doc, const QString &scope)
+TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQString &roleName,
+ const TQString &multi, const TQString &doc, const TQString &scope)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
@@ -599,13 +599,13 @@ TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = roleName.lower();
// record this for later consideration of initialization IF the
// multi value requires 1 of these objects
if (ObjectFieldVariables.findIndex(fieldVarName) == -1 &&
- multi.contains(QRegExp("^1$"))
+ multi.contains(TQRegExp("^1$"))
) {
// ugh. UGLY. Storing variable name and its class in pairs.
ObjectFieldVariables.append(fieldVarName);
@@ -615,7 +615,7 @@ TclWriter::writeAssociationRoleDecl(const QString &fieldClassName, const QString
"> " + fieldVarName + m_endl + doc);
writeCode(scope + " variable " + fieldVarName + m_endl);
} else {
- QString fieldVarName = roleName.lower();
+ TQString fieldVarName = roleName.lower();
// record unique occurrences for later when we want to check
// for initialization of this vector
@@ -642,7 +642,7 @@ TclWriter::writeInitAttributeSource()
{
// only need to do this under certain conditions
if (classifierInfo->hasAttributes) {
- QString varName;
+ TQString varName;
writeComm(mClassGlobal + "::initAttributes");
writeCode("body " + mClassGlobal + "::initAttributes {} {");
@@ -657,7 +657,7 @@ TclWriter::writeInitAttributeSource()
}
}
// Now initialize the association related fields (e.g. vectors)
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = VectorFieldVariables.begin();
it != VectorFieldVariables.end(); ++it) {
varName = *it;
@@ -668,7 +668,7 @@ TclWriter::writeInitAttributeSource()
it != ObjectFieldVariables.end(); ++it) {
varName = *it;
it++;
- QString fieldClassName = *it;
+ TQString fieldClassName = *it;
writeCode("set " + varName + " [list]");
}
// clean up
@@ -715,11 +715,11 @@ TclWriter::writeOperationHeader(UMLClassifier * c, Uml::Visibility permitScope)
writeComm("Operations");
}
for (op = oplist.first(); op; op = oplist.next()) {
- QString doc = "";
- QString code = "";
- QString methodReturnType = fixTypeName(op->getTypeName());
- QString name = cleanName(op->getName());
- QString scope = permitScope.toString();
+ TQString doc = "";
+ TQString code = "";
+ TQString methodReturnType = fixTypeName(op->getTypeName());
+ TQString name = cleanName(op->getName());
+ TQString scope = permitScope.toString();
if (op->getAbstract() || classifierInfo->isInterface) {
//TODO declare abstract method as 'virtual'
// str += "virtual ";
@@ -736,8 +736,8 @@ TclWriter::writeOperationHeader(UMLClassifier * c, Uml::Visibility permitScope)
UMLAttributeList atl = op->getParmList();
j = 0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString typeName = fixTypeName(at->getTypeName());
- QString atName = cleanName(at->getName());
+ TQString typeName = fixTypeName(at->getTypeName());
+ TQString atName = cleanName(at->getName());
if (at->getInitialValue().isEmpty()) {
doc +=
"@param " + typeName + ' ' + atName + m_endl + at->getDoc() +
@@ -790,9 +790,9 @@ TclWriter::writeOperationSource(UMLClassifier * c, Uml::Visibility permitScope)
// generate source for each operation given
for (op = oplist.first(); op; op = oplist.next()) {
- QString code = "";
- QString methodReturnType = fixTypeName(op->getTypeName());
- QString name;
+ TQString code = "";
+ TQString methodReturnType = fixTypeName(op->getTypeName());
+ TQString name;
// no code needed
if (op->getAbstract() || classifierInfo->isInterface) {
continue;
@@ -804,7 +804,7 @@ TclWriter::writeOperationSource(UMLClassifier * c, Uml::Visibility permitScope)
UMLAttributeList atl = op->getParmList();
j = 0;
for (at = atl.first(); at; at = atl.next(), j++) {
- QString atName = cleanName(at->getName());
+ TQString atName = cleanName(at->getName());
if (at->getInitialValue().isEmpty()) {
code += ' ' + atName;
} else {
@@ -829,7 +829,7 @@ TclWriter::writeAttributeSource()
UMLAttributeList *list = &(classifierInfo->atpub);
UMLAttribute *at;
for (at = list->first(); at; at = list->next()) {
- QString name = mClassGlobal + "::" + cleanName(at->getName());
+ TQString name = mClassGlobal + "::" + cleanName(at->getName());
writeComm(name);
writeCode("configbody " + name + " {} {" + m_endl + '}' + m_endl);
@@ -858,14 +858,14 @@ TclWriter::writeAssociationSource(UMLAssociationList associations,
// print RoleB source
if (printRoleB && a->getVisibility(Uml::B) == Uml::Visibility::Public) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::B)));
writeAssociationRoleSource(fieldClassName, a->getRoleName(Uml::B),
a->getMulti(Uml::B));
}
// print RoleA source
if (printRoleA && a->getVisibility(Uml::A) == Uml::Visibility::Public) {
- QString fieldClassName =
+ TQString fieldClassName =
cleanName(getUMLObjectName(a->getObject(Uml::A)));
writeAssociationRoleSource(fieldClassName, a->getRoleName(Uml::A),
a->getMulti(Uml::A));
@@ -877,8 +877,8 @@ TclWriter::writeAssociationSource(UMLAssociationList associations,
}
void
-TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
- const QString &roleName, const QString &multi)
+TclWriter::writeAssociationRoleSource(const TQString &fieldClassName,
+ const TQString &roleName, const TQString &multi)
{
// ONLY write out IF there is a rolename given
// otherwise its not meant to be declared in the code
@@ -888,8 +888,8 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
// declare the association based on whether it is this a single variable
// or a List (Vector). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- if (multi.isEmpty() || multi.contains(QRegExp("^[01]$"))) {
- QString fieldVarName = roleName.lower();
+ if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) {
+ TQString fieldVarName = roleName.lower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
@@ -902,7 +902,7 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
m_indentLevel--;
} else {
- QString fieldVarName = roleName.lower();
+ TQString fieldVarName = roleName.lower();
writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {");
m_indentLevel++;
@@ -922,7 +922,7 @@ TclWriter::writeAssociationRoleSource(const QString &fieldClassName,
}
QString
-TclWriter::fixTypeName(const QString &string)
+TclWriter::fixTypeName(const TQString &string)
{
if (string.isEmpty())
return "void";
@@ -933,13 +933,13 @@ TclWriter::fixTypeName(const QString &string)
QString
TclWriter::getUMLObjectName(UMLObject * obj)
{
- return (obj != 0) ? obj->getName() : QString("NULL");
+ return (obj != 0) ? obj->getName() : TQString("NULL");
}
const QStringList
TclWriter::reservedKeywords() const
{
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty())
{
diff --git a/umbrello/umbrello/codegenerators/tclwriter.h b/umbrello/umbrello/codegenerators/tclwriter.h
index 0c4d71c5..eac918bb 100644
--- a/umbrello/umbrello/codegenerators/tclwriter.h
+++ b/umbrello/umbrello/codegenerators/tclwriter.h
@@ -19,7 +19,7 @@
#ifndef TCLWRITER_H
#define TCLWRITER_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "simplecodegenerator.h"
#include "../umloperationlist.h"
#include "../umlattributelist.h"
@@ -63,37 +63,37 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
* Current output stream.
*/
- QTextStream * mStream;
+ TQTextStream * mStream;
/**
* write the header file for this classifier.
*/
- void writeHeaderFile(UMLClassifier * c, QFile & file);
+ void writeHeaderFile(UMLClassifier * c, TQFile & file);
/**
* write the source code body file for this classifier.
*/
- void writeSourceFile(UMLClassifier * c, QFile & file);
+ void writeSourceFile(UMLClassifier * c, TQFile & file);
/**
* write the source codei text.
*/
- void writeCode(const QString &text);
+ void writeCode(const TQString &text);
/**
* write comment text.
*/
- void writeComm(const QString &text);
+ void writeComm(const TQString &text);
/**
* write documentation text.
*/
- void writeDocu(const QString &text);
+ void writeDocu(const TQString &text);
void writeConstructorDecl();
@@ -103,9 +103,9 @@ private:
* Summary information about current classifier.
*/
ClassifierInfo *classifierInfo;
- QString mNamespace;
- QString mClass;
- QString mClassGlobal;
+ TQString mNamespace;
+ TQString mClass;
+ TQString mClassGlobal;
/**
* writes the Attribute declarations
@@ -116,19 +116,19 @@ private:
void writeAttributeDecl(Uml::Visibility visibility, bool writeStatic);
void writeAssociationIncl(UMLAssociationList list,
- Uml::IDType myId, const QString &type);
+ Uml::IDType myId, const TQString &type);
/**
* Searches a list of associations for appropriate ones to write out as attributes
*/
void writeAssociationDecl(UMLAssociationList associations,
Uml::Visibility permit, Uml::IDType id,
- const QString &type);
+ const TQString &type);
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(const QString &fieldClassName,
- const QString &roleName, const QString &multi, const QString &doc, const QString &docname);
+ void writeAssociationRoleDecl(const TQString &fieldClassName,
+ const TQString &roleName, const TQString &multi, const TQString &doc, const TQString &docname);
/**
* If needed, write out the declaration for the method to initialize attributes of our class.
@@ -147,9 +147,9 @@ private:
void writeAttributeSource();
void writeAssociationSource(UMLAssociationList associations,
Uml::IDType id);
- void writeAssociationRoleSource(const QString &fieldClassName,
- const QString &roleName,
- const QString &multi);
+ void writeAssociationRoleSource(const TQString &fieldClassName,
+ const TQString &roleName,
+ const TQString &multi);
void writeUse(UMLClassifier * c);
@@ -157,15 +157,15 @@ private:
/**
* Returns the name of the given object (if it exists)
*/
- QString getUMLObjectName(UMLObject * obj);
+ TQString getUMLObjectName(UMLObject * obj);
/**
* Replaces `string' with STRING_TYPENAME.
*/
- QString fixTypeName(const QString &string);
+ TQString fixTypeName(const TQString &string);
- QStringList ObjectFieldVariables;
- QStringList VectorFieldVariables;
+ TQStringList ObjectFieldVariables;
+ TQStringList VectorFieldVariables;
};
diff --git a/umbrello/umbrello/codegenerators/xmlcodecomment.cpp b/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
index 5f44620b..8d3a6893 100644
--- a/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
+++ b/umbrello/umbrello/codegenerators/xmlcodecomment.cpp
@@ -21,7 +21,7 @@
// Constructors/Destructors
//
-XMLCodeComment::XMLCodeComment ( CodeDocument * doc, const QString & text )
+XMLCodeComment::XMLCodeComment ( CodeDocument * doc, const TQString & text )
: CodeComment (doc, text)
{
@@ -43,17 +43,17 @@ XMLCodeComment::~XMLCodeComment ( ) { }
/**
* @return QString
*/
-QString XMLCodeComment::toString ( )
+TQString XMLCodeComment::toString ( )
{
- QString output = "";
+ TQString output = "";
// simple output method
if(getWriteOutText())
{
- QString indent = getIndentationString();
- QString endLine = getNewLineEndingChars();
- QString body = getText();
+ TQString indent = getIndentationString();
+ TQString endLine = getNewLineEndingChars();
+ TQString body = getText();
output.append(indent+"<!-- ");
if(!body.isEmpty())
output.append(formatMultiLineText (body, indent, endLine));
diff --git a/umbrello/umbrello/codegenerators/xmlcodecomment.h b/umbrello/umbrello/codegenerators/xmlcodecomment.h
index a30bcbab..e3f55ccc 100644
--- a/umbrello/umbrello/codegenerators/xmlcodecomment.h
+++ b/umbrello/umbrello/codegenerators/xmlcodecomment.h
@@ -18,7 +18,7 @@
#ifndef XMLCODECOMMENT_H
#define XMLCODECOMMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../codecomment.h"
class CodeDocument;
@@ -40,7 +40,7 @@ public:
/**
* Constructors
*/
- explicit XMLCodeComment ( CodeDocument * doc, const QString & text = "" );
+ explicit XMLCodeComment ( CodeDocument * doc, const TQString & text = "" );
/**
* Empty Destructor
@@ -56,7 +56,7 @@ public:
/**
* @return QString
*/
- QString toString ( );
+ TQString toString ( );
protected:
diff --git a/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp b/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
index 7e702619..6a068113 100644
--- a/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
+++ b/umbrello/umbrello/codegenerators/xmlelementcodeblock.cpp
@@ -29,7 +29,7 @@
// Constructors/Destructors
//
-XMLElementCodeBlock::XMLElementCodeBlock ( CodeDocument * parentDoc, const QString & nodeName, const QString & comment)
+XMLElementCodeBlock::XMLElementCodeBlock ( CodeDocument * parentDoc, const TQString & nodeName, const TQString & comment)
: HierarchicalCodeBlock(parentDoc)
{
init(parentDoc, nodeName, comment);
@@ -44,8 +44,8 @@ XMLElementCodeBlock::~XMLElementCodeBlock ( ) { }
/**
* Save the XMI representation of this object
*/
-void XMLElementCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "xmlelementblock" );
+void XMLElementCodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "xmlelementblock" );
setAttributesOnNode(doc, blockElement);
@@ -55,7 +55,7 @@ void XMLElementCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void XMLElementCodeBlock::loadFromXMI ( QDomElement & root )
+void XMLElementCodeBlock::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
@@ -63,7 +63,7 @@ void XMLElementCodeBlock::loadFromXMI ( QDomElement & root )
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void XMLElementCodeBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & docElement)
+void XMLElementCodeBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & docElement)
{
// superclass call
@@ -77,7 +77,7 @@ void XMLElementCodeBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement
/** set the class attributes of this object from
* the passed element node.
*/
-void XMLElementCodeBlock::setAttributesFromNode ( QDomElement & root) {
+void XMLElementCodeBlock::setAttributesFromNode ( TQDomElement & root) {
// superclass call
HierarchicalCodeBlock::setAttributesFromNode(root);
@@ -90,11 +90,11 @@ void XMLElementCodeBlock::setAttributesFromNode ( QDomElement & root) {
// Accessor methods
//
-void XMLElementCodeBlock::setNodeName (const QString &name) {
+void XMLElementCodeBlock::setNodeName (const TQString &name) {
m_nodeName = name;
}
-QString XMLElementCodeBlock::getNodeName () {
+TQString XMLElementCodeBlock::getNodeName () {
return m_nodeName;
}
@@ -116,13 +116,13 @@ UMLAttributeList * XMLElementCodeBlock::getAttributeList() {
void XMLElementCodeBlock::updateContent ( )
{
- QString endLine = getNewLineEndingChars();
+ TQString endLine = getNewLineEndingChars();
- QString nodeName = getNodeName();
+ TQString nodeName = getNodeName();
// Now update START/ENDING Text
- QString startText = '<' + nodeName;
- QString endText = "";
+ TQString startText = '<' + nodeName;
+ TQString endText = "";
UMLAttributeList * alist = getAttributeList();
for (UMLAttribute *at = alist->first(); at; at=alist->next())
@@ -150,7 +150,7 @@ void XMLElementCodeBlock::updateContent ( )
}
-void XMLElementCodeBlock::init (CodeDocument *parentDoc, const QString &nodeName, const QString &comment)
+void XMLElementCodeBlock::init (CodeDocument *parentDoc, const TQString &nodeName, const TQString &comment)
{
setComment(new XMLCodeComment(parentDoc));
diff --git a/umbrello/umbrello/codegenerators/xmlelementcodeblock.h b/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
index b0acd277..334cac17 100644
--- a/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
+++ b/umbrello/umbrello/codegenerators/xmlelementcodeblock.h
@@ -17,7 +17,7 @@
#ifndef XMLELEMENTCODEBLOCK_H
#define XMLELEMENTCODEBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "../umlattributelist.h"
#include "../hierarchicalcodeblock.h"
@@ -36,7 +36,7 @@ public:
/**
* Empty Constructor
*/
- XMLElementCodeBlock ( CodeDocument * parentDoc, const QString & nodeName, const QString & comment = "");
+ XMLElementCodeBlock ( CodeDocument * parentDoc, const TQString & nodeName, const TQString & comment = "");
/**
* Empty Destructor
@@ -46,17 +46,17 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
virtual UMLAttributeList * getAttributeList();
- virtual void setNodeName (const QString &name);
- virtual QString getNodeName ();
+ virtual void setNodeName (const TQString &name);
+ virtual TQString getNodeName ();
void addAttribute (UMLAttribute * at);
@@ -65,12 +65,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/**
* Update the start/end text of this codeblock.
@@ -80,8 +80,8 @@ protected:
private:
UMLAttributeList m_attList;
- QString m_nodeName;
- void init (CodeDocument * parent, const QString &nodeName, const QString &comment);
+ TQString m_nodeName;
+ void init (CodeDocument * parent, const TQString &nodeName, const TQString &comment);
};
diff --git a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
index 303d3230..8c043a3e 100644
--- a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
+++ b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp
@@ -18,9 +18,9 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include "../umldoc.h"
#include "../classifier.h"
@@ -58,7 +58,7 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
}
// find an appropriate name for our file
- QString fileName = findFileName(c,".xsd");
+ TQString fileName = findFileName(c,".xsd");
if (fileName.isEmpty()) {
emit codeGenerated(c, false);
@@ -66,13 +66,13 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
}
// check that we may open that file for writing
- QFile file;
+ TQFile file;
if ( !openFile(file, fileName) ) {
emit codeGenerated(c, false);
return;
}
- QTextStream XMLschema(&file);
+ TQTextStream XMLschema(&file);
// set package namespace tag appropriately
if(!c->getPackage().isEmpty())
@@ -85,10 +85,10 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
XMLschema<<"<?xml version=\"1.0\"?>"<<m_endl;
// 1. create the header
- QString headerText = getHeadingFile(".xsd");
+ TQString headerText = getHeadingFile(".xsd");
if(!headerText.isEmpty()) {
- headerText.replace(QRegExp("%filename%"),fileName);
- headerText.replace(QRegExp("%filepath%"),file.name());
+ headerText.replace(TQRegExp("%filename%"),fileName);
+ headerText.replace(TQRegExp("%filepath%"),file.name());
}
if(!headerText.isEmpty())
XMLschema<<headerText<<m_endl;
@@ -141,7 +141,7 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c)
writtenClassifiers.clear();
}
-void XMLSchemaWriter::writeElementDecl( const QString &elementName, const QString &elementTypeName, QTextStream &XMLschema)
+void XMLSchemaWriter::writeElementDecl( const TQString &elementName, const TQString &elementTypeName, TQTextStream &XMLschema)
{
if(forceDoc())
writeComment(elementName+" is the root element, declared here.", XMLschema);
@@ -153,7 +153,7 @@ void XMLSchemaWriter::writeElementDecl( const QString &elementName, const QStrin
}
-void XMLSchemaWriter::writeClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// NO doing this 2 or more times.
@@ -209,7 +209,7 @@ UMLAttributeList XMLSchemaWriter::findAttributes (UMLClassifier *c)
// element use the interface in element aggregation)
//
-void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// preparations
@@ -226,9 +226,9 @@ void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XM
if(subclasses.count() > 0)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
UMLAttributeList attribs = findAttributes(c);
- QStringList attribGroups = findAttributeGroups(c);
+ TQStringList attribGroups = findAttributeGroups(c);
writeAttributeGroupDecl(elementName, attribs, XMLschema);
@@ -245,11 +245,11 @@ void XMLSchemaWriter::writeAbstractClassifier (UMLClassifier *c, QTextStream &XM
void XMLSchemaWriter::writeGroupClassifierDecl (UMLClassifier *c,
UMLClassifierList subclasses,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
// name of class, subclassing classifiers
- QString elementTypeName = getElementGroupTypeName(c);
+ TQString elementTypeName = getElementGroupTypeName(c);
// start Writing node but only if it has subclasses? Nah..right now put in empty group
XMLschema<<getIndent()<<"<"<<makeSchemaTag("group")<<" name=\""<<elementTypeName<<"\">"<<m_endl;
@@ -277,7 +277,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
UMLAssociationList aggregations,
UMLAssociationList compositions,
UMLClassifierList superclasses,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
// Preparations
@@ -285,7 +285,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
// sort attributes by Scope
UMLAttributeList attribs = findAttributes(c);
- QStringList attribGroups = findAttributeGroups(c);
+ TQStringList attribGroups = findAttributeGroups(c);
// test for relevant associations
bool hasAssociations = determineIfHasChildNodes(c);
@@ -295,7 +295,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
// START WRITING
// start body of element
- QString elementTypeName = getElementTypeName(c);
+ TQString elementTypeName = getElementTypeName(c);
XMLschema<<getIndent()<<"<"<<makeSchemaTag("complexType")<<" name=\""<<elementTypeName<<"\"";
@@ -308,7 +308,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
if(hasSuperclass)
{
- QString superClassName = getElementTypeName(superclasses.first());
+ TQString superClassName = getElementTypeName(superclasses.first());
XMLschema<<getIndent()<<"<"<<makeSchemaTag("complexContent")<<">"<<m_endl;
//PROBLEM: we only treat ONE superclass for inheritence.. bah.
@@ -368,7 +368,7 @@ void XMLSchemaWriter::writeComplexTypeClassifierDecl (UMLClassifier *c,
}
-void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, QTextStream &XMLschema)
+void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, TQTextStream &XMLschema)
{
// preparations.. gather information about this classifier
@@ -400,11 +400,11 @@ void XMLSchemaWriter::writeConcreteClassifier (UMLClassifier *c, QTextStream &XM
}
// these exist for abstract classes only (which become xs:group nodes)
-QStringList XMLSchemaWriter::findAttributeGroups (UMLClassifier *c)
+TQStringList XMLSchemaWriter::findAttributeGroups (UMLClassifier *c)
{
// we need to look for any class we inherit from. IF these
// have attributes, then we need to notice
- QStringList list;
+ TQStringList list;
UMLClassifierList superclasses = c->findSuperClassConcepts(); // list of what inherits from us
for(UMLClassifier *classifier = superclasses.first(); classifier; classifier = superclasses.next())
{
@@ -432,7 +432,7 @@ bool XMLSchemaWriter::determineIfHasChildNodes( UMLClassifier *c)
void XMLSchemaWriter::writeChildObjsInAssociation (UMLClassifier *c,
UMLAssociationList assoc,
- QTextStream &XMLschema)
+ TQTextStream &XMLschema)
{
UMLObjectList list = findChildObjsInAssociations (c, assoc);
@@ -455,7 +455,7 @@ void XMLSchemaWriter::markAsWritten(UMLClassifier *c) {
writtenClassifiers.append(c);
}
-void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, TQTextStream &XMLschema )
{
UMLAttribute *at;
@@ -466,13 +466,13 @@ void XMLSchemaWriter::writeAttributeDecls(UMLAttributeList &attribs, QTextStream
}
-void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, TQTextStream &XMLschema )
{
- QString documentation = attrib->getDoc();
- QString typeName = fixTypeName(attrib->getTypeName());
+ TQString documentation = attrib->getDoc();
+ TQString typeName = fixTypeName(attrib->getTypeName());
bool isStatic = attrib->getStatic();
- QString initialValue = fixInitialStringDeclValue(attrib->getInitialValue(), typeName);
+ TQString initialValue = fixInitialStringDeclValue(attrib->getInitialValue(), typeName);
if(!documentation.isEmpty())
writeComment(documentation, XMLschema);
@@ -497,7 +497,7 @@ void XMLSchemaWriter::writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLs
}
-void XMLSchemaWriter::writeAttributeGroupDecl (const QString &elementName, UMLAttributeList &attribs, QTextStream &XMLschema )
+void XMLSchemaWriter::writeAttributeGroupDecl (const TQString &elementName, UMLAttributeList &attribs, TQTextStream &XMLschema )
{
if (attribs.count()> 0) {
@@ -522,16 +522,16 @@ void XMLSchemaWriter::writeAttributeGroupDecl (const QString &elementName, UMLAt
}
}
-void XMLSchemaWriter::writeComment( const QString &comment, QTextStream &XMLschema )
+void XMLSchemaWriter::writeComment( const TQString &comment, TQTextStream &XMLschema )
{
// in the case we have several line comment..
// NOTE: this part of the method has the problem of adopting UNIX newline,
// need to resolve for using with MAC/WinDoze eventually I assume
- QString indent = getIndent();
+ TQString indent = getIndent();
XMLschema<<indent<<"<!-- ";
- if (comment.contains(QRegExp("\n"))) {
+ if (comment.contains(TQRegExp("\n"))) {
XMLschema<<m_endl;
- QStringList lines = QStringList::split( "\n", comment);
+ TQStringList lines = TQStringList::split( "\n", comment);
for(uint i= 0; i < lines.count(); i++)
XMLschema<<indent<<" "<<lines[i]<<m_endl;
@@ -550,7 +550,7 @@ void XMLSchemaWriter::writeComment( const QString &comment, QTextStream &XMLsche
// badly for someone using a plain association between 2 different classes. THAT should
// be done, but isnt yet (this is why I have left role b code in for now). -b.t.
bool XMLSchemaWriter::writeAssociationDecls(UMLAssociationList associations,
- bool noRoleNameOK, bool didFirstOne, Uml::IDType id, QTextStream &XMLschema)
+ bool noRoleNameOK, bool didFirstOne, Uml::IDType id, TQTextStream &XMLschema)
{
if( !associations.isEmpty() )
@@ -637,14 +637,14 @@ UMLObjectList XMLSchemaWriter::findChildObjsInAssociations (UMLClassifier *c, UM
return list;
}
-void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString &multi, QTextStream &XMLschema)
+void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString &multi, TQTextStream &XMLschema)
{
bool isAbstract = c->getAbstract();
bool isInterface = c->isInterface();
- QString elementName = getElementName(c);
- QString doc = c->getDoc();
+ TQString elementName = getElementName(c);
+ TQString doc = c->getDoc();
if (!doc.isEmpty())
writeComment(doc, XMLschema);
@@ -653,8 +653,8 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
// Min/Max Occurs is based on whether it is this a single element
// or a List (maxoccurs>1). One day this will be done correctly with special
// multiplicity object that we don't have to figure out what it means via regex.
- QString minOccurs = "0";
- QString maxOccurs = "unbounded";
+ TQString minOccurs = "0";
+ TQString maxOccurs = "unbounded";
if (multi.isEmpty())
{
// in this case, association will only specify ONE element can exist
@@ -664,7 +664,7 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
}
else
{
- QStringList values = QStringList::split( QRegExp("[^\\d{1,}|\\*]"), multi);
+ TQStringList values = TQStringList::split( TQRegExp("[^\\d{1,}|\\*]"), multi);
// could use some improvement here.. for sequences like "0..1,3..5,10" we
// don't capture the whole "richness" of the multi. Instead we translate it
@@ -673,10 +673,10 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
{
// populate both with the actual value as long as our value isnt an asterix
// In that case, use special value (from above)
- if(values[0].contains(QRegExp("\\d{1,}")))
+ if(values[0].contains(TQRegExp("\\d{1,}")))
minOccurs = values[0]; // use first number in sequence
- if(values[values.count()-1].contains(QRegExp("\\d{1,}")))
+ if(values[values.count()-1].contains(TQRegExp("\\d{1,}")))
maxOccurs = values[values.count()-1]; // use only last number in sequence
}
}
@@ -734,14 +734,14 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const QString
// IF the type is "string" we need to declare it as
// the XMLSchema Object "String" (there is no string primative in XMLSchema).
// Same thing again for "bool" to "boolean"
-QString XMLSchemaWriter::fixTypeName(const QString& string)
+TQString XMLSchemaWriter::fixTypeName(const TQString& string)
{
- // string.replace(QRegExp("^string$"),schemaNamespaceTag+":string");
- // string.replace(QRegExp("^bool$"),schemaNamespaceTag+":boolean");
+ // string.replace(TQRegExp("^string$"),schemaNamespaceTag+":string");
+ // string.replace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean");
return schemaNamespaceTag + ':' + string;
}
-QString XMLSchemaWriter::fixInitialStringDeclValue(QString value, const QString &type)
+TQString XMLSchemaWriter::fixInitialStringDeclValue(TQString value, const TQString &type)
{
// check for strings only
if (!value.isEmpty() && type == "xs:string") {
@@ -753,36 +753,36 @@ QString XMLSchemaWriter::fixInitialStringDeclValue(QString value, const QString
return value;
}
-QString XMLSchemaWriter::getElementName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementName(UMLClassifier *c)
{
return cleanName(c->getName());
}
-QString XMLSchemaWriter::getElementTypeName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementTypeName(UMLClassifier *c)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
return elementName + "ComplexType";
}
-QString XMLSchemaWriter::getElementGroupTypeName(UMLClassifier *c)
+TQString XMLSchemaWriter::getElementGroupTypeName(UMLClassifier *c)
{
- QString elementName = getElementName(c);
+ TQString elementName = getElementName(c);
return elementName + "GroupType";
}
-QString XMLSchemaWriter::makePackageTag (QString tagName) {
+TQString XMLSchemaWriter::makePackageTag (TQString tagName) {
tagName.prepend( packageNamespaceTag + ':');
return tagName;
}
-QString XMLSchemaWriter::makeSchemaTag (QString tagName) {
+TQString XMLSchemaWriter::makeSchemaTag (TQString tagName) {
tagName.prepend( schemaNamespaceTag + ':');
return tagName;
}
-const QStringList XMLSchemaWriter::reservedKeywords() const {
+const TQStringList XMLSchemaWriter::reservedKeywords() const {
- static QStringList keywords;
+ static TQStringList keywords;
if (keywords.isEmpty()) {
keywords << "ATTLIST"
diff --git a/umbrello/umbrello/codegenerators/xmlschemawriter.h b/umbrello/umbrello/codegenerators/xmlschemawriter.h
index caf9f906..95210078 100644
--- a/umbrello/umbrello/codegenerators/xmlschemawriter.h
+++ b/umbrello/umbrello/codegenerators/xmlschemawriter.h
@@ -64,16 +64,16 @@ public:
/**
* get list of reserved keywords
*/
- virtual const QStringList reservedKeywords() const;
+ virtual const TQStringList reservedKeywords() const;
private:
/**
* Writes concept's documentation then guts
*/
- void writeClassifier(UMLClassifier *c, QTextStream &XMLSchema);
- void writeAbstractClassifier(UMLClassifier *c, QTextStream &XMLSchema);
- void writeConcreteClassifier(UMLClassifier *c, QTextStream &XMLSchema);
+ void writeClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
+ void writeAbstractClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
+ void writeConcreteClassifier(UMLClassifier *c, TQTextStream &XMLSchema);
/**
* write a <complexType> declaration for this classifier
@@ -83,7 +83,7 @@ private:
UMLAssociationList aggregations,
UMLAssociationList compositions,
UMLClassifierList superclassifiers,
- QTextStream &XMLSchema);
+ TQTextStream &XMLSchema);
/**
* write a <group> declaration for this classifier. Used for interfaces to classes with
@@ -91,7 +91,7 @@ private:
*/
void writeGroupClassifierDecl(UMLClassifier *c,
UMLClassifierList superclassifiers,
- QTextStream &XMLSchema);
+ TQTextStream &XMLSchema);
/**
* find if the classifier would have any Child elements.
@@ -103,24 +103,24 @@ private:
* @param c the class for which we are generating code
* @param j the stream associated with the output file
*/
- void writeAttributes(UMLClassifier *c, QTextStream &j);
+ void writeAttributes(UMLClassifier *c, TQTextStream &j);
/**
* write an element declaration.
*/
- void writeElementDecl( const QString &elementName, const QString &elementTypeName, QTextStream &XMLschema);
+ void writeElementDecl( const TQString &elementName, const TQString &elementTypeName, TQTextStream &XMLschema);
/**
* writes the Attribute declarations
* @param attribs List of attributes
* @param XMLschema text stream
*/
- void writeAttributeDecls(UMLAttributeList &attribs, QTextStream &XMLschema );
+ void writeAttributeDecls(UMLAttributeList &attribs, TQTextStream &XMLschema );
/**
* write an element attribute.
*/
- void writeAttributeDecl(UMLAttribute *attrib, QTextStream &XMLschema );
+ void writeAttributeDecl(UMLAttribute *attrib, TQTextStream &XMLschema );
/**
* Find all attributes for this concept.
@@ -131,7 +131,7 @@ private:
* Discover the string name of all the attribute groups (which are child nodes)
* of this concept (err.. element)
*/
- QStringList findAttributeGroups (UMLClassifier *c);
+ TQStringList findAttributeGroups (UMLClassifier *c);
/**
* Searches a list of associations for appropriate ones to write out as attributes.
@@ -139,32 +139,32 @@ private:
* not work right for plain associations between 2 different classes.
*/
bool writeAssociationDecls(UMLAssociationList associations, bool noRoleOK, bool didOne,
- Uml::IDType id, QTextStream &XMLschema);
+ Uml::IDType id, TQTextStream &XMLschema);
/**
* Find all attributes that belong in group
*/
- void writeAttributeGroupDecl(const QString &elementName, UMLAttributeList &attribs, QTextStream &XMLschema );
+ void writeAttributeGroupDecl(const TQString &elementName, UMLAttributeList &attribs, TQTextStream &XMLschema );
/**
* Writes out an association as an attribute using Vector
*/
- void writeAssociationRoleDecl(UMLClassifier *c, const QString &multi, QTextStream &XMLschema);
+ void writeAssociationRoleDecl(UMLClassifier *c, const TQString &multi, TQTextStream &XMLschema);
/**
* Construct an element tag with the schema namespace
*/
- QString makeSchemaTag ( QString tagName );
+ TQString makeSchemaTag ( TQString tagName );
/**
* Construct an element tag with the package namespace
*/
- QString makePackageTag ( QString tagName );
+ TQString makePackageTag ( TQString tagName );
/**
* Writes a comment
*/
- void writeComment(const QString &text, QTextStream &XMLschema);
+ void writeComment(const TQString &text, TQTextStream &XMLschema);
/**
* Find and return a list of child UMLObjects pointed to by the associations
@@ -175,35 +175,35 @@ private:
/**
* Replaces `string' with `String' and `bool' with `boolean'
*/
- QString fixTypeName(const QString& string);
+ TQString fixTypeName(const TQString& string);
/**
* check that initial values of strings DONT have quotes around them
* (we get double quoting then!!
*/
- QString fixInitialStringDeclValue( QString value, const QString &type);
+ TQString fixInitialStringDeclValue( TQString value, const TQString &type);
/**
* Find the element node name for this concept.
*/
- QString getElementName(UMLClassifier *c);
+ TQString getElementName(UMLClassifier *c);
/**
* Find the element node "type" name. Used in the "complexType" which
* might define that element node.
*/
- QString getElementTypeName(UMLClassifier *c);
+ TQString getElementTypeName(UMLClassifier *c);
/**
* Find the group node "type" name. Used for elements which define an interface/are abstract.
*/
- QString getElementGroupTypeName(UMLClassifier *c);
+ TQString getElementGroupTypeName(UMLClassifier *c);
/**
* Find all the child objects in this association and make sure they get
* written out (if they havent already been)
*/
- void writeChildObjsInAssociation (UMLClassifier *c, UMLAssociationList assoc, QTextStream &s);
+ void writeChildObjsInAssociation (UMLClassifier *c, UMLAssociationList assoc, TQTextStream &s);
/**
* Quick check to see if we have written the declaration for this concept yet.
@@ -218,27 +218,27 @@ private:
/**
* The basic schemaNamespace tag
*/
- QString schemaNamespaceTag;
+ TQString schemaNamespaceTag;
/**
* The basic schemaNamespace tag
*/
- QString packageNamespaceTag;
+ TQString packageNamespaceTag;
/*
* The basic schemaNamespace URI
*/
- QString schemaNamespaceURI;
+ TQString schemaNamespaceURI;
/**
* The basic schemaNamespace URI
*/
- QString packageNamespaceURI;
+ TQString packageNamespaceURI;
/**
* A \n, used at the end of each line
*/
- QString startline;
+ TQString startline;
/**
* a list of UMLClassifiers we have already written
diff --git a/umbrello/umbrello/codegenobjectwithtextblocks.cpp b/umbrello/umbrello/codegenobjectwithtextblocks.cpp
index 383c188f..c3fb2fd6 100644
--- a/umbrello/umbrello/codegenobjectwithtextblocks.cpp
+++ b/umbrello/umbrello/codegenobjectwithtextblocks.cpp
@@ -59,7 +59,7 @@ CodeGenObjectWithTextBlocks::~CodeGenObjectWithTextBlocks ( ) {
/**
* Get the list of TextBlock objects held by m_textblockVector
- * @return QPtrList<TextBlock *> list of TextBlock objects held by
+ * @return TQPtrList<TextBlock *> list of TextBlock objects held by
* m_textblockVector
*/
TextBlockList * CodeGenObjectWithTextBlocks::getTextBlockList ( ) {
@@ -74,7 +74,7 @@ TextBlockList * CodeGenObjectWithTextBlocks::getTextBlockList ( ) {
*/
bool CodeGenObjectWithTextBlocks::addTextBlock(TextBlock* add_object ) {
- QString tag = add_object->getTag();
+ TQString tag = add_object->getTag();
// assign a tag if one doesn't already exist
if(tag.isEmpty())
@@ -126,14 +126,14 @@ bool CodeGenObjectWithTextBlocks::removeTextBlock ( TextBlock * remove_object )
}
// if we get here.. it was in this object so remove from our map
- QString tag = remove_object->getTag();
+ TQString tag = remove_object->getTag();
if(!tag.isEmpty())
m_textBlockTagMap.erase(tag);
return true;
}
-TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const QString &tag )
+TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const TQString &tag )
{
//if we already know to which file this class was written/should be written, just return it.
if(m_textBlockTagMap.contains(tag))
@@ -146,7 +146,7 @@ TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const QString &tag
// and down into its Hierarchical codeblocks. This means you should start any
// search from the parent document of the text block. This method NOT meant for
// casual usage.
-CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTaggedTextBlock (const QString & tag) {
+CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTaggedTextBlock (const TQString & tag) {
// what??!? no tag, then CANT be here
if(tag.isEmpty())
@@ -181,7 +181,7 @@ CodeGenObjectWithTextBlocks * CodeGenObjectWithTextBlocks::findParentObjectForTa
* @param comment
* @param indentLevel
*/
-HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock ( const QString &tag, const QString &comment, int indentLevel ) {
+HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock ( const TQString &tag, const TQString &comment, int indentLevel ) {
// now actually declare the fields
HierarchicalCodeBlock * codeBlock = dynamic_cast<HierarchicalCodeBlock*>(findTextBlockByTag(tag));
@@ -213,7 +213,7 @@ HierarchicalCodeBlock * CodeGenObjectWithTextBlocks::getHierarchicalCodeBlock (
* @param comment
* @param indentLevel
*/
-CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments ( const QString &tag, const QString &comment, int indentLevel ) {
+CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments ( const TQString &tag, const TQString &comment, int indentLevel ) {
// now actually declare the fields
CodeBlockWithComments * codeBlock = dynamic_cast<CodeBlockWithComments*>(findTextBlockByTag(tag));
@@ -241,7 +241,7 @@ CodeBlockWithComments * CodeGenObjectWithTextBlocks::getCodeBlockWithComments (
* @param text
* @param indentationLevel
*/
-CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const QString &tag, const QString &text, int indentationLevel)
+CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const TQString &tag, const TQString &text, int indentationLevel)
{
TextBlock * tBlock = findTextBlockByTag(tag);
@@ -280,7 +280,7 @@ CodeComment * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeComment ( const
* @param indentLevel
* @param forceUserBlockUpdate
*/
-CodeBlockWithComments * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate )
+CodeBlockWithComments * CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments (const TQString &tag, const TQString &text, const TQString &ctext, int indentLevel, bool forceUserBlockUpdate )
{
TextBlock * tBlock = findTextBlockByTag(tag);
@@ -346,10 +346,10 @@ void CodeGenObjectWithTextBlocks::setAttributesFromObject (CodeGenObjectWithText
}
}
-void CodeGenObjectWithTextBlocks::setAttributesOnNode (QDomDocument & doc, QDomElement & root) {
+void CodeGenObjectWithTextBlocks::setAttributesOnNode (TQDomDocument & doc, TQDomElement & root) {
// set a section to hold document content
- QDomElement tblockElement = doc.createElement( "textblocks" );
+ TQDomElement tblockElement = doc.createElement( "textblocks" );
// only concrete calls to textblocks are saved
TextBlockList * tbList = getTextBlockList();
@@ -363,7 +363,7 @@ void CodeGenObjectWithTextBlocks::setAttributesOnNode (QDomDocument & doc, QDomE
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeGenObjectWithTextBlocks::setAttributesFromNode ( QDomElement & root)
+void CodeGenObjectWithTextBlocks::setAttributesFromNode ( TQDomElement & root)
{
// clear existing codeblocks
@@ -380,25 +380,25 @@ void CodeGenObjectWithTextBlocks::setAttributesFromNode ( QDomElement & root)
// this method should be overridden if this class is inherited
// by some other class that is concrete and takes children
// derived from codeblock/codecomment
-void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & root)
+void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( TQDomElement & root)
{
- QDomNode tnode = root.firstChild();
- QDomElement telement = tnode.toElement();
+ TQDomNode tnode = root.firstChild();
+ TQDomElement telement = tnode.toElement();
bool loadCheckForChildrenOK = false;
while( !telement.isNull() ) {
- QString nodeName = telement.tagName();
+ TQString nodeName = telement.tagName();
if( nodeName == "textblocks" ) {
- QDomNode node = telement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = telement.firstChild();
+ TQDomElement element = node.toElement();
// if there is nothing to begin with, then we don't worry about it
loadCheckForChildrenOK = element.isNull() ? true : false;
while( !element.isNull() ) {
- QString name = element.tagName();
+ TQString name = element.tagName();
if( name == "codecomment" ) {
CodeComment * block = CodeGenFactory::newCodeComment(m_pCodeDoc);
@@ -413,7 +413,7 @@ void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & ro
if( name == "codeaccessormethod" ||
name == "ccfdeclarationcodeblock"
) {
- QString acctag = element.attribute("tag","");
+ TQString acctag = element.attribute("tag","");
// search for our method in the
TextBlock * tb = findCodeClassFieldTextBlockByTag(acctag);
if(!tb || !addTextBlock(tb))
@@ -460,7 +460,7 @@ void CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode ( QDomElement & ro
} else
if( name == "codeoperation" ) {
// find the code operation by id
- QString id = element.attribute("parent_id","-1");
+ TQString id = element.attribute("parent_id","-1");
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(STR2ID(id));
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
if(op) {
diff --git a/umbrello/umbrello/codegenobjectwithtextblocks.h b/umbrello/umbrello/codegenobjectwithtextblocks.h
index 4e784b07..c21aacf2 100644
--- a/umbrello/umbrello/codegenobjectwithtextblocks.h
+++ b/umbrello/umbrello/codegenobjectwithtextblocks.h
@@ -17,7 +17,7 @@
#ifndef CODEGENOBJECTWITHTEXTBLOCKS_H
#define CODEGENOBJECTWITHTEXTBLOCKS_H
-#include <qmap.h>
+#include <tqmap.h>
#include "codeaccessormethod.h"
#include "textblocklist.h"
@@ -85,7 +85,7 @@ public:
* @param comment
* @param indentLevel
*/
- virtual HierarchicalCodeBlock * getHierarchicalCodeBlock ( const QString &tag, const QString &comment, int indentLevel );
+ virtual HierarchicalCodeBlock * getHierarchicalCodeBlock ( const TQString &tag, const TQString &comment, int indentLevel );
/**
* Will get a codeblockwithcomments from the document with given tag. IF the codeblock
@@ -96,7 +96,7 @@ public:
* @param comment
* @param indentLevel
*/
- virtual CodeBlockWithComments * getCodeBlockWithComments ( const QString &tag, const QString &comment, int indentLevel );
+ virtual CodeBlockWithComments * getCodeBlockWithComments ( const TQString &tag, const TQString &comment, int indentLevel );
/** allows the user to add a code comment to the end of the list
* of text blocks in this document OR, if a text block already exists
@@ -107,7 +107,7 @@ public:
* @param text
* @param indentationLevel
*/
- CodeComment * addOrUpdateTaggedCodeComment (const QString &tag = "", const QString &text = "", int indentationLevel = 0 );
+ CodeComment * addOrUpdateTaggedCodeComment (const TQString &tag = "", const TQString &text = "", int indentationLevel = 0 );
/** allows the user to either add a code block with comments to the end of the list
* of text blocks in this document OR, if a text block already exists
@@ -120,19 +120,19 @@ public:
* @param indentLevel
* @param forceUserBlockUpdate
*/
- CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &comment, int indentLevel, bool forceUserBlockUpdate );
+ CodeBlockWithComments * addOrUpdateTaggedCodeBlockWithComments (const TQString &tag, const TQString &text, const TQString &comment, int indentLevel, bool forceUserBlockUpdate );
/**
* @return TextBlock
* @param tag
*/
- virtual TextBlock * findTextBlockByTag ( const QString &tag );
+ virtual TextBlock * findTextBlockByTag ( const TQString &tag );
/**
* @return QString
* @param prefix
*/
- virtual QString getUniqueTag (const QString& prefix = "" ) = 0;
+ virtual TQString getUniqueTag (const TQString& prefix = "" ) = 0;
/** Virtual methods that return a new code document objects.
*/
@@ -145,19 +145,19 @@ public:
* @return parent object. Could return null if the textblock is missing from the
* branch of the document tree being examined.
*/
- CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock (const QString & tag);
+ CodeGenObjectWithTextBlocks * findParentObjectForTaggedTextBlock (const TQString & tag);
protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & elem );
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem );
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void setAttributesFromObject (CodeGenObjectWithTextBlocks * obj);
@@ -168,17 +168,17 @@ protected:
* by some other class that is concrete and takes children
* derived from codeblock/codecomment/hierarchicalcb/ownedhiercodeblock
*/
- virtual void loadChildTextBlocksFromNode ( QDomElement & root);
+ virtual void loadChildTextBlocksFromNode ( TQDomElement & root);
// reset/clear the inventory text blocks held by this object
virtual void resetTextBlocks();
- QMap<QString, TextBlock *> m_textBlockTagMap;
+ TQMap<TQString, TextBlock *> m_textBlockTagMap;
TextBlockList m_textblockVector;
// find specific text block belonging to code classfields.
// block may not presently be alocated t othe textblock list.
- virtual TextBlock * findCodeClassFieldTextBlockByTag( const QString &tag) = 0;
+ virtual TextBlock * findCodeClassFieldTextBlockByTag( const TQString &tag) = 0;
private:
diff --git a/umbrello/umbrello/codeimport/adaimport.cpp b/umbrello/umbrello/codeimport/adaimport.cpp
index 54ac3907..0cbd8d1c 100644
--- a/umbrello/umbrello/codeimport/adaimport.cpp
+++ b/umbrello/umbrello/codeimport/adaimport.cpp
@@ -14,7 +14,7 @@
#include <stdio.h>
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -43,15 +43,15 @@ void AdaImport::initVars() {
/// Split the line so that a string is returned as a single element of the list,
/// when not in a string then split at white space.
-QStringList AdaImport::split(const QString& lin) {
- QStringList list;
- QString listElement;
+TQStringList AdaImport::split(const TQString& lin) {
+ TQStringList list;
+ TQString listElement;
bool inString = false;
bool seenSpace = false;
- QString line = lin.stripWhiteSpace();
+ TQString line = lin.stripWhiteSpace();
uint len = line.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = line[i];
+ const TQChar& c = line[i];
if (inString) {
listElement += c;
if (c == '"') {
@@ -60,14 +60,14 @@ QStringList AdaImport::split(const QString& lin) {
continue;
}
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
inString = false;
}
} else if (c == '"') {
inString = true;
if (!listElement.isEmpty())
list.append(listElement);
- listElement = QString(c);
+ listElement = TQString(c);
seenSpace = false;
} else if (c == '\'') {
if (i < len - 2 && line[i + 2] == '\'') {
@@ -77,7 +77,7 @@ QStringList AdaImport::split(const QString& lin) {
listElement = line.mid(i, 3);
i += 2;
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
continue;
}
listElement += c;
@@ -88,7 +88,7 @@ QStringList AdaImport::split(const QString& lin) {
seenSpace = true;
if (!listElement.isEmpty()) {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
}
} else {
listElement += c;
@@ -100,23 +100,23 @@ QStringList AdaImport::split(const QString& lin) {
return list;
}
-void AdaImport::fillSource(const QString& word) {
- QString lexeme;
+void AdaImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (c == ':' && word[i + 1] == '=') {
m_source.append(":=");
i++;
} else {
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
}
@@ -124,14 +124,14 @@ void AdaImport::fillSource(const QString& word) {
m_source.append(lexeme);
}
-QString AdaImport::expand(const QString& name) {
- QRegExp pfxRegExp("^(\\w+)\\.");
+TQString AdaImport::expand(const TQString& name) {
+ TQRegExp pfxRegExp("^(\\w+)\\.");
pfxRegExp.setCaseSensitive(false);
int pos = pfxRegExp.search(name);
if (pos == -1)
return name;
- QString result = name;
- QString pfx = pfxRegExp.cap(1);
+ TQString result = name;
+ TQString pfx = pfxRegExp.cap(1);
if (m_renaming.contains(pfx)) {
result.remove(pfxRegExp);
result.prepend(m_renaming[pfx] + '.');
@@ -139,16 +139,16 @@ QString AdaImport::expand(const QString& name) {
return result;
}
-void AdaImport::parseStems(const QStringList& stems) {
+void AdaImport::parseStems(const TQStringList& stems) {
if (stems.isEmpty())
return;
- QString base = stems.first();
+ TQString base = stems.first();
uint i = 0;
while (1) {
- QString filename = base + ".ads";
+ TQString filename = base + ".ads";
if (! m_parsedFiles.contains(filename)) {
// Save current m_source and m_srcIndex.
- QStringList source(m_source);
+ TQStringList source(m_source);
uint srcIndex = m_srcIndex;
m_source.clear();
parseFile(filename);
@@ -167,7 +167,7 @@ void AdaImport::parseStems(const QStringList& stems) {
bool AdaImport::parseStmt() {
const uint srcLength = m_source.count();
- QString keyword = m_source[m_srcIndex];
+ TQString keyword = m_source[m_srcIndex];
UMLDoc *umldoc = UMLApp::app()->getDocument();
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "with") {
@@ -176,8 +176,8 @@ bool AdaImport::parseStmt() {
return false;
}
while (++m_srcIndex < srcLength && m_source[m_srcIndex] != ";") {
- QStringList components = QStringList::split(".", m_source[m_srcIndex].lower());
- const QString& prefix = components.first();
+ TQStringList components = TQStringList::split(".", m_source[m_srcIndex].lower());
+ const TQString& prefix = components.first();
if (prefix == "system" || prefix == "ada" || prefix == "gnat" ||
prefix == "interfaces" || prefix == "text_io" ||
prefix == "unchecked_conversion" ||
@@ -197,8 +197,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "package") {
- const QString& name = advance();
- QStringList parentPkgs = QStringList::split(".", name.lower());
+ const TQString& name = advance();
+ TQStringList parentPkgs = TQStringList::split(".", name.lower());
parentPkgs.pop_back(); // exclude the current package
parseStems(parentPkgs);
UMLObject *ns = NULL;
@@ -207,7 +207,7 @@ bool AdaImport::parseStmt() {
m_scope[m_scopeIndex], m_comment);
if (m_source[m_srcIndex + 1] == "new") {
m_srcIndex++;
- QString pkgName = advance();
+ TQString pkgName = advance();
UMLObject *gp = Import_Utils::createUMLObject(Uml::ot_Package, pkgName,
m_scope[m_scopeIndex]);
gp->setStereotype("generic");
@@ -237,9 +237,9 @@ bool AdaImport::parseStmt() {
if (m_inGenericFormalPart)
return false; // skip generic formal parameter (not yet implemented)
if (keyword == "subtype") {
- QString name = advance();
+ TQString name = advance();
advance(); // "is"
- QString base = expand(advance());
+ TQString base = expand(advance());
base.remove("Standard.", false);
UMLObject *type = umldoc->findUMLObject(base, Uml::ot_UMLObject, m_scope[m_scopeIndex]);
if (type == NULL) {
@@ -257,8 +257,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "type") {
- QString name = advance();
- QString next = advance();
+ TQString name = advance();
+ TQString next = advance();
if (next == "(") {
kDebug() << "AdaImport::parseStmt(" << name << "): "
<< "discriminant handling is not yet implemented" << endl;
@@ -290,7 +290,7 @@ bool AdaImport::parseStmt() {
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
while ((next = advance()) != ")") {
Import_Utils::addEnumLiteral(enumType, next, m_comment);
- m_comment = QString();
+ m_comment = TQString();
if (advance() != ",")
break;
}
@@ -322,7 +322,7 @@ bool AdaImport::parseStmt() {
if (t == Uml::ot_Interface) {
while ((next = advance()) == "and") {
UMLClassifier *klass = static_cast<UMLClassifier*>(ns);
- QString base = expand(advance());
+ TQString base = expand(advance());
UMLObject *p = Import_Utils::createUMLObject(Uml::ot_Interface, base, m_scope[m_scopeIndex]);
UMLClassifier *parent = static_cast<UMLClassifier*>(p);
Import_Utils::createGeneralization(klass, parent);
@@ -344,8 +344,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (next == "new") {
- QString base = expand(advance());
- QStringList baseInterfaces;
+ TQString base = expand(advance());
+ TQStringList baseInterfaces;
while ((next = advance()) == "and") {
baseInterfaces.append(expand(advance()));
}
@@ -372,8 +372,8 @@ bool AdaImport::parseStmt() {
}
if (baseInterfaces.count()) {
t = Uml::ot_Interface;
- QStringList::Iterator end(baseInterfaces.end());
- for (QStringList::Iterator bi(baseInterfaces.begin()); bi != end; ++bi) {
+ TQStringList::Iterator end(baseInterfaces.end());
+ for (TQStringList::Iterator bi(baseInterfaces.begin()); bi != end; ++bi) {
ns = Import_Utils::createUMLObject(t, *bi, m_scope[m_scopeIndex]);
parent = static_cast<UMLClassifier*>(ns);
Import_Utils::createGeneralization(klass, parent);
@@ -400,7 +400,7 @@ bool AdaImport::parseStmt() {
m_klass = NULL;
} else if (m_scopeIndex) {
if (advance() != ";") {
- QString scopeName = m_scope[m_scopeIndex]->getFullyQualifiedName();
+ TQString scopeName = m_scope[m_scopeIndex]->getFullyQualifiedName();
if (scopeName.lower() != m_source[m_srcIndex].lower())
kError() << "end: expecting " << scopeName << ", found "
<< m_source[m_srcIndex] << endl;
@@ -419,8 +419,8 @@ bool AdaImport::parseStmt() {
if (keyword == "overriding")
keyword = advance();
if (keyword == "function" || keyword == "procedure") {
- const QString& name = advance();
- QString returnType;
+ const TQString& name = advance();
+ TQString returnType;
if (advance() != "(") {
// Unlike an Ada package, a UML package does not support
// subprograms.
@@ -434,7 +434,7 @@ bool AdaImport::parseStmt() {
UMLOperation *op = NULL;
const uint MAX_PARNAMES = 16;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString parName[MAX_PARNAMES];
+ TQString parName[MAX_PARNAMES];
uint parNameCount = 0;
do {
if (parNameCount >= MAX_PARNAMES) {
@@ -448,8 +448,8 @@ bool AdaImport::parseStmt() {
skipStmt();
break;
}
- const QString &direction = advance();
- QString typeName;
+ const TQString &direction = advance();
+ TQString typeName;
Uml::Parameter_Direction dir = Uml::pd_In;
if (direction == "access") {
// Oops, we have to improvise here because there
@@ -521,12 +521,12 @@ bool AdaImport::parseStmt() {
if (keyword == "task" || keyword == "protected") {
// Can task and protected objects/types be mapped to UML?
bool isType = false;
- QString name = advance();
+ TQString name = advance();
if (name == "type") {
isType = true;
name = advance();
}
- QString next = advance();
+ TQString next = advance();
if (next == "(") {
skipStmt(")"); // skip discriminant
next = advance();
@@ -537,8 +537,8 @@ bool AdaImport::parseStmt() {
return true;
}
if (keyword == "for") { // rep spec
- QString typeName = advance();
- QString next = advance();
+ TQString typeName = advance();
+ TQString next = advance();
if (next == "'") {
advance(); // skip qualifier
next = advance();
@@ -558,21 +558,21 @@ bool AdaImport::parseStmt() {
skipStmt();
return true;
}
- const QString& name = keyword;
+ const TQString& name = keyword;
if (advance() != ":") {
kError() << "adaImport: expecting \":\" at " << name << " "
<< m_source[m_srcIndex] << endl;
skipStmt();
return true;
}
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken == "aliased")
nextToken = advance();
- QString typeName = expand(nextToken);
- QString initialValue;
+ TQString typeName = expand(nextToken);
+ TQString initialValue;
if (advance() == ":=") {
initialValue = advance();
- QString token;
+ TQString token;
while ((token = advance()) != ";") {
initialValue.append(' ' + token);
}
diff --git a/umbrello/umbrello/codeimport/adaimport.h b/umbrello/umbrello/codeimport/adaimport.h
index 14e41926..b7f3d3de 100644
--- a/umbrello/umbrello/codeimport/adaimport.h
+++ b/umbrello/umbrello/codeimport/adaimport.h
@@ -12,8 +12,8 @@
#ifndef ADAIMPORT_H
#define ADAIMPORT_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "nativeimportbase.h"
#include "../umlobjectlist.h"
@@ -46,24 +46,24 @@ protected:
* Ada's tic which is liable to be confused with the beginning of a character
* constant.
*/
- QStringList split(const QString& line);
+ TQStringList split(const TQString& line);
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Apply package renamings to the given name.
*
* @return expanded name
*/
- QString expand(const QString& name);
+ TQString expand(const TQString& name);
/**
* Parse all files that can be formed by concatenation of the given stems.
*/
- void parseStems(const QStringList& stems);
+ void parseStems(const TQStringList& stems);
bool m_inGenericFormalPart; ///< auxiliary variable
@@ -74,7 +74,7 @@ protected:
*/
UMLObjectList m_classesDefinedInThisScope;
- typedef QMap<QString, QString> StringMap;
+ typedef TQMap<TQString, TQString> StringMap;
/**
* Map of package renamings.
diff --git a/umbrello/umbrello/codeimport/classimport.cpp b/umbrello/umbrello/codeimport/classimport.cpp
index ed675bda..e32758dd 100644
--- a/umbrello/umbrello/codeimport/classimport.cpp
+++ b/umbrello/umbrello/codeimport/classimport.cpp
@@ -12,7 +12,7 @@
// own header
#include "classimport.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
// app includes
#include "../umldoc.h"
@@ -24,13 +24,13 @@
#include "pascalimport.h"
#include "cppimport.h"
-void ClassImport::importFiles(const QStringList &fileList) {
+void ClassImport::importFiles(const TQStringList &fileList) {
initialize();
UMLDoc *umldoc = UMLApp::app()->getDocument();
uint processedFilesCount = 0;
- for (QStringList::const_iterator fileIT = fileList.begin();
+ for (TQStringList::const_iterator fileIT = fileList.begin();
fileIT != fileList.end(); ++fileIT) {
- QString fileName = (*fileIT);
+ TQString fileName = (*fileIT);
umldoc->writeToStatusBar(i18n("Importing file: %1 Progress: %2/%3").
arg(fileName).arg(processedFilesCount).arg(fileList.size()));
parseFile(fileName);
@@ -39,7 +39,7 @@ void ClassImport::importFiles(const QStringList &fileList) {
umldoc->writeToStatusBar(i18n("Ready."));
}
-ClassImport *ClassImport::createImporterByFileExt(const QString &filename) {
+ClassImport *ClassImport::createImporterByFileExt(const TQString &filename) {
ClassImport *classImporter;
if (filename.endsWith(".idl"))
classImporter = new IDLImport();
@@ -47,7 +47,7 @@ ClassImport *ClassImport::createImporterByFileExt(const QString &filename) {
classImporter = new PythonImport();
else if (filename.endsWith(".java"))
classImporter = new JavaImport();
- else if (filename.contains( QRegExp("\\.ad[sba]$") ))
+ else if (filename.contains( TQRegExp("\\.ad[sba]$") ))
classImporter = new AdaImport();
else if (filename.endsWith(".pas"))
classImporter = new PascalImport();
diff --git a/umbrello/umbrello/codeimport/classimport.h b/umbrello/umbrello/codeimport/classimport.h
index 351ddec5..e9820aa1 100644
--- a/umbrello/umbrello/codeimport/classimport.h
+++ b/umbrello/umbrello/codeimport/classimport.h
@@ -12,7 +12,7 @@
#ifndef CLASSIMPORT_H
#define CLASSIMPORT_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* Interfaces classparser library to uml models
@@ -32,12 +32,12 @@ public:
*
* @param files List of files to import.
*/
- void importFiles(const QStringList &files);
+ void importFiles(const TQStringList &files);
/**
* Factory method.
*/
- static ClassImport *createImporterByFileExt(const QString &filename);
+ static ClassImport *createImporterByFileExt(const TQString &filename);
protected:
/**
@@ -54,7 +54,7 @@ protected:
*
* @param filename The file to import.
*/
- virtual void parseFile(const QString& filename) = 0;
+ virtual void parseFile(const TQString& filename) = 0;
};
diff --git a/umbrello/umbrello/codeimport/cppimport.cpp b/umbrello/umbrello/codeimport/cppimport.cpp
index 4537c038..f97a5359 100644
--- a/umbrello/umbrello/codeimport/cppimport.cpp
+++ b/umbrello/umbrello/codeimport/cppimport.cpp
@@ -12,8 +12,8 @@
// own header
#include "cppimport.h"
// qt/kde includes
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kdebug.h>
// app includes
@@ -33,7 +33,7 @@
// static members
CppDriver * CppImport::ms_driver;
-QStringList CppImport::ms_seenFiles;
+TQStringList CppImport::ms_seenFiles;
class CppDriver : public Driver {
public:
@@ -49,17 +49,17 @@ CppImport::CppImport() {
CppImport::~CppImport() {}
-void CppImport::feedTheModel(const QString& fileName) {
+void CppImport::feedTheModel(const TQString& fileName) {
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_seenFiles.append(fileName);
- QMap<QString, Dependence> deps = ms_driver->dependences(fileName);
+ TQMap<TQString, Dependence> deps = ms_driver->dependences(fileName);
if (! deps.empty()) {
- QMap<QString, Dependence>::Iterator it;
+ TQMap<TQString, Dependence>::Iterator it;
for (it = deps.begin(); it != deps.end(); ++it) {
if (it.data().second == Dep_Global) // don't want these
continue;
- QString includeFile = it.key();
+ TQString includeFile = it.key();
if (includeFile.isEmpty()) {
kError() << fileName << ": " << it.data().first
<< " not found" << endl;
@@ -89,10 +89,10 @@ void CppImport::initialize() {
ms_driver->addIncludePath( "/usr/include/c++" );
ms_driver->addIncludePath( "/usr/include/g++" );
ms_driver->addIncludePath( "/usr/local/include" );
- QStringList incPathList = Import_Utils::includePathList();
+ TQStringList incPathList = Import_Utils::includePathList();
if (incPathList.count()) {
- QStringList::Iterator end(incPathList.end());
- for (QStringList::Iterator i(incPathList.begin()); i != end; ++i) {
+ TQStringList::Iterator end(incPathList.end());
+ for (TQStringList::Iterator i(incPathList.begin()); i != end; ++i) {
ms_driver->addIncludePath( *i );
}
@@ -100,7 +100,7 @@ void CppImport::initialize() {
ms_seenFiles.clear();
}
-void CppImport::parseFile(const QString& fileName) {
+void CppImport::parseFile(const TQString& fileName) {
if (ms_seenFiles.find(fileName) != ms_seenFiles.end())
return;
ms_driver->parseFile( fileName );
diff --git a/umbrello/umbrello/codeimport/cppimport.h b/umbrello/umbrello/codeimport/cppimport.h
index 3d5d8195..bf980bf4 100644
--- a/umbrello/umbrello/codeimport/cppimport.h
+++ b/umbrello/umbrello/codeimport/cppimport.h
@@ -12,7 +12,7 @@
#ifndef CPPIMPORT_H
#define CPPIMPORT_H
-#include <qstring.h>
+#include <tqstring.h>
#include "classimport.h"
class CppDriver;
@@ -39,7 +39,7 @@ protected:
*
* @param filename The file to import.
*/
- void parseFile(const QString& filename);
+ void parseFile(const TQString& filename);
private:
/**
@@ -49,10 +49,10 @@ private:
* in proper order so that references between UML objects are created
* properly.
*/
- void feedTheModel(const QString& fileName);
+ void feedTheModel(const TQString& fileName);
static CppDriver * ms_driver;
- static QStringList ms_seenFiles; ///< auxiliary buffer for feedTheModel()
+ static TQStringList ms_seenFiles; ///< auxiliary buffer for feedTheModel()
};
diff --git a/umbrello/umbrello/codeimport/idlimport.cpp b/umbrello/umbrello/codeimport/idlimport.cpp
index 6d228baf..cd2db89d 100644
--- a/umbrello/umbrello/codeimport/idlimport.cpp
+++ b/umbrello/umbrello/codeimport/idlimport.cpp
@@ -14,9 +14,9 @@
#include <stdio.h>
// qt/kde includes
-// #include <qprocess.h> //should use this instead of popen()
-#include <qstringlist.h>
-#include <qregexp.h>
+// #include <tqprocess.h> //should use this instead of popen()
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -38,8 +38,8 @@ IDLImport::~IDLImport() {
}
/// Check for split type names (e.g. unsigned long long)
-QString IDLImport::joinTypename() {
- QString typeName = m_source[m_srcIndex];
+TQString IDLImport::joinTypename() {
+ TQString typeName = m_source[m_srcIndex];
if (m_source[m_srcIndex] == "unsigned")
typeName += ' ' + advance();
if (m_source[m_srcIndex] == "long" &&
@@ -48,18 +48,18 @@ QString IDLImport::joinTypename() {
return typeName;
}
-bool IDLImport::preprocess(QString& line) {
+bool IDLImport::preprocess(TQString& line) {
// Ignore C preprocessor generated lines.
if (line.startsWith("#"))
return true; // done
return NativeImportBase::preprocess(line);
}
-void IDLImport::fillSource(const QString& word) {
- QString lexeme;
+void IDLImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_') {
lexeme += c;
} else if (c == ':' && word[i + 1] == ':') {
@@ -74,28 +74,28 @@ void IDLImport::fillSource(const QString& word) {
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
if (!lexeme.isEmpty())
m_source.append(lexeme);
}
-void IDLImport::parseFile(const QString& filename) {
+void IDLImport::parseFile(const TQString& filename) {
if (filename.contains('/')) {
- QString path = filename;
- path.remove( QRegExp("/[^/]+$") );
+ TQString path = filename;
+ path.remove( TQRegExp("/[^/]+$") );
kDebug() << "IDLImport::parseFile: adding path " << path << endl;
Import_Utils::addIncludePath(path);
}
- QStringList includePaths = Import_Utils::includePathList();
- //QProcess command("cpp", UMLAp::app());
- QString command("cpp -C"); // -C means "preserve comments"
- for (QStringList::Iterator pathIt = includePaths.begin();
+ TQStringList includePaths = Import_Utils::includePathList();
+ //TQProcess command("cpp", UMLAp::app());
+ TQString command("cpp -C"); // -C means "preserve comments"
+ for (TQStringList::Iterator pathIt = includePaths.begin();
pathIt != includePaths.end(); ++pathIt) {
- QString path = (*pathIt);
+ TQString path = (*pathIt);
//command.addArgument(" -I" + path);
command += " -I" + path;
}
@@ -106,21 +106,21 @@ void IDLImport::parseFile(const QString& filename) {
kError() << "IDLImport::parseFile: cannot popen(" << command << ")" << endl;
return;
}
- // Scan the input file into the QStringList m_source.
+ // Scan the input file into the TQStringList m_source.
m_source.clear();
char buf[256];
while (fgets(buf, sizeof(buf), fp) != NULL) {
int len = strlen(buf);
if (buf[len - 1] == '\n')
buf[--len] = '\0';
- NativeImportBase::scan( QString(buf) );
+ NativeImportBase::scan( TQString(buf) );
}
- // Parse the QStringList m_source.
+ // Parse the TQStringList m_source.
m_scopeIndex = 0;
m_scope[0] = NULL;
const uint srcLength = m_source.count();
for (m_srcIndex = 0; m_srcIndex < srcLength; m_srcIndex++) {
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
//kDebug() << '"' << keyword << '"' << endl;
if (keyword.startsWith(m_singleLineCommentIntro)) {
m_comment = keyword.mid(m_singleLineCommentIntro.length());
@@ -129,16 +129,16 @@ void IDLImport::parseFile(const QString& filename) {
if (! parseStmt())
skipStmt();
m_currentAccess = Uml::Visibility::Public;
- m_comment = QString();
+ m_comment = TQString();
}
pclose(fp);
}
bool IDLImport::parseStmt() {
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
const uint srcLength = m_source.count();
if (keyword == "module") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -150,19 +150,19 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "interface") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
m_klass->setStereotype("CORBAInterface");
m_klass->setAbstract(m_isAbstract);
m_isAbstract = false;
- m_comment = QString();
+ m_comment = TQString();
if (advance() == ";") // forward declaration
return true;
if (m_source[m_srcIndex] == ":") {
while (++m_srcIndex < srcLength && m_source[m_srcIndex] != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -176,7 +176,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "struct" || keyword == "exception") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -197,7 +197,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "enum") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
@@ -211,8 +211,8 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "typedef") {
- const QString& existingType = advance();
- const QString& newType = advance();
+ const TQString& existingType = advance();
+ const TQString& newType = advance();
Import_Utils::createUMLObject(Uml::ot_Class, newType, m_scope[m_scopeIndex],
m_comment, "CORBATypedef" /* stereotype */);
// @todo How do we convey the existingType ?
@@ -231,7 +231,7 @@ bool IDLImport::parseStmt() {
return true;
}
if (keyword == "valuetype") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -243,7 +243,7 @@ bool IDLImport::parseStmt() {
if (advance() == "truncatable")
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -290,13 +290,13 @@ bool IDLImport::parseStmt() {
// (of a member of struct or valuetype, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
- if (! keyword.contains( QRegExp("^\\w") )) {
+ if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importIDL: ignoring " << keyword << endl;
return false;
}
- QString typeName = joinTypename();
- QString name = advance();
- if (name.contains( QRegExp("\\W") )) {
+ TQString typeName = joinTypename();
+ TQString name = advance();
+ if (name.contains( TQRegExp("\\W") )) {
kError() << "importIDL: expecting name in " << name << endl;
return false;
}
@@ -305,15 +305,15 @@ bool IDLImport::parseStmt() {
kError() << "importIDL: no class set for " << name << endl;
return false;
}
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken == "(") {
// operation
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- const QString &direction = m_source[m_srcIndex++];
- QString typeName = joinTypename();
- const QString &parName = advance();
+ const TQString &direction = m_source[m_srcIndex++];
+ TQString typeName = joinTypename();
+ const TQString &parName = advance();
UMLAttribute *att = Import_Utils::addMethodParameter(op, typeName, parName);
Uml::Parameter_Direction dir;
if (Model_Utils::stringToDirection(direction, dir))
diff --git a/umbrello/umbrello/codeimport/idlimport.h b/umbrello/umbrello/codeimport/idlimport.h
index 6945364f..b5e88113 100644
--- a/umbrello/umbrello/codeimport/idlimport.h
+++ b/umbrello/umbrello/codeimport/idlimport.h
@@ -33,20 +33,20 @@ public:
* Reimplement operation from NativeImportBase.
* Need to do this because we use the external C preprocessor.
*/
- void parseFile(const QString& file);
+ void parseFile(const TQString& file);
/**
* Override operation from NativeImportBase.
*/
- bool preprocess(QString& line);
+ bool preprocess(TQString& line);
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
protected:
- QString joinTypename();
+ TQString joinTypename();
bool m_isOneway, m_isReadonly, m_isAttribute;
};
diff --git a/umbrello/umbrello/codeimport/import_utils.cpp b/umbrello/umbrello/codeimport/import_utils.cpp
index 92a87867..87206ccb 100644
--- a/umbrello/umbrello/codeimport/import_utils.cpp
+++ b/umbrello/umbrello/codeimport/import_utils.cpp
@@ -12,8 +12,8 @@
// own header
#include "import_utils.h"
// qt/kde includes
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,7 +64,7 @@ bool bPutAtGlobalScope = false;
/**
* The include path list (see addIncludePath() and includePathList())
*/
-QStringList incPathList;
+TQStringList incPathList;
void putAtGlobalScope(bool yesno) {
bPutAtGlobalScope = yesno;
@@ -82,13 +82,13 @@ bool newUMLObjectWasCreated() {
return bNewUMLObjectWasCreated;
}
-QString formatComment(const QString &comment) {
+TQString formatComment(const TQString &comment) {
if (comment.isEmpty())
return comment;
- QStringList lines = QStringList::split("\n", comment);
- QString& first = lines.first();
- QRegExp wordex("\\w");
+ TQStringList lines = TQStringList::split("\n", comment);
+ TQString& first = lines.first();
+ TQRegExp wordex("\\w");
if (first.startsWith("/*")) {
int wordpos = wordex.search(first);
if (wordpos != -1)
@@ -96,7 +96,7 @@ QString formatComment(const QString &comment) {
else
lines.pop_front(); // nothing interesting on this line
}
- QString& last = lines.last();
+ TQString& last = lines.last();
int endpos = last.find("*/");
if (endpos != -1) {
if (last.contains(wordex))
@@ -107,16 +107,16 @@ QString formatComment(const QString &comment) {
if (! lines.count())
return "";
- QStringList::Iterator end(lines.end());
- for (QStringList::Iterator lit(lines.begin()); lit != end; ++lit) {
- (*lit).remove(QRegExp("^\\s+"));
- (*lit).remove(QRegExp("^\\*+\\s?"));
+ TQStringList::Iterator end(lines.end());
+ for (TQStringList::Iterator lit(lines.begin()); lit != end; ++lit) {
+ (*lit).remove(TQRegExp("^\\s+"));
+ (*lit).remove(TQRegExp("^\\*+\\s?"));
}
return lines.join("\n");
}
/*
-UMLObject* findUMLObject(QString name,
+UMLObject* findUMLObject(TQString name,
Uml::Object_Type type) {
// Why an extra wrapper? See comment at addMethodParameter()
UMLObject * o = umldoc->findUMLObject(name, type);
@@ -125,11 +125,11 @@ UMLObject* findUMLObject(QString name,
*/
UMLObject *createUMLObject(Uml::Object_Type type,
- const QString& inName,
+ const TQString& inName,
UMLPackage *parentPkg,
- const QString& comment,
- const QString& stereotype) {
- QString name = inName;
+ const TQString& comment,
+ const TQString& stereotype) {
+ TQString name = inName;
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLFolder *logicalView = umldoc->getRootFolder(Uml::mt_Logical);
const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
@@ -142,13 +142,13 @@ UMLObject *createUMLObject(Uml::Object_Type type,
bNewUMLObjectWasCreated = false;
if (o == NULL) {
// Strip possible adornments and look again.
- int isConst = name.contains(QRegExp("^const "));
- name.remove(QRegExp("^const\\s+"));
- QString typeName(name);
- const int isAdorned = typeName.contains( QRegExp("[^\\w:\\. ]") );
+ int isConst = name.contains(TQRegExp("^const "));
+ name.remove(TQRegExp("^const\\s+"));
+ TQString typeName(name);
+ const int isAdorned = typeName.contains( TQRegExp("[^\\w:\\. ]") );
const int isPointer = typeName.contains('*');
const int isRef = typeName.contains('&');
- typeName.remove(QRegExp("[^\\w:\\. ].*$"));
+ typeName.remove(TQRegExp("[^\\w:\\. ].*$"));
typeName = typeName.simplifyWhiteSpace();
UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg);
if (origType == NULL) {
@@ -156,17 +156,17 @@ UMLObject *createUMLObject(Uml::Object_Type type,
if (bPutAtGlobalScope)
parentPkg = logicalView;
// Find, or create, the scopes.
- QStringList components;
+ TQStringList components;
if (typeName.contains("::")) {
- components = QStringList::split("::", typeName);
+ components = TQStringList::split("::", typeName);
} else if (typeName.contains(".")) {
- components = QStringList::split(".", typeName);
+ components = TQStringList::split(".", typeName);
}
if (components.count() > 1) {
typeName = components.back();
components.pop_back();
while ( components.count() ) {
- QString scopeName = components.front();
+ TQString scopeName = components.front();
components.pop_front();
o = umldoc->findUMLObject(scopeName, Uml::ot_UMLObject, parentPkg);
if (o) {
@@ -240,7 +240,7 @@ UMLObject *createUMLObject(Uml::Object_Type type,
parentPkg->addObject(o);
}
}
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
o->setDoc(strippedComment);
}
@@ -249,17 +249,17 @@ UMLObject *createUMLObject(Uml::Object_Type type,
}
if (gRelatedClassifier == NULL || gRelatedClassifier == o)
return o;
- QRegExp templateInstantiation("^[\\w:\\.]+\\s*<(.*)>");
+ TQRegExp templateInstantiation("^[\\w:\\.]+\\s*<(.*)>");
int pos = templateInstantiation.search(name);
if (pos == -1)
return o;
// Create dependencies on template parameters.
- QString caption = templateInstantiation.cap(1);
- QStringList params = QStringList::split(QRegExp("[^\\w:\\.]+"), caption);
+ TQString caption = templateInstantiation.cap(1);
+ TQStringList params = TQStringList::split(TQRegExp("[^\\w:\\.]+"), caption);
if (!params.count())
return o;
- QStringList::Iterator end(params.end());
- for (QStringList::Iterator it(params.begin()); it != end; ++it) {
+ TQStringList::Iterator end(params.end());
+ for (TQStringList::Iterator it(params.begin()); it != end; ++it) {
UMLObject *p = umldoc->findUMLObject(*it, Uml::ot_UMLObject, parentPkg);
if (p == NULL || p->getBaseType() == Uml::ot_Datatype)
continue;
@@ -274,16 +274,16 @@ UMLObject *createUMLObject(Uml::Object_Type type,
return o;
}
-UMLOperation* makeOperation(UMLClassifier *parent, const QString &name) {
+UMLOperation* makeOperation(UMLClassifier *parent, const TQString &name) {
UMLOperation *op = Object_Factory::createOperation(parent, name);
return op;
}
UMLObject* insertAttribute(UMLClassifier *owner,
Uml::Visibility scope,
- const QString& name,
+ const TQString& name,
UMLClassifier *attrType,
- const QString& comment /* ="" */,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */) {
Uml::Object_Type ot = owner->getBaseType();
Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
@@ -299,7 +299,7 @@ UMLObject* insertAttribute(UMLClassifier *owner,
UMLAttribute *attr = owner->addAttribute(name, attrType, scope);
attr->setStatic(isStatic);
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
attr->setDoc(strippedComment);
}
@@ -309,9 +309,9 @@ UMLObject* insertAttribute(UMLClassifier *owner,
}
UMLObject* insertAttribute(UMLClassifier *owner, Uml::Visibility scope,
- const QString& name,
- const QString& type,
- const QString& comment /* ="" */,
+ const TQString& name,
+ const TQString& type,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */) {
UMLObject *attrType = owner->findTemplate(type);
if (attrType == NULL) {
@@ -327,10 +327,10 @@ UMLObject* insertAttribute(UMLClassifier *owner, Uml::Visibility scope,
}
void insertMethod(UMLClassifier *klass, UMLOperation* &op,
- Uml::Visibility scope, const QString& type,
+ Uml::Visibility scope, const TQString& type,
bool isStatic, bool isAbstract,
bool isFriend, bool isConstructor,
- const QString& comment) {
+ const TQString& comment) {
op->setVisibility(scope);
if (!type.isEmpty() // return type may be missing (constructor/destructor)
&& type != "void") {
@@ -359,7 +359,7 @@ void insertMethod(UMLClassifier *klass, UMLOperation* &op,
if (isConstructor)
op->setStereotype("constructor");
- QString strippedComment = formatComment(comment);
+ TQString strippedComment = formatComment(comment);
if (! strippedComment.isEmpty()) {
op->setDoc(strippedComment);
}
@@ -394,8 +394,8 @@ void insertMethod(UMLClassifier *klass, UMLOperation* &op,
}
UMLAttribute* addMethodParameter(UMLOperation *method,
- const QString& type,
- const QString& name) {
+ const TQString& type,
+ const TQString& name) {
UMLClassifier *owner = static_cast<UMLClassifier*>(method->parent());
UMLObject *typeObj = owner->findTemplate(type);
if (typeObj == NULL) {
@@ -410,7 +410,7 @@ UMLAttribute* addMethodParameter(UMLOperation *method,
return attr;
}
-void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment) {
+void addEnumLiteral(UMLEnum *enumType, const TQString &literal, const TQString &comment) {
UMLObject *el = enumType->addEnumLiteral(literal);
el->setDoc(comment);
}
@@ -433,28 +433,28 @@ void createGeneralization(UMLClassifier *child, UMLClassifier *parent) {
umldoc->addAssociation(assoc);
}
-void createGeneralization(UMLClassifier *child, const QString &parentName) {
+void createGeneralization(UMLClassifier *child, const TQString &parentName) {
UMLObject *parentObj = createUMLObject( Uml::ot_Class, parentName );
UMLClassifier *parent = static_cast<UMLClassifier*>(parentObj);
createGeneralization(child, parent);
}
-QStringList includePathList() {
- QStringList includePathList(incPathList);
+TQStringList includePathList() {
+ TQStringList includePathList(incPathList);
char *umbrello_incpath = getenv( "UMBRELLO_INCPATH" );
if (umbrello_incpath) {
- includePathList += QStringList::split( ':', umbrello_incpath );
+ includePathList += TQStringList::split( ':', umbrello_incpath );
}
return includePathList;
}
-void addIncludePath(const QString& path) {
+void addIncludePath(const TQString& path) {
if (! incPathList.contains(path))
incPathList.append(path);
}
-bool isDatatype(const QString& name, UMLPackage *parentPkg) {
+bool isDatatype(const TQString& name, UMLPackage *parentPkg) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLObject * o = umldoc->findUMLObject(name, Uml::ot_Datatype, parentPkg);
return (o!=NULL);
diff --git a/umbrello/umbrello/codeimport/import_utils.h b/umbrello/umbrello/codeimport/import_utils.h
index 7d36bc77..f04aa3be 100644
--- a/umbrello/umbrello/codeimport/import_utils.h
+++ b/umbrello/umbrello/codeimport/import_utils.h
@@ -12,7 +12,7 @@
#ifndef IMPORT_UTILS_H
#define IMPORT_UTILS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "../umlnamespace.h"
#include "../umlattributelist.h"
@@ -34,10 +34,10 @@ namespace Import_Utils {
* Find or create a document object.
*/
UMLObject* createUMLObject(Uml::Object_Type type,
- const QString& name,
+ const TQString& name,
UMLPackage *parentPkg = NULL,
- const QString& comment = QString::null,
- const QString& stereotype = QString::null);
+ const TQString& comment = TQString::null,
+ const TQString& stereotype = TQString::null);
/**
* Control whether an object which is newly created by createUMLObject()
* is put at the global scope.
@@ -66,18 +66,18 @@ namespace Import_Utils {
* Create a UMLAttribute and insert it into the document.
*/
UMLObject* insertAttribute(UMLClassifier *klass, Uml::Visibility scope,
- const QString& name,
- const QString& type,
- const QString& comment = QString::null,
+ const TQString& name,
+ const TQString& type,
+ const TQString& comment = TQString::null,
bool isStatic = false);
/**
* Create a UMLAttribute and insert it into the document.
* Use the specified existing attrType.
*/
UMLObject* insertAttribute(UMLClassifier *klass, Uml::Visibility scope,
- const QString& name,
+ const TQString& name,
UMLClassifier *attrType,
- const QString& comment /* ="" */,
+ const TQString& comment /* ="" */,
bool isStatic /* =false */);
/**
* Create a UMLOperation.
@@ -88,7 +88,7 @@ namespace Import_Utils {
* a conflict with a pre-existing parameterless method of the same
* name.)
*/
- UMLOperation* makeOperation(UMLClassifier *parent, const QString &name);
+ UMLOperation* makeOperation(UMLClassifier *parent, const TQString &name);
/**
* Insert the UMLOperation into the given classifier.
@@ -109,10 +109,10 @@ namespace Import_Utils {
* @param comment The Documentation for this method
*/
void insertMethod(UMLClassifier *klass, UMLOperation* &op,
- Uml::Visibility scope, const QString& type,
+ Uml::Visibility scope, const TQString& type,
bool isStatic, bool isAbstract,
bool isFriend = false, bool isConstructor = false,
- const QString& comment = QString::null);
+ const TQString& comment = TQString::null);
/**
* Add an argument to a UMLOperation.
@@ -120,14 +120,14 @@ namespace Import_Utils {
* prefixes in the `type'.
*/
UMLAttribute* addMethodParameter(UMLOperation *method,
- const QString& type,
- const QString& name);
+ const TQString& type,
+ const TQString& name);
/**
* Add an enum literal to an UMLEnum.
*/
- void addEnumLiteral(UMLEnum *enumType, const QString &literal,
- const QString &comment = QString());
+ void addEnumLiteral(UMLEnum *enumType, const TQString &literal,
+ const TQString &comment = TQString());
/**
* Create a generalization from the given child classifier to the given
@@ -139,12 +139,12 @@ namespace Import_Utils {
* Create a generalization from the existing child UMLObject to the given
* parent class name.
*/
- void createGeneralization(UMLClassifier *child, const QString &parentName);
+ void createGeneralization(UMLClassifier *child, const TQString &parentName);
/**
* Strip comment lines of leading whitespace and stars.
*/
- QString formatComment(const QString &comment);
+ TQString formatComment(const TQString &comment);
/**
* Return the list of paths set by previous calls to addIncludePath()
@@ -152,12 +152,12 @@ namespace Import_Utils {
* This list can be used for finding #included (or Ada with'ed or...)
* files.
*/
- QStringList includePathList();
+ TQStringList includePathList();
/**
* Add a path to the include path list.
*/
- void addIncludePath(const QString& path);
+ void addIncludePath(const TQString& path);
/**
* Returns whether the last createUMLObject() actually created
@@ -168,7 +168,7 @@ namespace Import_Utils {
/**
* Returns true if a type is an actual Datatype
*/
- bool isDatatype(const QString& name, UMLPackage *parentPkg = NULL);
+ bool isDatatype(const TQString& name, UMLPackage *parentPkg = NULL);
} // end namespace Import_Utils
diff --git a/umbrello/umbrello/codeimport/javaimport.cpp b/umbrello/umbrello/codeimport/javaimport.cpp
index 8df6e5e7..7f62a1a9 100644
--- a/umbrello/umbrello/codeimport/javaimport.cpp
+++ b/umbrello/umbrello/codeimport/javaimport.cpp
@@ -13,10 +13,10 @@
#include "javaimport.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -29,7 +29,7 @@
#include "../operation.h"
#include "../attribute.h"
-QStringList JavaImport::s_filesAlreadyParsed;
+TQStringList JavaImport::s_filesAlreadyParsed;
int JavaImport::s_parseDepth = 0;
JavaImport::JavaImport() : NativeImportBase("//") {
@@ -45,7 +45,7 @@ void JavaImport::initVars() {
}
/// Catenate possible template arguments/array dimensions to the end of the type name.
-QString JavaImport::joinTypename(QString typeName) {
+TQString JavaImport::joinTypename(TQString typeName) {
if (m_source[m_srcIndex + 1] == "<" ||
m_source[m_srcIndex + 1] == "[") {
uint start = ++m_srcIndex;
@@ -62,19 +62,19 @@ QString JavaImport::joinTypename(QString typeName) {
return typeName;
}
-void JavaImport::fillSource(const QString& word) {
- QString lexeme;
+void JavaImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = word[i];
+ const TQChar& c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
if (!lexeme.isEmpty())
@@ -83,15 +83,15 @@ void JavaImport::fillSource(const QString& word) {
///Spawn off an import of the specified file
-void JavaImport::spawnImport( QString file ) {
+void JavaImport::spawnImport( TQString file ) {
// if the file is being parsed, don't bother
//
if (s_filesAlreadyParsed.contains( file ) ) {
return;
}
- if (QFile::exists(file)) {
+ if (TQFile::exists(file)) {
JavaImport importer;
- QStringList fileList;
+ TQStringList fileList;
fileList.append( file );
s_filesAlreadyParsed.append( file );
importer.importFiles( fileList );
@@ -100,7 +100,7 @@ void JavaImport::spawnImport( QString file ) {
///returns the UML Object if found, or null otherwise
-UMLObject* findObject( QString name, UMLPackage *parentPkg ) {
+UMLObject* findObject( TQString name, UMLPackage *parentPkg ) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLObject * o = umldoc->findUMLObject(name, Uml::ot_UMLObject , parentPkg);
return o;
@@ -108,14 +108,14 @@ UMLObject* findObject( QString name, UMLPackage *parentPkg ) {
///Resolve the specified className
-UMLObject* JavaImport::resolveClass (QString className) {
+UMLObject* JavaImport::resolveClass (TQString className) {
kDebug() << "importJava trying to resolve " << className << endl;
// keep track if we are dealing with an array
//
bool isArray = className.contains('[');
// remove any [] so that the class itself can be resolved
//
- QString baseClassName = className;
+ TQString baseClassName = className;
baseClassName.remove('[');
baseClassName.remove(']');
@@ -123,7 +123,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
// current package, which is in the same directory as the current file
// being parsed
//
- QStringList file = QStringList::split( '/', m_currentFileName);
+ TQStringList file = TQStringList::split( '/', m_currentFileName);
// remove the filename. This leaves the full path to the containing
// dir which should also include the package hierarchy
//
@@ -132,9 +132,9 @@ UMLObject* JavaImport::resolveClass (QString className) {
// the file we're looking for might be in the same directory as the
// current class
//
- QString myDir = file.join( "/" );
- QString myFile = '/' + myDir + '/' + baseClassName + ".java";
- if ( QFile::exists(myFile) ) {
+ TQString myDir = file.join( "/" );
+ TQString myFile = '/' + myDir + '/' + baseClassName + ".java";
+ if ( TQFile::exists(myFile) ) {
spawnImport( myFile );
if ( isArray ) {
// we have imported the type. For arrays we want to return
@@ -147,7 +147,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
// the class we want is not in the same package as the one being imported.
// use the imports to find the one we want.
//
- QStringList package = QStringList::split( '.', m_currentPackage);
+ TQStringList package = TQStringList::split( '.', m_currentPackage);
int dirsInPackageCount = package.size();
for (int count=0; count < dirsInPackageCount; count ++ ) {
@@ -156,27 +156,27 @@ UMLObject* JavaImport::resolveClass (QString className) {
file.pop_back();
}
// this is now the root of any further source imports
- QString sourceRoot = '/' + file.join("/") + '/';
+ TQString sourceRoot = '/' + file.join("/") + '/';
- for (QStringList::Iterator pathIt = m_imports.begin();
+ for (TQStringList::Iterator pathIt = m_imports.begin();
pathIt != m_imports.end(); ++pathIt) {
- QString import = (*pathIt);
- QStringList split = QStringList::split( '.', import );
+ TQString import = (*pathIt);
+ TQStringList split = TQStringList::split( '.', import );
split.pop_back(); // remove the * or the classname
if ( import.endsWith( "*" ) || import.endsWith( baseClassName) ) {
// check if the file we want is in this imported package
// convert the org.test type package into a filename
//
- QString aFile = sourceRoot + split.join("/") + '/' + baseClassName + ".java";
- if ( QFile::exists(aFile) ) {
+ TQString aFile = sourceRoot + split.join("/") + '/' + baseClassName + ".java";
+ if ( TQFile::exists(aFile) ) {
spawnImport( aFile );
// we need to set the package for the class that will be resolved
// start at the root package
UMLPackage *parent = m_scope[0];
UMLPackage *current = NULL;
- for (QStringList::Iterator it = split.begin(); it != split.end(); ++it) {
- QString name = (*it);
+ for (TQStringList::Iterator it = split.begin(); it != split.end(); ++it) {
+ TQString name = (*it);
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, parent);
current = static_cast<UMLPackage*>(ns);
@@ -197,7 +197,7 @@ UMLObject* JavaImport::resolveClass (QString className) {
/// keep track of the current file being parsed and reset the list of imports
-void JavaImport::parseFile(const QString& filename) {
+void JavaImport::parseFile(const TQString& filename) {
m_currentFileName= filename;
m_imports.clear();
// default visibility is Impl, unless we are an interface, then it is
@@ -223,14 +223,14 @@ void JavaImport::parseFile(const QString& filename) {
bool JavaImport::parseStmt() {
const uint srcLength = m_source.count();
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "package") {
m_currentPackage = advance();
- const QString& qualifiedName = m_currentPackage;
- QStringList names = QStringList::split(".", qualifiedName);
- for (QStringList::Iterator it = names.begin(); it != names.end(); ++it) {
- QString name = (*it);
+ const TQString& qualifiedName = m_currentPackage;
+ TQStringList names = TQStringList::split(".", qualifiedName);
+ for (TQStringList::Iterator it = names.begin(); it != names.end(); ++it) {
+ TQString name = (*it);
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -242,7 +242,7 @@ bool JavaImport::parseStmt() {
return true;
}
if (keyword == "class" || keyword == "interface") {
- const QString& name = advance();
+ const TQString& name = advance();
const Uml::Object_Type t = (keyword == "class" ? Uml::ot_Class : Uml::ot_Interface);
UMLObject *ns = Import_Utils::createUMLObject(t, name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
@@ -270,14 +270,14 @@ bool JavaImport::parseStmt() {
return false;
}
while (1) {
- const QString arg = m_source[++start];
- if (! arg.contains( QRegExp("^[A-Za-z_]") )) {
+ const TQString arg = m_source[++start];
+ if (! arg.contains( TQRegExp("^[A-Za-z_]") )) {
kDebug() << "importJava(" << name << "): cannot handle template syntax ("
<< arg << ")" << endl;
break;
}
/* UMLTemplate *tmpl = */ m_klass->addTemplate(arg);
- const QString next = m_source[++start];
+ const TQString next = m_source[++start];
if (next == ">")
break;
if (next != ",") {
@@ -289,7 +289,7 @@ bool JavaImport::parseStmt() {
advance(); // skip over ">"
}
if (m_source[m_srcIndex] == "extends") {
- const QString& baseName = advance();
+ const TQString& baseName = advance();
// try to resolve the class we are extending, or if impossible
// create a placeholder
UMLObject *parent = resolveClass( baseName );
@@ -304,7 +304,7 @@ bool JavaImport::parseStmt() {
}
if (m_source[m_srcIndex] == "implements") {
while (m_srcIndex < srcLength - 1 && advance() != "{") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
// try to resolve the interface we are implementing, if this fails
// create a placeholder
UMLObject *interface = resolveClass( baseName );
@@ -327,14 +327,14 @@ bool JavaImport::parseStmt() {
return true;
}
if (keyword == "enum") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Enum,
name, m_scope[m_scopeIndex], m_comment);
UMLEnum *enumType = static_cast<UMLEnum*>(ns);
skipStmt("{");
while (m_srcIndex < srcLength - 1 && advance() != "}") {
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex]);
- QString next = advance();
+ TQString next = advance();
if (next == "{" || next == "(") {
if (! skipToClosing(next[0]))
return false;
@@ -389,7 +389,7 @@ bool JavaImport::parseStmt() {
}
if (keyword == "import") {
// keep track of imports so we can resolve classes we are dependent on
- QString import = advance();
+ TQString import = advance();
if ( import.endsWith(".") ) {
//this most likely an import that ends with a *
//
@@ -420,28 +420,28 @@ bool JavaImport::parseStmt() {
// (of a member of class or interface, or return type
// of an operation.) Up next is the name of the attribute
// or operation.
- if (! keyword.contains( QRegExp("^\\w") )) {
+ if (! keyword.contains( TQRegExp("^\\w") )) {
kError() << "importJava: ignoring " << keyword << endl;
return false;
}
- QString typeName = m_source[m_srcIndex];
+ TQString typeName = m_source[m_srcIndex];
typeName = joinTypename(typeName);
// At this point we need a class.
if (m_klass == NULL) {
kError() << "importJava: no class set for " << typeName << endl;
return false;
}
- QString name = advance();
- QString nextToken;
+ TQString name = advance();
+ TQString nextToken;
if (typeName == m_klass->getName() && name == "(") {
// Constructor.
nextToken = name;
name = typeName;
- typeName = QString();
+ typeName = TQString();
} else {
nextToken = advance();
}
- if (name.contains( QRegExp("\\W") )) {
+ if (name.contains( TQRegExp("\\W") )) {
kError() << "importJava: expecting name in " << name << endl;
return false;
}
@@ -450,13 +450,13 @@ bool JavaImport::parseStmt() {
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
m_srcIndex++;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString typeName = m_source[m_srcIndex];
+ TQString typeName = m_source[m_srcIndex];
if ( typeName == "final" || typeName.startsWith( "//") ) {
// ignore the "final" keyword and any comments in method args
typeName = advance();
}
typeName = joinTypename(typeName);
- QString parName = advance();
+ TQString parName = advance();
// the Class might not be resolved yet so resolve it if necessary
UMLObject *obj = resolveClass(typeName);
if (obj) {
diff --git a/umbrello/umbrello/codeimport/javaimport.h b/umbrello/umbrello/codeimport/javaimport.h
index 30fa2395..05dcbcb1 100644
--- a/umbrello/umbrello/codeimport/javaimport.h
+++ b/umbrello/umbrello/codeimport/javaimport.h
@@ -40,27 +40,27 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Keep track of the filename currently being parsed
*/
- void parseFile(const QString& filename);
+ void parseFile(const TQString& filename);
/**
* Try to resolve the specified class the current class depends on
*/
- UMLObject* resolveClass (QString className);
+ UMLObject* resolveClass (TQString className);
/**
* spawn off an import of the specified file
*/
- void spawnImport(QString file);
+ void spawnImport(TQString file);
/**
* figure out if the type is really an array or template of the given typeName
*/
- QString joinTypename(QString typeName);
+ TQString joinTypename(TQString typeName);
/**
* true if the member var or method is declared static
@@ -70,23 +70,23 @@ protected:
/**
* The current filename being parsed
*/
- QString m_currentFileName;
+ TQString m_currentFileName;
/**
* the current package of the file being parsed
*/
- QString m_currentPackage;
+ TQString m_currentPackage;
/**
* the imports included in the current file
*/
- QStringList m_imports;
+ TQStringList m_imports;
/**
* Keep track of the files we have already parsed so we don't
* reparse the same ones over and over again.
*/
- static QStringList s_filesAlreadyParsed;
+ static TQStringList s_filesAlreadyParsed;
/**
* Keep track of the parses so that the filesAlreadyParsed
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
index 1ca07eb6..e6a7e2b5 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp
@@ -18,10 +18,10 @@
*/
#include "ast.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
-QString nodeTypeToString( int type )
+TQString nodeTypeToString( int type )
{
switch( type )
{
@@ -117,7 +117,7 @@ QString nodeTypeToString( int type )
return "Custom";
}
- return QString::null;
+ return TQString::null;
}
@@ -224,18 +224,18 @@ void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNam
m_classOrNamespaceNameList.append( classOrNamespaceName.release() );
}
-QString NameAST::text() const
+TQString NameAST::text() const
{
if( !m_unqualifiedName.get() )
- return QString::null;
+ return TQString::null;
- QString str;
+ TQString str;
if( m_global )
str += "::";
- QStringList l;
- QPtrListIterator<ClassOrNamespaceNameAST> it( m_classOrNamespaceNameList );
+ TQStringList l;
+ TQPtrListIterator<ClassOrNamespaceNameAST> it( m_classOrNamespaceNameList );
while( it.current() ){
str += it.current()->text() + "::";
++it;
@@ -406,11 +406,11 @@ void TemplateArgumentListAST::addArgument( AST::Node& arg )
m_argumentList.append( arg.release() );
}
-QString TemplateArgumentListAST::text() const
+TQString TemplateArgumentListAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_argumentList );
+ TQPtrListIterator<AST> it( m_argumentList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -459,14 +459,14 @@ void ClassOrNamespaceNameAST::setTemplateArgumentList( TemplateArgumentListAST::
if( m_templateArgumentList.get() ) m_templateArgumentList->setParent( this );
}
-QString ClassOrNamespaceNameAST::text() const
+TQString ClassOrNamespaceNameAST::text() const
{
if( !m_name.get() )
- return QString::null;
+ return TQString::null;
- QString str = m_name->text();
+ TQString str = m_name->text();
if( m_templateArgumentList.get() )
- str += QString::fromLatin1("< ") + m_templateArgumentList->text() + QString::fromLatin1(" >");
+ str += TQString::fromLatin1("< ") + m_templateArgumentList->text() + TQString::fromLatin1(" >");
return str;
}
@@ -488,9 +488,9 @@ void TypeSpecifierAST::setCv2Qualify( GroupAST::Node& cv2Qualify )
if( m_cv2Qualify.get() ) m_cv2Qualify->setParent( this );
}
-QString TypeSpecifierAST::text() const
+TQString TypeSpecifierAST::text() const
{
- QString str;
+ TQString str;
if( m_cvQualify.get() )
str += m_cvQualify->text() + ' ';
@@ -499,7 +499,7 @@ QString TypeSpecifierAST::text() const
str += m_name->text();
if( m_cv2Qualify.get() )
- str += QString(" ") + m_cv2Qualify->text();
+ str += TQString(" ") + m_cv2Qualify->text();
return str;
}
@@ -558,7 +558,7 @@ void ElaboratedTypeSpecifierAST::setKind( AST::Node& kind )
if( m_kind.get() ) m_kind->setParent( this );
}
-QString ElaboratedTypeSpecifierAST::text() const
+TQString ElaboratedTypeSpecifierAST::text() const
{
if( m_kind.get() )
return m_kind->text() + ' ' + TypeSpecifierAST::text();
@@ -960,9 +960,9 @@ void ParameterDeclarationAST::setExpression( AST::Node& expression )
if( m_expression.get() ) m_expression->setParent( this );
}
-QString ParameterDeclarationAST::text() const
+TQString ParameterDeclarationAST::text() const
{
- QString str;
+ TQString str;
if( m_typeSpec.get() )
str += m_typeSpec->text() + ' ';
@@ -970,7 +970,7 @@ QString ParameterDeclarationAST::text() const
str += m_declarator->text();
if( m_expression.get() )
- str += QString( " = " ) + m_expression->text();
+ str += TQString( " = " ) + m_expression->text();
return str;
}
@@ -990,11 +990,11 @@ void ParameterDeclarationListAST::addParameter( ParameterDeclarationAST::Node& p
m_parameterList.append( parameter.release() );
}
-QString ParameterDeclarationListAST::text() const
+TQString ParameterDeclarationListAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<ParameterDeclarationAST> it( m_parameterList );
+ TQPtrListIterator<ParameterDeclarationAST> it( m_parameterList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -1021,9 +1021,9 @@ void ParameterDeclarationClauseAST::setEllipsis( AST::Node& ellipsis )
if( m_ellipsis.get() ) m_ellipsis->setParent( this );
}
-QString ParameterDeclarationClauseAST::text() const
+TQString ParameterDeclarationClauseAST::text() const
{
- QString str;
+ TQString str;
if( m_parameterDeclarationList.get() )
str += m_parameterDeclarationList->text();
@@ -1050,11 +1050,11 @@ void GroupAST::addNode( AST::Node& node )
m_nodeList.append( node.release() );
}
-QString GroupAST::text() const
+TQString GroupAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_nodeList );
+ TQPtrListIterator<AST> it( m_nodeList );
while( it.current() ){
l.append( it.current()->text() );
++it;
@@ -1078,11 +1078,11 @@ void AccessDeclarationAST::addAccess( AST::Node& access )
m_accessList.append( access.release() );
}
-QString AccessDeclarationAST::text() const
+TQString AccessDeclarationAST::text() const
{
- QStringList l;
+ TQStringList l;
- QPtrListIterator<AST> it( m_accessList );
+ TQPtrListIterator<AST> it( m_accessList );
while( it.current() ){
l.append( it.current()->text() );
++it;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.h b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
index 932cf5dd..e2bd7835 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.h
@@ -21,8 +21,8 @@
#define __ast_h
#include <memory>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#if defined( Q_OS_WIN32 ) || defined( Q_CC_SUN )
@@ -174,7 +174,7 @@ enum NodeType
NodeType_Custom = 2000
};
-QString nodeTypeToString( int type );
+TQString nodeTypeToString( int type );
#if defined(CPPPARSER_QUICK_ALLOCATOR)
@@ -199,7 +199,7 @@ QString nodeTypeToString( int type );
struct Slice
{
- QString source;
+ TQString source;
int position;
int length;
@@ -232,31 +232,31 @@ public:
void getEndPosition( int* line, int* col ) const;
#ifndef CPPPARSER_NO_CHILDREN
- QPtrList<AST> children() { return m_children; }
+ TQPtrList<AST> children() { return m_children; }
void appendChild( AST* child );
void removeChild( AST* child );
#endif
- virtual inline QString text() const
+ virtual inline TQString text() const
{ return m_slice.source.mid(m_slice.position, m_slice.length); }
- QString comment() const
+ TQString comment() const
{ return m_comment; }
inline void setSlice( const Slice& slice )
{ m_slice = slice; }
- inline void setSlice( const QString &text, int position, int length )
+ inline void setSlice( const TQString &text, int position, int length )
{
m_slice.source = text;
m_slice.position = position;
m_slice.length = length;
}
- inline void setText(const QString &text)
+ inline void setText(const TQString &text)
{ setSlice(text, 0, text.length()); }
- void setComment( const QString &comment )
+ void setComment( const TQString &comment )
{ m_comment = comment; }
private:
@@ -266,9 +266,9 @@ private:
int m_endLine, m_endColumn;
Slice m_slice;
#ifndef CPPPARSER_NO_CHILDREN
- QPtrList<AST> m_children;
+ TQPtrList<AST> m_children;
#endif
- QString m_comment;
+ TQString m_comment;
private:
AST( const AST& source );
@@ -286,13 +286,13 @@ public:
public:
GroupAST();
- QPtrList<AST> nodeList() { return m_nodeList; }
+ TQPtrList<AST> nodeList() { return m_nodeList; }
void addNode( AST::Node& node );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_nodeList;
+ TQPtrList<AST> m_nodeList;
private:
GroupAST( const GroupAST& source );
@@ -312,12 +312,12 @@ public:
TemplateArgumentListAST();
void addArgument( AST::Node& arg );
- QPtrList<AST> argumentList() { return m_argumentList; }
+ TQPtrList<AST> argumentList() { return m_argumentList; }
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_argumentList;
+ TQPtrList<AST> m_argumentList;
private:
TemplateArgumentListAST( const TemplateArgumentListAST& source );
@@ -341,7 +341,7 @@ public:
TemplateArgumentListAST* templateArgumentList() { return m_templateArgumentList.get(); }
void setTemplateArgumentList( TemplateArgumentListAST::Node& templateArgumentList );
- virtual QString text() const;
+ virtual TQString text() const;
private:
AST::Node m_name;
@@ -367,17 +367,17 @@ public:
void setGlobal( bool b );
void addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNamespaceName );
- QPtrList<ClassOrNamespaceNameAST> classOrNamespaceNameList() { return m_classOrNamespaceNameList; }
+ TQPtrList<ClassOrNamespaceNameAST> classOrNamespaceNameList() { return m_classOrNamespaceNameList; }
ClassOrNamespaceNameAST* unqualifiedName() { return m_unqualifiedName.get(); }
void setUnqualifiedName( ClassOrNamespaceNameAST::Node& unqualifiedName );
- virtual QString text() const;
+ virtual TQString text() const;
private:
bool m_global;
ClassOrNamespaceNameAST::Node m_unqualifiedName;
- QPtrList<ClassOrNamespaceNameAST> m_classOrNamespaceNameList;
+ TQPtrList<ClassOrNamespaceNameAST> m_classOrNamespaceNameList;
private:
NameAST( const NameAST& source );
@@ -445,13 +445,13 @@ public:
public:
AccessDeclarationAST();
- QPtrList<AST> accessList() { return m_accessList; }
+ TQPtrList<AST> accessList() { return m_accessList; }
void addAccess( AST::Node& access );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<AST> m_accessList;
+ TQPtrList<AST> m_accessList;
private:
AccessDeclarationAST( const AccessDeclarationAST& source );
@@ -478,7 +478,7 @@ public:
GroupAST* cv2Qualify() { return m_cv2Qualify.get(); }
void setCv2Qualify( GroupAST::Node& cv2Qualify );
- virtual QString text() const;
+ virtual TQString text() const;
private:
NameAST::Node m_name;
@@ -532,10 +532,10 @@ public:
BaseClauseAST();
void addBaseSpecifier( BaseSpecifierAST::Node& baseSpecifier );
- QPtrList<BaseSpecifierAST> baseSpecifierList() { return m_baseSpecifierList; }
+ TQPtrList<BaseSpecifierAST> baseSpecifierList() { return m_baseSpecifierList; }
private:
- QPtrList<BaseSpecifierAST> m_baseSpecifierList;
+ TQPtrList<BaseSpecifierAST> m_baseSpecifierList;
private:
BaseClauseAST( const BaseClauseAST& source );
@@ -562,14 +562,14 @@ public:
BaseClauseAST* baseClause() { return m_baseClause.get(); }
void setBaseClause( BaseClauseAST::Node& baseClause );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
void addDeclaration( DeclarationAST::Node& declaration );
private:
GroupAST::Node m_winDeclSpec;
AST::Node m_classKey;
BaseClauseAST::Node m_baseClause;
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
ClassSpecifierAST( const ClassSpecifierAST& source );
@@ -614,10 +614,10 @@ public:
EnumSpecifierAST();
void addEnumerator( EnumeratorAST::Node& enumerator );
- QPtrList<EnumeratorAST> enumeratorList() { return m_enumeratorList; }
+ TQPtrList<EnumeratorAST> enumeratorList() { return m_enumeratorList; }
private:
- QPtrList<EnumeratorAST> m_enumeratorList;
+ TQPtrList<EnumeratorAST> m_enumeratorList;
private:
EnumSpecifierAST( const EnumSpecifierAST& source );
@@ -638,7 +638,7 @@ public:
AST* kind() { return m_kind.get(); }
void setKind( AST::Node& kind );
- virtual QString text() const;
+ virtual TQString text() const;
private:
AST::Node m_kind;
@@ -661,10 +661,10 @@ public:
LinkageBodyAST();
void addDeclaration( DeclarationAST::Node& ast );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
private:
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
LinkageBodyAST( const LinkageBodyAST& source );
@@ -812,7 +812,7 @@ public:
public:
DeclaratorAST();
- QPtrList<AST> ptrOpList() { return m_ptrOpList; }
+ TQPtrList<AST> ptrOpList() { return m_ptrOpList; }
void addPtrOp( AST::Node& ptrOp );
DeclaratorAST* subDeclarator() { return m_subDeclarator.get(); }
@@ -824,7 +824,7 @@ public:
AST* bitfieldInitialization() { return m_bitfieldInitialization.get(); }
void setBitfieldInitialization( AST::Node& bitfieldInitialization );
- QPtrList<AST> arrayDimensionList() { return m_arrayDimensionList; }
+ TQPtrList<AST> arrayDimensionList() { return m_arrayDimensionList; }
void addArrayDimension( AST::Node& arrayDimension );
class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); }
@@ -838,11 +838,11 @@ public:
void setExceptionSpecification( GroupAST::Node& exceptionSpecification );
private:
- QPtrList<AST> m_ptrOpList;
+ TQPtrList<AST> m_ptrOpList;
Node m_subDeclarator;
NameAST::Node m_declaratorId;
AST::Node m_bitfieldInitialization;
- QPtrList<AST> m_arrayDimensionList;
+ TQPtrList<AST> m_arrayDimensionList;
AUTO_PTR<class ParameterDeclarationClauseAST> m_parameterDeclarationClause;
AST::Node m_constant;
GroupAST::Node m_exceptionSpecification;
@@ -872,7 +872,7 @@ public:
AST* expression() { return m_expression.get(); }
void setExpression( AST::Node& expression );
- virtual QString text() const;
+ virtual TQString text() const;
private:
TypeSpecifierAST::Node m_typeSpec;
@@ -895,13 +895,13 @@ public:
public:
ParameterDeclarationListAST();
- QPtrList<ParameterDeclarationAST> parameterList() { return m_parameterList; }
+ TQPtrList<ParameterDeclarationAST> parameterList() { return m_parameterList; }
void addParameter( ParameterDeclarationAST::Node& parameter );
- virtual QString text() const;
+ virtual TQString text() const;
private:
- QPtrList<ParameterDeclarationAST> m_parameterList;
+ TQPtrList<ParameterDeclarationAST> m_parameterList;
private:
ParameterDeclarationListAST( const ParameterDeclarationListAST& source );
@@ -925,7 +925,7 @@ public:
AST* ellipsis() { return m_ellipsis.get(); }
void setEllipsis( AST::Node& ellipsis );
- virtual QString text() const;
+ virtual TQString text() const;
private:
ParameterDeclarationListAST::Node m_parameterDeclarationList;
@@ -974,11 +974,11 @@ public:
public:
InitDeclaratorListAST();
- QPtrList<InitDeclaratorAST> initDeclaratorList() { return m_initDeclaratorList; }
+ TQPtrList<InitDeclaratorAST> initDeclaratorList() { return m_initDeclaratorList; }
void addInitDeclarator( InitDeclaratorAST::Node& decl );
private:
- QPtrList<InitDeclaratorAST> m_initDeclaratorList;
+ TQPtrList<InitDeclaratorAST> m_initDeclaratorList;
private:
InitDeclaratorListAST( const InitDeclaratorListAST& source );
@@ -1048,11 +1048,11 @@ public:
public:
TemplateParameterListAST();
- QPtrList<TemplateParameterAST> templateParameterList() { return m_templateParameterList; }
+ TQPtrList<TemplateParameterAST> templateParameterList() { return m_templateParameterList; }
void addTemplateParameter( TemplateParameterAST::Node& templateParameter );
private:
- QPtrList<TemplateParameterAST> m_templateParameterList;
+ TQPtrList<TemplateParameterAST> m_templateParameterList;
private:
TemplateParameterListAST( const TemplateParameterListAST& source );
@@ -1348,11 +1348,11 @@ public:
public:
StatementListAST();
- QPtrList<StatementAST> statementList() { return m_statementList; }
+ TQPtrList<StatementAST> statementList() { return m_statementList; }
void addStatement( StatementAST::Node& statement );
private:
- QPtrList<StatementAST> m_statementList;
+ TQPtrList<StatementAST> m_statementList;
private:
StatementListAST( const StatementListAST& source );
@@ -1436,10 +1436,10 @@ public:
TranslationUnitAST();
void addDeclaration( DeclarationAST::Node& ast );
- QPtrList<DeclarationAST> declarationList() { return m_declarationList; }
+ TQPtrList<DeclarationAST> declarationList() { return m_declarationList; }
private:
- QPtrList<DeclarationAST> m_declarationList;
+ TQPtrList<DeclarationAST> m_declarationList;
private:
TranslationUnitAST( const TranslationUnitAST& source );
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
index e30f0c1e..45cfd8ed 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp
@@ -12,8 +12,8 @@
#include "ast_utils.h"
#include "ast.h"
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -35,8 +35,8 @@ AST* findNodeAt( AST* node, int line, int column )
if( (line > startLine || (line == startLine && column >= startColumn)) &&
(line < endLine || (line == endLine && column < endColumn)) ){
- QPtrList<AST> children = node->children();
- QPtrListIterator<AST> it( children );
+ TQPtrList<AST> children = node->children();
+ TQPtrListIterator<AST> it( children );
while( it.current() ){
AST* a = it.current();
++it;
@@ -52,7 +52,7 @@ AST* findNodeAt( AST* node, int line, int column )
return 0;
}
-void scopeOfNode( AST* ast, QStringList& scope )
+void scopeOfNode( AST* ast, TQStringList& scope )
{
if( !ast )
return;
@@ -60,13 +60,13 @@ void scopeOfNode( AST* ast, QStringList& scope )
if( ast->parent() )
scopeOfNode( ast->parent(), scope );
- QString s;
+ TQString s;
switch( ast->nodeType() )
{
case NodeType_ClassSpecifier:
if( ((ClassSpecifierAST*)ast)->name() ){
s = ((ClassSpecifierAST*)ast)->name()->text();
- s = s.isEmpty() ? QString::fromLatin1("<unnamed>") : s;
+ s = s.isEmpty() ? TQString::fromLatin1("<unnamed>") : s;
scope.push_back( s );
}
break;
@@ -74,7 +74,7 @@ void scopeOfNode( AST* ast, QStringList& scope )
case NodeType_Namespace:
{
AST* namespaceName = ((NamespaceAST*)ast)->namespaceName();
- s = namespaceName ? namespaceName->text() : QString::fromLatin1("<unnamed>");
+ s = namespaceName ? namespaceName->text() : TQString::fromLatin1("<unnamed>");
scope.push_back( s );
}
break;
@@ -88,8 +88,8 @@ void scopeOfNode( AST* ast, QStringList& scope )
if ( !d->declaratorId() )
break;
- QPtrList<ClassOrNamespaceNameAST> l = d->declaratorId()->classOrNamespaceNameList();
- QPtrListIterator<ClassOrNamespaceNameAST> nameIt( l );
+ TQPtrList<ClassOrNamespaceNameAST> l = d->declaratorId()->classOrNamespaceNameList();
+ TQPtrListIterator<ClassOrNamespaceNameAST> nameIt( l );
while( nameIt.current() ){
AST* name = nameIt.current()->name();
scope.push_back( name->text() );
@@ -105,24 +105,24 @@ void scopeOfNode( AST* ast, QStringList& scope )
}
-QString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
+TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
{
if( !typeSpec )
- return QString::null;
+ return TQString::null;
- return typeSpec->text().replace( QRegExp(" :: "), "::" );
+ return typeSpec->text().replace( TQRegExp(" :: "), "::" );
}
-QString declaratorToString( DeclaratorAST* declarator, const QString& scope, bool skipPtrOp )
+TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp )
{
if( !declarator )
- return QString::null;
+ return TQString::null;
- QString text;
+ TQString text;
if( !skipPtrOp ){
- QPtrList<AST> ptrOpList = declarator->ptrOpList();
- for( QPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
+ TQPtrList<AST> ptrOpList = declarator->ptrOpList();
+ for( TQPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
text += it.current()->text();
}
text += ' ';
@@ -131,13 +131,13 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
text += scope;
if( declarator->subDeclarator() )
- text += QString::fromLatin1("(") + declaratorToString(declarator->subDeclarator()) + QString::fromLatin1(")");
+ text += TQString::fromLatin1("(") + declaratorToString(declarator->subDeclarator()) + TQString::fromLatin1(")");
if( declarator->declaratorId() )
text += declarator->declaratorId()->text();
- QPtrList<AST> arrays = declarator->arrayDimensionList();
- QPtrListIterator<AST> it( arrays );
+ TQPtrList<AST> arrays = declarator->arrayDimensionList();
+ TQPtrListIterator<AST> it( arrays );
while( it.current() ){
text += "[]";
++it;
@@ -148,11 +148,11 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
ParameterDeclarationListAST* l = declarator->parameterDeclarationClause()->parameterDeclarationList();
if( l != 0 ){
- QPtrList<ParameterDeclarationAST> params = l->parameterList();
- QPtrListIterator<ParameterDeclarationAST> it( params );
+ TQPtrList<ParameterDeclarationAST> params = l->parameterList();
+ TQPtrListIterator<ParameterDeclarationAST> it( params );
while( it.current() ){
- QString type = typeSpecToString( it.current()->typeSpec() );
+ TQString type = typeSpecToString( it.current()->typeSpec() );
text += type;
if( !type.isEmpty() )
text += ' ';
@@ -171,6 +171,6 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo
text += " const";
}
- return text.replace( QRegExp(" :: "), "::" ).simplifyWhiteSpace();
+ return text.replace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace();
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
index 187647b7..1e3c86e1 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h
@@ -12,7 +12,7 @@
#ifndef __ast_utils_h
#define __ast_utils_h
-#include <qstring.h>
+#include <tqstring.h>
class AST;
class DeclaratorAST;
@@ -22,8 +22,8 @@ class QStringList;
namespace KTextEditor{ class EditInterface; }
AST* findNodeAt( AST* unit, int line, int column );
-void scopeOfNode( AST* ast, QStringList& );
-QString typeSpecToString( TypeSpecifierAST* typeSpec );
-QString declaratorToString( DeclaratorAST* declarator, const QString& scope = QString::null, bool skipPtrOp=false );
+void scopeOfNode( AST* ast, TQStringList& );
+TQString typeSpecToString( TypeSpecifierAST* typeSpec );
+TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope = TQString::null, bool skipPtrOp=false );
#endif // __ast_utils_h
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
index e7d0b848..5763ec5e 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp
@@ -13,9 +13,9 @@
// own header
#include "cpptree2uml.h"
// qt/kde includes
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "ast_utils.h"
@@ -27,7 +27,7 @@
// FIXME The next include is motivated by template params
#include "../../template.h"
-CppTree2Uml::CppTree2Uml( const QString& fileName)
+CppTree2Uml::CppTree2Uml( const TQString& fileName)
: m_anon( 0 ), m_nsCnt( 0 ), m_clsCnt( 0 )
{
m_fileName = URLUtil::canonicalPath(fileName);
@@ -64,10 +64,10 @@ void CppTree2Uml::parseNamespace( NamespaceAST* ast )
return;
}
- QString nsName;
+ TQString nsName;
if( !ast->namespaceName() || ast->namespaceName()->text().isEmpty() ){
- QFileInfo fileInfo( m_fileName );
- QString shortFileName = fileInfo.baseName();
+ TQFileInfo fileInfo( m_fileName );
+ TQString shortFileName = fileInfo.baseName();
nsName.sprintf( "(%s_%d)", shortFileName.local8Bit().data(), m_anon++ );
} else {
@@ -100,7 +100,7 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast )
DeclaratorAST* oldDeclarator = m_currentDeclarator;
if( ast && ast->initDeclaratorList() && ast->initDeclaratorList()->initDeclaratorList().count() > 0 ) {
- QPtrList<InitDeclaratorAST> lst( ast->initDeclaratorList()->initDeclaratorList() );
+ TQPtrList<InitDeclaratorAST> lst( ast->initDeclaratorList()->initDeclaratorList() );
m_currentDeclarator = lst.at( 0 )->declarator();
}
@@ -115,18 +115,18 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast )
InitDeclaratorListAST* declarators = ast->initDeclaratorList();
if( typeSpec && declarators ){
- QString typeId;
+ TQString typeId;
if( typeSpec->name() )
typeId = typeSpec->name()->text();
- QPtrList<InitDeclaratorAST> l( declarators->initDeclaratorList() );
- QPtrListIterator<InitDeclaratorAST> it( l );
+ TQPtrList<InitDeclaratorAST> l( declarators->initDeclaratorList() );
+ TQPtrListIterator<InitDeclaratorAST> it( l );
InitDeclaratorAST* initDecl = 0;
while( 0 != (initDecl = it.current()) ){
- QString type, id;
+ TQString type, id;
if( initDecl->declarator() ){
type = typeOfDeclaration( typeSpec, initDecl->declarator() );
@@ -178,8 +178,8 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
TemplateParameterListAST* parmListAST = ast->templateParameterList();
if (parmListAST == NULL)
return;
- QPtrList<TemplateParameterAST> parmList = parmListAST->templateParameterList();
- for (QPtrListIterator<TemplateParameterAST> it(parmList); it.current(); ++it) {
+ TQPtrList<TemplateParameterAST> parmList = parmListAST->templateParameterList();
+ for (TQPtrListIterator<TemplateParameterAST> it(parmList); it.current(); ++it) {
// The template is either a typeParameter or a typeValueParameter.
TemplateParameterAST* tmplParmNode = it.current();
@@ -187,7 +187,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
if (typeParmNode) {
NameAST* nameNode = typeParmNode->name();
if (nameNode) {
- QString typeName = nameNode->unqualifiedName()->text();
+ TQString typeName = nameNode->unqualifiedName()->text();
Model_Utils::NameAndType nt(typeName, NULL);
m_templateParams.append(nt);
} else {
@@ -204,7 +204,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
<< " typeSpec is NULL" << endl;
continue;
}
- QString typeName = typeSpec->name()->text();
+ TQString typeName = typeSpec->name()->text();
UMLObject *t = Import_Utils::createUMLObject( Uml::ot_UMLObject, typeName,
m_currentNamespace[m_nsCnt] );
DeclaratorAST* declNode = valueNode->declarator();
@@ -214,7 +214,7 @@ void CppTree2Uml::parseTemplateDeclaration( TemplateDeclarationAST* ast )
<< " nameNode is NULL" << endl;
continue;
}
- QString paramName = nameNode->unqualifiedName()->text();
+ TQString paramName = nameNode->unqualifiedName()->text();
Model_Utils::NameAndType nt(paramName, t);
m_templateParams.append(nt);
}
@@ -235,9 +235,9 @@ void CppTree2Uml::parseSimpleDeclaration( SimpleDeclarationAST* ast )
parseTypeSpecifier( typeSpec );
if( declarators ){
- QPtrList<InitDeclaratorAST> l = declarators->initDeclaratorList();
+ TQPtrList<InitDeclaratorAST> l = declarators->initDeclaratorList();
- QPtrListIterator<InitDeclaratorAST> it( l );
+ TQPtrListIterator<InitDeclaratorAST> it( l );
while( it.current() ){
parseDeclaration( ast->functionSpecifier(), ast->storageSpecifier(), typeSpec, it.current() );
++it;
@@ -266,10 +266,10 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
bool isConstructor = false;
if( funSpec ){
- QPtrList<AST> l = funSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = funSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "virtual" ) isVirtual = true;
else if( text == "inline" ) isInline = true;
++it;
@@ -277,17 +277,17 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
}
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
}
}
- QString id = d->declaratorId()->unqualifiedName()->text().stripWhiteSpace();
+ TQString id = d->declaratorId()->unqualifiedName()->text().stripWhiteSpace();
UMLClassifier *c = m_currentClass[m_clsCnt];
if (c == NULL) {
@@ -296,7 +296,7 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast )
return;
}
- QString returnType = typeOfDeclaration( typeSpec, d );
+ TQString returnType = typeOfDeclaration( typeSpec, d );
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
@@ -323,17 +323,17 @@ void CppTree2Uml::parseClassSpecifier( ClassSpecifierAST* ast )
bool oldInSlots = m_inSlots;
bool oldInSignals = m_inSignals;
- QString kind = ast->classKey()->text();
+ TQString kind = ast->classKey()->text();
m_currentAccess=Uml::Visibility::fromString(kind);
m_inSlots = false;
m_inSignals = false;
- QString className;
+ TQString className;
if( !ast->name() && m_currentDeclarator && m_currentDeclarator->declaratorId() ) {
className = m_currentDeclarator->declaratorId()->text().stripWhiteSpace();
} else if( !ast->name() ){
- QFileInfo fileInfo( m_fileName );
- QString shortFileName = fileInfo.baseName();
+ TQFileInfo fileInfo( m_fileName );
+ TQString shortFileName = fileInfo.baseName();
className.sprintf( "(%s_%d)", shortFileName.local8Bit().data(), m_anon++ );
} else {
className = ast->name()->unqualifiedName()->text().stripWhiteSpace();
@@ -341,13 +341,13 @@ void CppTree2Uml::parseClassSpecifier( ClassSpecifierAST* ast )
//#ifdef DEBUG_CPPTREE2UML
kDebug() << "CppTree2Uml::parseClassSpecifier: name=" << className << endl;
//#endif
- if( !scopeOfName( ast->name(), QStringList() ).isEmpty() ){
+ if( !scopeOfName( ast->name(), TQStringList() ).isEmpty() ){
kDebug() << "skip private class declarations" << endl;
return;
}
if (className.isEmpty()) {
- className = "anon_" + QString::number(m_anon);
+ className = "anon_" + TQString::number(m_anon);
m_anon++;
}
UMLObject * o = Import_Utils::createUMLObject( Uml::ot_Class, className,
@@ -387,17 +387,17 @@ void CppTree2Uml::parseEnumSpecifier( EnumSpecifierAST* ast )
NameAST *nameNode = ast->name();
if (nameNode == NULL)
return; // skip constants
- QString typeName = nameNode->unqualifiedName()->text().stripWhiteSpace();
+ TQString typeName = nameNode->unqualifiedName()->text().stripWhiteSpace();
if (typeName.isEmpty())
return; // skip constants
UMLObject *o = Import_Utils::createUMLObject( Uml::ot_Enum, typeName,
m_currentNamespace[m_nsCnt],
ast->comment() );
- QPtrList<EnumeratorAST> l = ast->enumeratorList();
- QPtrListIterator<EnumeratorAST> it( l );
+ TQPtrList<EnumeratorAST> l = ast->enumeratorList();
+ TQPtrListIterator<EnumeratorAST> it( l );
while ( it.current() ) {
- QString enumLiteral = it.current()->id()->text();
+ TQString enumLiteral = it.current()->id()->text();
Import_Utils::addEnumLiteral( (UMLEnum*)o, enumLiteral );
++it;
}
@@ -409,9 +409,9 @@ void CppTree2Uml::parseElaboratedTypeSpecifier( ElaboratedTypeSpecifierAST* type
/// @todo Refine - Currently only handles class forward declarations.
/// - Using typeSpec->text() is probably not good, decode
/// the kind() instead.
- QString text = typeSpec->text();
+ TQString text = typeSpec->text();
kDebug() << "CppTree2Uml::parseElaboratedTypeSpecifier: text is " << text << endl;
- text.remove(QRegExp("^class\\s+"));
+ text.remove(TQRegExp("^class\\s+"));
UMLObject *o = Import_Utils::createUMLObject(Uml::ot_Class, text, m_currentNamespace[m_nsCnt]);
flushTemplateParams( static_cast<UMLClassifier*>(o) );
}
@@ -434,11 +434,11 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
while( t && t->subDeclarator() )
t = t->subDeclarator();
- QString id;
+ TQString id;
if( t && t->declaratorId() && t->declaratorId()->unqualifiedName() )
id = t->declaratorId()->unqualifiedName()->text();
- if( !scopeOfDeclarator(d, QStringList()).isEmpty() ){
+ if( !scopeOfDeclarator(d, TQStringList()).isEmpty() ){
kDebug() << "CppTree2Uml::parseDeclaration (" << id << "): skipping."
<< endl;
return;
@@ -451,16 +451,16 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
return;
}
- QString typeName = typeOfDeclaration( typeSpec, d );
+ TQString typeName = typeOfDeclaration( typeSpec, d );
bool isFriend = false;
bool isStatic = false;
//bool isInitialized = decl->initializer() != 0;
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
@@ -474,9 +474,9 @@ void CppTree2Uml::parseDeclaration( GroupAST* funSpec, GroupAST* storageSpec,
void CppTree2Uml::parseAccessDeclaration( AccessDeclarationAST * access )
{
- QPtrList<AST> l = access->accessList();
+ TQPtrList<AST> l = access->accessList();
- QString accessStr = l.at( 0 )->text();
+ TQString accessStr = l.at( 0 )->text();
m_currentAccess=Uml::Visibility::fromString(accessStr);
@@ -495,10 +495,10 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
bool isConstructor = false;
if( funSpec ){
- QPtrList<AST> l = funSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = funSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "virtual" ) isVirtual = true;
else if( text == "inline" ) isInline = true;
++it;
@@ -506,10 +506,10 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
}
if( storageSpec ){
- QPtrList<AST> l = storageSpec->nodeList();
- QPtrListIterator<AST> it( l );
+ TQPtrList<AST> l = storageSpec->nodeList();
+ TQPtrListIterator<AST> it( l );
while( it.current() ){
- QString text = it.current()->text();
+ TQString text = it.current()->text();
if( text == "friend" ) isFriend = true;
else if( text == "static" ) isStatic = true;
++it;
@@ -517,7 +517,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
}
DeclaratorAST* d = decl->declarator();
- QString id = d->declaratorId()->unqualifiedName()->text();
+ TQString id = d->declaratorId()->unqualifiedName()->text();
UMLClassifier *c = m_currentClass[m_clsCnt];
if (c == NULL) {
@@ -526,7 +526,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag
return;
}
- QString returnType = typeOfDeclaration( typeSpec, d );
+ TQString returnType = typeOfDeclaration( typeSpec, d );
UMLOperation *m = Import_Utils::makeOperation(c, id);
// if a class has no return type, it could be a constructor or
// a destructor
@@ -546,17 +546,17 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator,
if( clause && clause->parameterDeclarationList() ){
ParameterDeclarationListAST* params = clause->parameterDeclarationList();
- QPtrList<ParameterDeclarationAST> l( params->parameterList() );
- QPtrListIterator<ParameterDeclarationAST> it( l );
+ TQPtrList<ParameterDeclarationAST> l( params->parameterList() );
+ TQPtrListIterator<ParameterDeclarationAST> it( l );
while( it.current() ){
ParameterDeclarationAST* param = it.current();
++it;
- QString name;
+ TQString name;
if (param->declarator())
- name = declaratorToString(param->declarator(), QString::null, true );
+ name = declaratorToString(param->declarator(), TQString::null, true );
- QString tp = typeOfDeclaration( param->typeSpec(), param->declarator() );
+ TQString tp = typeOfDeclaration( param->typeSpec(), param->declarator() );
if (tp != "void")
Import_Utils::addMethodParameter( method, tp, name );
@@ -564,17 +564,17 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator,
}
}
-QString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator )
+TQString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator )
{
if( !typeSpec || !declarator )
- return QString::null;
+ return TQString::null;
- QString text;
+ TQString text;
text += typeSpec->text();
- QPtrList<AST> ptrOpList = declarator->ptrOpList();
- for( QPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
+ TQPtrList<AST> ptrOpList = declarator->ptrOpList();
+ for( TQPtrListIterator<AST> it(ptrOpList); it.current(); ++it ){
text += it.current()->text();
}
@@ -583,8 +583,8 @@ QString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAS
void CppTree2Uml::parseBaseClause( BaseClauseAST * baseClause, UMLClassifier* klass )
{
- QPtrList<BaseSpecifierAST> l = baseClause->baseSpecifierList();
- QPtrListIterator<BaseSpecifierAST> it( l );
+ TQPtrList<BaseSpecifierAST> l = baseClause->baseSpecifierList();
+ TQPtrListIterator<BaseSpecifierAST> it( l );
while( it.current() ){
BaseSpecifierAST* baseSpecifier = it.current();
++it;
@@ -595,19 +595,19 @@ void CppTree2Uml::parseBaseClause( BaseClauseAST * baseClause, UMLClassifier* kl
continue;
}
- QString baseName = baseSpecifier->name()->text();
+ TQString baseName = baseSpecifier->name()->text();
Import_Utils::createGeneralization( klass, baseName );
}
}
-QStringList CppTree2Uml::scopeOfName( NameAST* id, const QStringList& startScope )
+TQStringList CppTree2Uml::scopeOfName( NameAST* id, const TQStringList& startScope )
{
- QStringList scope = startScope;
+ TQStringList scope = startScope;
if( id && id->classOrNamespaceNameList().count() ){
if( id->isGlobal() )
scope.clear();
- QPtrList<ClassOrNamespaceNameAST> l = id->classOrNamespaceNameList();
- QPtrListIterator<ClassOrNamespaceNameAST> it( l );
+ TQPtrList<ClassOrNamespaceNameAST> l = id->classOrNamespaceNameList();
+ TQPtrListIterator<ClassOrNamespaceNameAST> it( l );
while( it.current() ){
if( it.current()->name() ){
scope << it.current()->name()->text();
@@ -619,7 +619,7 @@ QStringList CppTree2Uml::scopeOfName( NameAST* id, const QStringList& startScope
return scope;
}
-QStringList CppTree2Uml::scopeOfDeclarator( DeclaratorAST* d, const QStringList& startScope )
+TQStringList CppTree2Uml::scopeOfDeclarator( DeclaratorAST* d, const TQStringList& startScope )
{
return scopeOfName( d->declaratorId(), startScope );
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
index b9791372..7248c782 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h
@@ -13,7 +13,7 @@
#define CPPTREE2UML_H
#include "tree_parser.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "../../model_utils.h"
// fwd decls
@@ -24,7 +24,7 @@ class UMLPackage;
class CppTree2Uml: public TreeParser
{
public:
- CppTree2Uml( const QString& fileName);
+ CppTree2Uml( const TQString& fileName);
virtual ~CppTree2Uml();
//FileDom file() { return m_file; }
@@ -60,11 +60,11 @@ public:
virtual void parseBaseClause( BaseClauseAST* baseClause, UMLClassifier* klass );
private:
- //NamespaceDom findOrInsertNamespace( NamespaceAST* ast, const QString& name );
+ //NamespaceDom findOrInsertNamespace( NamespaceAST* ast, const TQString& name );
- QString typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator );
- QStringList scopeOfName( NameAST* id, const QStringList& scope );
- QStringList scopeOfDeclarator( DeclaratorAST* d, const QStringList& scope );
+ TQString typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator );
+ TQStringList scopeOfName( NameAST* id, const TQStringList& scope );
+ TQStringList scopeOfDeclarator( DeclaratorAST* d, const TQStringList& scope );
/**
* Flush template parameters pending in m_templateParams to the klass.
*/
@@ -72,15 +72,15 @@ private:
private:
//FileDom m_file;
- QString m_fileName;
- QStringList m_currentScope;
+ TQString m_fileName;
+ TQStringList m_currentScope;
Uml::Visibility m_currentAccess;
bool m_inSlots;
bool m_inSignals;
int m_anon;
bool m_inStorageSpec;
bool m_inTypedef;
- QString m_comment;
+ TQString m_comment;
Model_Utils::NameAndType_List m_templateParams;
DeclaratorAST* m_currentDeclarator;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
index ac626c00..1a804c81 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp
@@ -22,29 +22,29 @@
#include "parser.h"
#include <kdebug.h>
#include <stdlib.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
class DefaultSourceProvider: public SourceProvider
{
public:
DefaultSourceProvider() {}
- virtual QString contents( const QString& fileName )
+ virtual TQString contents( const TQString& fileName )
{
- QString source;
+ TQString source;
- QFile f( fileName );
+ TQFile f( fileName );
if( f.open(IO_ReadOnly) ){
- QTextStream s( &f );
+ TQTextStream s( &f );
source = s.read();
f.close();
}
return source;
}
- virtual bool isModified( const QString& fileName )
+ virtual bool isModified( const TQString& fileName )
{
Q_UNUSED( fileName );
return true;
@@ -94,13 +94,13 @@ void Driver::reset( )
}
}
-void Driver::remove( const QString & fileName )
+void Driver::remove( const TQString & fileName )
{
m_dependences.remove( fileName );
m_problems.remove( fileName );
removeAllMacrosInFile( fileName );
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
if( it != m_parsedUnits.end() ){
TranslationUnitAST* unit = *it;
m_parsedUnits.remove( it );
@@ -108,9 +108,9 @@ void Driver::remove( const QString & fileName )
}
}
-void Driver::removeAllMacrosInFile( const QString& fileName )
+void Driver::removeAllMacrosInFile( const TQString& fileName )
{
- QMap<QString, Macro>::Iterator it = m_macros.begin();
+ TQMap<TQString, Macro>::Iterator it = m_macros.begin();
while( it != m_macros.end() ){
Macro m = *it++;
if( m.fileName() == fileName )
@@ -118,38 +118,38 @@ void Driver::removeAllMacrosInFile( const QString& fileName )
}
}
-TranslationUnitAST::Node Driver::takeTranslationUnit( const QString& fileName )
+TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName )
{
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName );
TranslationUnitAST::Node unit( *it );
//m_parsedUnits.remove( it );
m_parsedUnits[ fileName] = 0;
return unit;
}
-TranslationUnitAST* Driver::translationUnit( const QString& fileName ) const
+TranslationUnitAST* Driver::translationUnit( const TQString& fileName ) const
{
- QMap<QString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName );
+ TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName );
return it != m_parsedUnits.end() ? *it : 0;
}
-void Driver::addDependence( const QString & fileName, const Dependence & dep )
+void Driver::addDependence( const TQString & fileName, const Dependence & dep )
{
- QFileInfo fileInfo( dep.first );
- QString fn = fileInfo.absFilePath();
+ TQFileInfo fileInfo( dep.first );
+ TQString fn = fileInfo.absFilePath();
if ( !depresolv ){
findOrInsertDependenceList( fileName ).insert( fn, dep );
return;
}
- QString file = findIncludeFile( dep );
+ TQString file = findIncludeFile( dep );
findOrInsertDependenceList( fileName ).insert( file, dep );
if ( m_parsedUnits.find(file) != m_parsedUnits.end() )
return;
- if ( !QFile::exists( file ) ) {
+ if ( !TQFile::exists( file ) ) {
Problem p( "Couldn't find include file " + dep.first,
lexer ? lexer->currentLine() : -1,
lexer ? lexer->currentColumn() : -1 );
@@ -157,7 +157,7 @@ void Driver::addDependence( const QString & fileName, const Dependence & dep )
return;
}
- QString cfn = m_currentFileName;
+ TQString cfn = m_currentFileName;
Lexer *l = lexer;
parseFile( file );
m_currentFileName = cfn;
@@ -169,60 +169,60 @@ void Driver::addMacro( const Macro & macro )
m_macros.insert( macro.name(), macro );
}
-void Driver::addProblem( const QString & fileName, const Problem & problem )
+void Driver::addProblem( const TQString & fileName, const Problem & problem )
{
findOrInsertProblemList( fileName ).append( problem );
}
-QMap< QString, Dependence >& Driver::findOrInsertDependenceList( const QString & fileName )
+TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQString & fileName )
{
- QMap<QString, QMap<QString, Dependence> >::Iterator it = m_dependences.find( fileName );
+ TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
- QMap<QString, Dependence> l;
+ TQMap<TQString, Dependence> l;
m_dependences.insert( fileName, l );
return m_dependences[ fileName ];
}
-QValueList < Problem >& Driver::findOrInsertProblemList( const QString & fileName )
+TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName )
{
- QMap<QString, QValueList<Problem> >::Iterator it = m_problems.find( fileName );
+ TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
- QValueList<Problem> l;
+ TQValueList<Problem> l;
m_problems.insert( fileName, l );
return m_problems[ fileName ];
}
-QMap< QString, Dependence > Driver::dependences( const QString & fileName ) const
+TQMap< TQString, Dependence > Driver::dependences( const TQString & fileName ) const
{
- QMap<QString, QMap<QString, Dependence> >::ConstIterator it = m_dependences.find( fileName );
+ TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.find( fileName );
if( it != m_dependences.end() )
return it.data();
- return QMap<QString, Dependence>();
+ return TQMap<TQString, Dependence>();
}
-QMap< QString, Macro > Driver::macros() const
+TQMap< TQString, Macro > Driver::macros() const
{
return m_macros;
}
-QValueList < Problem > Driver::problems( const QString & fileName ) const
+TQValueList < Problem > Driver::problems( const TQString & fileName ) const
{
- QMap<QString, QValueList<Problem> >::ConstIterator it = m_problems.find( fileName );
+ TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName );
if( it != m_problems.end() )
return it.data();
- return QValueList<Problem>();
+ return TQValueList<Problem>();
}
-void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force )
+void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool force )
{
- QFileInfo fileInfo( fileName );
- QString absFilePath = fileInfo.absFilePath();
+ TQFileInfo fileInfo( fileName );
+ TQString absFilePath = fileInfo.absFilePath();
- QMap<QString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath );
+ TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath );
if( force && it != m_parsedUnits.end() ){
takeTranslationUnit( absFilePath );
@@ -252,7 +252,7 @@ void Driver::parseFile( const QString& fileName, bool onlyPreProcess, bool force
fileParsed( fileName );
}
- m_currentFileName = QString::null;
+ m_currentFileName = TQString::null;
lexer = 0;
}
@@ -385,37 +385,37 @@ void Driver::setupParser( Parser * parser )
Q_UNUSED( parser );
}
-void Driver::removeMacro( const QString& macroName )
+void Driver::removeMacro( const TQString& macroName )
{
m_macros.remove( macroName );
}
-void Driver::addIncludePath( const QString &path )
+void Driver::addIncludePath( const TQString &path )
{
if( !path.stripWhiteSpace().isEmpty() )
m_includePaths << path;
}
-QString Driver::findIncludeFile( const Dependence& dep ) const
+TQString Driver::findIncludeFile( const Dependence& dep ) const
{
- QString fileName = dep.first;
+ TQString fileName = dep.first;
if( dep.second == Dep_Local ){
- QString path = QFileInfo( currentFileName() ).dirPath( true );
- QFileInfo fileInfo( QFileInfo(path, fileName) );
+ TQString path = TQFileInfo( currentFileName() ).dirPath( true );
+ TQFileInfo fileInfo( TQFileInfo(path, fileName) );
if ( fileInfo.exists() && fileInfo.isFile() )
return fileInfo.absFilePath();
}
- QStringList::ConstIterator end(m_includePaths.end());
- for ( QStringList::ConstIterator it(m_includePaths.begin()); it != end; ++it ) {
- QFileInfo fileInfo( *it, fileName );
+ TQStringList::ConstIterator end(m_includePaths.end());
+ for ( TQStringList::ConstIterator it(m_includePaths.begin()); it != end; ++it ) {
+ TQFileInfo fileInfo( *it, fileName );
if ( fileInfo.exists() && fileInfo.isFile() )
return fileInfo.absFilePath();
}
- return QString::null;
+ return TQString::null;
}
void Driver::setResolveDependencesEnabled( bool enabled )
@@ -429,7 +429,7 @@ void Driver::setupPreProcessor()
{
}
-void Driver::fileParsed( const QString & fileName )
+void Driver::fileParsed( const TQString & fileName )
{
Q_UNUSED( fileName );
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.h b/umbrello/umbrello/codeimport/kdevcppparser/driver.h
index f6e9f100..6c53a939 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/driver.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.h
@@ -22,10 +22,10 @@
#include "ast.h"
-#include <qpair.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqpair.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
class Lexer;
class Parser;
@@ -46,7 +46,7 @@ public:
Problem( const Problem& source )
: m_text( source.m_text ), m_line( source.m_line ),
m_column( source.m_column ), m_level( source.m_level ) {}
- Problem( const QString& text, int line, int column, int level=Level_Error )
+ Problem( const TQString& text, int line, int column, int level=Level_Error )
: m_text( text ), m_line( line ), m_column( column ), m_level(level) {}
Problem& operator = ( const Problem& source )
@@ -63,13 +63,13 @@ public:
return m_text == p.m_text && m_line == p.m_line && m_column == p.m_column && m_level == p.m_level;
}
- QString text() const { return m_text; }
+ TQString text() const { return m_text; }
int line() const { return m_line; }
int column() const { return m_column; }
int level() const { return m_level; }
private:
- QString m_text;
+ TQString m_text;
int m_line;
int m_column;
int m_level;
@@ -81,16 +81,16 @@ enum
Dep_Local
};
-typedef QPair<QString, int> Dependence;
+typedef QPair<TQString, int> Dependence;
class Macro
{
public:
- typedef QString Argument;
+ typedef TQString Argument;
public:
Macro( bool hasArguments = false ): m_hasArguments( hasArguments ) {}
- Macro( const QString &n, const QString &b ) : m_name( n ), m_body( b ), m_hasArguments( false ) {}
+ Macro( const TQString &n, const TQString &b ) : m_name( n ), m_body( b ), m_hasArguments( false ) {}
Macro( const Macro& source )
: m_name( source.m_name),
@@ -119,29 +119,29 @@ public:
m_argumentList == source.m_argumentList;
}
- QString name() const { return m_name; }
- void setName( const QString& name ) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setName( const TQString& name ) { m_name = name; }
- QString fileName() const { return m_fileName; }
- void setFileName( const QString& fileName ) { m_fileName = fileName; }
+ TQString fileName() const { return m_fileName; }
+ void setFileName( const TQString& fileName ) { m_fileName = fileName; }
- QString body() const { return m_body; }
- void setBody( const QString& body ) { m_body = body; }
+ TQString body() const { return m_body; }
+ void setBody( const TQString& body ) { m_body = body; }
bool hasArguments() const { return m_hasArguments; }
void setHasArguments( bool hasArguments ) { m_hasArguments = hasArguments; }
- QValueList<Argument> argumentList() const { return m_argumentList; }
+ TQValueList<Argument> argumentList() const { return m_argumentList; }
void clearArgumentList() { m_argumentList.clear(); m_hasArguments = false; }
void addArgument( const Argument& argument ) { m_argumentList << argument; }
- void addArgumentList( const QValueList<Argument>& arguments ) { m_argumentList += arguments; }
+ void addArgumentList( const TQValueList<Argument>& arguments ) { m_argumentList += arguments; }
private:
- QString m_name;
- QString m_fileName;
- QString m_body;
+ TQString m_name;
+ TQString m_fileName;
+ TQString m_body;
bool m_hasArguments;
- QValueList<Argument> m_argumentList;
+ TQValueList<Argument> m_argumentList;
};
class SourceProvider
@@ -150,8 +150,8 @@ public:
SourceProvider() {}
virtual ~SourceProvider() {}
- virtual QString contents( const QString& fileName ) = 0;
- virtual bool isModified( const QString& fileName ) = 0;
+ virtual TQString contents( const TQString& fileName ) = 0;
+ virtual bool isModified( const TQString& fileName ) = 0;
private:
SourceProvider( const SourceProvider& source );
@@ -169,34 +169,34 @@ public:
virtual void reset();
- virtual void parseFile( const QString& fileName, bool onlyPreProcesss=false, bool force=false );
- virtual void fileParsed( const QString& fileName );
- virtual void remove( const QString& fileName );
+ virtual void parseFile( const TQString& fileName, bool onlyPreProcesss=false, bool force=false );
+ virtual void fileParsed( const TQString& fileName );
+ virtual void remove( const TQString& fileName );
- virtual void addDependence( const QString& fileName, const Dependence& dep );
+ virtual void addDependence( const TQString& fileName, const Dependence& dep );
virtual void addMacro( const Macro& macro );
- virtual void addProblem( const QString& fileName, const Problem& problem );
+ virtual void addProblem( const TQString& fileName, const Problem& problem );
- QString currentFileName() const { return m_currentFileName; }
- TranslationUnitAST::Node takeTranslationUnit( const QString& fileName );
- TranslationUnitAST* translationUnit( const QString& fileName ) const;
- QMap<QString, Dependence> dependences( const QString& fileName ) const;
- QMap<QString, Macro> macros() const;
- QValueList<Problem> problems( const QString& fileName ) const;
+ TQString currentFileName() const { return m_currentFileName; }
+ TranslationUnitAST::Node takeTranslationUnit( const TQString& fileName );
+ TranslationUnitAST* translationUnit( const TQString& fileName ) const;
+ TQMap<TQString, Dependence> dependences( const TQString& fileName ) const;
+ TQMap<TQString, Macro> macros() const;
+ TQValueList<Problem> problems( const TQString& fileName ) const;
- bool hasMacro( const QString& name ) const { return m_macros.contains( name ); }
- const Macro& macro( const QString& name ) const { return m_macros[ name ]; }
- Macro& macro( const QString& name ) { return m_macros[ name ]; }
+ bool hasMacro( const TQString& name ) const { return m_macros.contains( name ); }
+ const Macro& macro( const TQString& name ) const { return m_macros[ name ]; }
+ Macro& macro( const TQString& name ) { return m_macros[ name ]; }
- virtual void removeMacro( const QString& macroName );
- virtual void removeAllMacrosInFile( const QString& fileName );
+ virtual void removeMacro( const TQString& macroName );
+ virtual void removeAllMacrosInFile( const TQString& fileName );
- QStringList includePaths() const { return m_includePaths; }
- virtual void addIncludePath( const QString &path );
+ TQStringList includePaths() const { return m_includePaths; }
+ virtual void addIncludePath( const TQString &path );
/// @todo remove
- const QMap<QString, TranslationUnitAST*> &parsedUnits() const { return m_parsedUnits; }
+ const TQMap<TQString, TranslationUnitAST*> &parsedUnits() const { return m_parsedUnits; }
virtual void setResolveDependencesEnabled( bool enabled );
bool isResolveDependencesEnabled() const { return depresolv; }
@@ -207,17 +207,17 @@ protected:
virtual void setupPreProcessor();
private:
- QMap<QString, Dependence>& findOrInsertDependenceList( const QString& fileName );
- QValueList<Problem>& findOrInsertProblemList( const QString& fileName );
- QString findIncludeFile( const Dependence& dep ) const;
+ TQMap<TQString, Dependence>& findOrInsertDependenceList( const TQString& fileName );
+ TQValueList<Problem>& findOrInsertProblemList( const TQString& fileName );
+ TQString findIncludeFile( const Dependence& dep ) const;
private:
- QString m_currentFileName;
- QMap< QString, QMap<QString, Dependence> > m_dependences;
- QMap<QString, Macro> m_macros;
- QMap< QString, QValueList<Problem> > m_problems;
- QMap<QString, TranslationUnitAST*> m_parsedUnits;
- QStringList m_includePaths;
+ TQString m_currentFileName;
+ TQMap< TQString, TQMap<TQString, Dependence> > m_dependences;
+ TQMap<TQString, Macro> m_macros;
+ TQMap< TQString, TQValueList<Problem> > m_problems;
+ TQMap<TQString, TranslationUnitAST*> m_parsedUnits;
+ TQStringList m_includePaths;
uint depresolv : 1;
Lexer *lexer;
SourceProvider* m_sourceProvider;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/errors.h b/umbrello/umbrello/codeimport/kdevcppparser/errors.h
index 813d3a3f..6751475e 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/errors.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/errors.h
@@ -20,15 +20,15 @@
#ifndef ERRORS_H
#define ERRORS_H
-#include <qstring.h>
+#include <tqstring.h>
struct Error{
int code;
int level;
- QString text;
+ TQString text;
- Error( int c, int l, const QString& s )
+ Error( int c, int l, const TQString& s )
: code( c ), level( l ), text( s )
{}
};
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
index 68dd2e6f..11b326f6 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp
@@ -24,12 +24,12 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqregexp.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#if defined( KDEVELOP_BGPARSER )
-#include <qthread.h>
+#include <tqthread.h>
class KDevTread: public QThread
{
@@ -54,8 +54,8 @@ using namespace std;
struct LexerData
{
- typedef QMap<QString, QString> Scope;
- typedef QValueList<Scope> StaticChain;
+ typedef TQMap<TQString, TQString> Scope;
+ typedef TQValueList<Scope> StaticChain;
StaticChain staticChain;
@@ -70,13 +70,13 @@ struct LexerData
staticChain.pop_front();
}
- void bind( const QString& name, const QString& value )
+ void bind( const TQString& name, const TQString& value )
{
Q_ASSERT( staticChain.size() > 0 );
staticChain.front().insert( name, value );
}
- bool hasBind( const QString& name ) const
+ bool hasBind( const TQString& name ) const
{
StaticChain::ConstIterator it = staticChain.begin();
while( it != staticChain.end() ){
@@ -90,7 +90,7 @@ struct LexerData
return false;
}
- QString apply( const QString& name ) const
+ TQString apply( const TQString& name ) const
{
StaticChain::ConstIterator it = staticChain.begin();
while( it != staticChain.end() ){
@@ -101,7 +101,7 @@ struct LexerData
return scope[ name ];
}
- return QString::null;
+ return TQString::null;
}
};
@@ -127,7 +127,7 @@ Lexer::~Lexer()
delete( d );
}
-void Lexer::setSource( const QString& source )
+void Lexer::setSource( const TQString& source )
{
reset();
m_source = source;
@@ -143,7 +143,7 @@ void Lexer::reset()
m_index = 0;
m_size = 0;
m_tokens.clear();
- m_source = QString::null;
+ m_source = TQString::null;
m_ptr = 0;
m_endPtr = 0;
m_startLine = false;
@@ -160,12 +160,12 @@ void Lexer::reset()
// ### should all be done with a "long" type IMO
int Lexer::toInt( const Token& token )
{
- QString s = token.text();
+ TQString s = token.text();
if( token.type() == Token_number_literal ){
// hex literal ?
if( s[0] == '0' && (s[1] == 'x' || s[1] == 'X'))
return s.mid( 2 ).toInt( 0, 16 );
- QString n;
+ TQString n;
int i = 0;
while( i < int(s.length()) && s[i].isDigit() )
n += s[i++];
@@ -211,8 +211,8 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
int startLine = m_currentLine;
int startColumn = m_currentColumn;
- QChar ch = currentChar();
- QChar ch1 = peekChar();
+ TQChar ch = currentChar();
+ TQChar ch1 = peekChar();
if( ch.isNull() || ch.isSpace() ){
/* skip */
@@ -224,7 +224,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
int start = currentPosition();
readIdentifier(); // read the directive
- QString directive = m_source.mid( start, currentPosition() - start );
+ TQString directive = m_source.mid( start, currentPosition() - start );
handleDirective( directive );
} else if( m_startLine && m_skipping[ m_ifLevel ] ){
@@ -272,7 +272,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
} else if( ch.isLetter() || ch == '_' ){
int start = currentPosition();
readIdentifier();
- QString ide = m_source.mid( start, currentPosition() - start );
+ TQString ide = m_source.mid( start, currentPosition() - start );
int k = Lookup::find( &keyword, ide );
if( m_preprocessorEnabled && m_driver->hasMacro(ide) &&
(k == -1 || !m_driver->macro(ide).body().isEmpty()) ){
@@ -290,7 +290,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
Macro m = m_driver->macro( ide );
//m_driver->removeMacro( m.name() );
- QString ellipsisArg;
+ TQString ellipsisArg;
if( m.hasArguments() ){
int endIde = currentPosition();
@@ -303,11 +303,11 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
while( currentChar() && argIdx<argCount ){
readWhiteSpaces();
- QString argName = m.argumentList()[ argIdx ];
+ TQString argName = m.argumentList()[ argIdx ];
bool ellipsis = argName == "...";
- QString arg = readArgument();
+ TQString arg = readArgument();
if( !ellipsis )
d->bind( argName, arg );
@@ -352,7 +352,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
// tokenize the macro body
- QString textToInsert;
+ TQString textToInsert;
m_endPtr = currentPosition() + m.body().length();
while( currentChar() ){
@@ -371,24 +371,24 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
if( tok == Token_eof )
break;
- QString tokText = tok.text();
- QString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText;
+ TQString tokText = tok.text();
+ TQString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText;
if( str == ide ){
//Problem p( i18n("unsafe use of macro '%1'").arg(ide), m_currentLine, m_currentColumn );
//m_driver->addProblem( m_driver->currentFileName(), p );
m_driver->removeMacro( ide );
- // str = QString::null;
+ // str = TQString::null;
}
if( stringify ) {
- textToInsert.append( QString::fromLatin1("\"") + str + QString::fromLatin1("\" ") );
+ textToInsert.append( TQString::fromLatin1("\"") + str + TQString::fromLatin1("\" ") );
} else if( merge ){
textToInsert.truncate( textToInsert.length() - 1 );
textToInsert.append( str );
} else if( tok == Token_ellipsis && d->hasBind("...") ){
textToInsert.append( ellipsisArg );
} else {
- textToInsert.append( str + QString::fromLatin1(" ") );
+ textToInsert.append( str + TQString::fromLatin1(" ") );
}
}
@@ -408,7 +408,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
tk.setStartPosition( startLine, startColumn );
tk.setEndPosition( m_currentLine, m_currentColumn );
} else if( m_skipWordsEnabled ){
- QMap< QString, QPair<SkipType, QString> >::Iterator pos = m_words.find( ide );
+ TQMap< TQString, QPair<SkipType, TQString> >::Iterator pos = m_words.find( ide );
if( pos != m_words.end() ){
if( (*pos).first == SkipWordAndArguments ){
readWhiteSpaces();
@@ -419,7 +419,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline )
#if defined( KDEVELOP_BGPARSER )
qthread_yield();
#endif
- m_source.insert( currentPosition(), QString(" ") + (*pos).second + QString(" ") );
+ m_source.insert( currentPosition(), TQString(" ") + (*pos).second + TQString(" ") );
m_endPtr = m_source.length();
}
} else if( /*qt_rx.exactMatch(ide) ||*/
@@ -502,7 +502,7 @@ void Lexer::resetSkipWords()
m_words.clear();
}
-void Lexer::addSkipWord( const QString& word, SkipType skipType, const QString& str )
+void Lexer::addSkipWord( const TQString& word, SkipType skipType, const TQString& str )
{
m_words[ word ] = qMakePair( skipType, str );
}
@@ -531,17 +531,17 @@ void Lexer::skip( int l, int r )
m_currentColumn = svCurrentColumn;
}
-QString Lexer::readArgument()
+TQString Lexer::readArgument()
{
int count = 0;
- QString arg;
+ TQString arg;
readWhiteSpaces();
while( currentChar() ){
readWhiteSpaces();
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch.isNull() || (!count && (ch == ',' || ch == ')')) )
break;
@@ -562,7 +562,7 @@ QString Lexer::readArgument()
return arg.stripWhiteSpace();
}
-void Lexer::handleDirective( const QString& directive )
+void Lexer::handleDirective( const TQString& directive )
{
m_inPreproc = true;
@@ -623,7 +623,7 @@ int Lexer::macroDefined()
readWhiteSpaces( false );
int startWord = currentPosition();
readIdentifier();
- QString word = m_source.mid( startWord, currentPosition() - startWord );
+ TQString word = m_source.mid( startWord, currentPosition() - startWord );
bool r = m_driver->hasMacro( word );
return r;
@@ -636,7 +636,7 @@ void Lexer::processDefine( Macro& m )
int startMacroName = currentPosition();
readIdentifier();
- QString macroName = m_source.mid( startMacroName, int(currentPosition()-startMacroName) );
+ TQString macroName = m_source.mid( startMacroName, int(currentPosition()-startMacroName) );
m_driver->removeMacro( macroName );
m.setName( macroName );
@@ -656,7 +656,7 @@ void Lexer::processDefine( Macro& m )
else
readIdentifier();
- QString arg = m_source.mid( startArg, int(currentPosition()-startArg) );
+ TQString arg = m_source.mid( startArg, int(currentPosition()-startArg) );
m.addArgument( Macro::Argument(arg) );
@@ -673,7 +673,7 @@ void Lexer::processDefine( Macro& m )
setPreprocessorEnabled( true );
- QString body;
+ TQString body;
while( currentChar() && currentChar() != '\n' ){
if( currentChar().isSpace() ){
@@ -685,7 +685,7 @@ void Lexer::processDefine( Macro& m )
nextToken( tk, true );
if( tk.type() != -1 ){
- QString s = tk.text();
+ TQString s = tk.text();
body += s;
}
}
@@ -777,16 +777,16 @@ void Lexer::processInclude()
readWhiteSpaces( false );
if( currentChar() ){
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch == '"' || ch == '<' ){
nextChar();
- QChar ch2 = ch == QChar('"') ? QChar('"') : QChar('>');
+ TQChar ch2 = ch == TQChar('"') ? TQChar('"') : TQChar('>');
int startWord = currentPosition();
while( currentChar() && currentChar() != ch2 )
nextChar();
if( currentChar() ){
- QString word = m_source.mid( startWord, int(currentPosition()-startWord) );
+ TQString word = m_source.mid( startWord, int(currentPosition()-startWord) );
m_driver->addDependence( m_driver->currentFileName(),
Dependence(word, ch == '"' ? Dep_Local : Dep_Global) );
nextChar();
@@ -800,7 +800,7 @@ void Lexer::processUndef()
readWhiteSpaces();
int startWord = currentPosition();
readIdentifier();
- QString word = m_source.mid( startWord, currentPosition() - startWord );
+ TQString word = m_source.mid( startWord, currentPosition() - startWord );
m_driver->removeMacro( word );
}
@@ -824,7 +824,7 @@ int Lexer::macroPrimary()
case '!':
case '~':
{
- QChar tk = currentChar();
+ TQChar tk = currentChar();
nextChar();
int result = macroPrimary();
if( tk == '-' ) return -result;
@@ -973,7 +973,7 @@ int Lexer::macroLogicalAnd()
nextChar( 2 );
int start = currentPosition();
result = macroBoolOr() && result;
- QString s = m_source.mid( start, currentPosition() - start );
+ TQString s = m_source.mid( start, currentPosition() - start );
}
return result;
}
@@ -996,7 +996,7 @@ int Lexer::macroExpression()
}
// *IMPORTANT*
-// please, don't include lexer.moc here, because Lexer isn't a QObject class!!
+// please, don't include lexer.moc here, because Lexer isn't a TQObject class!!
// if you have problem while recompiling try to remove cppsupport/.deps,
// cppsupport/Makefile.in and rerun automake/autoconf
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
index da656591..4851c183 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h
@@ -22,11 +22,11 @@
#include "driver.h"
-#include <qstring.h>
-#include <qmap.h>
-#include <qvaluestack.h>
-#include <qpair.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqvaluestack.h>
+#include <tqpair.h>
+#include <tqptrvector.h>
enum Type {
Token_eof = 0,
@@ -148,7 +148,7 @@ class Token
{
public:
Token();
- Token( int type, int position, int length, const QString& text );
+ Token( int type, int position, int length, const TQString& text );
Token( const Token& source );
Token& operator = ( const Token& source );
@@ -171,7 +171,7 @@ public:
int position() const;
void setPosition( int position );
- QString text() const;
+ TQString text() const;
private:
int m_type;
@@ -181,7 +181,7 @@ private:
int m_startColumn;
int m_endLine;
int m_endColumn;
- QString m_text;
+ TQString m_text;
friend class Lexer;
friend class Parser;
@@ -212,10 +212,10 @@ public:
void setPreprocessorEnabled( bool enabled );
void resetSkipWords();
- void addSkipWord( const QString& word, SkipType skipType=SkipWord, const QString& str = QString::null );
+ void addSkipWord( const TQString& word, SkipType skipType=SkipWord, const TQString& str = TQString::null );
- QString source() const;
- void setSource( const QString& source );
+ TQString source() const;
+ void setSource( const TQString& source );
int index() const;
void setIndex( int index );
@@ -235,8 +235,8 @@ public:
int currentColumn() const { return m_currentColumn; }
private:
- QChar currentChar() const;
- QChar peekChar( int n=1 ) const;
+ TQChar currentChar() const;
+ TQChar peekChar( int n=1 ) const;
int currentPosition() const;
void tokenize();
@@ -259,7 +259,7 @@ private:
// preprocessor (based on an article of Al Stevens on Dr.Dobb's journal)
int testIfLevel();
int macroDefined();
- QString readArgument();
+ TQString readArgument();
int macroPrimary();
int macroMultiplyDivide();
@@ -273,7 +273,7 @@ private:
int macroLogicalOr();
int macroExpression();
- void handleDirective( const QString& directive );
+ void handleDirective( const TQString& directive );
void processDefine( Macro& macro );
void processElse();
void processElif();
@@ -287,24 +287,24 @@ private:
private:
LexerData* d;
Driver* m_driver;
- QPtrVector< Token > m_tokens;
+ TQPtrVector< Token > m_tokens;
int m_size;
int m_index;
- QString m_source;
+ TQString m_source;
int m_ptr;
int m_endPtr;
bool m_recordComments;
bool m_recordWhiteSpaces;
bool m_startLine;
- QMap< QString, QPair<SkipType, QString> > m_words;
+ TQMap< TQString, QPair<SkipType, TQString> > m_words;
int m_currentLine;
int m_currentColumn;
bool m_skipWordsEnabled;
// preprocessor
- QMemArray<bool> m_skipping;
- QMemArray<bool> m_trueTest;
+ TQMemArray<bool> m_skipping;
+ TQMemArray<bool> m_trueTest;
int m_ifLevel;
bool m_preprocessorEnabled;
bool m_inPreproc;
@@ -326,7 +326,7 @@ inline Token::Token()
{
}
-inline Token::Token( int type, int position, int length, const QString& text )
+inline Token::Token( int type, int position, int length, const TQString& text )
: m_type( type ),
m_position( position ),
m_length( length ),
@@ -396,7 +396,7 @@ inline int Token::position() const
return m_position;
}
-inline QString Token::text() const
+inline TQString Token::text() const
{
return m_text.mid(m_position, m_length);
}
@@ -460,7 +460,7 @@ inline void Lexer::setRecordWhiteSpaces( bool record )
m_recordWhiteSpaces = record;
}
-inline QString Lexer::source() const
+inline TQString Lexer::source() const
{
return m_source;
}
@@ -524,7 +524,7 @@ inline void Lexer::readIdentifier()
inline void Lexer::readWhiteSpaces( bool skipNewLine )
{
while( !currentChar().isNull() ){
- QChar ch = currentChar();
+ TQChar ch = currentChar();
if( ch == '\n' && !skipNewLine ){
break;
@@ -544,7 +544,7 @@ inline void Lexer::readLineComment()
while( !currentChar().isNull() && currentChar() != '\n' ){
if( m_reportMessages && currentChar() == '@' && m_source.mid(currentPosition()+1, 4).lower() == "todo" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -561,7 +561,7 @@ inline void Lexer::readLineComment()
} else
if( m_reportMessages && m_source.mid(currentPosition(), 5).lower() == "fixme" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -588,7 +588,7 @@ inline void Lexer::readMultiLineComment()
return;
} else if( m_reportMessages && currentChar() == '@' && m_source.mid(currentPosition()+1, 4).lower() == "todo" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -604,7 +604,7 @@ inline void Lexer::readMultiLineComment()
} else
if( m_reportMessages && m_source.mid(currentPosition(), 5).lower() == "fixme" ){
nextChar( 5 );
- QString msg;
+ TQString msg;
int line = m_currentLine;
int col = m_currentColumn;
@@ -682,7 +682,7 @@ inline int Lexer::findOperator3() const
int n = int(m_endPtr - m_ptr);
if( n >= 3){
- QChar ch = currentChar(), ch1=peekChar(), ch2=peekChar(2);
+ TQChar ch = currentChar(), ch1=peekChar(), ch2=peekChar(2);
if( ch == '<' && ch1 == '<' && ch2 == '=' ) return Token_assign;
else if( ch == '>' && ch1 == '>' && ch2 == '=' ) return Token_assign;
@@ -698,7 +698,7 @@ inline int Lexer::findOperator2() const
int n = int(m_endPtr - m_ptr);
if( n>=2 ){
- QChar ch = currentChar(), ch1=peekChar();
+ TQChar ch = currentChar(), ch1=peekChar();
if( ch == ':' && ch1 == ':' ) return Token_scope;
else if( ch == '.' && ch1 == '*' ) return Token_ptrmem;
@@ -752,14 +752,14 @@ inline int Lexer::currentPosition() const
return m_ptr;
}
-inline QChar Lexer::currentChar() const
+inline TQChar Lexer::currentChar() const
{
- return m_ptr < m_endPtr ? m_source[m_ptr] : QChar::null;
+ return m_ptr < m_endPtr ? m_source[m_ptr] : TQChar::null;
}
-inline QChar Lexer::peekChar( int n ) const
+inline TQChar Lexer::peekChar( int n ) const
{
- return m_ptr+n < m_endPtr ? m_source[m_ptr + n] : QChar::null;
+ return m_ptr+n < m_endPtr ? m_source[m_ptr + n] : TQChar::null;
}
inline bool Lexer::eof() const
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
index 8831e6f3..f46b9270 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp
@@ -29,7 +29,7 @@
#include <string.h>
const HashEntry* Lookup::findEntry( const struct HashTable *table,
- const QChar *c, unsigned int len )
+ const TQChar *c, unsigned int len )
{
if (table->type != 2) {
kdDebug() << "KJS: Unknown hash table version" << endl;
@@ -69,13 +69,13 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table,
}
const HashEntry* Lookup::findEntry( const struct HashTable *table,
- const QString &s )
+ const TQString &s )
{
return findEntry( table, s.unicode(), s.length() );
}
int Lookup::find(const struct HashTable *table,
- const QChar *c, unsigned int len)
+ const TQChar *c, unsigned int len)
{
const HashEntry *entry = findEntry( table, c, len );
if (entry)
@@ -83,12 +83,12 @@ int Lookup::find(const struct HashTable *table,
return -1;
}
-int Lookup::find(const struct HashTable *table, const QString &s)
+int Lookup::find(const struct HashTable *table, const TQString &s)
{
return find(table, s.unicode(), s.length());
}
-unsigned int Lookup::hash(const QChar *c, unsigned int len)
+unsigned int Lookup::hash(const TQChar *c, unsigned int len)
{
unsigned int val = 0;
// ignoring rower byte
@@ -98,7 +98,7 @@ unsigned int Lookup::hash(const QChar *c, unsigned int len)
return val;
}
-unsigned int Lookup::hash(const QString &key)
+unsigned int Lookup::hash(const TQString &key)
{
return hash(key.unicode(), key.length());
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
index 225c3ab0..b2bad4de 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h
@@ -24,7 +24,7 @@
#ifndef _KJSLOOKUP_H_
#define _KJSLOOKUP_H_
-#include <qstring.h>
+#include <tqstring.h>
#include <stdio.h>
/**
@@ -95,8 +95,8 @@
/**
* Find an entry in the table, and return its value (i.e. the value field of HashEntry)
*/
- static int find(const struct HashTable *table, const QString& s);
- static int find(const struct HashTable *table, const QChar *c, unsigned int len);
+ static int find(const struct HashTable *table, const TQString& s);
+ static int find(const struct HashTable *table, const TQChar *c, unsigned int len);
/**
* Find an entry in the table, and return the entry
@@ -104,15 +104,15 @@
* especially the attr field.
*/
static const HashEntry* findEntry(const struct HashTable *table,
- const QString &s);
+ const TQString &s);
static const HashEntry* findEntry(const struct HashTable *table,
- const QChar *c, unsigned int len);
+ const TQChar *c, unsigned int len);
/**
* Calculate the hash value for a given key
*/
- static unsigned int hash(const QString &key);
- static unsigned int hash(const QChar *c, unsigned int len);
+ static unsigned int hash(const TQString &key);
+ static unsigned int hash(const TQChar *c, unsigned int len);
static unsigned int hash(const char *s);
};
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
index 184352d5..9b93384c 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp
@@ -24,9 +24,9 @@
#include "errors.h"
// qt
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qasciidict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqasciidict.h>
#include <kdebug.h>
#include <klocale.h>
@@ -132,7 +132,7 @@ bool Parser::reportError( const Error& err )
const Token& token = lex->lookAhead( 0 );
lex->getTokenPosition( token, &line, &col );
- QString s = lex->lookAhead(0).text();
+ TQString s = lex->lookAhead(0).text();
s = s.left( 30 ).stripWhiteSpace();
if( s.isEmpty() )
s = i18n( "<eof>" );
@@ -143,7 +143,7 @@ bool Parser::reportError( const Error& err )
return true;
}
-bool Parser::reportError( const QString& msg )
+bool Parser::reportError( const TQString& msg )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::reportError()" << endl;
if( m_problems < m_maxProblems ){
@@ -314,9 +314,9 @@ bool Parser::skipCommaExpression( AST::Node& node )
if( !skipExpression(expr) )
return false;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !skipExpression(expr) ){
@@ -468,7 +468,7 @@ bool Parser::parseDeclaration( DeclarationAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseDeclaration()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -830,9 +830,9 @@ bool Parser::parseTemplateArgumentList( TemplateArgumentListAST::Node& node, boo
return false;
ast->addArgument( templArg );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseTemplateArgument(templArg) ){
@@ -951,7 +951,7 @@ bool Parser::parseTemplateDeclaration( DeclarationAST::Node& node )
bool Parser::parseOperator( AST::Node& /*node*/ )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseOperator()" << endl;
- QString text = lex->lookAhead(0).text();
+ TQString text = lex->lookAhead(0).text();
switch( lex->lookAhead(0) ){
case Token_new:
@@ -1394,7 +1394,7 @@ bool Parser::parseEnumSpecifier( TypeSpecifierAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseEnumSpecifier()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -1426,7 +1426,7 @@ bool Parser::parseEnumSpecifier( TypeSpecifierAST::Node& node )
if( parseEnumerator(enumerator) ){
ast->addEnumerator( enumerator );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
comment = "";
advanceAndCheckTrailingComment( comment );
@@ -1472,9 +1472,9 @@ bool Parser::parseTemplateParameterList( TemplateParameterListAST::Node& node )
}
ast->addTemplateParameter( param );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseTemplateParameter(param) ){
@@ -1702,7 +1702,7 @@ bool Parser::parseInitDeclaratorList( InitDeclaratorListAST::Node& node )
}
ast->addInitDeclarator( decl );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
comment = "";
advanceAndCheckTrailingComment( comment );
@@ -1777,9 +1777,9 @@ bool Parser::parseParameterDeclarationList( ParameterDeclarationListAST::Node& n
}
ast->addParameter( param );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( lex->lookAhead(0) == Token_ellipsis )
@@ -1878,7 +1878,7 @@ bool Parser::parseClassSpecifier( TypeSpecifierAST::Node& node )
}
}
- QString comment;
+ TQString comment;
while (lex->lookAhead(0) == Token_comment) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -1942,7 +1942,7 @@ bool Parser::parseAccessSpecifier( AST::Node& node )
return false;
}
-void Parser::advanceAndCheckTrailingComment(QString& comment)
+void Parser::advanceAndCheckTrailingComment(TQString& comment)
{
Token t = lex->tokenAt( lex->index() );
int previousTokenEndLine = 0;
@@ -1963,7 +1963,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseMemberSpecification()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -2148,7 +2148,7 @@ bool Parser::parseEnumerator( EnumeratorAST::Node& node )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseEnumerator()" << endl;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == Token_comment ) {
comment += lex->lookAhead(0).text();
lex->nextToken();
@@ -2226,9 +2226,9 @@ bool Parser::parseBaseClause( BaseClauseAST::Node& node )
if( parseBaseSpecifier(baseSpec) ){
bca->addBaseSpecifier( baseSpec );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseBaseSpecifier(baseSpec) ){
@@ -2280,9 +2280,9 @@ bool Parser::parseMemInitializerList( AST::Node& /*node*/ )
return false;
}
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( parseMemInitializer(init) ){
@@ -2325,9 +2325,9 @@ bool Parser::parseTypeIdList( GroupAST::Node& node )
GroupAST::Node ast = CreateNode<GroupAST>();
ast->addNode( typeId );
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( parseTypeId(typeId) ){
if (!comment.isEmpty())
@@ -2991,7 +2991,7 @@ bool Parser::parseDeclarationStatement( StatementAST::Node& node )
return true;
}
-bool Parser::parseDeclarationInternal( DeclarationAST::Node& node, QString& comment )
+bool Parser::parseDeclarationInternal( DeclarationAST::Node& node, TQString& comment )
{
//kdDebug(9007)<< "--- tok = " << lex->lookAhead(0).text() << " -- " << "Parser::parseDeclarationInternal()" << endl;
@@ -3231,9 +3231,9 @@ bool Parser::parseFunctionBody( StatementListAST::Node& node )
return true;
}
-QString Parser::toString( int start, int end, const QString& sep ) const
+TQString Parser::toString( int start, int end, const TQString& sep ) const
{
- QStringList l;
+ TQStringList l;
for( int i=start; i<end; ++i ){
l << lex->tokenAt(i).text();
@@ -3902,9 +3902,9 @@ bool Parser::parseCommaExpression( AST::Node& node )
if( !parseAssignmentExpression(expr) )
return false;
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( !parseAssignmentExpression(expr) )
@@ -4108,9 +4108,9 @@ bool Parser::parseIdentifierList( GroupAST::Node & node )
ast->addNode( tk );
lex->nextToken();
- QString comment;
+ TQString comment;
while( lex->lookAhead(0) == ',' ){
- comment = QString::null;
+ comment = TQString::null;
advanceAndCheckTrailingComment( comment );
if( lex->lookAhead(0) == Token_identifier ){
AST_FROM_TOKEN( tk, lex->index() );
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/parser.h b/umbrello/umbrello/codeimport/kdevcppparser/parser.h
index 23876e9f..9be954c2 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/parser.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/parser.h
@@ -22,10 +22,10 @@
#include "ast.h"
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qvaluestack.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
struct ParserPrivateData;
@@ -42,7 +42,7 @@ public:
private:
virtual bool reportError( const Error& err );
- /** @todo remove*/ virtual bool reportError( const QString& msg );
+ /** @todo remove*/ virtual bool reportError( const TQString& msg );
/** @todo remove*/ virtual void syntaxError();
public: /*rules*/
@@ -60,7 +60,7 @@ public: /*rules*/
bool parseTypedef( DeclarationAST::Node& node );
bool parseAsmDefinition( DeclarationAST::Node& node );
bool parseTemplateDeclaration( DeclarationAST::Node& node );
- bool parseDeclarationInternal( DeclarationAST::Node& node, QString& comment );
+ bool parseDeclarationInternal( DeclarationAST::Node& node, TQString& comment );
bool parseUnqualifiedName( ClassOrNamespaceNameAST::Node& node );
bool parseStringLiteral( AST::Node& node );
@@ -196,13 +196,13 @@ public: /*rules*/
bool parseObjcOpenBracketExpr( AST::Node& node );
bool parseObjcCloseBracket( AST::Node& node );
- void advanceAndCheckTrailingComment(QString& comment);
+ void advanceAndCheckTrailingComment(TQString& comment);
bool skipUntil( int token );
bool skipUntilDeclaration();
bool skipUntilStatement();
bool skip( int l, int r );
- QString toString( int start, int end, const QString& sep=" " ) const;
+ TQString toString( int start, int end, const TQString& sep=" " ) const;
private:
ParserPrivateData* d;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp b/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
index 2f81c3b6..454c4b99 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/tree_parser.cpp
@@ -32,8 +32,8 @@ void TreeParser::parseTranslationUnit( TranslationUnitAST* translationUnit )
{
//kdDebug(9007) << "TreeParser::parseTranslationUnit()" << endl;
- QPtrList<DeclarationAST> declarations = translationUnit->declarationList();
- QPtrListIterator<DeclarationAST> it( declarations );
+ TQPtrList<DeclarationAST> declarations = translationUnit->declarationList();
+ TQPtrListIterator<DeclarationAST> it( declarations );
while( it.current() ){
parseDeclaration( it.current() );
++it;
@@ -153,8 +153,8 @@ void TreeParser::parseFunctionDefinition( FunctionDefinitionAST* def )
void TreeParser::parseLinkageBody( LinkageBodyAST* linkageBody )
{
//kdDebug(9007) << "TreeParser::parseLinkageBody()" << endl;
- QPtrList<DeclarationAST> declarations = linkageBody->declarationList();
- for( QPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
+ TQPtrList<DeclarationAST> declarations = linkageBody->declarationList();
+ for( TQPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
parseDeclaration( it.current() );
}
}
@@ -181,8 +181,8 @@ void TreeParser::parseTypeSpecifier( TypeSpecifierAST* typeSpec )
void TreeParser::parseClassSpecifier( ClassSpecifierAST* classSpec )
{
//kdDebug(9007) << "TreeParser::parseClassSpecifier()" << endl;
- QPtrList<DeclarationAST> declarations = classSpec->declarationList();
- for( QPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
+ TQPtrList<DeclarationAST> declarations = classSpec->declarationList();
+ for( TQPtrListIterator<DeclarationAST> it(declarations); it.current(); ++it ){
parseDeclaration( it.current() );
}
}
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
index 9b48649d..5235bc3c 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
+++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp
@@ -20,10 +20,10 @@
*/
#include "urlutil.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <unistd.h>
@@ -39,27 +39,27 @@
// Namespace URLUtil
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::filename(const QString & name) {
+TQString URLUtil::filename(const TQString & name) {
int slashPos = name.findRev("/");
return slashPos<0 ? name : name.mid(slashPos+1);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::directory(const QString & name) {
+TQString URLUtil::directory(const TQString & name) {
int slashPos = name.findRev("/");
- return slashPos<0 ? QString("") : name.left(slashPos);
+ return slashPos<0 ? TQString("") : name.left(slashPos);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) {
+TQString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) {
bool slashPrefix = slashPolicy & SLASH_PREFIX;
bool slashSuffix = slashPolicy & SLASH_SUFFIX;
if (parent == child)
- return slashPrefix ? QString("/") : QString("");
+ return slashPrefix ? TQString("/") : TQString("");
- if (!parent.isParentOf(child)) return QString();
+ if (!parent.isParentOf(child)) return TQString();
int a=slashPrefix ? -1 : 1;
int b=slashSuffix ? 1 : -1;
return child.path(b).mid(parent.path(a).length());
@@ -67,15 +67,15 @@ QString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slas
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePath(const QString & parent, const QString & child, uint slashPolicy) {
+TQString URLUtil::relativePath(const TQString & parent, const TQString & child, uint slashPolicy) {
return relativePath(KURL(parent), KURL(child), slashPolicy);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::upDir(const QString & path, bool slashSuffix) {
+TQString URLUtil::upDir(const TQString & path, bool slashSuffix) {
int slashPos = path.findRev("/");
- if (slashPos<1) return QString::null;
+ if (slashPos<1) return TQString::null;
return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) );
}
@@ -93,41 +93,41 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil
if (dest == child) return source;
// calculate
- QString childUrlStr = child.url(-1);
- QString destStemStr = dest.url(1);
- QString sourceStemStr = source.url(1);
+ TQString childUrlStr = child.url(-1);
+ TQString destStemStr = dest.url(1);
+ TQString sourceStemStr = source.url(1);
return KURL(sourceStemStr.append( childUrlStr.mid( destStemStr.length() ) ) );
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::getExtension(const QString & path) {
+TQString URLUtil::getExtension(const TQString & path) {
int dotPos = path.findRev('.');
- if (dotPos<0) return QString("");
+ if (dotPos<0) return TQString("");
return path.mid(dotPos+1);
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &url )
+TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &url )
{
- QString absBase = extractPathNameAbsolute( baseDirUrl ),
+ TQString absBase = extractPathNameAbsolute( baseDirUrl ),
absRef = extractPathNameAbsolute( url );
int i = absRef.find( absBase, 0, true );
if (i == -1)
- return QString();
+ return TQString();
if (absRef == absBase)
- return QString( "." );
+ return TQString( "." );
else
- return absRef.replace( 0, absBase.length(), QString() );
+ return absRef.replace( 0, absBase.length(), TQString() );
}
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const QString &basePath, const KURL &url )
+TQString URLUtil::extractPathNameRelative(const TQString &basePath, const KURL &url )
{
#if (KDE_VERSION_MINOR!=0) || (KDE_VERSION_MAJOR!=3)
KURL baseDirUrl = KURL::fromPathOrURL( basePath );
@@ -139,7 +139,7 @@ QString URLUtil::extractPathNameRelative(const QString &basePath, const KURL &ur
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameRelative(const QString &basePath, const QString &absFilePath )
+TQString URLUtil::extractPathNameRelative(const TQString &basePath, const TQString &absFilePath )
{
#if (KDE_VERSION_MINOR!=0) || (KDE_VERSION_MAJOR!=3)
KURL baseDirUrl = KURL::fromPathOrURL( basePath ),
@@ -153,7 +153,7 @@ QString URLUtil::extractPathNameRelative(const QString &basePath, const QString
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::extractPathNameAbsolute( const KURL &url )
+TQString URLUtil::extractPathNameAbsolute( const KURL &url )
{
if (isDirectory( url ))
return url.path( +1 ); // with trailing "/" if none is present
@@ -162,9 +162,9 @@ QString URLUtil::extractPathNameAbsolute( const KURL &url )
// Ok, this is an over-tight pre-condition on "url" since I hope nobody will never
// stress this function with absurd cases ... but who knows?
/*
- QString path = url.path();
- QFileInfo fi( path ); // Argh: QFileInfo is back ;))
- return ( fi.exists()? path : QString() );
+ TQString path = url.path();
+ TQFileInfo fi( path ); // Argh: TQFileInfo is back ;))
+ return ( fi.exists()? path : TQString() );
*/
return url.path();
}
@@ -179,14 +179,14 @@ bool URLUtil::isDirectory( const KURL &url )
///////////////////////////////////////////////////////////////////////////////
-bool URLUtil::isDirectory( const QString &absFilePath )
+bool URLUtil::isDirectory( const TQString &absFilePath )
{
- return QDir( absFilePath ).exists();
+ return TQDir( absFilePath ).exists();
}
///////////////////////////////////////////////////////////////////////////////
-void URLUtil::dump( const KURL::List &urls, const QString &aMessage )
+void URLUtil::dump( const KURL::List &urls, const TQString &aMessage )
{
if (!aMessage.isNull())
{
@@ -203,9 +203,9 @@ void URLUtil::dump( const KURL::List &urls, const QString &aMessage )
///////////////////////////////////////////////////////////////////////////////
-QStringList URLUtil::toRelativePaths( const QString &baseDir, const KURL::List &urls)
+TQStringList URLUtil::toRelativePaths( const TQString &baseDir, const KURL::List &urls)
{
- QStringList paths;
+ TQStringList paths;
for (size_t i=0; i<urls.count(); ++i)
{
@@ -217,25 +217,25 @@ QStringList URLUtil::toRelativePaths( const QString &baseDir, const KURL::List &
///////////////////////////////////////////////////////////////////////////////
-QString URLUtil::relativePathToFile( const QString & dirUrl, const QString & fileUrl )
+TQString URLUtil::relativePathToFile( const TQString & dirUrl, const TQString & fileUrl )
{
if (dirUrl.isEmpty() || (dirUrl == "/"))
return fileUrl;
- QStringList dir = QStringList::split("/", dirUrl, false);
- QStringList file = QStringList::split("/", fileUrl, false);
+ TQStringList dir = TQStringList::split("/", dirUrl, false);
+ TQStringList file = TQStringList::split("/", fileUrl, false);
- QString resFileName = file.last();
+ TQString resFileName = file.last();
file.remove(file.last());
uint i = 0;
while ( (i < dir.count()) && (i < (file.count())) && (dir[i] == file[i]) )
i++;
- QString result_up;
- QString result_down;
- QString currDir;
- QString currFile;
+ TQString result_up;
+ TQString result_down;
+ TQString currDir;
+ TQString currFile;
do
{
i >= dir.count() ? currDir = "" : currDir = dir[i];
@@ -261,17 +261,17 @@ QString URLUtil::relativePathToFile( const QString & dirUrl, const QString & fil
///////////////////////////////////////////////////////////////////////////////
-// code from qt-3.1.2 version of QDir::canonicalPath()
-QString URLUtil::canonicalPath( const QString & path )
+// code from qt-3.1.2 version of TQDir::canonicalPath()
+TQString URLUtil::canonicalPath( const TQString & path )
{
- QString r;
+ TQString r;
char cur[PATH_MAX+1];
if ( ::getcwd( cur, PATH_MAX ) )
{
char tmp[PATH_MAX+1];
- if( ::realpath( QFile::encodeName( path ), tmp ) )
+ if( ::realpath( TQFile::encodeName( path ), tmp ) )
{
- r = QFile::decodeName( tmp );
+ r = TQFile::decodeName( tmp );
}
//always make sure we go back to the current dir
::chdir( cur );
@@ -283,7 +283,7 @@ QString URLUtil::canonicalPath( const QString & path )
//written by "Dawit A." <adawit@kde.org>
//borrowed from his patch to KShell
-QString URLUtil::envExpand ( const QString& str )
+TQString URLUtil::envExpand ( const TQString& str )
{
uint len = str.length();
@@ -294,11 +294,11 @@ QString URLUtil::envExpand ( const QString& str )
if (pos < 0)
pos = len;
- char* ret = getenv( QConstString(str.unicode()+1, pos-1).string().local8Bit().data() );
+ char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() );
if (ret)
{
- QString expandedStr ( QFile::decodeName( ret ) );
+ TQString expandedStr ( TQFile::decodeName( ret ) );
if (pos < (int)len)
expandedStr += str.mid(pos);
return expandedStr;
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
index 590069dc..75486983 100644
--- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
+++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h
@@ -21,8 +21,8 @@
#ifndef _URLUTIL_H_
#define _URLUTIL_H_
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kurl.h>
namespace URLUtil
@@ -32,19 +32,19 @@ namespace URLUtil
/**
* Returns the filename part of a pathname (i.e. everything past the last slash)
*/
- QString filename(const QString & pathName);
+ TQString filename(const TQString & pathName);
/**
* Returns the directory part of a path (i.e. everything up to but not including the last slash)
*/
- QString directory(const QString & pathName);
+ TQString directory(const TQString & pathName);
/**
* Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent
*/
- QString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX);
+ TQString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX);
/**
* Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent
*/
- QString relativePath(const QString & parent, const QString & child, uint slashPolicy = SLASH_PREFIX);
+ TQString relativePath(const TQString & parent, const TQString & child, uint slashPolicy = SLASH_PREFIX);
/**
* Returns the relative path between a directory and file. Should never return empty path.
* Example:
@@ -52,11 +52,11 @@ namespace URLUtil
* fileUrl: /home/test/lib/mylib.cpp
* returns: ../lib/mylib.cpp
*/
- QString relativePathToFile( const QString & dirUrl, const QString & fileUrl );
+ TQString relativePathToFile( const TQString & dirUrl, const TQString & fileUrl );
/**
*Returns the path 'up one level' - the opposite of what filename returns
*/
- QString upDir(const QString & path, bool slashSuffix = false);
+ TQString upDir(const TQString & path, bool slashSuffix = false);
/**
* 'Merges' URLs - changes a URL that starts with dest to start with source instead
* Example:
@@ -69,7 +69,7 @@ namespace URLUtil
/**
* Returns the file extension for a filename or path
*/
- QString getExtension(const QString & path);
+ TQString getExtension(const TQString & path);
/**
* Given a base directory url in @p baseDirUrl and the url referring to a date sub-directory or file,
@@ -79,44 +79,44 @@ namespace URLUtil
* KURL baseUrl, dirUrl;
* baseUrl.setPath( "/home/mario/src/kdevelop/" );
* dirUrl.setPath( "/home/mario/src/kdevelop/parts/cvs/" );
- * QString relPathName = extractDirPathRelative( baseUrl, url ); // == "parts/cvs/"
- * QString absPathName = extractDirPathAbsolute( url ); // == "/home/mario/src/kdevelop/parts/cvs/"
+ * TQString relPathName = extractDirPathRelative( baseUrl, url ); // == "parts/cvs/"
+ * TQString absPathName = extractDirPathAbsolute( url ); // == "/home/mario/src/kdevelop/parts/cvs/"
* </code>
* Note that if you pass a file name in @p url (instead of a directory) or the @p baseUrl is not contained
* in @p url then the function will return "" (void string).
*/
- QString extractPathNameRelative(const KURL &baseDirUrl, const KURL &url );
- QString extractPathNameRelative(const QString &basePath, const KURL &url );
- QString extractPathNameRelative(const QString &basePath, const QString &absFilePath );
+ TQString extractPathNameRelative(const KURL &baseDirUrl, const KURL &url );
+ TQString extractPathNameRelative(const TQString &basePath, const KURL &url );
+ TQString extractPathNameRelative(const TQString &basePath, const TQString &absFilePath );
/**
* Will return the absolute path name referred in @p url.
* Look at above for an example.
*/
- QString extractPathNameAbsolute( const KURL &url );
+ TQString extractPathNameAbsolute( const KURL &url );
/**
- * Returns a QStringList of relative (to @p baseDir) paths from a list of KURLs in @p urls
+ * Returns a TQStringList of relative (to @p baseDir) paths from a list of KURLs in @p urls
*/
- QStringList toRelativePaths( const QString &baseDir, const KURL::List &urls);
+ TQStringList toRelativePaths( const TQString &baseDir, const KURL::List &urls);
/**
* If @p url is a directory will return true, false otherwise.
*/
bool isDirectory( const KURL &url );
- bool isDirectory( const QString &absFilePath );
+ bool isDirectory( const TQString &absFilePath );
/**
* Will dump the list of KURL @p urls on standard output, eventually printing @ aMessage if it
* is not null.
*/
- void dump( const KURL::List &urls, const QString &aMessage = QString::null );
+ void dump( const KURL::List &urls, const TQString &aMessage = TQString::null );
/**
- * Same as QDir::canonicalPath in later versions of QT. Earlier versions of QT
+ * Same as TQDir::canonicalPath in later versions of QT. Earlier versions of QT
* had this broken, so it's reproduced here.
*/
- QString canonicalPath( const QString & path );
+ TQString canonicalPath( const TQString & path );
/**
* Performs environment variable expansion on @p variable.
@@ -125,7 +125,7 @@ namespace URLUtil
* @return the expanded environment variable value. if the variable
* cannot be expanded, @p variable itself is returned.
*/
- QString envExpand ( const QString &variable );
+ TQString envExpand ( const TQString &variable );
}
diff --git a/umbrello/umbrello/codeimport/nativeimportbase.cpp b/umbrello/umbrello/codeimport/nativeimportbase.cpp
index 058b4d19..b2f7dac3 100644
--- a/umbrello/umbrello/codeimport/nativeimportbase.cpp
+++ b/umbrello/umbrello/codeimport/nativeimportbase.cpp
@@ -13,15 +13,15 @@
#include "nativeimportbase.h"
// qt/kde includes
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
-NativeImportBase::NativeImportBase(const QString &singleLineCommentIntro) {
+NativeImportBase::NativeImportBase(const TQString &singleLineCommentIntro) {
m_singleLineCommentIntro = singleLineCommentIntro;
m_srcIndex = 0;
m_scopeIndex = 0; // index 0 is reserved for global scope
@@ -34,24 +34,24 @@ NativeImportBase::NativeImportBase(const QString &singleLineCommentIntro) {
NativeImportBase::~NativeImportBase() {
}
-void NativeImportBase::setMultiLineComment(const QString &intro, const QString &end) {
+void NativeImportBase::setMultiLineComment(const TQString &intro, const TQString &end) {
m_multiLineCommentIntro = intro;
m_multiLineCommentEnd = end;
}
-void NativeImportBase::setMultiLineAltComment(const QString &intro, const QString &end) {
+void NativeImportBase::setMultiLineAltComment(const TQString &intro, const TQString &end) {
m_multiLineAltCommentIntro = intro;
m_multiLineAltCommentEnd = end;
}
-void NativeImportBase::skipStmt(QString until /* = ";" */) {
+void NativeImportBase::skipStmt(TQString until /* = ";" */) {
const uint srcLength = m_source.count();
while (m_srcIndex < srcLength && m_source[m_srcIndex] != until)
m_srcIndex++;
}
-bool NativeImportBase::skipToClosing(QChar opener) {
- QString closing;
+bool NativeImportBase::skipToClosing(TQChar opener) {
+ TQString closing;
switch (opener) {
case '{':
closing = "}";
@@ -70,12 +70,12 @@ bool NativeImportBase::skipToClosing(QChar opener) {
<< "): " << "illegal input character" << endl;
return false;
}
- const QString opening(opener);
+ const TQString opening(opener);
skipStmt(opening);
const uint srcLength = m_source.count();
int nesting = 0;
while (m_srcIndex < srcLength) {
- QString nextToken = advance();
+ TQString nextToken = advance();
if (nextToken.isEmpty())
break;
if (nextToken == closing) {
@@ -91,7 +91,7 @@ bool NativeImportBase::skipToClosing(QChar opener) {
return true;
}
-QString NativeImportBase::advance() {
+TQString NativeImportBase::advance() {
while (m_srcIndex < m_source.count() - 1) {
if (m_source[++m_srcIndex].startsWith(m_singleLineCommentIntro))
m_comment += m_source[m_srcIndex];
@@ -102,12 +102,12 @@ QString NativeImportBase::advance() {
// if last item in m_source is a comment then it is dropped too
(m_srcIndex == m_source.count() - 1 &&
m_source[m_srcIndex].startsWith(m_singleLineCommentIntro))) {
- return QString();
+ return TQString();
}
return m_source[m_srcIndex];
}
-bool NativeImportBase::preprocess(QString& line) {
+bool NativeImportBase::preprocess(TQString& line) {
if (m_multiLineCommentIntro.isEmpty())
return false;
// Check for end of multi line comment.
@@ -126,7 +126,7 @@ bool NativeImportBase::preprocess(QString& line) {
delimiterLen = m_multiLineCommentEnd.length();
}
if (pos > 0) {
- QString text = line.mid(0, pos - 1);
+ TQString text = line.mid(0, pos - 1);
m_comment += text.stripWhiteSpace();
}
m_source.append(m_singleLineCommentIntro + m_comment); // denotes comments in `m_source'
@@ -162,7 +162,7 @@ bool NativeImportBase::preprocess(QString& line) {
if (endpos == -1) {
m_inComment = true;
if (pos + delimIntroLen < (int)line.length()) {
- QString cmnt = line.mid(pos + delimIntroLen);
+ TQString cmnt = line.mid(pos + delimIntroLen);
m_comment += cmnt.stripWhiteSpace() + "\n";
}
if (pos == 0)
@@ -170,16 +170,16 @@ bool NativeImportBase::preprocess(QString& line) {
line = line.left(pos);
} else { // It's a multiline comment on a single line.
if (endpos > pos + delimIntroLen) {
- QString cmnt = line.mid(pos + delimIntroLen, endpos - pos - delimIntroLen);
+ TQString cmnt = line.mid(pos + delimIntroLen, endpos - pos - delimIntroLen);
cmnt = cmnt.stripWhiteSpace();
if (!cmnt.isEmpty())
m_source.append(m_singleLineCommentIntro + cmnt);
}
endpos++; // endpos now points at the slash of "*/"
- QString pre;
+ TQString pre;
if (pos > 0)
pre = line.left(pos);
- QString post;
+ TQString post;
if (endpos + delimEndLen < (int)line.length())
post = line.mid(endpos + 1);
line = pre + post;
@@ -190,20 +190,20 @@ bool NativeImportBase::preprocess(QString& line) {
/// Split the line so that a string is returned as a single element of the list,
/// when not in a string then split at white space.
-QStringList NativeImportBase::split(const QString& lin) {
- QStringList list;
- QString listElement;
- QChar stringIntro = 0; // buffers the string introducer character
+TQStringList NativeImportBase::split(const TQString& lin) {
+ TQStringList list;
+ TQString listElement;
+ TQChar stringIntro = 0; // buffers the string introducer character
bool seenSpace = false;
- QString line = lin.stripWhiteSpace();
+ TQString line = lin.stripWhiteSpace();
for (uint i = 0; i < line.length(); i++) {
- const QChar& c = line[i];
+ const TQChar& c = line[i];
if (stringIntro) { // we are in a string
listElement += c;
if (c == stringIntro) {
if (line[i - 1] != '\\') {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
stringIntro = 0; // we are no longer in a string
}
}
@@ -219,7 +219,7 @@ QStringList NativeImportBase::split(const QString& lin) {
seenSpace = true;
if (!listElement.isEmpty()) {
list.append(listElement);
- listElement = QString();
+ listElement = TQString();
}
} else {
listElement += c;
@@ -233,23 +233,23 @@ QStringList NativeImportBase::split(const QString& lin) {
/// The lexer. Tokenizes the given string and fills `m_source'.
/// Stores possible comments in `m_comment'.
-void NativeImportBase::scan(QString line) {
+void NativeImportBase::scan(TQString line) {
if (preprocess(line))
return;
// Check for single line comment.
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
- QString cmnt = line.mid(pos);
+ TQString cmnt = line.mid(pos);
m_source.append(cmnt);
if (pos == 0)
return;
line = line.left(pos);
}
- if (line.contains(QRegExp("^\\s*$")))
+ if (line.contains(TQRegExp("^\\s*$")))
return;
- QStringList words = split(line);
- for (QStringList::Iterator it = words.begin(); it != words.end(); ++it) {
- QString word = *it;
+ TQStringList words = split(line);
+ for (TQStringList::Iterator it = words.begin(); it != words.end(); ++it) {
+ TQString word = *it;
if (word[0] == '"' || word[0] == '\'')
m_source.append(word); // string constants are handled by split()
else
@@ -260,34 +260,34 @@ void NativeImportBase::scan(QString line) {
void NativeImportBase::initVars() {
}
-void NativeImportBase::parseFile(const QString& filename) {
- QString nameWithoutPath = filename;
- nameWithoutPath.remove(QRegExp("^.*/"));
+void NativeImportBase::parseFile(const TQString& filename) {
+ TQString nameWithoutPath = filename;
+ nameWithoutPath.remove(TQRegExp("^.*/"));
if (m_parsedFiles.contains(nameWithoutPath))
return;
m_parsedFiles.append(nameWithoutPath);
- QString fname = filename;
- const QString msgPrefix = "NativeImportBase::parseFile(" + filename + "): ";
+ TQString fname = filename;
+ const TQString msgPrefix = "NativeImportBase::parseFile(" + filename + "): ";
if (filename.contains('/')) {
- QString path = filename;
- path.remove( QRegExp("/[^/]+$") );
+ TQString path = filename;
+ path.remove( TQRegExp("/[^/]+$") );
kDebug() << msgPrefix << "adding path " << path << endl;
Import_Utils::addIncludePath(path);
}
- if (! QFile::exists(filename)) {
+ if (! TQFile::exists(filename)) {
if (filename.startsWith("/")) {
kError() << msgPrefix << "cannot find file" << endl;
return;
}
bool found = false;
- QStringList includePaths = Import_Utils::includePathList();
- for (QStringList::Iterator pathIt = includePaths.begin();
+ TQStringList includePaths = Import_Utils::includePathList();
+ for (TQStringList::Iterator pathIt = includePaths.begin();
pathIt != includePaths.end(); ++pathIt) {
- QString path = (*pathIt);
+ TQString path = (*pathIt);
if (! path.endsWith("/")) {
path.append("/");
}
- if (QFile::exists(path + filename)) {
+ if (TQFile::exists(path + filename)) {
fname.prepend(path);
found = true;
break;
@@ -298,30 +298,30 @@ void NativeImportBase::parseFile(const QString& filename) {
return;
}
}
- QFile file(fname);
+ TQFile file(fname);
if (! file.open(IO_ReadOnly)) {
kError() << msgPrefix << "cannot open file" << endl;
return;
}
kDebug() << msgPrefix << "parsing." << endl;
- // Scan the input file into the QStringList m_source.
+ // Scan the input file into the TQStringList m_source.
m_source.clear();
m_srcIndex = 0;
initVars();
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (! stream.atEnd()) {
- QString line = stream.readLine();
+ TQString line = stream.readLine();
scan(line);
}
file.close();
- // Parse the QStringList m_source.
+ // Parse the TQStringList m_source.
m_klass = NULL;
m_currentAccess = Uml::Visibility::Public;
m_scopeIndex = 0;
m_scope[0] = NULL; // index 0 is reserved for global scope
const uint srcLength = m_source.count();
for (m_srcIndex = 0; m_srcIndex < srcLength; m_srcIndex++) {
- const QString& firstToken = m_source[m_srcIndex];
+ const TQString& firstToken = m_source[m_srcIndex];
//kDebug() << '"' << firstToken << '"' << endl;
if (firstToken.startsWith(m_singleLineCommentIntro)) {
m_comment = firstToken.mid(m_singleLineCommentIntro.length());
@@ -329,7 +329,7 @@ void NativeImportBase::parseFile(const QString& filename) {
}
if (! parseStmt())
skipStmt();
- m_comment = QString();
+ m_comment = TQString();
}
kDebug() << msgPrefix << "end of parse." << endl;
}
diff --git a/umbrello/umbrello/codeimport/nativeimportbase.h b/umbrello/umbrello/codeimport/nativeimportbase.h
index cc82fd91..03a78a5c 100644
--- a/umbrello/umbrello/codeimport/nativeimportbase.h
+++ b/umbrello/umbrello/codeimport/nativeimportbase.h
@@ -12,8 +12,8 @@
#ifndef NATIVEIMPORTBASE_H
#define NATIVEIMPORTBASE_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "classimport.h"
#include "../umlnamespace.h"
@@ -47,7 +47,7 @@ public:
* Constructor
* @param singleLineCommentIntro "//" for IDL and Java, "--" for Ada
*/
- NativeImportBase(const QString &singleLineCommentIntro);
+ NativeImportBase(const TQString &singleLineCommentIntro);
virtual ~NativeImportBase();
protected:
@@ -64,12 +64,12 @@ protected:
* @param end In languages with a C style multiline comment
* this is star-slash.
*/
- void setMultiLineComment(const QString &intro, const QString &end);
+ void setMultiLineComment(const TQString &intro, const TQString &end);
/**
* Set the delimiter strings for an alternative form of
* multi line comment. See setMultiLineComment().
*/
- void setMultiLineAltComment(const QString &intro, const QString &end);
+ void setMultiLineAltComment(const TQString &intro, const TQString &end);
/**
* Import a single file.
@@ -78,12 +78,12 @@ protected:
*
* @param filename The file to import.
*/
- virtual void parseFile(const QString& filename);
+ virtual void parseFile(const TQString& filename);
/**
* Initialize auxiliary variables.
* This is called by the default implementation of parseFile()
- * after scanning (before parsing the QStringList m_source.)
+ * after scanning (before parsing the TQStringList m_source.)
* The default implementation is empty.
*/
virtual void initVars();
@@ -95,7 +95,7 @@ protected:
*
* @param line The line to scan.
*/
- void scan(QString line);
+ void scan(TQString line);
/**
* Preprocess a line.
@@ -108,21 +108,21 @@ protected:
* false if there are still items left in the line
* for further analysis.
*/
- virtual bool preprocess(QString& line);
+ virtual bool preprocess(TQString& line);
/**
* Split the line so that a string is returned as a single element of the list.
* When not in a string then split at white space.
* The default implementation is suitable for C style strings and char constants.
*/
- virtual QStringList split(const QString& line);
+ virtual TQStringList split(const TQString& line);
/**
* Analyze the given word and fill `m_source'.
* A "word" is a whitespace delimited item from the input line.
* To be provided by the specific importer class.
*/
- virtual void fillSource(const QString& word) = 0;
+ virtual void fillSource(const TQString& word) = 0;
/**
* Parse the statement which starts at m_source[m_srcIndex]
@@ -138,7 +138,7 @@ protected:
* Advance m_srcIndex until m_source[m_srcIndex] contains the lexeme
* given by `until'.
*/
- void skipStmt(QString until = ";");
+ void skipStmt(TQString until = ";");
/**
* Advance m_srcIndex to the index of the corresponding closing character
@@ -148,24 +148,24 @@ protected:
* @return True for success, false for misuse (invalid opener) or
* if no matching closing character is found in m_source.
*/
- bool skipToClosing(QChar opener);
+ bool skipToClosing(TQChar opener);
/**
* Advance m_srcIndex until m_source[m_srcIndex] contains a non-comment.
* Comments encountered during advancement are accumulated in `m_comment'.
- * If m_srcIndex hits the end of m_source then QString::null is returned.
+ * If m_srcIndex hits the end of m_source then TQString::null is returned.
*/
- QString advance();
+ TQString advance();
/**
* How to start a single line comment in this programming language.
*/
- QString m_singleLineCommentIntro;
+ TQString m_singleLineCommentIntro;
/**
* The scanned lexemes.
*/
- QStringList m_source;
+ TQStringList m_source;
/**
* Used for indexing m_source.
*/
@@ -191,7 +191,7 @@ protected:
/**
* Intermediate accumulator for comment text.
*/
- QString m_comment;
+ TQString m_comment;
/**
* True if we are currently in a multi-line comment.
* Only applies to languages with multi-line comments.
@@ -208,19 +208,19 @@ protected:
* whether the name is already present in this list in order to
* avoid parsing the same file multiple times.
*/
- QStringList m_parsedFiles;
+ TQStringList m_parsedFiles;
/**
* Multi line comment delimiters
*/
- QString m_multiLineCommentIntro;
- QString m_multiLineCommentEnd;
+ TQString m_multiLineCommentIntro;
+ TQString m_multiLineCommentEnd;
/**
* Some languages support an alternative set of multi line
* comment delimiters.
*/
- QString m_multiLineAltCommentIntro;
- QString m_multiLineAltCommentEnd;
+ TQString m_multiLineAltCommentIntro;
+ TQString m_multiLineAltCommentEnd;
};
#endif
diff --git a/umbrello/umbrello/codeimport/pascalimport.cpp b/umbrello/umbrello/codeimport/pascalimport.cpp
index ffe291ff..a769571d 100644
--- a/umbrello/umbrello/codeimport/pascalimport.cpp
+++ b/umbrello/umbrello/codeimport/pascalimport.cpp
@@ -14,7 +14,7 @@
#include <stdio.h>
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -41,23 +41,23 @@ void PascalImport::initVars() {
NativeImportBase::m_currentAccess = Uml::Visibility::Public;
}
-void PascalImport::fillSource(const QString& word) {
- QString lexeme;
+void PascalImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- QChar c = word[i];
+ TQChar c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.' || c == '#') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (c == ':' && word[i + 1] == '=') {
m_source.append(":=");
i++;
} else {
- m_source.append(QString(c));
+ m_source.append(TQString(c));
}
}
}
@@ -68,7 +68,7 @@ void PascalImport::fillSource(const QString& word) {
void PascalImport::checkModifiers(bool& isVirtual, bool& isAbstract) {
const uint srcLength = m_source.count();
while (m_srcIndex < srcLength - 1) {
- QString lookAhead = m_source[m_srcIndex + 1].lower();
+ TQString lookAhead = m_source[m_srcIndex + 1].lower();
if (lookAhead != "virtual" && lookAhead != "abstract" &&
lookAhead != "override" &&
lookAhead != "register" && lookAhead != "cdecl" &&
@@ -87,12 +87,12 @@ void PascalImport::checkModifiers(bool& isVirtual, bool& isAbstract) {
bool PascalImport::parseStmt() {
const uint srcLength = m_source.count();
- QString keyword = m_source[m_srcIndex].lower();
+ TQString keyword = m_source[m_srcIndex].lower();
//kDebug() << '"' << keyword << '"' << endl;
if (keyword == "uses") {
while (m_srcIndex < srcLength - 1) {
- QString unit = advance();
- const QString& prefix = unit.lower();
+ TQString unit = advance();
+ const TQString& prefix = unit.lower();
if (prefix == "sysutils" || prefix == "types" || prefix == "classes" ||
prefix == "graphics" || prefix == "controls" || prefix == "strings" ||
prefix == "forms" || prefix == "windows" || prefix == "messages" ||
@@ -103,10 +103,10 @@ bool PascalImport::parseStmt() {
break;
continue;
}
- QString filename = unit + ".pas";
+ TQString filename = unit + ".pas";
if (! m_parsedFiles.contains(unit)) {
// Save current m_source and m_srcIndex.
- QStringList source(m_source);
+ TQStringList source(m_source);
uint srcIndex = m_srcIndex;
m_source.clear();
parseFile(filename);
@@ -123,7 +123,7 @@ bool PascalImport::parseStmt() {
return true;
}
if (keyword == "unit") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Package, name,
m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = static_cast<UMLPackage*>(ns);
@@ -209,13 +209,13 @@ bool PascalImport::parseStmt() {
checkModifiers(dummyVirtual, dummyAbstract);
return true;
}
- const QString& name = advance();
+ const TQString& name = advance();
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
if (m_source[m_srcIndex + 1] == "(") {
advance();
const uint MAX_PARNAMES = 16;
while (m_srcIndex < srcLength && m_source[m_srcIndex] != ")") {
- QString nextToken = m_source[m_srcIndex + 1].lower();
+ TQString nextToken = m_source[m_srcIndex + 1].lower();
Uml::Parameter_Direction dir = Uml::pd_In;
if (nextToken == "var") {
dir = Uml::pd_InOut;
@@ -226,7 +226,7 @@ bool PascalImport::parseStmt() {
dir = Uml::pd_Out;
advance();
}
- QString parName[MAX_PARNAMES];
+ TQString parName[MAX_PARNAMES];
uint parNameCount = 0;
do {
if (parNameCount >= MAX_PARNAMES) {
@@ -259,7 +259,7 @@ bool PascalImport::parseStmt() {
break;
}
}
- QString returnType;
+ TQString returnType;
if (keyword == "function") {
if (advance() != ":") {
kError() << "importPascal: expecting \":\" at function "
@@ -283,8 +283,8 @@ bool PascalImport::parseStmt() {
return true;
}
if (m_klass == NULL) {
- const QString& name = m_source[m_srcIndex];
- QString nextToken = advance();
+ const TQString& name = m_source[m_srcIndex];
+ TQString nextToken = advance();
if (nextToken != "=") {
kDebug() << "PascalImport::parseStmt(" << name << "): "
<< "expecting '=' at " << nextToken << endl;
@@ -325,15 +325,15 @@ bool PascalImport::parseStmt() {
UMLObject *ns = Import_Utils::createUMLObject(t, name,
m_scope[m_scopeIndex], m_comment);
UMLClassifier *klass = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
- QString lookAhead = m_source[m_srcIndex + 1];
+ m_comment = TQString();
+ TQString lookAhead = m_source[m_srcIndex + 1];
if (lookAhead == "(") {
advance();
do {
- QString base = advance();
+ TQString base = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class, base, NULL);
UMLClassifier *parent = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
+ m_comment = TQString();
Import_Utils::createGeneralization(klass, parent);
} while (advance() == ",");
if (m_source[m_srcIndex] != ")") {
@@ -379,7 +379,7 @@ bool PascalImport::parseStmt() {
skipStmt();
return true;
}
- QString name, stereotype;
+ TQString name, stereotype;
if (keyword == "property") {
stereotype = keyword;
name = advance();
@@ -392,11 +392,11 @@ bool PascalImport::parseStmt() {
skipStmt();
return true;
}
- QString typeName = advance();
- QString initialValue;
+ TQString typeName = advance();
+ TQString initialValue;
if (advance() == "=") {
initialValue = advance();
- QString token;
+ TQString token;
while ((token = advance()) != ";") {
initialValue.append(' ' + token);
}
diff --git a/umbrello/umbrello/codeimport/pascalimport.h b/umbrello/umbrello/codeimport/pascalimport.h
index 975dc423..55c0b2bd 100644
--- a/umbrello/umbrello/codeimport/pascalimport.h
+++ b/umbrello/umbrello/codeimport/pascalimport.h
@@ -38,7 +38,7 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& word);
+ void fillSource(const TQString& word);
/**
* Check for, and skip over, all modifiers following a method.
diff --git a/umbrello/umbrello/codeimport/pythonimport.cpp b/umbrello/umbrello/codeimport/pythonimport.cpp
index af59cf8a..2436699a 100644
--- a/umbrello/umbrello/codeimport/pythonimport.cpp
+++ b/umbrello/umbrello/codeimport/pythonimport.cpp
@@ -13,8 +13,8 @@
#include "pythonimport.h"
// qt/kde includes
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "import_utils.h"
@@ -41,26 +41,26 @@ void PythonImport::initVars() {
m_braceWasOpened = false;
}
-bool PythonImport::preprocess(QString& line) {
+bool PythonImport::preprocess(TQString& line) {
if (NativeImportBase::preprocess(line))
return true;
// Handle single line comment
int pos = line.find(m_singleLineCommentIntro);
if (pos != -1) {
- QString cmnt = line.mid(pos);
+ TQString cmnt = line.mid(pos);
m_source.append(cmnt);
m_srcIndex++;
if (pos == 0)
return true;
line = line.left(pos);
- line.remove( QRegExp("\\s+$") );
+ line.remove( TQRegExp("\\s+$") );
}
// Transform changes in indentation into braces a la C++/Java/Perl/...
- pos = line.find( QRegExp("\\S") );
+ pos = line.find( TQRegExp("\\S") );
if (pos == -1)
return true;
bool isContinuation = false;
- int leadingWhite = line.left(pos).contains( QRegExp("\\s") );
+ int leadingWhite = line.left(pos).contains( TQRegExp("\\s") );
if (leadingWhite > m_srcIndent[m_srcIndentIndex]) {
if (m_srcIndex == 0) {
kError() << "PythonImport::preprocess(): internal error 1" << endl;
@@ -80,7 +80,7 @@ bool PythonImport::preprocess(QString& line) {
}
}
if (line.endsWith(":")) {
- line.replace( QRegExp(":$"), "{" );
+ line.replace( TQRegExp(":$"), "{" );
m_braceWasOpened = true;
} else {
m_braceWasOpened = false;
@@ -90,20 +90,20 @@ bool PythonImport::preprocess(QString& line) {
return false; // The input was not completely consumed by preprocessing.
}
-void PythonImport::fillSource(const QString& word) {
- QString lexeme;
+void PythonImport::fillSource(const TQString& word) {
+ TQString lexeme;
const uint len = word.length();
for (uint i = 0; i < len; i++) {
- const QChar& c = word[i];
+ const TQChar& c = word[i];
if (c.isLetterOrNumber() || c == '_' || c == '.') {
lexeme += c;
} else {
if (!lexeme.isEmpty()) {
m_source.append(lexeme);
m_srcIndex++;
- lexeme = QString();
+ lexeme = TQString();
}
- m_source.append(QString(c));
+ m_source.append(TQString(c));
m_srcIndex++;
}
}
@@ -117,7 +117,7 @@ void PythonImport::skipBody() {
if (m_source[m_srcIndex] != "{")
skipStmt("{");
int braceNesting = 0;
- QString token;
+ TQString token;
while (!(token = advance()).isNull()) {
if (token == "}") {
if (braceNesting <= 0)
@@ -131,16 +131,16 @@ void PythonImport::skipBody() {
bool PythonImport::parseStmt() {
const uint srcLength = m_source.count();
- const QString& keyword = m_source[m_srcIndex];
+ const TQString& keyword = m_source[m_srcIndex];
if (keyword == "class") {
- const QString& name = advance();
+ const TQString& name = advance();
UMLObject *ns = Import_Utils::createUMLObject(Uml::ot_Class,
name, m_scope[m_scopeIndex], m_comment);
m_scope[++m_scopeIndex] = m_klass = static_cast<UMLClassifier*>(ns);
- m_comment = QString();
+ m_comment = TQString();
if (advance() == "(") {
while (m_srcIndex < srcLength - 1 && advance() != ")") {
- const QString& baseName = m_source[m_srcIndex];
+ const TQString& baseName = m_source[m_srcIndex];
Import_Utils::createGeneralization(m_klass, baseName);
if (advance() != ",")
break;
@@ -157,7 +157,7 @@ bool PythonImport::parseStmt() {
skipBody();
return true;
}
- const QString& name = advance();
+ const TQString& name = advance();
// operation
UMLOperation *op = Import_Utils::makeOperation(m_klass, name);
if (advance() != "(") {
@@ -166,7 +166,7 @@ bool PythonImport::parseStmt() {
return true;
}
while (m_srcIndex < srcLength && advance() != ")") {
- const QString& parName = m_source[m_srcIndex];
+ const TQString& parName = m_source[m_srcIndex];
UMLAttribute *att = Import_Utils::addMethodParameter(op, "string", parName);
if (advance() != ",")
break;
diff --git a/umbrello/umbrello/codeimport/pythonimport.h b/umbrello/umbrello/codeimport/pythonimport.h
index 41fea0d4..d5c62a91 100644
--- a/umbrello/umbrello/codeimport/pythonimport.h
+++ b/umbrello/umbrello/codeimport/pythonimport.h
@@ -38,7 +38,7 @@ protected:
/**
* Implement abstract operation from NativeImportBase.
*/
- void fillSource(const QString& line);
+ void fillSource(const TQString& line);
/**
* Reimplement operation from NativeImportBase.
@@ -48,7 +48,7 @@ protected:
* Removal of Python's indentation sensitivity simplifies subsequent
* processing using Umbrello's native import framework.
*/
- bool preprocess(QString& line);
+ bool preprocess(TQString& line);
/**
* Skip ahead to outermost closing brace
diff --git a/umbrello/umbrello/codemethodblock.cpp b/umbrello/umbrello/codemethodblock.cpp
index 4a6e1f6a..c5fc22be 100644
--- a/umbrello/umbrello/codemethodblock.cpp
+++ b/umbrello/umbrello/codemethodblock.cpp
@@ -22,7 +22,7 @@
// Constructors/Destructors
//
-CodeMethodBlock::CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj, const QString & body, const QString & comment)
+CodeMethodBlock::CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj, const TQString & body, const TQString & comment)
: CodeBlockWithComments ((CodeDocument*)doc, body, comment), OwnedCodeBlock (parentObj)
{
initFields();
@@ -46,28 +46,28 @@ CodeDocument * CodeMethodBlock::getParentDocument() {
/**
* Get the starting text that begins this method before the body is printed.
*/
-QString CodeMethodBlock::getStartMethodText() const {
+TQString CodeMethodBlock::getStartMethodText() const {
return m_startMethod;
}
/**
* Get the ending text that finishes this method after the body is printed.
*/
-QString CodeMethodBlock::getEndMethodText() const {
+TQString CodeMethodBlock::getEndMethodText() const {
return m_endMethod;
}
/**
* Set the starting text that begins this method before the body is printed.
*/
-void CodeMethodBlock::setStartMethodText (const QString &value) {
+void CodeMethodBlock::setStartMethodText (const TQString &value) {
m_startMethod = value;
}
/**
* Set the ending text that finishes this method after the body is printed.
*/
-void CodeMethodBlock::setEndMethodText (const QString &value) {
+void CodeMethodBlock::setEndMethodText (const TQString &value) {
m_endMethod = value;
}
@@ -83,7 +83,7 @@ void CodeMethodBlock::release () {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem) {
+void CodeMethodBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -92,7 +92,7 @@ void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & el
// set local class attributes
if(getContentType() != AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
elem.setAttribute("startMethodText",encodeText(getStartMethodText(),endLine));
elem.setAttribute("endMethodText",encodeText(getEndMethodText(),endLine));
}
@@ -102,7 +102,7 @@ void CodeMethodBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & el
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeMethodBlock::setAttributesFromNode ( QDomElement & elem) {
+void CodeMethodBlock::setAttributesFromNode ( TQDomElement & elem) {
// set attributes from the XMI
CodeBlockWithComments::setAttributesFromNode(elem); // superclass load
@@ -111,7 +111,7 @@ void CodeMethodBlock::setAttributesFromNode ( QDomElement & elem) {
// now load local attributes
if(getContentType() != AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setStartMethodText(decodeText(elem.attribute("startMethodText",""),endLine));
setEndMethodText(decodeText(elem.attribute("endMethodText",""),endLine));
}
@@ -135,21 +135,21 @@ void CodeMethodBlock::setAttributesFromObject(TextBlock * obj)
/**
* @return QString
*/
-QString CodeMethodBlock::toString ( ) {
+TQString CodeMethodBlock::toString ( ) {
- QString string = QString("");
+ TQString string = TQString("");
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString bodyIndent = getIndentationString(getIndentationLevel()+1);
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString indent = getIndentationString();
+ TQString bodyIndent = getIndentationString(getIndentationLevel()+1);
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString startMethod = formatMultiLineText ( getStartMethodText(), indent, endLine);
- QString body = formatMultiLineText (getText(), bodyIndent, endLine);
- QString endMethod = formatMultiLineText( getEndMethodText(), indent, endLine);
+ TQString startMethod = formatMultiLineText ( getStartMethodText(), indent, endLine);
+ TQString body = formatMultiLineText (getText(), bodyIndent, endLine);
+ TQString endMethod = formatMultiLineText( getEndMethodText(), indent, endLine);
- QString comment = getComment()->toString();
+ TQString comment = getComment()->toString();
if(!comment.isEmpty() && getComment()->getWriteOutText())
string.append(comment);
@@ -170,8 +170,8 @@ QString CodeMethodBlock::toString ( ) {
void CodeMethodBlock::initFields ( ) {
- m_startMethod = QString("");
- m_endMethod = QString("");
+ m_startMethod = TQString("");
+ m_endMethod = TQString("");
}
void CodeMethodBlock::syncToParent ( )
diff --git a/umbrello/umbrello/codemethodblock.h b/umbrello/umbrello/codemethodblock.h
index 65cbe2e8..41555627 100644
--- a/umbrello/umbrello/codemethodblock.h
+++ b/umbrello/umbrello/codemethodblock.h
@@ -18,7 +18,7 @@
#ifndef CODEMETHODBLOCK_H
#define CODEMETHODBLOCK_H
-#include <qstring.h>
+#include <tqstring.h>
#include "ownedcodeblock.h"
#include "codeblockwithcomments.h"
@@ -45,7 +45,7 @@ public:
* Constructors
*/
CodeMethodBlock ( ClassifierCodeDocument * doc, UMLObject * parentObj,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -58,17 +58,17 @@ public:
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/**
* Get the starting text that begins this method before the body is printed.
*/
- QString getStartMethodText () const;
+ TQString getStartMethodText () const;
/**
* Get the ending text that finishes this method after the body is printed.
*/
- QString getEndMethodText () const;
+ TQString getEndMethodText () const;
// get the parent code document
CodeDocument * getParentDocument();
@@ -85,12 +85,12 @@ protected:
/**
* Set the starting text that begins this method before the body is printed.
*/
- void setStartMethodText (const QString &value);
+ void setStartMethodText (const TQString &value);
/**
* Set the ending text that finishes this method after the body is printed.
*/
- void setEndMethodText (const QString &value);
+ void setEndMethodText (const TQString &value);
/** this is the method called from within syncToparent().
* to update the start and end Method text. It is called
@@ -107,12 +107,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
@@ -120,8 +120,8 @@ protected:
private:
- QString m_startMethod;
- QString m_endMethod;
+ TQString m_startMethod;
+ TQString m_endMethod;
void initFields ( );
diff --git a/umbrello/umbrello/codeoperation.cpp b/umbrello/umbrello/codeoperation.cpp
index 3e98af8f..13f5121b 100644
--- a/umbrello/umbrello/codeoperation.cpp
+++ b/umbrello/umbrello/codeoperation.cpp
@@ -32,7 +32,7 @@
// Constructors/Destructors
//
-CodeOperation::CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parentOp, const QString & body, const QString & comment)
+CodeOperation::CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parentOp, const TQString & body, const TQString & comment)
: CodeMethodBlock ( doc, parentOp, body, comment)
{
init(parentOp);
@@ -67,11 +67,11 @@ void CodeOperation::removeParameter ( CodeParameter * remove_object ) {
/**
* Get the list of Parameter objects held by m_parameterVector
- * @return QPtrList<CodeParameter *> list of Parameter objects held by
+ * @return TQPtrList<CodeParameter *> list of Parameter objects held by
* m_parameterVector
*/
/*
-QPtrList<CodeParameter> CodeOperation::getParameterList ( ) {
+TQPtrList<CodeParameter> CodeOperation::getParameterList ( ) {
return m_parameterVector;
}
*/
@@ -88,8 +88,8 @@ UMLOperation * CodeOperation::getParentOperation( ) {
/** Save the XMI representation of this object
*/
-void CodeOperation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "codeoperation" );
+void CodeOperation::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "codeoperation" );
// set attributes
setAttributesOnNode(doc, blockElement);
@@ -100,19 +100,19 @@ void CodeOperation::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
/**
* load params from the appropriate XMI element node.
*/
-void CodeOperation::loadFromXMI ( QDomElement & root )
+void CodeOperation::loadFromXMI ( TQDomElement & root )
{
setAttributesFromNode(root);
}
-QString CodeOperation::findTag (UMLOperation * op) {
- return QString("operation_" + ID2STR(op->getID()));
+TQString CodeOperation::findTag (UMLOperation * op) {
+ return TQString("operation_" + ID2STR(op->getID()));
}
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void CodeOperation::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem)
+void CodeOperation::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & elem)
{
CodeMethodBlock::setAttributesOnNode(doc,elem); // superclass
@@ -122,7 +122,7 @@ void CodeOperation::setAttributesOnNode ( QDomDocument & doc, QDomElement & elem
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeOperation::setAttributesFromNode ( QDomElement & element)
+void CodeOperation::setAttributesFromNode ( TQDomElement & element)
{
CodeMethodBlock::setAttributesFromNode(element); // superclass
@@ -133,7 +133,7 @@ void CodeOperation::setAttributesFromNode ( QDomElement & element)
// we simply need to record the parent operation here
// m_parentOperation->disconnect(this); // always disconnect from current parent
- QString idStr = element.attribute("parent_id","-1");
+ TQString idStr = element.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
UMLObject * obj = UMLApp::app()->getDocument()->findObjectById(id);
UMLOperation * op = dynamic_cast<UMLOperation*>(obj);
@@ -163,7 +163,7 @@ void CodeOperation::init (UMLOperation * parentOp)
setTag(CodeOperation::findTag(parentOp));
// not needed.. done by parent "ownedcodeblock" class
- // connect(parentOp,SIGNAL(modified()),this,SLOT(syncToParent()));
+ // connect(parentOp,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
diff --git a/umbrello/umbrello/codeoperation.h b/umbrello/umbrello/codeoperation.h
index abe97e75..7ac63dd3 100644
--- a/umbrello/umbrello/codeoperation.h
+++ b/umbrello/umbrello/codeoperation.h
@@ -17,7 +17,7 @@
#ifndef CODEOPERATION_H
#define CODEOPERATION_H
-#include <qstring.h>
+#include <tqstring.h>
#include "codemethodblock.h"
#include "operation.h"
@@ -36,7 +36,7 @@ public:
* Constructors
*/
CodeOperation ( ClassifierCodeDocument * doc , UMLOperation * parent,
- const QString & body = "", const QString & comment = "");
+ const TQString & body = "", const TQString & comment = "");
/**
* Empty Destructor
@@ -51,16 +51,16 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/** Find the value of the tag that this operation would have.
*/
- static QString findTag (UMLOperation * op) ;
+ static TQString findTag (UMLOperation * op) ;
/** set the class attributes from a passed object
*/
@@ -69,17 +69,17 @@ public:
protected:
// list of parameters used by this code operation.
- // QPtrList<CodeParameter> m_parameterVector;
+ // TQPtrList<CodeParameter> m_parameterVector;
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
virtual void updateMethodDeclaration() = 0;
virtual void updateContent();
diff --git a/umbrello/umbrello/codeparameter.cpp b/umbrello/umbrello/codeparameter.cpp
index f2f429fa..5ee7345c 100644
--- a/umbrello/umbrello/codeparameter.cpp
+++ b/umbrello/umbrello/codeparameter.cpp
@@ -34,7 +34,7 @@
//
CodeParameter::CodeParameter ( ClassifierCodeDocument * parentDoc, UMLObject * parentObject )
- : QObject ( (QObject*) parentObject, "ACodeParam")
+ : TQObject ( (TQObject*) parentObject, "ACodeParam")
{
initFields( parentDoc, parentObject );
}
@@ -71,7 +71,7 @@ bool CodeParameter::getStatic ( ) {
* The name of this code parameter.
* @return the value
*/
-QString CodeParameter::getName ( ) const {
+TQString CodeParameter::getName ( ) const {
return m_parentObject->getName();
}
@@ -81,7 +81,7 @@ QString CodeParameter::getName ( ) const {
* an object)
* @return the value of type
*/
-QString CodeParameter::getTypeName ( ) {
+TQString CodeParameter::getTypeName ( ) {
UMLAttribute * at = (UMLAttribute*) m_parentObject;
return at->getTypeName();
}
@@ -100,7 +100,7 @@ Uml::Visibility CodeParameter::getVisibility ( ) const {
* The initial value of this code parameter
* @param new_var the new value of m_initialValue
*/
-void CodeParameter::setInitialValue ( const QString &new_var ) {
+void CodeParameter::setInitialValue ( const TQString &new_var ) {
m_initialValue = new_var;
}
@@ -109,7 +109,7 @@ void CodeParameter::setInitialValue ( const QString &new_var ) {
* The initial value of this code parameter
* @return the value of m_initialValue
*/
-QString CodeParameter::getInitialValue ( ) {
+TQString CodeParameter::getInitialValue ( ) {
return m_initialValue;
}
@@ -141,7 +141,7 @@ UMLObject * CodeParameter::getParentObject ( ) {
// need to get the ID of the parent object
// this is kind of broken for UMLRoles.
-QString CodeParameter::getID () {
+TQString CodeParameter::getID () {
UMLRole * role = dynamic_cast<UMLRole*>(m_parentObject);
if(role)
{
@@ -157,7 +157,7 @@ QString CodeParameter::getID () {
// Other methods
//
-void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void CodeParameter::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
@@ -176,7 +176,7 @@ void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & bloc
blockElement.setAttribute("initialValue",getInitialValue());
// a comment which we will store in its own separate child node block
- QDomElement commElement = doc.createElement( "header" );
+ TQDomElement commElement = doc.createElement( "header" );
getComment()->saveToXMI(doc, commElement); // comment
blockElement.appendChild( commElement);
@@ -185,10 +185,10 @@ void CodeParameter::setAttributesOnNode ( QDomDocument & doc, QDomElement & bloc
/** set the class attributes of this object from
* the passed element node.
*/
-void CodeParameter::setAttributesFromNode ( QDomElement & root) {
+void CodeParameter::setAttributesFromNode ( TQDomElement & root) {
// set local attributes, parent object first
- QString idStr = root.attribute("parent_id","-1");
+ TQString idStr = root.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
// always disconnect
@@ -238,14 +238,14 @@ void CodeParameter::setAttributesFromNode ( QDomElement & root) {
// load comment now
// by looking for our particular child element
- QDomNode node = root.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = root.firstChild();
+ TQDomElement element = node.toElement();
bool gotComment = false;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if( tag == "header" ) {
- QDomNode cnode = element.firstChild();
- QDomElement celem = cnode.toElement();
+ TQDomNode cnode = element.firstChild();
+ TQDomElement celem = cnode.toElement();
getComment()->loadFromXMI(celem);
gotComment = true;
break;
@@ -276,12 +276,12 @@ void CodeParameter::initFields ( ClassifierCodeDocument * doc, UMLObject * obj)
m_parentObject = obj;
m_parentDocument = doc;
- m_initialValue = QString("");
+ m_initialValue = TQString("");
m_comment = CodeGenFactory::newCodeComment(m_parentDocument);
m_comment->setText(getParentObject()->getDoc());
- connect(m_parentObject,SIGNAL(modified()),this,SLOT(syncToParent()));
+ connect(m_parentObject,TQT_SIGNAL(modified()),this,TQT_SLOT(syncToParent()));
}
#include "codeparameter.moc"
diff --git a/umbrello/umbrello/codeparameter.h b/umbrello/umbrello/codeparameter.h
index 8ee4dc45..05fa96f8 100644
--- a/umbrello/umbrello/codeparameter.h
+++ b/umbrello/umbrello/codeparameter.h
@@ -82,7 +82,7 @@ public:
* The name of this code parameter.
* @return the value of parameter name
*/
- QString getName ( ) const;
+ TQString getName ( ) const;
/**
* Get the value of m_typeName
@@ -90,7 +90,7 @@ public:
* an object)
* @return the value of m_typeName
*/
- virtual QString getTypeName ( );
+ virtual TQString getTypeName ( );
/**
* Get the value of m_visibility
@@ -104,14 +104,14 @@ public:
* The initial value of this code parameter
* @param new_var the new value of m_initialValue
*/
- virtual void setInitialValue ( const QString &new_var );
+ virtual void setInitialValue ( const TQString &new_var );
/**
* Get the value of m_initialValue
* The initial value of this code parameter
* @return the value of m_initialValue
*/
- virtual QString getInitialValue ( );
+ virtual TQString getInitialValue ( );
/**
* Set a Comment
@@ -124,7 +124,7 @@ public:
CodeComment * getComment ( );
// the id of this parameter is the same as the parent UMLObject id.
- QString getID ();
+ TQString getID ();
protected:
@@ -133,12 +133,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
private:
@@ -147,7 +147,7 @@ private:
CodeComment * m_comment;
// The initial value of this code parameter
- QString m_initialValue;
+ TQString m_initialValue;
void initFields ( ClassifierCodeDocument * doc, UMLObject * obj);
diff --git a/umbrello/umbrello/codeviewerstate.h b/umbrello/umbrello/codeviewerstate.h
index 0a45fce9..aab0f60b 100644
--- a/umbrello/umbrello/codeviewerstate.h
+++ b/umbrello/umbrello/codeviewerstate.h
@@ -12,8 +12,8 @@
#ifndef CODEVIEWERSTATE_H
#define CODEVIEWERSTATE_H
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
namespace Settings {
@@ -23,14 +23,14 @@ struct CodeViewerState {
int width;
bool showHiddenBlocks;
bool blocksAreHighlighted;
- QFont font;
- QColor paperColor;
- QColor fontColor;
- QColor selectedColor;
- QColor editBlockColor;
- QColor nonEditBlockColor;
- QColor umlObjectColor;
- QColor hiddenColor;
+ TQFont font;
+ TQColor paperColor;
+ TQColor fontColor;
+ TQColor selectedColor;
+ TQColor editBlockColor;
+ TQColor nonEditBlockColor;
+ TQColor umlObjectColor;
+ TQColor hiddenColor;
};
}
diff --git a/umbrello/umbrello/component.cpp b/umbrello/umbrello/component.cpp
index 6c8f674b..eb69ccd1 100644
--- a/umbrello/umbrello/component.cpp
+++ b/umbrello/umbrello/component.cpp
@@ -20,7 +20,7 @@
#include "model_utils.h"
#include "clipboard/idchangelog.h"
-UMLComponent::UMLComponent(const QString & name, Uml::IDType id)
+UMLComponent::UMLComponent(const TQString & name, Uml::IDType id)
: UMLPackage(name, id) {
init();
}
@@ -39,12 +39,12 @@ UMLObject* UMLComponent::clone() const {
return clone;
}
-void UMLComponent::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement componentElement = UMLObject::save("UML:Component", qDoc);
+void UMLComponent::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement componentElement = UMLObject::save("UML:Component", qDoc);
componentElement.setAttribute("executable", m_executable);
// Save contained components if any.
if (m_objects.count()) {
- QDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedElement = qDoc.createElement( "UML:Namespace.ownedElement" );
for (UMLObject *obj = m_objects.first(); obj; obj = m_objects.next())
obj->saveToXMI (qDoc, ownedElement);
componentElement.appendChild(ownedElement);
@@ -52,15 +52,15 @@ void UMLComponent::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(componentElement);
}
-bool UMLComponent::load(QDomElement& element) {
- QString executable = element.attribute("executable", "0");
+bool UMLComponent::load(TQDomElement& element) {
+ TQString executable = element.attribute("executable", "0");
m_executable = (bool)executable.toInt();
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (Uml::tagEq(type, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/component.h b/umbrello/umbrello/component.h
index 014cf39e..c67495ab 100644
--- a/umbrello/umbrello/component.h
+++ b/umbrello/umbrello/component.h
@@ -36,7 +36,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLComponent(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLComponent(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -57,7 +57,7 @@ public:
* Creates the UML:Component element including its operations,
* attributes and templates
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* sets m_executable
@@ -74,7 +74,7 @@ protected:
* Loads the UML:Component element including its operations,
* attributes and templates
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/componentwidget.cpp b/umbrello/umbrello/componentwidget.cpp
index f4c38270..84bae8b0 100644
--- a/umbrello/umbrello/componentwidget.cpp
+++ b/umbrello/umbrello/componentwidget.cpp
@@ -13,7 +13,7 @@
#include "componentwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
// app includes
#include <kdebug.h>
@@ -45,13 +45,13 @@ void ComponentWidget::init() {
ComponentWidget::~ComponentWidget() {}
-void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void ComponentWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLComponent *umlcomp = static_cast<UMLComponent*>(m_pObject);
if (umlcomp == NULL)
return;
UMLWidget::setPen(p);
if ( umlcomp->getExecutable() ) {
- QPen thickerPen = p.pen();
+ TQPen thickerPen = p.pen();
thickerPen.setWidth(2);
p.setPen(thickerPen);
}
@@ -63,18 +63,18 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
- const QString stereotype = m_pObject->getStereotype();
+ TQString name = getName();
+ const TQString stereotype = m_pObject->getStereotype();
p.drawRect(offsetX + 2*COMPONENT_MARGIN, offsetY, w - 2*COMPONENT_MARGIN, h);
p.drawRect(offsetX, offsetY + h/2 - fontHeight/2 - fontHeight, COMPONENT_MARGIN*4, fontHeight);
p.drawRect(offsetX, offsetY + h/2 + fontHeight/2, COMPONENT_MARGIN*4, fontHeight);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
@@ -105,14 +105,14 @@ void ComponentWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize ComponentWidget::calculateSize() {
+TQSize ComponentWidget::calculateSize() {
if ( !m_pObject) {
- return QSize(70, 70);
+ return TQSize(70, 70);
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
- QString name = m_pObject->getName();
+ TQString name = m_pObject->getName();
if ( UMLWidget::getIsInstance() ) {
name = UMLWidget::getInstanceName() + " : " + name;
}
@@ -130,11 +130,11 @@ QSize ComponentWidget::calculateSize() {
int height = (2*fontHeight) + (COMPONENT_MARGIN * 3);
- return QSize(width, height);
+ return TQSize(width, height);
}
-void ComponentWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("componentwidget");
+void ComponentWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("componentwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/componentwidget.h b/umbrello/umbrello/componentwidget.h
index 7266ef01..d07b0536 100644
--- a/umbrello/umbrello/componentwidget.h
+++ b/umbrello/umbrello/componentwidget.h
@@ -46,18 +46,18 @@ public:
/**
* Overrides standard method
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "componentwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/configurable.cpp b/umbrello/umbrello/configurable.cpp
index 5aaec43c..2b2447b3 100644
--- a/umbrello/umbrello/configurable.cpp
+++ b/umbrello/umbrello/configurable.cpp
@@ -19,7 +19,7 @@
#include "configurable.h"
// Qt includes
-#include <qstringlist.h>
+#include <tqstringlist.h>
// KDE includes
#include <kdebug.h>
@@ -45,13 +45,13 @@ Configurable::~Configurable()
bool
Configurable::loadPlugins(KConfig *config,
- const QString &key)
+ const TQString &key)
{
bool ret = true;
- QStringList names = config->readListEntry(key);
+ TQStringList names = config->readListEntry(key);
for(uint i = 0; i != names.size(); i++) {
- const QString &name = names[i];
+ const TQString &name = names[i];
kdDebug() << "loading plugin " << name << endl;
diff --git a/umbrello/umbrello/configurable.h b/umbrello/umbrello/configurable.h
index 8debcba1..e26c4e87 100644
--- a/umbrello/umbrello/configurable.h
+++ b/umbrello/umbrello/configurable.h
@@ -19,8 +19,8 @@
#ifndef UMBRELLO_CONFIGURABLE_H
#define UMBRELLO_CONFIGURABLE_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
// forward declarations
class KLibrary;
@@ -97,7 +97,7 @@ protected:
*
* @return True on success, false on failure.
*/
- bool loadPlugins(KConfig *config, const QString &key);
+ bool loadPlugins(KConfig *config, const TQString &key);
/**
* This is a convenience method for derived classes. When a functional object
@@ -109,7 +109,7 @@ protected:
bool unloadPlugins();
private:
- typedef QPtrList<Plugin> PluginList;
+ typedef TQPtrList<Plugin> PluginList;
PluginList _plugins; ///< List of loaded plugins
};
diff --git a/umbrello/umbrello/datatypewidget.cpp b/umbrello/umbrello/datatypewidget.cpp
index 33509b95..4e8aef78 100644
--- a/umbrello/umbrello/datatypewidget.cpp
+++ b/umbrello/umbrello/datatypewidget.cpp
@@ -13,7 +13,7 @@
#include "datatypewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -39,7 +39,7 @@ void DatatypeWidget::init() {
m_pMenu = 0;
}
-void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void DatatypeWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if (UMLWidget::getUseFillColour()) {
p.setBrush(UMLWidget::getFillColour());
@@ -50,14 +50,14 @@ void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
p.drawText(offsetX + DATATYPE_MARGIN, offsetY,
@@ -74,12 +74,12 @@ void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize DatatypeWidget::calculateSize() {
+TQSize DatatypeWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
int lines = 1;//always have one line - for name
@@ -99,16 +99,16 @@ QSize DatatypeWidget::calculateSize() {
//allow for width margin
width += DATATYPE_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void DatatypeWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement conceptElement = qDoc.createElement("datatypewidget");
+void DatatypeWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("datatypewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
-bool DatatypeWidget::loadFromXMI( QDomElement & qElement ) {
+bool DatatypeWidget::loadFromXMI( TQDomElement & qElement ) {
return UMLWidget::loadFromXMI(qElement);
}
diff --git a/umbrello/umbrello/datatypewidget.h b/umbrello/umbrello/datatypewidget.h
index fb60d536..81a53ca6 100644
--- a/umbrello/umbrello/datatypewidget.h
+++ b/umbrello/umbrello/datatypewidget.h
@@ -46,23 +46,23 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "datatypewidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from a "datatypewidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/dialog_utils.cpp b/umbrello/umbrello/dialog_utils.cpp
index a6d1ff2c..43e92a93 100644
--- a/umbrello/umbrello/dialog_utils.cpp
+++ b/umbrello/umbrello/dialog_utils.cpp
@@ -13,10 +13,10 @@
#include "dialog_utils.h"
// qt/kde includes
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <kinputdialog.h>
// app includes
@@ -25,26 +25,26 @@
namespace Dialog_Utils {
-QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, int row,
- QLabel * &label, const QString& labelText,
- QLineEdit * &editField,
- const QString& editFieldText /* = QString::null */)
+TQLineEdit* makeLabeledEditField(TQGroupBox *containingBox, TQGridLayout *layout, int row,
+ TQLabel * &label, const TQString& labelText,
+ TQLineEdit * &editField,
+ const TQString& editFieldText /* = TQString::null */)
{
- label = new QLabel(labelText, containingBox);
+ label = new TQLabel(labelText, containingBox);
layout->addWidget(label, row, 0);
- editField = new QLineEdit(editFieldText, containingBox);
+ editField = new TQLineEdit(editFieldText, containingBox);
layout->addWidget(editField, row, 1 );
label->setBuddy(editField);
return editField;
}
-void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
- const QString& dialogPrompt, const QString& defaultName) {
+void askNameForWidget(UMLWidget * &targetWidget, const TQString& dialogTitle,
+ const TQString& dialogPrompt, const TQString& defaultName) {
bool pressedOK = false;
- QString name = KInputDialog::getText(dialogTitle, dialogPrompt, defaultName, &pressedOK, UMLApp::app());
+ TQString name = KInputDialog::getText(dialogTitle, dialogPrompt, defaultName, &pressedOK, UMLApp::app());
if (pressedOK) {
targetWidget->setName(name);
diff --git a/umbrello/umbrello/dialog_utils.h b/umbrello/umbrello/dialog_utils.h
index a414a7a7..0ee2f59a 100644
--- a/umbrello/umbrello/dialog_utils.h
+++ b/umbrello/umbrello/dialog_utils.h
@@ -12,7 +12,7 @@
#ifndef DIALOG_UTILS_H
#define DIALOG_UTILS_H
-#include <qstring.h>
+#include <tqstring.h>
class QGroupBox;
class QGridLayout;
@@ -30,19 +30,19 @@ namespace Dialog_Utils {
/**
* Create a labeled text lineedit widget.
*
- * @param containingBox The containing QGroupBox.
- * @param layout The QGridLayout to use.
- * @param row The row number within the QGridLayout.
- * @param label The QLabel object allocated (return value)
+ * @param containingBox The containing TQGroupBox.
+ * @param layout The TQGridLayout to use.
+ * @param row The row number within the TQGridLayout.
+ * @param label The TQLabel object allocated (return value)
* @param labelText The label text.
- * @param editField The QLineEdit object allocated (return value)
+ * @param editField The TQLineEdit object allocated (return value)
* @param editFieldText Initialization text in the editField (optional.)
- * @return a pointer to the QLineEdit so you can setFocus() if necessary
+ * @return a pointer to the TQLineEdit so you can setFocus() if necessary
*/
-QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, int row,
- QLabel * &label, const QString& labelText,
- QLineEdit * &editField,
- const QString& editFieldText = QString::null);
+TQLineEdit* makeLabeledEditField(TQGroupBox *containingBox, TQGridLayout *layout, int row,
+ TQLabel * &label, const TQString& labelText,
+ TQLineEdit * &editField,
+ const TQString& editFieldText = TQString::null);
/**
* Helper function for requesting a name for an UMLWidget using a dialog.
@@ -54,8 +54,8 @@ QLineEdit* makeLabeledEditField(QGroupBox *containingBox, QGridLayout *layout, i
* @param dialogPrompt Prompt of the dialog.
* @param defaultName Default value of the name field.
*/
-void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
- const QString& dialogPrompt, const QString& defaultName);
+void askNameForWidget(UMLWidget * &targetWidget, const TQString& dialogTitle,
+ const TQString& dialogPrompt, const TQString& defaultName);
}
diff --git a/umbrello/umbrello/dialogs/activitydialog.cpp b/umbrello/umbrello/dialogs/activitydialog.cpp
index d34782a5..ed7f779e 100644
--- a/umbrello/umbrello/dialogs/activitydialog.cpp
+++ b/umbrello/umbrello/dialogs/activitydialog.cpp
@@ -13,7 +13,7 @@
#include "activitydialog.h"
//qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
//kde includes
#include <kiconloader.h>
@@ -67,17 +67,17 @@ void ActivityDialog::applyPage( Page page ) {
}
void ActivityDialog::setupGeneralPage() {
- QString types[ ] = { i18n("Initial activity"), i18n("Activity"), i18n("End activity"), i18n( "Branch/Merge"), i18n( "Fork/Join" ) };
+ TQString types[ ] = { i18n("Initial activity"), i18n("Activity"), i18n("End activity"), i18n( "Branch/Merge"), i18n( "Fork/Join" ) };
ActivityWidget::ActivityType type = m_pActivityWidget -> getActivityType();
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
- m_GenPageWidgets.generalGB = new QGroupBox( i18n( "Properties"), (QWidget *)page );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
+ m_GenPageWidgets.generalGB = new TQGroupBox( i18n( "Properties"), (TQWidget *)page );
- QGridLayout * generalLayout = new QGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
+ TQGridLayout * generalLayout = new TQGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
generalLayout -> setSpacing( spacingHint() );
generalLayout -> setMargin( fontMetrics().height() );
- QString actType ( types[ (int)type ] );
+ TQString actType ( types[ (int)type ] );
Dialog_Utils::makeLabeledEditField( m_GenPageWidgets.generalGB, generalLayout, 0,
m_GenPageWidgets.typeL, i18n("Activity type:"),
m_GenPageWidgets.typeLE, actType );
@@ -87,13 +87,13 @@ void ActivityDialog::setupGeneralPage() {
m_GenPageWidgets.nameL, i18n("Activity name:"),
m_GenPageWidgets.nameLE );
- m_GenPageWidgets.docGB = new QGroupBox( i18n( "Documentation"), (QWidget *)page );
+ m_GenPageWidgets.docGB = new TQGroupBox( i18n( "Documentation"), (TQWidget *)page );
- QHBoxLayout * docLayout = new QHBoxLayout( m_GenPageWidgets.docGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_GenPageWidgets.docGB );
docLayout -> setSpacing( spacingHint() );
docLayout -> setMargin( fontMetrics().height() );
- m_GenPageWidgets.docMLE = new QMultiLineEdit( m_GenPageWidgets.docGB );
+ m_GenPageWidgets.docMLE = new TQMultiLineEdit( m_GenPageWidgets.docGB );
m_GenPageWidgets.docMLE -> setText( m_pActivityWidget -> getDoc() );
docLayout -> addWidget( m_GenPageWidgets.docMLE );
@@ -105,14 +105,14 @@ void ActivityDialog::setupGeneralPage() {
}
void ActivityDialog::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pActivityWidget -> getFont() );
}
void ActivityDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, m_pActivityWidget );
m_pColorLayout -> addWidget(m_pColorPage);
}
diff --git a/umbrello/umbrello/dialogs/activitydialog.h b/umbrello/umbrello/dialogs/activitydialog.h
index 4dc5980b..ccc746c3 100644
--- a/umbrello/umbrello/dialogs/activitydialog.h
+++ b/umbrello/umbrello/dialogs/activitydialog.h
@@ -13,10 +13,10 @@
#define ACTIVITYDIALOG_H
//qt class includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqgroupbox.h>
//kde class includes
#include <kdialogbase.h>
@@ -124,11 +124,11 @@ protected:
bool m_bChangesMade;
struct GeneralPageWidgets {
- QLabel * nameL, * typeL;
- QLineEdit * nameLE, * typeLE;
- QMultiLineEdit * docMLE;
+ TQLabel * nameL, * typeL;
+ TQLineEdit * nameLE, * typeLE;
+ TQMultiLineEdit * docMLE;
- QGroupBox * docGB, * generalGB;
+ TQGroupBox * docGB, * generalGB;
}
m_GenPageWidgets;
};
diff --git a/umbrello/umbrello/dialogs/activitypage.cpp b/umbrello/umbrello/dialogs/activitypage.cpp
index 8d3f5931..5a728576 100644
--- a/umbrello/umbrello/dialogs/activitypage.cpp
+++ b/umbrello/umbrello/dialogs/activitypage.cpp
@@ -18,10 +18,10 @@
#include <klocale.h>
#include <kbuttonbox.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
-ActivityPage::ActivityPage( QWidget * pParent, StateWidget * pWidget ) : QWidget( pParent ) {
+ActivityPage::ActivityPage( TQWidget * pParent, StateWidget * pWidget ) : TQWidget( pParent ) {
m_pStateWidget = pWidget;
m_pMenu = 0;
setupPage();
@@ -32,24 +32,24 @@ ActivityPage::~ActivityPage() {}
void ActivityPage::setupPage() {
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( this );
mainLayout -> setSpacing(10);
- m_pActivityGB = new QGroupBox(i18n("Activities"), this );
+ m_pActivityGB = new TQGroupBox(i18n("Activities"), this );
// vertical box layout for the activity lists, arrow buttons and the button box
- QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pActivityGB );
+ TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pActivityGB );
listVBoxLayout -> setMargin(margin);
listVBoxLayout -> setSpacing ( 10 );
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout );
+ TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout );
- m_pActivityLB = new QListBox(m_pActivityGB );
+ m_pActivityLB = new TQListBox(m_pActivityGB );
listHBoxLayout -> addWidget(m_pActivityLB);
- QVBoxLayout * buttonLayout = new QVBoxLayout( listHBoxLayout );
+ TQVBoxLayout * buttonLayout = new TQVBoxLayout( listHBoxLayout );
m_pTopArrowB = new KArrowButton( m_pActivityGB );
m_pTopArrowB -> setEnabled( false );
@@ -69,42 +69,42 @@ void ActivityPage::setupPage() {
KButtonBox* buttonBox = new KButtonBox(m_pActivityGB);
- buttonBox->addButton( i18n("New Activity..."), this, SLOT(slotNewActivity()) );
+ buttonBox->addButton( i18n("New Activity..."), this, TQT_SLOT(slotNewActivity()) );
m_pDeleteActivityButton = buttonBox->addButton( i18n("Delete"),
- this, SLOT(slotDelete()) );
- m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, SLOT(slotRename()) );
+ this, TQT_SLOT(slotDelete()) );
+ m_pRenameButton = buttonBox->addButton( i18n("Rename"), this, TQT_SLOT(slotRename()) );
listVBoxLayout->addWidget(buttonBox);
mainLayout -> addWidget( m_pActivityGB );
//now fill activity list box
- QStringList list = m_pStateWidget -> getActivityList();
- QStringList::Iterator end(list.end());
+ TQStringList list = m_pStateWidget -> getActivityList();
+ TQStringList::Iterator end(list.end());
- for( QStringList::Iterator it(list.begin()); it != end; ++it ) {
+ for( TQStringList::Iterator it(list.begin()); it != end; ++it ) {
m_pActivityLB -> insertItem( *it );
}
//now setup the signals
- connect(m_pActivityLB, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotClicked(QListBoxItem *)));
- connect(m_pActivityLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(clicked(TQListBoxItem *)), this, TQT_SLOT(slotClicked(TQListBoxItem *)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pActivityLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pActivityLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
- connect( m_pTopArrowB, SIGNAL( clicked() ), this, SLOT( slotTopClicked() ) );
- connect( m_pUpArrowB, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
- connect( m_pDownArrowB, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
- connect( m_pBottomArrowB, SIGNAL( clicked() ), this, SLOT( slotBottomClicked() ) );
+ connect( m_pTopArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTopClicked() ) );
+ connect( m_pUpArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
+ connect( m_pDownArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
+ connect( m_pBottomArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBottomClicked() ) );
- connect( m_pActivityLB, SIGNAL( doubleClicked( QListBoxItem* ) ), this, SLOT( slotDoubleClicked( QListBoxItem* ) ) );
+ connect( m_pActivityLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), this, TQT_SLOT( slotDoubleClicked( TQListBoxItem* ) ) );
enableWidgets(false);
}
void ActivityPage::updateActivities() {
- QStringList list;
+ TQStringList list;
int count = m_pActivityLB -> count();
for( int i = 0; i < count; i++ ) {
list.append( m_pActivityLB -> text( i ) );
@@ -130,7 +130,7 @@ void ActivityPage::slotMenuSelection( int sel ) {
void ActivityPage::slotNewActivity() {
bool ok = false;
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
name = KInputDialog::getText( i18n("New Activity"), i18n("Enter the name of the new activity:"),
i18n("new activity"), &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
@@ -140,7 +140,7 @@ void ActivityPage::slotNewActivity() {
}
void ActivityPage::slotDelete() {
- QString name = m_pActivityLB->currentText();
+ TQString name = m_pActivityLB->currentText();
m_pStateWidget->removeActivity(name);
m_pActivityLB->removeItem( m_pActivityLB->currentItem() );
slotClicked(0);
@@ -148,8 +148,8 @@ void ActivityPage::slotDelete() {
void ActivityPage::slotRename() {
bool ok = false;
- QString name = m_pActivityLB -> currentText();
- QString oldName = name;
+ TQString name = m_pActivityLB -> currentText();
+ TQString oldName = name;
name = KInputDialog::getText( i18n("Rename Activity"), i18n("Enter the new name of the activity:"), name, &ok, UMLApp::app() );
if( ok && name.length() > 0 ) {
m_pActivityLB -> changeItem( name, m_pActivityLB -> currentItem());
@@ -157,16 +157,16 @@ void ActivityPage::slotRename() {
}
}
-void ActivityPage::slotRightButtonClicked(QListBoxItem * /*item*/, const QPoint &/* p*/) {
+void ActivityPage::slotRightButtonClicked(TQListBoxItem * /*item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
+void ActivityPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p)
{
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if( item ) { //pressed on an item
@@ -177,13 +177,13 @@ void ActivityPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p)
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
}
@@ -195,11 +195,11 @@ void ActivityPage::slotTopClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, 0 );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( 0 );
+ TQListBoxItem* item = m_pActivityLB->item( 0 );
m_pActivityLB->setSelected( item, true );
slotClicked(item);
@@ -214,12 +214,12 @@ void ActivityPage::slotUpClicked() {
}
//swap the text around ( meaning attributes )
- QString aboveString = m_pActivityLB -> text( index - 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString aboveString = m_pActivityLB -> text( index - 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index -1 );
m_pActivityLB -> changeItem( aboveString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index - 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index - 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -233,12 +233,12 @@ void ActivityPage::slotDownClicked() {
}
//swap the text around ( meaning attributes )
- QString belowString = m_pActivityLB -> text( index + 1 );
- QString currentString = m_pActivityLB -> text( index );
+ TQString belowString = m_pActivityLB -> text( index + 1 );
+ TQString currentString = m_pActivityLB -> text( index );
m_pActivityLB -> changeItem( currentString, index + 1 );
m_pActivityLB -> changeItem( belowString, index );
//set the moved atttribute selected
- QListBoxItem * item = m_pActivityLB -> item( index + 1 );
+ TQListBoxItem * item = m_pActivityLB -> item( index + 1 );
m_pActivityLB -> setSelected( item, true );
slotClicked(item);
}
@@ -252,18 +252,18 @@ void ActivityPage::slotBottomClicked() {
return;
//swap the text around in the ListBox
- QString currentString = m_pActivityLB->text( index );
+ TQString currentString = m_pActivityLB->text( index );
m_pActivityLB->removeItem( index );
m_pActivityLB->insertItem( currentString, m_pActivityLB->count() );
//set the moved item selected
- QListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
+ TQListBoxItem* item = m_pActivityLB->item( m_pActivityLB->count() - 1 );
m_pActivityLB->setSelected( item, true );
slotClicked( item );
}
-void ActivityPage::slotClicked(QListBoxItem *item) {
+void ActivityPage::slotClicked(TQListBoxItem *item) {
//make sure clicked on an item
if(!item) {
enableWidgets(false);
@@ -273,7 +273,7 @@ void ActivityPage::slotClicked(QListBoxItem *item) {
}
}
-void ActivityPage::slotDoubleClicked(QListBoxItem* item) {
+void ActivityPage::slotDoubleClicked(TQListBoxItem* item) {
if (item) {
slotRename();
}
diff --git a/umbrello/umbrello/dialogs/activitypage.h b/umbrello/umbrello/dialogs/activitypage.h
index 7d391b96..57a079e6 100644
--- a/umbrello/umbrello/dialogs/activitypage.h
+++ b/umbrello/umbrello/dialogs/activitypage.h
@@ -12,9 +12,9 @@
#ifndef ACTIVITYPAGE_H
#define ACTIVITYPAGE_H
//qt includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
//kde includes
#include <karrowbutton.h>
//app includes
@@ -26,13 +26,13 @@ class ListPopupMenu;
* @author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ActivityPage : public QWidget {
+class ActivityPage : public TQWidget {
Q_OBJECT
public:
/**
* Constructor
*/
- ActivityPage( QWidget * pParent, StateWidget * pWidget );
+ ActivityPage( TQWidget * pParent, StateWidget * pWidget );
/**
* Deconstructor
@@ -67,21 +67,21 @@ protected:
*/
ListPopupMenu * m_pMenu;
//GUI widgets
- QListBox * m_pActivityLB;
- QGroupBox * m_pActivityGB;
+ TQListBox * m_pActivityLB;
+ TQGroupBox * m_pActivityGB;
KArrowButton * m_pUpArrowB, * m_pDownArrowB, * m_pTopArrowB, *m_pBottomArrowB;
- QPushButton* m_pDeleteActivityButton;
- QPushButton* m_pRenameButton;
+ TQPushButton* m_pDeleteActivityButton;
+ TQPushButton* m_pRenameButton;
public slots:
/**
* Popup menu item selected
*/
void slotMenuSelection( int sel );
- void slotClicked( QListBoxItem* item );
- void slotDoubleClicked( QListBoxItem* item );
- void slotRightButtonClicked(QListBoxItem* item, const QPoint& p);
- void slotRightButtonPressed(QListBoxItem* item, const QPoint& p);
+ void slotClicked( TQListBoxItem* item );
+ void slotDoubleClicked( TQListBoxItem* item );
+ void slotRightButtonClicked(TQListBoxItem* item, const TQPoint& p);
+ void slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p);
void slotTopClicked();
void slotUpClicked();
void slotDownClicked();
diff --git a/umbrello/umbrello/dialogs/assocgenpage.cpp b/umbrello/umbrello/dialogs/assocgenpage.cpp
index 9be13ee0..b093cae0 100644
--- a/umbrello/umbrello/dialogs/assocgenpage.cpp
+++ b/umbrello/umbrello/dialogs/assocgenpage.cpp
@@ -13,7 +13,7 @@
#include "assocgenpage.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcombobox.h>
// kde includes
@@ -25,8 +25,8 @@
#include "../association.h"
#include "../dialog_utils.h"
-AssocGenPage::AssocGenPage (UMLDoc *d, QWidget *parent, AssociationWidget *assoc)
- : QWidget(parent)
+AssocGenPage::AssocGenPage (UMLDoc *d, TQWidget *parent, AssociationWidget *assoc)
+ : TQWidget(parent)
{
m_pAssociationWidget = assoc;
@@ -46,38 +46,38 @@ void AssocGenPage::constructWidget() {
// general configuration of the GUI
int margin = fontMetrics().height();
setMinimumSize(310,330);
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
// group boxes for name, documentation properties
- QGroupBox *nameGB = new QGroupBox(this);
- QGroupBox *docGB = new QGroupBox(this);
+ TQGroupBox *nameGB = new TQGroupBox(this);
+ TQGroupBox *docGB = new TQGroupBox(this);
nameGB -> setTitle(i18n("Properties"));
docGB -> setTitle(i18n("Documentation"));
topLayout -> addWidget(nameGB);
topLayout -> addWidget(docGB);
- QGridLayout * nameLayout = new QGridLayout(nameGB, 2, 2);
+ TQGridLayout * nameLayout = new TQGridLayout(nameGB, 2, 2);
nameLayout -> setSpacing(6);
nameLayout -> setMargin(margin);
//Association name
- QLabel *pAssocNameL = NULL;
- QLineEdit* nameField = Dialog_Utils::makeLabeledEditField( nameGB, nameLayout, 0,
+ TQLabel *pAssocNameL = NULL;
+ TQLineEdit* nameField = Dialog_Utils::makeLabeledEditField( nameGB, nameLayout, 0,
pAssocNameL, i18n("Name:"),
m_pAssocNameLE, m_pAssociationWidget->getName() );
nameField->setFocus();
// document
- QHBoxLayout * docLayout = new QHBoxLayout(docGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(docGB);
docLayout -> setMargin(margin);
- m_pDoc = new QMultiLineEdit(docGB);
+ m_pDoc = new TQMultiLineEdit(docGB);
docLayout -> addWidget(m_pDoc);
m_pDoc-> setText(m_pAssociationWidget-> getDoc());
Uml::Association_Type currentType = m_pAssociationWidget->getAssocType();
- QString currentTypeAsString = UMLAssociation::typeAsString(currentType);
- QLabel *pTypeL = new QLabel(i18n("Type:"), nameGB);
+ TQString currentTypeAsString = UMLAssociation::typeAsString(currentType);
+ TQLabel *pTypeL = new TQLabel(i18n("Type:"), nameGB);
nameLayout->addWidget(pTypeL, 1, 0);
/* Here is a list of all the supported choices for changing
@@ -90,7 +90,7 @@ void AssocGenPage::constructWidget() {
m_AssocTypeStrings.clear();
for (uint i=0; i<m_AssocTypes.size(); ++i) {
if (m_AssocTypes[i] == currentType) found=true;
- QString typeStr = UMLAssociation::typeAsString(m_AssocTypes[i]);
+ TQString typeStr = UMLAssociation::typeAsString(m_AssocTypes[i]);
m_AssocTypeStrings << typeStr;
}
@@ -108,7 +108,7 @@ void AssocGenPage::constructWidget() {
m_pTypeCB->setCurrentText(currentTypeAsString);
m_pTypeCB->setDuplicatesEnabled(false);//only allow one of each type in box
m_pTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
nameLayout->addWidget(m_pTypeCB, 1, 1);
diff --git a/umbrello/umbrello/dialogs/assocgenpage.h b/umbrello/umbrello/dialogs/assocgenpage.h
index 3eff137f..4cd34421 100644
--- a/umbrello/umbrello/dialogs/assocgenpage.h
+++ b/umbrello/umbrello/dialogs/assocgenpage.h
@@ -13,15 +13,15 @@
#define ASSOCGENPAGE_H
//quicktime class includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqvaluelist.h>
//my class includes
#include "../umlobject.h"
@@ -40,7 +40,7 @@ class KComboBox;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocGenPage : public QWidget {
+class AssocGenPage : public TQWidget {
Q_OBJECT
public:
@@ -51,7 +51,7 @@ public:
* @param parent The parent to the AssocGenPage.
* @param a The AssociationWidget to display the properties of.
*/
- AssocGenPage(UMLDoc *d, QWidget *parent, AssociationWidget *a);
+ AssocGenPage(UMLDoc *d, TQWidget *parent, AssociationWidget *a);
/**
* Standard deconstructor.
@@ -65,15 +65,15 @@ public:
void updateObject();
private:
- QLineEdit * m_pAssocNameLE;
+ TQLineEdit * m_pAssocNameLE;
KComboBox *m_pTypeCB;
- /* Choices for the QComboBox, and we store ints and strings
+ /* Choices for the TQComboBox, and we store ints and strings
so we can translate both ways */
- QValueList<Uml::Association_Type> m_AssocTypes;
- QStringList m_AssocTypeStrings;
+ TQValueList<Uml::Association_Type> m_AssocTypes;
+ TQStringList m_AssocTypeStrings;
- QMultiLineEdit * m_pDoc;
+ TQMultiLineEdit * m_pDoc;
AssociationWidget *m_pAssociationWidget;
UMLDoc * m_pUmldoc;
diff --git a/umbrello/umbrello/dialogs/assocpage.cpp b/umbrello/umbrello/dialogs/assocpage.cpp
index 1b3cf5ad..feb193eb 100644
--- a/umbrello/umbrello/dialogs/assocpage.cpp
+++ b/umbrello/umbrello/dialogs/assocpage.cpp
@@ -10,53 +10,53 @@
***************************************************************************/
#include "assocpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "assocpropdlg.h"
-AssocPage::AssocPage(QWidget *parent, UMLView * v, UMLObject * o) : QWidget(parent) {
+AssocPage::AssocPage(TQWidget *parent, UMLView * v, UMLObject * o) : TQWidget(parent) {
m_pObject = o;
m_pView = v;
int margin = fontMetrics().height();
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
- m_pAssocGB = new QGroupBox(i18n("Associations"), this);
+ m_pAssocGB = new TQGroupBox(i18n("Associations"), this);
mainLayout -> addWidget(m_pAssocGB);
- QHBoxLayout * layout = new QHBoxLayout(m_pAssocGB);
+ TQHBoxLayout * layout = new TQHBoxLayout(m_pAssocGB);
layout -> setSpacing(10);
layout -> setMargin(margin);
- m_pAssocLB = new QListBox(m_pAssocGB);
+ m_pAssocLB = new TQListBox(m_pAssocGB);
layout -> addWidget(m_pAssocLB);
setMinimumSize(310, 330);
fillListBox();
m_pMenu = 0;
- connect(m_pAssocLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ connect(m_pAssocLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- connect(m_pAssocLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pAssocLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pAssocLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pAssocLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
AssocPage::~AssocPage() {
- disconnect(m_pAssocLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- disconnect(m_pAssocLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- disconnect(m_pAssocLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ disconnect(m_pAssocLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
-void AssocPage::slotDoubleClick(QListBoxItem * i) {
+void AssocPage::slotDoubleClick(TQListBoxItem * i) {
if(!i)
return;
@@ -84,27 +84,27 @@ void AssocPage::fillListBox() {
}
}
-void AssocPage::slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/) {
+void AssocPage::slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void AssocPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p) {
+void AssocPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p) {
if(!item)
return;
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, ListPopupMenu::mt_Association_Selected);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void AssocPage::slotPopupMenuSel(int id) {
diff --git a/umbrello/umbrello/dialogs/assocpage.h b/umbrello/umbrello/dialogs/assocpage.h
index 60e1e339..a38aa2ac 100644
--- a/umbrello/umbrello/dialogs/assocpage.h
+++ b/umbrello/umbrello/dialogs/assocpage.h
@@ -13,10 +13,10 @@
#ifndef ASSOCPAGE_H
#define ASSOCPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqptrlist.h>
#include "../umlobject.h"
#include "../umlview.h"
@@ -38,7 +38,7 @@
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocPage : public QWidget {
+class AssocPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -48,7 +48,7 @@ public:
* @param v The view the UMLObject being represented.
* @param o The UMLObject being represented
*/
- AssocPage(QWidget *parent, UMLView * v, UMLObject * o);
+ AssocPage(TQWidget *parent, UMLView * v, UMLObject * o);
/**
* Standard deconstructor.
@@ -57,8 +57,8 @@ public:
private:
UMLObject * m_pObject;
UMLView * m_pView;
- QListBox * m_pAssocLB;
- QGroupBox * m_pAssocGB;
+ TQListBox * m_pAssocLB;
+ TQGroupBox * m_pAssocGB;
AssociationWidgetList m_List;
ListPopupMenu * m_pMenu;
@@ -67,9 +67,9 @@ private:
*/
void fillListBox();
public slots:
- void slotDoubleClick(QListBoxItem * i);
- void slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/);
- void slotRightButtonPressed(QListBoxItem * item, const QPoint & p);
+ void slotDoubleClick(TQListBoxItem * i);
+ void slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/);
+ void slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p);
void slotPopupMenuSel(int id);
};
diff --git a/umbrello/umbrello/dialogs/assocpropdlg.cpp b/umbrello/umbrello/dialogs/assocpropdlg.cpp
index 2458da13..1d5b9c77 100644
--- a/umbrello/umbrello/dialogs/assocpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/assocpropdlg.cpp
@@ -13,8 +13,8 @@
#include "assocpropdlg.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,7 +35,7 @@
#include "../umlview.h"
-AssocPropDlg::AssocPropDlg (QWidget *parent, AssociationWidget * assocWidget, int pageNum)
+AssocPropDlg::AssocPropDlg (TQWidget *parent, AssociationWidget * assocWidget, int pageNum)
: KDialogBase(IconList, i18n("Association Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_ASSOCPROPDLG_", true, true)
{
@@ -84,15 +84,15 @@ void AssocPropDlg::setupPages (AssociationWidget *assocWidget)
{
// general page
- QFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
- QHBoxLayout *genLayout = new QHBoxLayout(page);
+ TQFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout *genLayout = new TQHBoxLayout(page);
page -> setMinimumSize(310, 330);
m_pGenPage = new AssocGenPage (m_pDoc, page, assocWidget);
genLayout -> addWidget(m_pGenPage);
// role page
- QFrame * newPage = addPage( i18n("Roles"), i18n("Role Settings"), DesktopIcon( "misc") );
- QHBoxLayout * roleLayout = new QHBoxLayout(newPage);
+ TQFrame * newPage = addPage( i18n("Roles"), i18n("Role Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout * roleLayout = new TQHBoxLayout(newPage);
// newPage -> setMinimumSize(310, 330);
m_pRolePage = new AssocRolePage(m_pDoc, newPage, assocWidget);
roleLayout -> addWidget(m_pRolePage);
@@ -106,8 +106,8 @@ void AssocPropDlg::setupFontPage()
if( !m_pAssoc)
return;
- QVBox *page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts"));
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox *page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts"));
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser->setFont( m_pAssoc->getFont());
m_pChooser->setSampleText(i18n("Association font"));
}
diff --git a/umbrello/umbrello/dialogs/assocpropdlg.h b/umbrello/umbrello/dialogs/assocpropdlg.h
index a5bdad6e..8fbbebe8 100644
--- a/umbrello/umbrello/dialogs/assocpropdlg.h
+++ b/umbrello/umbrello/dialogs/assocpropdlg.h
@@ -40,7 +40,7 @@ public:
* @param pageNum The page to show first.
*/
- AssocPropDlg(QWidget *parent, AssociationWidget *a, int pageNum = 0);
+ AssocPropDlg(TQWidget *parent, AssociationWidget *a, int pageNum = 0);
/**
* Standard deconstructor
diff --git a/umbrello/umbrello/dialogs/assocrolepage.cpp b/umbrello/umbrello/dialogs/assocrolepage.cpp
index 807a7e1e..adb7dcc3 100644
--- a/umbrello/umbrello/dialogs/assocrolepage.cpp
+++ b/umbrello/umbrello/dialogs/assocrolepage.cpp
@@ -13,7 +13,7 @@
#include "assocrolepage.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
// kde includes
#include <klocale.h>
@@ -23,8 +23,8 @@
// local includes
#include "../dialog_utils.h"
-AssocRolePage::AssocRolePage (UMLDoc *d, QWidget *parent, AssociationWidget *assoc)
- : QWidget(parent)
+AssocRolePage::AssocRolePage (UMLDoc *d, TQWidget *parent, AssociationWidget *assoc)
+ : TQWidget(parent)
{
m_pAssociationWidget = assoc;
@@ -45,12 +45,12 @@ AssocRolePage::~AssocRolePage() {}
void AssocRolePage::constructWidget() {
// underlying roles and objects
- QString nameA = m_pAssociationWidget->getRoleName(Uml::A);
- QString nameB = m_pAssociationWidget->getRoleName(Uml::B);
- QString titleA = i18n("Role A Properties");
- QString titleB = i18n("Role B Properties");
- QString widgetNameA = m_pAssociationWidget->getWidget(Uml::A)->getName();
- QString widgetNameB = m_pAssociationWidget->getWidget(Uml::B)->getName();
+ TQString nameA = m_pAssociationWidget->getRoleName(Uml::A);
+ TQString nameB = m_pAssociationWidget->getRoleName(Uml::B);
+ TQString titleA = i18n("Role A Properties");
+ TQString titleB = i18n("Role B Properties");
+ TQString widgetNameA = m_pAssociationWidget->getWidget(Uml::A)->getName();
+ TQString widgetNameB = m_pAssociationWidget->getWidget(Uml::B)->getName();
if(!widgetNameA.isEmpty())
titleA.append(" (" + widgetNameA + ')');
if(!widgetNameB.isEmpty())
@@ -59,28 +59,28 @@ void AssocRolePage::constructWidget() {
// general configuration of the GUI
int margin = fontMetrics().height();
- QGridLayout * mainLayout = new QGridLayout(this, 4, 2);
+ TQGridLayout * mainLayout = new TQGridLayout(this, 4, 2);
mainLayout -> setSpacing(6);
// group boxes for role, documentation properties
- QGroupBox *propsAGB = new QGroupBox(this);
- QGroupBox *propsBGB = new QGroupBox(this);
- QButtonGroup * scopeABG = new QButtonGroup(i18n("Role A Visibility"), this );
- QButtonGroup * scopeBBG = new QButtonGroup(i18n("Role B Visibility"), this );
- QButtonGroup * changeABG = new QButtonGroup(i18n("Role A Changeability"), this );
- QButtonGroup * changeBBG = new QButtonGroup(i18n("Role B Changeability"), this );
- QGroupBox *docAGB = new QGroupBox(this);
- QGroupBox *docBGB = new QGroupBox(this);
+ TQGroupBox *propsAGB = new TQGroupBox(this);
+ TQGroupBox *propsBGB = new TQGroupBox(this);
+ TQButtonGroup * scopeABG = new TQButtonGroup(i18n("Role A Visibility"), this );
+ TQButtonGroup * scopeBBG = new TQButtonGroup(i18n("Role B Visibility"), this );
+ TQButtonGroup * changeABG = new TQButtonGroup(i18n("Role A Changeability"), this );
+ TQButtonGroup * changeBBG = new TQButtonGroup(i18n("Role B Changeability"), this );
+ TQGroupBox *docAGB = new TQGroupBox(this);
+ TQGroupBox *docBGB = new TQGroupBox(this);
propsAGB -> setTitle(titleA);
propsBGB -> setTitle(titleB);
docAGB -> setTitle(i18n("Documentation"));
docBGB -> setTitle(i18n("Documentation"));
- QGridLayout * propsALayout = new QGridLayout(propsAGB, 2, 2);
+ TQGridLayout * propsALayout = new TQGridLayout(propsAGB, 2, 2);
propsALayout -> setSpacing(6);
propsALayout -> setMargin(margin);
- QGridLayout * propsBLayout = new QGridLayout(propsBGB, 3, 2);
+ TQGridLayout * propsBLayout = new TQGridLayout(propsBGB, 3, 2);
propsBLayout -> setSpacing(6);
propsBLayout -> setMargin(margin);
@@ -88,31 +88,31 @@ void AssocRolePage::constructWidget() {
//
// Rolename A
- QLabel *pRoleAL = NULL;
+ TQLabel *pRoleAL = NULL;
Dialog_Utils::makeLabeledEditField( propsAGB, propsALayout, 0,
pRoleAL, i18n("Rolename:"),
m_pRoleALE, nameA );
// Multi A
- QLabel *pMultiAL = NULL;
+ TQLabel *pMultiAL = NULL;
Dialog_Utils::makeLabeledEditField( propsAGB, propsALayout, 1,
pMultiAL, i18n("Multiplicity:"),
m_pMultiALE, m_pAssociationWidget->getMulti(Uml::A) );
// Visibility A
- QHBoxLayout * scopeALayout = new QHBoxLayout(scopeABG);
+ TQHBoxLayout * scopeALayout = new TQHBoxLayout(scopeABG);
scopeALayout -> setMargin(margin);
- m_PublicARB = new QRadioButton(i18n("Public"), scopeABG);
+ m_PublicARB = new TQRadioButton(i18n("Public"), scopeABG);
scopeALayout -> addWidget(m_PublicARB);
- m_PrivateARB = new QRadioButton(i18n("Private"), scopeABG);
+ m_PrivateARB = new TQRadioButton(i18n("Private"), scopeABG);
scopeALayout -> addWidget(m_PrivateARB);
- m_ProtectedARB = new QRadioButton(i18n("Protected"), scopeABG);
+ m_ProtectedARB = new TQRadioButton(i18n("Protected"), scopeABG);
scopeALayout -> addWidget(m_ProtectedARB);
- m_ImplementationARB = new QRadioButton(i18n("Implementation"), scopeABG);
+ m_ImplementationARB = new TQRadioButton(i18n("Implementation"), scopeABG);
scopeALayout -> addWidget(m_ImplementationARB);
Uml::Visibility scope = m_pAssociationWidget->getVisibility(Uml::A);
@@ -126,16 +126,16 @@ void AssocRolePage::constructWidget() {
m_ProtectedARB -> setChecked( true );
// Changeability A
- QHBoxLayout * changeALayout = new QHBoxLayout(changeABG);
+ TQHBoxLayout * changeALayout = new TQHBoxLayout(changeABG);
changeALayout -> setMargin(margin);
- m_ChangeableARB = new QRadioButton(i18n("Changeable"), changeABG);
+ m_ChangeableARB = new TQRadioButton(i18n("Changeable"), changeABG);
changeALayout -> addWidget(m_ChangeableARB);
- m_FrozenARB = new QRadioButton(i18n("Frozen"), changeABG);
+ m_FrozenARB = new TQRadioButton(i18n("Frozen"), changeABG);
changeALayout -> addWidget(m_FrozenARB);
- m_AddOnlyARB = new QRadioButton(i18n("Add only"), changeABG);
+ m_AddOnlyARB = new TQRadioButton(i18n("Add only"), changeABG);
changeALayout -> addWidget(m_AddOnlyARB);
Uml::Changeability_Type changeability = m_pAssociationWidget->getChangeability(Uml::A);
@@ -147,32 +147,32 @@ void AssocRolePage::constructWidget() {
m_AddOnlyARB -> setChecked( true );
// Rolename B
- QLabel * pRoleBL = NULL;
+ TQLabel * pRoleBL = NULL;
Dialog_Utils::makeLabeledEditField( propsBGB, propsBLayout, 0,
pRoleBL, i18n("Rolename:"),
m_pRoleBLE, nameB );
// Multi B
- QLabel * pMultiBL = NULL;
+ TQLabel * pMultiBL = NULL;
Dialog_Utils::makeLabeledEditField( propsBGB, propsBLayout, 1,
pMultiBL, i18n("Multiplicity:"),
m_pMultiBLE, m_pAssociationWidget->getMulti(Uml::B) );
// Visibility B
- QHBoxLayout * scopeBLayout = new QHBoxLayout(scopeBBG);
+ TQHBoxLayout * scopeBLayout = new TQHBoxLayout(scopeBBG);
scopeBLayout -> setMargin(margin);
- m_PublicBRB = new QRadioButton(i18n("Public"), scopeBBG);
+ m_PublicBRB = new TQRadioButton(i18n("Public"), scopeBBG);
scopeBLayout -> addWidget(m_PublicBRB);
- m_PrivateBRB = new QRadioButton(i18n("Private"), scopeBBG);
+ m_PrivateBRB = new TQRadioButton(i18n("Private"), scopeBBG);
scopeBLayout -> addWidget(m_PrivateBRB);
- m_ProtectedBRB = new QRadioButton(i18n("Protected"), scopeBBG);
+ m_ProtectedBRB = new TQRadioButton(i18n("Protected"), scopeBBG);
scopeBLayout -> addWidget(m_ProtectedBRB);
- m_ImplementationBRB = new QRadioButton(i18n("Implementation"), scopeBBG);
+ m_ImplementationBRB = new TQRadioButton(i18n("Implementation"), scopeBBG);
scopeBLayout -> addWidget(m_ImplementationBRB);
scope = m_pAssociationWidget->getVisibility(Uml::B);
@@ -186,16 +186,16 @@ void AssocRolePage::constructWidget() {
m_ImplementationBRB -> setChecked( true );
// Changeability B
- QHBoxLayout * changeBLayout = new QHBoxLayout(changeBBG);
+ TQHBoxLayout * changeBLayout = new TQHBoxLayout(changeBBG);
changeBLayout -> setMargin(margin);
- m_ChangeableBRB = new QRadioButton(i18n("Changeable"), changeBBG);
+ m_ChangeableBRB = new TQRadioButton(i18n("Changeable"), changeBBG);
changeBLayout -> addWidget(m_ChangeableBRB);
- m_FrozenBRB = new QRadioButton(i18n("Frozen"), changeBBG);
+ m_FrozenBRB = new TQRadioButton(i18n("Frozen"), changeBBG);
changeBLayout -> addWidget(m_FrozenBRB);
- m_AddOnlyBRB = new QRadioButton(i18n("Add only"), changeBBG);
+ m_AddOnlyBRB = new TQRadioButton(i18n("Add only"), changeBBG);
changeBLayout -> addWidget(m_AddOnlyBRB);
changeability = m_pAssociationWidget->getChangeability(Uml::B);
@@ -210,23 +210,23 @@ void AssocRolePage::constructWidget() {
//
// Document A
- QHBoxLayout * docALayout = new QHBoxLayout(docAGB);
+ TQHBoxLayout * docALayout = new TQHBoxLayout(docAGB);
docALayout -> setMargin(margin);
- m_pDocA = new QMultiLineEdit(docAGB);
+ m_pDocA = new TQMultiLineEdit(docAGB);
docALayout -> addWidget(m_pDocA);
m_pDocA-> setText(m_pAssociationWidget-> getRoleDoc(Uml::A));
// m_pDocA-> setText("<<not implemented yet>>");
// m_pDocA-> setEnabled(false);
- m_pDocA->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocA->setWordWrap(TQMultiLineEdit::WidgetWidth);
// Document B
- QHBoxLayout * docBLayout = new QHBoxLayout(docBGB);
+ TQHBoxLayout * docBLayout = new TQHBoxLayout(docBGB);
docBLayout -> setMargin(margin);
- m_pDocB = new QMultiLineEdit(docBGB);
+ m_pDocB = new TQMultiLineEdit(docBGB);
docBLayout -> addWidget(m_pDocB);
m_pDocB-> setText(m_pAssociationWidget-> getRoleDoc(Uml::B));
// m_pDocB-> setEnabled(false);
- m_pDocB->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocB->setWordWrap(TQMultiLineEdit::WidgetWidth);
// add group boxes to main layout
mainLayout -> addWidget( propsAGB, 0, 0);
diff --git a/umbrello/umbrello/dialogs/assocrolepage.h b/umbrello/umbrello/dialogs/assocrolepage.h
index c1c4d603..440707cc 100644
--- a/umbrello/umbrello/dialogs/assocrolepage.h
+++ b/umbrello/umbrello/dialogs/assocrolepage.h
@@ -13,14 +13,14 @@
#define ASSOCROLEPAGE_H
//quicktime class includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
//my class includes
#include "../umlobject.h"
@@ -36,7 +36,7 @@
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class AssocRolePage : public QWidget {
+class AssocRolePage : public TQWidget {
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param parent The parent to the AssocRolePage.
* @param a The AssociationWidget to display the properties of.
*/
- AssocRolePage(UMLDoc *d, QWidget *parent, AssociationWidget *a);
+ AssocRolePage(UMLDoc *d, TQWidget *parent, AssociationWidget *a);
/**
* Standard deconstructor.
@@ -61,15 +61,15 @@ public:
void updateObject();
private:
- QLineEdit *m_pRoleALE, *m_pRoleBLE, *m_pMultiALE, *m_pMultiBLE;
- QMultiLineEdit *m_pDocA, *m_pDocB;
+ TQLineEdit *m_pRoleALE, *m_pRoleBLE, *m_pMultiALE, *m_pMultiBLE;
+ TQMultiLineEdit *m_pDocA, *m_pDocB;
AssociationWidget *m_pAssociationWidget;
UMLDoc * m_pUmldoc;
ObjectWidget *m_pWidget;
- QRadioButton *m_PublicARB, *m_ProtectedARB, *m_PrivateARB, *m_ImplementationARB;
- QRadioButton *m_PublicBRB, *m_ProtectedBRB, *m_PrivateBRB, *m_ImplementationBRB;
- QRadioButton *m_ChangeableARB, *m_AddOnlyARB, *m_FrozenARB;
- QRadioButton *m_ChangeableBRB, *m_AddOnlyBRB, *m_FrozenBRB;
+ TQRadioButton *m_PublicARB, *m_ProtectedARB, *m_PrivateARB, *m_ImplementationARB;
+ TQRadioButton *m_PublicBRB, *m_ProtectedBRB, *m_PrivateBRB, *m_ImplementationBRB;
+ TQRadioButton *m_ChangeableARB, *m_AddOnlyARB, *m_FrozenARB;
+ TQRadioButton *m_ChangeableBRB, *m_AddOnlyBRB, *m_FrozenBRB;
void constructWidget();
diff --git a/umbrello/umbrello/dialogs/classgenpage.cpp b/umbrello/umbrello/dialogs/classgenpage.cpp
index 01b3d3c7..d633b6ae 100644
--- a/umbrello/umbrello/dialogs/classgenpage.cpp
+++ b/umbrello/umbrello/dialogs/classgenpage.cpp
@@ -13,14 +13,14 @@
#include "classgenpage.h"
// qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
// kde includes
#include <klocale.h>
@@ -38,11 +38,11 @@
#include "../umlview.h"
#include "../stereotype.h"
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, UMLObject* o) : TQWidget(parent) {
m_pWidget = 0;
m_pObject = 0;
m_pInstanceWidget = 0;
- QString name;
+ TQString name;
int margin = fontMetrics().height();
Uml::Object_Type t = o -> getBaseType();
m_pUmldoc = d;
@@ -70,17 +70,17 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
kWarning() << "creating class gen page for unknown widget type" << endl;
}
setMinimumSize(310,330);
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
//setup name
- QGridLayout * m_pNameLayout = new QGridLayout(topLayout, 4, 2);
+ TQGridLayout * m_pNameLayout = new TQGridLayout(topLayout, 4, 2);
m_pNameLayout -> setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
m_pNameL -> setText(name);
m_pNameLayout -> addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pNameLayout -> addWidget(m_pClassNameLE, 0, 1);
m_pClassNameLE->setFocus();
m_pNameL->setBuddy(m_pClassNameLE);
@@ -90,7 +90,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
m_pAbstractCB = 0;
m_pDeconCB = 0;
- m_pStereoTypeL = new QLabel(i18n("&Stereotype name:"), this);
+ m_pStereoTypeL = new TQLabel(i18n("&Stereotype name:"), this);
m_pNameLayout -> addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, this);
@@ -104,10 +104,10 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
if (t == Uml::ot_Class || t == Uml::ot_Interface) {
- m_pPackageL = new QLabel(i18n("&Package name:"), this);
+ m_pPackageL = new TQLabel(i18n("&Package name:"), this);
m_pNameLayout -> addWidget(m_pPackageL, 2, 0);
- m_pPackageLE = new QLineEdit(this);
+ m_pPackageLE = new TQLineEdit(this);
m_pNameLayout -> addWidget(m_pPackageLE, 2, 1);
m_pPackageLE -> setText(o -> getPackage());
@@ -116,40 +116,40 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
if (t == Uml::ot_Class || t == Uml::ot_UseCase ) {
- QString abstractCaption;
+ TQString abstractCaption;
if ( t == Uml::ot_Class ) {
abstractCaption = i18n("A&bstract class");
} else {
abstractCaption = i18n("A&bstract use case");
}
- m_pAbstractCB = new QCheckBox( abstractCaption, this );
+ m_pAbstractCB = new TQCheckBox( abstractCaption, this );
m_pAbstractCB -> setChecked( o -> getAbstract() );
m_pNameLayout -> addWidget( m_pAbstractCB, 3, 0 );
}
if (t == Uml::ot_Component) {
- m_pExecutableCB = new QCheckBox(i18n("&Executable"), this);
+ m_pExecutableCB = new TQCheckBox(i18n("&Executable"), this);
m_pExecutableCB->setChecked( (static_cast<UMLComponent*>(o))->getExecutable() );
m_pNameLayout->addWidget( m_pExecutableCB, 3, 0 );
}
if (t == Uml::ot_Artifact) {
//setup artifact draw as
- m_pDrawAsBG = new QButtonGroup(i18n("Draw As"), this);
- QHBoxLayout* drawAsLayout = new QHBoxLayout(m_pDrawAsBG);
+ m_pDrawAsBG = new TQButtonGroup(i18n("Draw As"), this);
+ TQHBoxLayout* drawAsLayout = new TQHBoxLayout(m_pDrawAsBG);
drawAsLayout->setMargin(margin);
m_pDrawAsBG->setExclusive(true);
- m_pDefaultRB = new QRadioButton(i18n("&Default"), m_pDrawAsBG);
+ m_pDefaultRB = new TQRadioButton(i18n("&Default"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pDefaultRB);
- m_pFileRB = new QRadioButton(i18n("&File"), m_pDrawAsBG);
+ m_pFileRB = new TQRadioButton(i18n("&File"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pFileRB);
- m_pLibraryRB = new QRadioButton(i18n("&Library"), m_pDrawAsBG);
+ m_pLibraryRB = new TQRadioButton(i18n("&Library"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pLibraryRB);
- m_pTableRB = new QRadioButton(i18n("&Table"), m_pDrawAsBG);
+ m_pTableRB = new TQRadioButton(i18n("&Table"), m_pDrawAsBG);
drawAsLayout->addWidget(m_pTableRB);
topLayout->addWidget(m_pDrawAsBG);
@@ -168,31 +168,31 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
}
//setup scope
- m_pButtonBG = new QButtonGroup(i18n("Visibility"), this);
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pButtonBG);
+ m_pButtonBG = new TQButtonGroup(i18n("Visibility"), this);
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pButtonBG);
scopeLayout -> setMargin(margin);
m_pButtonBG -> setExclusive(true);
- m_pPublicRB = new QRadioButton(i18n("P&ublic"), m_pButtonBG);
+ m_pPublicRB = new TQRadioButton(i18n("P&ublic"), m_pButtonBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pButtonBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pButtonBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Pro&tected"), m_pButtonBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Pro&tected"), m_pButtonBG);
scopeLayout -> addWidget(m_pProtectedRB);
topLayout -> addWidget(m_pButtonBG);
- m_pImplementationRB = new QRadioButton(i18n("Imple&mentation"), m_pButtonBG);
+ m_pImplementationRB = new TQRadioButton(i18n("Imple&mentation"), m_pButtonBG);
scopeLayout -> addWidget(m_pImplementationRB);
topLayout -> addWidget(m_pButtonBG);
//setup documentation
- m_pDocGB = new QGroupBox(this);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ m_pDocGB = new TQGroupBox(this);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
m_pDocGB -> setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
docLayout -> addWidget(m_pDoc);
topLayout -> addWidget(m_pDocGB);
@@ -213,7 +213,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
// manage stereotypes
m_pStereoTypeCB -> setDuplicatesEnabled(false);//only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_pUmldoc->getStereotypes()); it.current(); ++it) {
@@ -232,11 +232,11 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLObject* o) : QWidget(p
m_pStereoTypeCB -> setCurrentItem(-1);
///////////
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
//////////
}
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, ObjectWidget* o) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, ObjectWidget* o) : TQWidget(parent) {
m_pObject = 0;
m_pInstanceWidget = 0;
m_pWidget = o;
@@ -246,62 +246,62 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, ObjectWidget* o) : QWidge
//int t = o -> getBaseType();
m_pUmldoc = d;
setMinimumSize(310,330);
- QGridLayout * topLayout = new QGridLayout(this, 2, 1);
+ TQGridLayout * topLayout = new TQGridLayout(this, 2, 1);
topLayout -> setSpacing(6);
//setup name
- QGridLayout * m_pNameLayout = new QGridLayout(topLayout, 3, 2);
+ TQGridLayout * m_pNameLayout = new TQGridLayout(topLayout, 3, 2);
m_pNameLayout -> setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
m_pNameL -> setText(i18n("Class name:"));
m_pNameLayout -> addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pClassNameLE -> setText(o -> getName());
m_pNameLayout -> addWidget(m_pClassNameLE, 0, 1);
- m_pInstanceL = new QLabel(this);
+ m_pInstanceL = new TQLabel(this);
m_pInstanceL -> setText(i18n("Instance name:"));
m_pNameLayout -> addWidget(m_pInstanceL, 1, 0);
- m_pInstanceLE = new QLineEdit(this);
+ m_pInstanceLE = new TQLineEdit(this);
m_pInstanceLE -> setText(o -> getInstanceName());
m_pNameLayout -> addWidget(m_pInstanceLE, 1, 1);
UMLView *view = UMLApp::app()->getCurrentView();
- m_pDrawActorCB = new QCheckBox( i18n( "Draw as actor" ) , this );
+ m_pDrawActorCB = new TQCheckBox( i18n( "Draw as actor" ) , this );
m_pDrawActorCB -> setChecked( o -> getDrawAsActor() );
m_pNameLayout -> addWidget( m_pDrawActorCB, 2, 0 );
if(view -> getType() == Uml::dt_Collaboration) {
- m_pMultiCB = new QCheckBox(i18n("Multiple instance"), this);
+ m_pMultiCB = new TQCheckBox(i18n("Multiple instance"), this);
m_pMultiCB -> setChecked(o -> getMultipleInstance());
m_pNameLayout -> addWidget(m_pMultiCB, 2,1);
if( m_pDrawActorCB -> isChecked() )
m_pMultiCB -> setEnabled( false );
} else//sequence diagram
{
- m_pDeconCB = new QCheckBox(i18n("Show destruction"), this);
+ m_pDeconCB = new TQCheckBox(i18n("Show destruction"), this);
m_pDeconCB->setChecked(o->getShowDestruction());
m_pNameLayout -> addWidget(m_pDeconCB, 2,1);
}
//setup documentation
- m_pDocGB = new QGroupBox(this);
+ m_pDocGB = new TQGroupBox(this);
topLayout -> addWidget(m_pDocGB, 1, 0);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
m_pDocGB -> setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
m_pDoc-> setText(o -> getDoc());
docLayout -> addWidget(m_pDoc);
m_pObject = 0;//needs to be set to zero
if( m_pMultiCB )
- connect( m_pDrawActorCB, SIGNAL( toggled( bool ) ), this, SLOT( slotActorToggled( bool ) ) );
+ connect( m_pDrawActorCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotActorToggled( bool ) ) );
}
-ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWidget(parent) {
+ClassGenPage::ClassGenPage(UMLDoc* d, TQWidget* parent, UMLWidget* widget) : TQWidget(parent) {
m_pWidget = 0;
m_pObject = 0;
m_pInstanceWidget = widget;
@@ -311,13 +311,13 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
//int t = o -> getBaseType();
m_pUmldoc = d;
setMinimumSize(310,330);
- QGridLayout* topLayout = new QGridLayout(this, 2, 1);
+ TQGridLayout* topLayout = new TQGridLayout(this, 2, 1);
topLayout->setSpacing(6);
//setup name
- QGridLayout* m_pNameLayout = new QGridLayout(topLayout, 3, 2);
+ TQGridLayout* m_pNameLayout = new TQGridLayout(topLayout, 3, 2);
m_pNameLayout->setSpacing(6);
- m_pNameL = new QLabel(this);
+ m_pNameL = new TQLabel(this);
if (widget->getBaseType() == Uml::wt_Component) {
m_pNameL->setText(i18n("Component name:"));
} else if (widget->getBaseType() == Uml::wt_Node) {
@@ -327,11 +327,11 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
}
m_pNameLayout->addWidget(m_pNameL, 0, 0);
- m_pClassNameLE = new QLineEdit(this);
+ m_pClassNameLE = new TQLineEdit(this);
m_pClassNameLE->setText(widget->getName());
m_pNameLayout->addWidget(m_pClassNameLE, 0, 1);
- m_pStereoTypeL = new QLabel(i18n("Stereotype name:"), this);
+ m_pStereoTypeL = new TQLabel(i18n("Stereotype name:"), this);
m_pNameLayout->addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, this);
@@ -340,23 +340,23 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
m_pStereoTypeCB->setCurrentText( widget->getUMLObject()->getStereotype() );
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- m_pInstanceL = new QLabel(this);
+ m_pInstanceL = new TQLabel(this);
m_pInstanceL->setText(i18n("Instance name:"));
m_pNameLayout->addWidget(m_pInstanceL, 2, 0);
- m_pInstanceLE = new QLineEdit(this);
+ m_pInstanceLE = new TQLineEdit(this);
m_pInstanceLE->setText(widget->getInstanceName());
m_pNameLayout->addWidget(m_pInstanceLE, 2, 1);
//setup documentation
- m_pDocGB = new QGroupBox(this);
+ m_pDocGB = new TQGroupBox(this);
topLayout->addWidget(m_pDocGB, 1, 0);
- QHBoxLayout* docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout* docLayout = new TQHBoxLayout(m_pDocGB);
docLayout->setMargin(margin);
m_pDocGB->setTitle(i18n("Documentation"));
- m_pDoc = new QMultiLineEdit(m_pDocGB);
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
m_pDoc->setText(widget->getDoc());
docLayout->addWidget(m_pDoc);
m_pObject = 0;//needs to be set to zero
@@ -364,7 +364,7 @@ ClassGenPage::ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget) : QWid
ClassGenPage::~ClassGenPage() {}
-void ClassGenPage::insertStereotype( const QString& type, int index )
+void ClassGenPage::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
@@ -372,7 +372,7 @@ void ClassGenPage::insertStereotype( const QString& type, int index )
void ClassGenPage::updateObject() {
if(m_pObject) {
- QString name = m_pClassNameLE -> text();
+ TQString name = m_pClassNameLE -> text();
m_pObject -> setDoc(m_pDoc -> text());
@@ -437,7 +437,7 @@ void ClassGenPage::updateObject() {
m_pWidget -> setDrawAsActor( m_pDrawActorCB -> isChecked() );
if( m_pDeconCB )
m_pWidget -> setShowDestruction( m_pDeconCB -> isChecked() );
- QString name = m_pClassNameLE -> text();
+ TQString name = m_pClassNameLE -> text();
m_pWidget -> setDoc(m_pDoc -> text());
UMLObject * o = m_pWidget -> getUMLObject();
UMLObject * old = m_pUmldoc -> findUMLObject(name);
@@ -448,7 +448,7 @@ void ClassGenPage::updateObject() {
o -> setName(name);
} else if (m_pInstanceWidget) {
m_pInstanceWidget->setInstanceName(m_pInstanceLE->text());
- QString name = m_pClassNameLE->text();
+ TQString name = m_pClassNameLE->text();
m_pInstanceWidget->setDoc(m_pDoc->text());
UMLObject* o = m_pInstanceWidget->getUMLObject();
UMLObject* old = m_pUmldoc->findUMLObject(name);
diff --git a/umbrello/umbrello/dialogs/classgenpage.h b/umbrello/umbrello/dialogs/classgenpage.h
index 6fd0f7d3..6fad1cde 100644
--- a/umbrello/umbrello/dialogs/classgenpage.h
+++ b/umbrello/umbrello/dialogs/classgenpage.h
@@ -12,7 +12,7 @@
#ifndef CLASSGENPAGE_H
#define CLASSGENPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QGroupBox;
class QLabel;
@@ -36,7 +36,7 @@ class UMLDoc;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassGenPage : public QWidget {
+class ClassGenPage : public TQWidget {
Q_OBJECT
public:
@@ -47,7 +47,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param o The UMLObject to display the properties of.
*/
- ClassGenPage(UMLDoc *d, QWidget *parent, UMLObject * o);
+ ClassGenPage(UMLDoc *d, TQWidget *parent, UMLObject * o);
/**
* Sets up the ClassGenPage for an ObjectWidget
@@ -56,7 +56,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param o The ObjectWidget to display the properties of.
*/
- ClassGenPage(UMLDoc *d, QWidget *parent, ObjectWidget * o);
+ ClassGenPage(UMLDoc *d, TQWidget *parent, ObjectWidget * o);
/**
* Sets up the ClassGenPage for a UMLWidget instance (used
@@ -66,7 +66,7 @@ public:
* @param parent The parent to the ClassGenPage.
* @param widget The UMLWidget to display the properties of.
*/
- ClassGenPage(UMLDoc* d, QWidget* parent, UMLWidget* widget);
+ ClassGenPage(UMLDoc* d, TQWidget* parent, UMLWidget* widget);
/**
* Standard deconstructor.
@@ -79,23 +79,23 @@ public:
*/
void updateObject();
private:
- QGroupBox *m_pDocGB;
- QButtonGroup * m_pButtonBG;
- QLabel * m_pNameL, * m_pInstanceL, * m_pStereoTypeL, * m_pPackageL;
- QLineEdit * m_pClassNameLE, *m_pInstanceLE, * m_pPackageLE;
+ TQGroupBox *m_pDocGB;
+ TQButtonGroup * m_pButtonBG;
+ TQLabel * m_pNameL, * m_pInstanceL, * m_pStereoTypeL, * m_pPackageL;
+ TQLineEdit * m_pClassNameLE, *m_pInstanceLE, * m_pPackageLE;
KComboBox * m_pStereoTypeCB;
- QRadioButton *m_pPublicRB, *m_pPrivateRB, *m_pProtectedRB, *m_pImplementationRB;
- QCheckBox * m_pMultiCB, * m_pDrawActorCB, * m_pAbstractCB, * m_pDeconCB;
- QMultiLineEdit * m_pDoc;
+ TQRadioButton *m_pPublicRB, *m_pPrivateRB, *m_pProtectedRB, *m_pImplementationRB;
+ TQCheckBox * m_pMultiCB, * m_pDrawActorCB, * m_pAbstractCB, * m_pDeconCB;
+ TQMultiLineEdit * m_pDoc;
UMLObject * m_pObject;
UMLDoc * m_pUmldoc;
ObjectWidget * m_pWidget;
UMLWidget* m_pInstanceWidget;
- QButtonGroup* m_pDrawAsBG;
- QRadioButton* m_pDefaultRB,* m_pFileRB,* m_pLibraryRB,* m_pTableRB;
- QCheckBox* m_pExecutableCB;
+ TQButtonGroup* m_pDrawAsBG;
+ TQRadioButton* m_pDefaultRB,* m_pFileRB,* m_pLibraryRB,* m_pTableRB;
+ TQCheckBox* m_pExecutableCB;
- void insertStereotype(const QString& type, int index = -1);
+ void insertStereotype(const TQString& type, int index = -1);
public slots:
/**
diff --git a/umbrello/umbrello/dialogs/classifierlistpage.cpp b/umbrello/umbrello/dialogs/classifierlistpage.cpp
index d7148660..e59956bc 100644
--- a/umbrello/umbrello/dialogs/classifierlistpage.cpp
+++ b/umbrello/umbrello/dialogs/classifierlistpage.cpp
@@ -25,15 +25,15 @@
#include <kbuttonbox.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace Uml;
-ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifier,
- UMLDoc* doc, Uml::Object_Type type) : QWidget(parent) {
+ClassifierListPage::ClassifierListPage(TQWidget* parent, UMLClassifier* classifier,
+ UMLDoc* doc, Uml::Object_Type type) : TQWidget(parent) {
m_itemType = type;
- QString typeName("");
- QString newItemType("");
+ TQString typeName("");
+ TQString newItemType("");
if (type == ot_Attribute) {
typeName = i18n("Attributes");
newItemType = i18n("N&ew Attribute...");
@@ -61,22 +61,22 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
setMinimumSize(310,330);
//main layout contains our two group boxes, the list and the documentation
- QVBoxLayout* mainLayout = new QVBoxLayout( this );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( this );
mainLayout->setSpacing(10);
//top group box, contains a vertical layout with list box above and buttons below
- m_pItemListGB = new QGroupBox(typeName, this );
- QVBoxLayout* listVBoxLayout = new QVBoxLayout( m_pItemListGB );
+ m_pItemListGB = new TQGroupBox(typeName, this );
+ TQVBoxLayout* listVBoxLayout = new TQVBoxLayout( m_pItemListGB );
listVBoxLayout->setMargin(margin);
listVBoxLayout->setSpacing ( 10 );
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* listHBoxLayout = new QHBoxLayout( listVBoxLayout );
- m_pItemListLB = new QListBox(m_pItemListGB);
+ TQHBoxLayout* listHBoxLayout = new TQHBoxLayout( listVBoxLayout );
+ m_pItemListLB = new TQListBox(m_pItemListGB);
listHBoxLayout->addWidget(m_pItemListLB);
//the move up/down buttons (another vertical box)
- QVBoxLayout* buttonLayout = new QVBoxLayout( listHBoxLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( listHBoxLayout );
m_pTopArrowB = new KArrowButton( m_pItemListGB );
m_pTopArrowB->setEnabled( false );
buttonLayout->addWidget( m_pTopArrowB );
@@ -95,17 +95,17 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
//the action buttons
KButtonBox* buttonBox = new KButtonBox(m_pItemListGB);
- buttonBox->addButton( newItemType, this, SLOT(slotNewListItem()) );
+ buttonBox->addButton( newItemType, this, TQT_SLOT(slotNewListItem()) );
m_pDeleteListItemButton = buttonBox->addButton( i18n("&Delete"),
- this, SLOT(slotDelete()) );
- m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, SLOT(slotProperties()) );
+ this, TQT_SLOT(slotDelete()) );
+ m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this, TQT_SLOT(slotProperties()) );
listVBoxLayout->addWidget(buttonBox);
mainLayout->addWidget(m_pItemListGB);
- m_pDocGB = new QGroupBox(i18n("Documentation"), this);
- QVBoxLayout* docLayout = new QVBoxLayout( m_pDocGB );
- m_pDocTE = new QTextEdit( m_pDocGB );
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), this);
+ TQVBoxLayout* docLayout = new TQVBoxLayout( m_pDocGB );
+ m_pDocTE = new TQTextEdit( m_pDocGB );
docLayout->setMargin(margin);
docLayout->setSpacing ( 10 );
docLayout->addWidget( m_pDocTE );
@@ -117,27 +117,27 @@ ClassifierListPage::ClassifierListPage(QWidget* parent, UMLClassifier* classifie
// to the ListItemModified slot in this class
for (UMLClassifierListItem* listItem = itemList.first(); listItem != 0; listItem = itemList.next() ) {
m_pItemListLB->insertItem(listItem->toString(Uml::st_SigNoVis));
- connect( listItem, SIGNAL(modified()),this,SLOT(slotListItemModified()) );
+ connect( listItem, TQT_SIGNAL(modified()),this,TQT_SLOT(slotListItemModified()) );
}
enableWidgets(false);//disable widgets until an att is chosen
m_pOldListItem = 0;
- connect(m_pItemListLB, SIGNAL(clicked(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*)));
- connect(m_pItemListLB, SIGNAL(selectionChanged(QListBoxItem*)), this, SLOT(slotClicked(QListBoxItem*)));
-
- connect(m_pItemListLB, SIGNAL(rightButtonPressed(QListBoxItem*, const QPoint&)),
- this, SLOT(slotRightButtonPressed(QListBoxItem*, const QPoint&)));
-
- connect(m_pItemListLB, SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint&)),
- this, SLOT(slotRightButtonClicked(QListBoxItem*, const QPoint&)));
- connect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject*)), this, SLOT(slotListItemCreated(UMLObject*)));
-
- connect( m_pTopArrowB, SIGNAL( clicked() ), this, SLOT( slotTopClicked() ) );
- connect( m_pUpArrowB, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
- connect( m_pDownArrowB, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
- connect( m_pBottomArrowB, SIGNAL( clicked() ), this, SLOT( slotBottomClicked() ) );
- connect( m_pItemListLB, SIGNAL( doubleClicked( QListBoxItem* ) ),
- this, SLOT( slotDoubleClick( QListBoxItem* ) ) );
+ connect(m_pItemListLB, TQT_SIGNAL(clicked(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*)));
+ connect(m_pItemListLB, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), this, TQT_SLOT(slotClicked(TQListBoxItem*)));
+
+ connect(m_pItemListLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem*, const TQPoint&)));
+
+ connect(m_pItemListLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem*, const TQPoint&)));
+ connect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject*)), this, TQT_SLOT(slotListItemCreated(UMLObject*)));
+
+ connect( m_pTopArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTopClicked() ) );
+ connect( m_pUpArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
+ connect( m_pDownArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
+ connect( m_pBottomArrowB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBottomClicked() ) );
+ connect( m_pItemListLB, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ this, TQT_SLOT( slotDoubleClick( TQListBoxItem* ) ) );
}
ClassifierListPage::~ClassifierListPage() {
@@ -189,7 +189,7 @@ void ClassifierListPage::enableWidgets(bool state) {
m_pPropertiesButton->setEnabled(true);
}
-void ClassifierListPage::slotClicked(QListBoxItem*item) {
+void ClassifierListPage::slotClicked(TQListBoxItem*item) {
//if not first time an item is highlighted
//save old highlighted item first
if(m_pOldListItem) {
@@ -201,7 +201,7 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) {
// focus and so at least one item is always selected; this doesn't happen, if
// there are no items of course;
//
- // for more information see Qt doc for void QListBox::clearSelection()
+ // for more information see Qt doc for void TQListBox::clearSelection()
UMLClassifierListItem* listItem;
if (item == NULL) {
if (m_pItemListLB->count() == 0) {
@@ -226,11 +226,11 @@ void ClassifierListPage::slotClicked(QListBoxItem*item) {
void ClassifierListPage::updateObject() {
saveCurrentItemDocumentation();
- QListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem());
+ TQListBoxItem*i = m_pItemListLB->item(m_pItemListLB->currentItem());
slotClicked(i);
// The rest of this function does nothing?!
- QStringList stringList;
+ TQStringList stringList;
int count = m_pItemListLB->count();
for( int j = 0; j < count ; j++ )
stringList.append( m_pItemListLB->text( j ) );
@@ -267,16 +267,16 @@ void ClassifierListPage::slotListItemModified() {
m_bSigWaiting = false;
}
-void ClassifierListPage::slotRightButtonClicked(QListBoxItem* /*item*/, const QPoint& /* p*/) {
+void ClassifierListPage::slotRightButtonClicked(TQListBoxItem* /*item*/, const TQPoint& /* p*/) {
if (m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint& p) {
+void ClassifierListPage::slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p) {
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if (item) { //pressed on a list item
if (m_itemType == ot_Attribute) {
@@ -309,14 +309,14 @@ void ClassifierListPage::slotRightButtonPressed(QListBoxItem* item, const QPoint
}
if(m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void ClassifierListPage::slotPopupMenuSel(int id) {
@@ -349,10 +349,10 @@ void ClassifierListPage::slotPopupMenuSel(int id) {
}
}
-void ClassifierListPage::printItemList(QString prologue) {
+void ClassifierListPage::printItemList(TQString prologue) {
#ifdef VERBOSE_DEBUGGING
UMLClassifierListItem* item;
- QString buf;
+ TQString buf;
UMLClassifierListItemList itemList = getItemList();
for (UMLClassifierListItemListIt it(itemList); (item = it.current()) != NULL; ++it)
buf.append(' ' + item->getName());
@@ -369,11 +369,11 @@ void ClassifierListPage::slotTopClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString currentString = m_pItemListLB->text( index );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->removeItem( index );
m_pItemListLB->insertItem( currentString, 0 );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( 0 );
+ TQListBoxItem* item = m_pItemListLB->item( 0 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -400,12 +400,12 @@ void ClassifierListPage::slotUpClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString aboveString = m_pItemListLB->text( index - 1 );
- QString currentString = m_pItemListLB->text( index );
+ TQString aboveString = m_pItemListLB->text( index - 1 );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->changeItem( currentString, index -1 );
m_pItemListLB->changeItem( aboveString, index );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( index - 1 );
+ TQListBoxItem* item = m_pItemListLB->item( index - 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -434,12 +434,12 @@ void ClassifierListPage::slotDownClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString belowString = m_pItemListLB->text( index + 1 );
- QString currentString = m_pItemListLB->text( index );
+ TQString belowString = m_pItemListLB->text( index + 1 );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->changeItem( currentString, index + 1 );
m_pItemListLB->changeItem( belowString, index );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( index + 1 );
+ TQListBoxItem* item = m_pItemListLB->item( index + 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
printItemList("itemList before change: ");
@@ -467,11 +467,11 @@ void ClassifierListPage::slotBottomClicked() {
m_pOldListItem = NULL;
//swap the text around in the ListBox
- QString currentString = m_pItemListLB->text( index );
+ TQString currentString = m_pItemListLB->text( index );
m_pItemListLB->removeItem( index );
m_pItemListLB->insertItem( currentString, m_pItemListLB->count() );
//set the moved item selected
- QListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 );
+ TQListBoxItem* item = m_pItemListLB->item( m_pItemListLB->count() - 1 );
m_pItemListLB->setSelected( item, true );
//now change around in the list
@@ -489,7 +489,7 @@ void ClassifierListPage::slotBottomClicked() {
slotClicked( item );
}
-void ClassifierListPage::slotDoubleClick( QListBoxItem* item ) {
+void ClassifierListPage::slotDoubleClick( TQListBoxItem* item ) {
if( !item )
return;
diff --git a/umbrello/umbrello/dialogs/classifierlistpage.h b/umbrello/umbrello/dialogs/classifierlistpage.h
index ea1c0b9f..1dba8297 100644
--- a/umbrello/umbrello/dialogs/classifierlistpage.h
+++ b/umbrello/umbrello/dialogs/classifierlistpage.h
@@ -13,10 +13,10 @@
#define CLASSIFIERLISTPAGE_H
//qt includes
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qtextedit.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqtextedit.h>
//kde includes
#include <karrowbutton.h>
@@ -36,7 +36,7 @@ class UMLDoc;
* @author Paul Hensgen, Jonathan Riddell
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassifierListPage : public QWidget {
+class ClassifierListPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -47,7 +47,7 @@ public:
* @param doc The UMLDoc document
* @param type The type of listItem this handles
*/
- ClassifierListPage(QWidget* parent, UMLClassifier* classifier, UMLDoc* doc, Uml::Object_Type type);
+ ClassifierListPage(TQWidget* parent, UMLClassifier* classifier, UMLDoc* doc, Uml::Object_Type type);
/**
* Standard deconstructor.
@@ -108,21 +108,21 @@ private:
* Utility for debugging, prints the current item list.
* Only effective if VERBOSE_DEBUGGING is defined.
*/
- void printItemList(QString prologue);
+ void printItemList(TQString prologue);
UMLClassifier* m_pClassifier;
- QGroupBox* m_pDocGB;
- QGroupBox* m_pItemListGB;
- QListBox* m_pItemListLB;
- QTextEdit* m_pDocTE;
+ TQGroupBox* m_pDocGB;
+ TQGroupBox* m_pItemListGB;
+ TQListBox* m_pItemListLB;
+ TQTextEdit* m_pDocTE;
Uml::Object_Type m_itemType;
KArrowButton* m_pTopArrowB;
KArrowButton* m_pUpArrowB;
KArrowButton* m_pDownArrowB;
KArrowButton* m_pBottomArrowB;
- QPushButton* m_pDeleteListItemButton;
- QPushButton* m_pPropertiesButton;
+ TQPushButton* m_pDeleteListItemButton;
+ TQPushButton* m_pPropertiesButton;
UMLClassifierListItem* m_pOldListItem;
UMLDoc* m_pDoc;
@@ -134,7 +134,7 @@ public slots:
* called when list view is clicked on
* calls enableWidgets()
*/
- void slotClicked(QListBoxItem* item);
+ void slotClicked(TQListBoxItem* item);
/**
* Called when an item is selected in a right click menu
@@ -143,13 +143,13 @@ public slots:
void slotListItemCreated(UMLObject* object);
void slotListItemModified();
- void slotRightButtonClicked(QListBoxItem* item, const QPoint& p);
- void slotRightButtonPressed(QListBoxItem* item, const QPoint& p);
+ void slotRightButtonClicked(TQListBoxItem* item, const TQPoint& p);
+ void slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p);
/**
* shows properties dialog for the attribute clicked on
*/
- void slotDoubleClick(QListBoxItem* item);
+ void slotDoubleClick(TQListBoxItem* item);
/**
diff --git a/umbrello/umbrello/dialogs/classoptionspage.cpp b/umbrello/umbrello/dialogs/classoptionspage.cpp
index 7a54f2dc..670d86f1 100644
--- a/umbrello/umbrello/dialogs/classoptionspage.cpp
+++ b/umbrello/umbrello/dialogs/classoptionspage.cpp
@@ -13,7 +13,7 @@
#include "classoptionspage.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kdebug.h>
@@ -22,15 +22,15 @@
#include "../classifierwidget.h"
-ClassOptionsPage::ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget)
- : QWidget( pParent ) {
+ClassOptionsPage::ClassOptionsPage(TQWidget* pParent, ClassifierWidget* pWidget)
+ : TQWidget( pParent ) {
init();
//Uml::Widget_Type type = pWidget->getBaseType();
m_pWidget = pWidget;
setupPage();
}
-ClassOptionsPage::ClassOptionsPage(QWidget* pParent, Settings::OptionState *options) : QWidget( pParent )
+ClassOptionsPage::ClassOptionsPage(TQWidget* pParent, Settings::OptionState *options) : TQWidget( pParent )
{
init();
m_options = options;
@@ -54,20 +54,20 @@ void ClassOptionsPage::setupPage() {
bool sig = false;
Uml::Signature_Type sigtype;
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
- m_pVisibilityGB = new QGroupBox(i18n("Show"), this);
+ m_pVisibilityGB = new TQGroupBox(i18n("Show"), this);
topLayout -> addWidget(m_pVisibilityGB);
- QGridLayout * visibilityLayout = new QGridLayout(m_pVisibilityGB);
+ TQGridLayout * visibilityLayout = new TQGridLayout(m_pVisibilityGB);
visibilityLayout -> setSpacing(10);
visibilityLayout -> setMargin(margin);
visibilityLayout -> setRowStretch(3, 1);
- m_pShowOpsCB = new QCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
+ m_pShowOpsCB = new TQCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
m_pShowOpsCB -> setChecked(m_pWidget -> getShowOps());
visibilityLayout -> addWidget(m_pShowOpsCB, 0, 0);
- m_pShowVisibilityCB = new QCheckBox(i18n("&Visibility"), m_pVisibilityGB);
+ m_pShowVisibilityCB = new TQCheckBox(i18n("&Visibility"), m_pVisibilityGB);
m_pShowVisibilityCB -> setChecked(m_pWidget -> getShowVisibility());
visibilityLayout -> addWidget(m_pShowVisibilityCB, 0, 1);
@@ -76,26 +76,26 @@ void ClassOptionsPage::setupPage() {
sig = false;
else
sig = true;
- m_pShowOpSigCB = new QCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
+ m_pShowOpSigCB = new TQCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
m_pShowOpSigCB -> setChecked(sig);
visibilityLayout -> addWidget(m_pShowOpSigCB, 1, 0);
- m_pShowPackageCB = new QCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
+ m_pShowPackageCB = new TQCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
m_pShowPackageCB -> setChecked(m_pWidget -> getShowPackage());
visibilityLayout -> addWidget(m_pShowPackageCB, 1, 1);
Uml::Widget_Type type = m_pWidget->getBaseType();
if (type == Uml::wt_Class) {
- m_pShowAttsCB = new QCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
+ m_pShowAttsCB = new TQCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
m_pShowAttsCB->setChecked(m_pWidget->getShowAtts());
visibilityLayout->addWidget(m_pShowAttsCB, 2, 0);
- m_pShowStereotypeCB = new QCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
+ m_pShowStereotypeCB = new TQCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
m_pShowStereotypeCB->setChecked(m_pWidget->getShowStereotype());
visibilityLayout->addWidget(m_pShowStereotypeCB, 2, 1);
- m_pShowAttSigCB = new QCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
+ m_pShowAttSigCB = new TQCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
sigtype = m_pWidget->getShowAttSigs();
if(sigtype == Uml::st_NoSig || sigtype == Uml::st_NoSigNoVis)
sig = false;
@@ -105,7 +105,7 @@ void ClassOptionsPage::setupPage() {
visibilityLayout->addWidget(m_pShowAttSigCB, 3, 0);
} else if (type == Uml::wt_Interface) {
- m_pDrawAsCircleCB = new QCheckBox(i18n("Draw as circle"), m_pVisibilityGB);
+ m_pDrawAsCircleCB = new TQCheckBox(i18n("Draw as circle"), m_pVisibilityGB);
m_pDrawAsCircleCB->setChecked( m_pWidget->getDrawAsCircle() );
visibilityLayout->addWidget(m_pDrawAsCircleCB, 2, 0);
}
@@ -115,40 +115,40 @@ void ClassOptionsPage::setupClassPageOption() {
int margin = fontMetrics().height();
- QVBoxLayout * topLayout = new QVBoxLayout(this);
+ TQVBoxLayout * topLayout = new TQVBoxLayout(this);
topLayout -> setSpacing(6);
- m_pVisibilityGB = new QGroupBox(i18n("Show"), this);
+ m_pVisibilityGB = new TQGroupBox(i18n("Show"), this);
topLayout -> addWidget(m_pVisibilityGB);
- QGridLayout * visibilityLayout = new QGridLayout(m_pVisibilityGB);
+ TQGridLayout * visibilityLayout = new TQGridLayout(m_pVisibilityGB);
visibilityLayout -> setSpacing(10);
visibilityLayout -> setMargin(margin);
- m_pShowOpsCB = new QCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
+ m_pShowOpsCB = new TQCheckBox(i18n("Operatio&ns"), m_pVisibilityGB);
m_pShowOpsCB -> setChecked( m_options->classState.showOps );
visibilityLayout -> addWidget(m_pShowOpsCB, 0, 0);
- m_pShowOpSigCB = new QCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
+ m_pShowOpSigCB = new TQCheckBox(i18n("O&peration signature"), m_pVisibilityGB);
m_pShowOpSigCB -> setChecked(m_options->classState.showOpSig);
visibilityLayout -> addWidget(m_pShowOpSigCB, 1, 0);
visibilityLayout -> setRowStretch(3, 1);
- m_pShowAttsCB = new QCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
+ m_pShowAttsCB = new TQCheckBox(i18n("Att&ributes"), m_pVisibilityGB);
m_pShowAttsCB -> setChecked(m_options->classState.showAtts );
visibilityLayout -> addWidget(m_pShowAttsCB, 2, 0);
- m_pShowAttSigCB = new QCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
+ m_pShowAttSigCB = new TQCheckBox(i18n("Attr&ibute signature"), m_pVisibilityGB);
m_pShowAttSigCB -> setChecked(m_options->classState.showAttSig);
visibilityLayout -> addWidget(m_pShowAttSigCB, 3, 0);
- m_pShowVisibilityCB = new QCheckBox(i18n("&Visibility"), m_pVisibilityGB);
+ m_pShowVisibilityCB = new TQCheckBox(i18n("&Visibility"), m_pVisibilityGB);
m_pShowVisibilityCB -> setChecked(m_options->classState.showVisibility);
visibilityLayout -> addWidget(m_pShowVisibilityCB, 0, 1);
- m_pShowPackageCB = new QCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
+ m_pShowPackageCB = new TQCheckBox(i18n("Pac&kage"), m_pVisibilityGB);
m_pShowPackageCB -> setChecked(m_options->classState.showPackage);
visibilityLayout -> addWidget(m_pShowPackageCB, 1, 1);
- m_pShowStereotypeCB = new QCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
+ m_pShowStereotypeCB = new TQCheckBox(i18n("Stereot&ype"), m_pVisibilityGB);
m_pShowStereotypeCB -> setChecked(m_options->classState.showStereoType);
visibilityLayout -> addWidget(m_pShowStereotypeCB, 2, 1);
diff --git a/umbrello/umbrello/dialogs/classoptionspage.h b/umbrello/umbrello/dialogs/classoptionspage.h
index 50d43f8c..718944cc 100644
--- a/umbrello/umbrello/dialogs/classoptionspage.h
+++ b/umbrello/umbrello/dialogs/classoptionspage.h
@@ -13,9 +13,9 @@
#ifndef CLASSOPTIONSPAGE_H
#define CLASSOPTIONSPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
#include "../optionstate.h"
@@ -31,17 +31,17 @@ class ClassifierWidget;
* @see ClassPropDlg
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class ClassOptionsPage : public QWidget {
+class ClassOptionsPage : public TQWidget {
public:
/**
* Constructor - observe and modify a Widget
*/
- ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget);
+ ClassOptionsPage(TQWidget* pParent, ClassifierWidget* pWidget);
/**
* Constructor - observe and modify an OptionState structure
*/
- ClassOptionsPage(QWidget* pParent, Settings::OptionState *options );
+ ClassOptionsPage(TQWidget* pParent, Settings::OptionState *options );
/**
* destructor
@@ -88,11 +88,11 @@ protected:
void updateOptionState();
//GUI widgets
- QGroupBox * m_pVisibilityGB;
- QCheckBox * m_pShowVisibilityCB, * m_pShowAttSigCB;
- QCheckBox * m_pShowOpSigCB, * m_pShowAttsCB, * m_pShowOpsCB;
- QCheckBox * m_pShowStereotypeCB, * m_pShowPackageCB;
- QCheckBox* m_pDrawAsCircleCB;
+ TQGroupBox * m_pVisibilityGB;
+ TQCheckBox * m_pShowVisibilityCB, * m_pShowAttSigCB;
+ TQCheckBox * m_pShowOpSigCB, * m_pShowAttsCB, * m_pShowOpsCB;
+ TQCheckBox * m_pShowStereotypeCB, * m_pShowPackageCB;
+ TQCheckBox* m_pDrawAsCircleCB;
/**
* The classifier widget to represent in the dialog page.
diff --git a/umbrello/umbrello/dialogs/classpropdlg.cpp b/umbrello/umbrello/dialogs/classpropdlg.cpp
index 9c4848a1..169de20e 100644
--- a/umbrello/umbrello/dialogs/classpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/classpropdlg.cpp
@@ -13,7 +13,7 @@
#include "classpropdlg.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kdebug.h>
@@ -33,7 +33,7 @@
#include "../uml.h"
#include "../umlview.h"
-ClassPropDlg::ClassPropDlg(QWidget *parent, UMLObject * c, int pageNum, bool assoc)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, UMLObject * c, int pageNum, bool assoc)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = 0;
@@ -52,7 +52,7 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, UMLObject * c, int pageNum, bool ass
showPage(pageNum);
}
-ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, ObjectWidget * o)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = o;
@@ -66,14 +66,14 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
m_Type = pt_ObjectWidget;
m_pObject = m_pWidget->getUMLObject();
m_pDoc = UMLApp::app()->getDocument();
- QFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQFrame *page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
page -> setMinimumSize(310, 330);
- QHBoxLayout * topLayout = new QHBoxLayout(page);
+ TQHBoxLayout * topLayout = new TQHBoxLayout(page);
m_pGenPage = new ClassGenPage(m_pDoc, page, o);
topLayout -> addWidget(m_pGenPage);
- QFrame * newPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(newPage);
+ TQFrame * newPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(newPage);
m_pColorPage = new UMLWidgetColorPage(newPage, o);
m_pColorLayout -> addWidget(m_pColorPage);
@@ -82,7 +82,7 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, ObjectWidget * o)
setMinimumSize(340,420);
}
-ClassPropDlg::ClassPropDlg(QWidget *parent, UMLWidget * w)
+ClassPropDlg::ClassPropDlg(TQWidget *parent, UMLWidget * w)
: KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, parent, "_CLASSDLG_", true, true) {
m_pWidget = w;
@@ -115,15 +115,15 @@ ClassPropDlg::ClassPropDlg(QWidget *parent, UMLWidget * w)
//now setup the options page for classes
if (w->getBaseType() == Uml::wt_Class || w->getBaseType() == Uml::wt_Interface) {
- QFrame* newPage = addPage( i18n("Display"), i18n("Display Options"), DesktopIcon("info") );
- QHBoxLayout* m_pOptionsLayout = new QHBoxLayout(newPage);
+ TQFrame* newPage = addPage( i18n("Display"), i18n("Display Options"), DesktopIcon("info") );
+ TQHBoxLayout* m_pOptionsLayout = new TQHBoxLayout(newPage);
ClassifierWidget *cw = static_cast<ClassifierWidget*>(w);
m_pOptionsPage = new ClassOptionsPage( newPage, cw );
m_pOptionsLayout -> addWidget(m_pOptionsPage);
}
- QFrame* colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon("colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame* colorPage = addPage( i18n("Color"), i18n("Widget Colors"), DesktopIcon("colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage(colorPage, w);
m_pColorLayout -> addWidget(m_pColorPage);
setupFontPage();
@@ -167,8 +167,8 @@ void ClassPropDlg::slotApply() {
}
void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
- QFrame *page = addPage(i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
- QHBoxLayout * genLayout = new QHBoxLayout(page);
+ TQFrame *page = addPage(i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQHBoxLayout * genLayout = new TQHBoxLayout(page);
page -> setMinimumSize(310, 330);
m_pGenPage = new ClassGenPage(m_pDoc, page, c);
genLayout -> addWidget(m_pGenPage);
@@ -176,52 +176,52 @@ void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
//add extra pages for class
if (ot == Uml::ot_Class ) {
//setup attributes page
- QFrame* newPage = addPage( i18n("Attributes"), i18n("Attribute Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Attributes"), i18n("Attribute Settings"), DesktopIcon("misc") );
m_pAttPage = new ClassifierListPage(newPage, (UMLClassifier *)c, m_pDoc, Uml::ot_Attribute);
- QHBoxLayout * attLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout * attLayout = new TQHBoxLayout(newPage);
attLayout -> addWidget(m_pAttPage);
}
if (ot == Uml::ot_Class || ot == Uml::ot_Interface) {
//setup operations page
- QFrame* newPage = addPage( i18n("Operations"), i18n("Operation Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Operations"), i18n("Operation Settings"), DesktopIcon("misc") );
m_pOpsPage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_Operation);
- QHBoxLayout* pOpsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* pOpsLayout = new TQHBoxLayout(newPage);
pOpsLayout -> addWidget(m_pOpsPage);
}
if (ot == Uml::ot_Class || ot == Uml::ot_Interface) {
//setup templates page
- QFrame* newPage = addPage( i18n("Templates"), i18n("Templates Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Templates"), i18n("Templates Settings"), DesktopIcon("misc") );
m_pTemplatePage = new ClassifierListPage(newPage, (UMLClassifier *)c, m_pDoc, Uml::ot_Template);
- QHBoxLayout* templatesLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* templatesLayout = new TQHBoxLayout(newPage);
templatesLayout->addWidget(m_pTemplatePage);
}
if (ot == Uml::ot_Enum) {
//setup enum literals page
- QFrame* newPage = addPage( i18n("Enum Literals"), i18n("Enum Literals Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Enum Literals"), i18n("Enum Literals Settings"), DesktopIcon("misc") );
m_pEnumLiteralPage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_EnumLiteral);
- QHBoxLayout* enumLiteralsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* enumLiteralsLayout = new TQHBoxLayout(newPage);
enumLiteralsLayout->addWidget(m_pEnumLiteralPage);
}
if (ot == Uml::ot_Entity) {
//setup enum literals page
- QFrame* newPage = addPage( i18n("Entity Attributes"), i18n("Entity Attributes Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Entity Attributes"), i18n("Entity Attributes Settings"), DesktopIcon("misc") );
m_pEntityAttributePage = new ClassifierListPage(newPage, (UMLClassifier*)c, m_pDoc, Uml::ot_EntityAttribute);
- QHBoxLayout* entityAttributesLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* entityAttributesLayout = new TQHBoxLayout(newPage);
entityAttributesLayout->addWidget(m_pEntityAttributePage);
}
if (ot == Uml::ot_Package ) {
// Set up containment page.
- QFrame* newPage = addPage( i18n("Contents"), i18n("Contents Settings"), DesktopIcon("misc") );
+ TQFrame* newPage = addPage( i18n("Contents"), i18n("Contents Settings"), DesktopIcon("misc") );
m_pPkgContentsPage = new PkgContentsPage(newPage, (UMLPackage*)(c));
- QHBoxLayout* contentsLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* contentsLayout = new TQHBoxLayout(newPage);
contentsLayout->addWidget(m_pPkgContentsPage);
}
if (assoc) {
- QFrame* newPage = addPage(i18n("Associations"), i18n("Class Associations"), DesktopIcon( "misc") );
+ TQFrame* newPage = addPage(i18n("Associations"), i18n("Class Associations"), DesktopIcon( "misc") );
m_pAssocPage = new AssocPage(newPage, UMLApp::app()->getCurrentView(), m_pObject);
- QHBoxLayout* assocLayout = new QHBoxLayout(newPage);
+ TQHBoxLayout* assocLayout = new TQHBoxLayout(newPage);
assocLayout -> addWidget(m_pAssocPage);
} else {
m_pAssocPage = 0;
@@ -229,8 +229,8 @@ void ClassPropDlg::setupPages(UMLObject * c, bool assoc) {
}
void ClassPropDlg::setupInstancePages(UMLWidget* widget) {
- QFrame* page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon("misc") );
- QHBoxLayout* genLayout = new QHBoxLayout(page);
+ TQFrame* page = addPage( i18n("General"), i18n("General Settings"), DesktopIcon("misc") );
+ TQHBoxLayout* genLayout = new TQHBoxLayout(page);
page->setMinimumSize(310, 330);
m_pGenPage = new ClassGenPage(m_pDoc, page, widget);
genLayout->addWidget(m_pGenPage);
@@ -240,8 +240,8 @@ void ClassPropDlg::setupInstancePages(UMLWidget* widget) {
void ClassPropDlg::setupFontPage() {
if( !m_pWidget )
return;
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pWidget -> getFont() );
}
diff --git a/umbrello/umbrello/dialogs/classpropdlg.h b/umbrello/umbrello/dialogs/classpropdlg.h
index 90c5b4ec..6a107ad7 100644
--- a/umbrello/umbrello/dialogs/classpropdlg.h
+++ b/umbrello/umbrello/dialogs/classpropdlg.h
@@ -49,7 +49,7 @@ public:
* @param pageNum The page to show first.
* @param assoc Determines whether to display associations
*/
- ClassPropDlg(QWidget *parent, UMLObject *c, int pageNum = 0, bool assoc = false);
+ ClassPropDlg(TQWidget *parent, UMLObject *c, int pageNum = 0, bool assoc = false);
/**
* Sets up a ClassPropDlg.
@@ -57,7 +57,7 @@ public:
* @param parent The parent of the ClassPropDlg
* @param o The ObjectWidget to display properties of.
*/
- ClassPropDlg(QWidget *parent, ObjectWidget * o);
+ ClassPropDlg(TQWidget *parent, ObjectWidget * o);
/**
* Sets up a ClassPropDlg.
@@ -65,7 +65,7 @@ public:
* @param parent The parent of the ClassPropDlg
* @param o The UMLWidget to display properties of.
*/
- ClassPropDlg(QWidget *parent, UMLWidget * o);
+ ClassPropDlg(TQWidget *parent, UMLWidget * o);
/**
diff --git a/umbrello/umbrello/dialogs/classwizard.cpp b/umbrello/umbrello/dialogs/classwizard.cpp
index 7ac1cb27..c49e418f 100644
--- a/umbrello/umbrello/dialogs/classwizard.cpp
+++ b/umbrello/umbrello/dialogs/classwizard.cpp
@@ -26,13 +26,13 @@
#include "../umlclassifierlistitemlist.h"
#include "../classifierlistitem.h"
-ClassWizard::ClassWizard( UMLDoc * pDoc ) : KWizard( (QWidget*)pDoc -> parent(), "_CLASSWIZARD_", true) {
+ClassWizard::ClassWizard( UMLDoc * pDoc ) : KWizard( (TQWidget*)pDoc -> parent(), "_CLASSWIZARD_", true) {
m_pDoc = pDoc;
//create a unique class to start with
UMLObject * pTemp = 0;
- QString name = i18n("new_class");
- QString newName = name;
- QString num = "";
+ TQString name = i18n("new_class");
+ TQString newName = name;
+ TQString num = "";
int i = 0;
m_pClass = new UMLClassifier( newName );
do {
@@ -63,42 +63,42 @@ void ClassWizard::setupPages() {
addPage( m_pOpPage, i18n("Class Operations") );
}
-void ClassWizard::showPage( QWidget * pWidget ) {
- QWizard::showPage( pWidget );
+void ClassWizard::showPage( TQWidget * pWidget ) {
+ TQWizard::showPage( pWidget );
if( pWidget == m_pOpPage )
finishButton() -> setEnabled( true );
}
void ClassWizard::next() {
- QWidget * pWidget = currentPage();
+ TQWidget * pWidget = currentPage();
if( pWidget == m_pGenPage ) {
m_pGenPage -> updateObject();
} else if( pWidget == m_pAttPage ) {
m_pAttPage -> updateObject();
}
- QWizard::next();
+ TQWizard::next();
}
void ClassWizard::back() {
- QWidget * pWidget = currentPage();
+ TQWidget * pWidget = currentPage();
if( pWidget == m_pAttPage ) {
m_pAttPage -> updateObject();
} else if( pWidget == m_pOpPage ) {
m_pOpPage -> updateObject();
}
- QWizard::back();
+ TQWizard::back();
}
void ClassWizard::accept() {
m_pDoc -> addUMLObject( m_pClass );
m_pDoc->signalUMLObjectCreated(m_pClass);
- QWizard::accept();
+ TQWizard::accept();
}
void ClassWizard::reject() {
delete m_pClass;
- QWizard::reject();
+ TQWizard::reject();
}
void ClassWizard::help() {
diff --git a/umbrello/umbrello/dialogs/classwizard.h b/umbrello/umbrello/dialogs/classwizard.h
index bc2dabf8..77fde177 100644
--- a/umbrello/umbrello/dialogs/classwizard.h
+++ b/umbrello/umbrello/dialogs/classwizard.h
@@ -41,7 +41,7 @@ protected:
/**
* Overrides the default method.
*/
- void showPage( QWidget * pWidget );
+ void showPage( TQWidget * pWidget );
/**
* Overrides the default method.
diff --git a/umbrello/umbrello/dialogs/codeeditor.cpp b/umbrello/umbrello/dialogs/codeeditor.cpp
index c05b80bb..9fe17afc 100644
--- a/umbrello/umbrello/dialogs/codeeditor.cpp
+++ b/umbrello/umbrello/dialogs/codeeditor.cpp
@@ -22,13 +22,13 @@
#include "codeeditor.h"
// qt/kde includes
-#include <qkeysequence.h>
-#include <qcursor.h>
-#include <qcolor.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqkeysequence.h>
+#include <tqcursor.h>
+#include <tqcolor.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -55,14 +55,14 @@
#include "umlroledialog.h"
#include "umloperationdialog.h"
-CodeEditor::CodeEditor ( const QString & text, const QString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
- : QTextEdit ( text, context, parent, name)
+CodeEditor::CodeEditor ( const TQString & text, const TQString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
+ : TQTextEdit ( text, context, parent, name)
{
init(parent, doc);
}
CodeEditor::CodeEditor ( CodeViewerDialog * parent, const char* name, CodeDocument * doc )
- : QTextEdit ( parent, name )
+ : TQTextEdit ( parent, name )
{
init(parent, doc);
}
@@ -90,7 +90,7 @@ Settings::CodeViewerState CodeEditor::getState()
return m_parentDlg->getState();
}
-QLabel * CodeEditor::getComponentLabel() {
+TQLabel * CodeEditor::getComponentLabel() {
return m_parentDlg->componentLabel;
}
@@ -98,7 +98,7 @@ QLabel * CodeEditor::getComponentLabel() {
// FIX: used only for debugging right now.. eliminate eventually -b.t.
void CodeEditor::clicked(int para, int pos)
{
- getComponentLabel()->setText("para:"+QString::number(para)+" pos:"+QString::number(pos));
+ getComponentLabel()->setText("para:"+TQString::number(para)+" pos:"+TQString::number(pos));
}
@@ -112,7 +112,7 @@ bool CodeEditor::close ( bool alsoDelete )
m_lastTextBlockToBeEdited = 0;
}
- return QTextEdit::close(alsoDelete);
+ return TQTextEdit::close(alsoDelete);
}
@@ -177,14 +177,14 @@ void CodeEditor::editTextBlock(TextBlock * tBlock, int para) {
}
// return whether is empty or just whitespace
-bool CodeEditor::StringIsBlank(const QString &str)
+bool CodeEditor::StringIsBlank(const TQString &str)
{
if(str.isEmpty() || str.stripWhiteSpace().isEmpty())
return true;
return false;
}
-void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
+void CodeEditor::keyPressEvent ( TQKeyEvent * e ) {
// kDebug() <<"KEY PRESS EVENT:["<<e->text().latin1()<<"] ascii CODE:"<<e->ascii();
@@ -195,7 +195,7 @@ void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
if((e->ascii() == 10) || (e->ascii() == 13) || (e->text() == "\r\n"))
m_newLinePressed = true;
- QTextEdit::keyPressEvent(e);
+ TQTextEdit::keyPressEvent(e);
}
void CodeEditor::loadFromDocument ()
@@ -205,12 +205,12 @@ void CodeEditor::loadFromDocument ()
clearText();
// set caption on tool
- QString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
+ TQString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
setCaption( tr2i18n( caption.latin1() ) );
// header for document
- QString header = m_parentDoc->getHeader()->toString();
- QString componentName = QString("header for file ") +caption;
+ TQString header = m_parentDoc->getHeader()->toString();
+ TQString componentName = TQString("header for file ") +caption;
if(!StringIsBlank(header))
insert(header,m_parentDoc->getHeader(),false,getState().fontColor,
getState().nonEditBlockColor,0,componentName);
@@ -223,7 +223,7 @@ void CodeEditor::loadFromDocument ()
}
-void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable, const QColor & fgcolor, const QColor & bgcolor, UMLObject * umlobj, const QString & displayName, int startLine)
+void CodeEditor::insert (const TQString & text, TextBlock * parent, bool editable, const TQColor & fgcolor, const TQColor & bgcolor, UMLObject * umlobj, const TQString & displayName, int startLine)
{
// set some params
@@ -235,19 +235,19 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
if(startLine == -1)
{
startLine = paragraphs()-1;
- QTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
+ TQTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
}
else
{
isInsert = true;
- QTextEdit::insertAt(text, startLine, 0);
+ TQTextEdit::insertAt(text, startLine, 0);
}
// actual put in text
// now do 'paragraph' background highlighting
// int endLine = paragraphs()-2;
- int endLine = text.contains(QRegExp("\n")) + startLine -1;
+ int endLine = text.contains(TQRegExp("\n")) + startLine -1;
if(m_isHighlighted)
for(int para=startLine;para<=endLine;para++)
setParagraphBackgroundColor(para,bgcolor);
@@ -297,7 +297,7 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
// that are greater than zero in that type of textblock
int increase = size + 1;
- QMap<TextBlock*,TextBlockInfo*>::Iterator it;
+ TQMap<TextBlock*,TextBlockInfo*>::Iterator it;
for ( it = m_tbInfoMap->begin(); it != m_tbInfoMap->end(); ++it )
{
TextBlock * tblock = it.key();
@@ -363,18 +363,18 @@ void CodeEditor::appendText(TextBlockList * items)
}
-void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const QString & componentName)
+void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const TQString & componentName)
{
if(!comment->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!comment->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString indent = comment->getIndentationString();
- QString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
+ TQString indent = comment->getIndentationString();
+ TQString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
if(!StringIsBlank(text))
insert(text,parent,true,getState().fontColor, bgcolor, umlObj, componentName);
@@ -385,11 +385,11 @@ void CodeEditor::appendText (CodeBlockWithComments * cb ) {
if(!cb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = cb->getIndentationString();
- QString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
+ TQString indent = cb->getIndentationString();
+ TQString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("CodeBlock");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("CodeBlock");
appendText(cb->getComment(), cb, 0, componentName);
@@ -406,13 +406,13 @@ void CodeEditor::appendText (CodeClassFieldDeclarationBlock * db ) {
if(!db->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = db->getIndentationString();
- QString body = db->formatMultiLineText (db->getText(), indent, "\n");
+ TQString indent = db->getIndentationString();
+ TQString body = db->formatMultiLineText (db->getText(), indent, "\n");
UMLObject * parentObj = db->getParentClassField()->getParentObject();
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("");
if(parentObj)
{
if(db->getParentClassField()->parentIsAttribute()) {
@@ -443,13 +443,13 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
if(!mb->getWriteOutText() && (!m_showHiddenBlocks || dynamic_cast<CodeAccessorMethod*>(mb)))
return;
- QColor bgcolor = getState().umlObjectColor;
- QString indent = mb->getIndentationString();
- QString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
+ TQColor bgcolor = getState().umlObjectColor;
+ TQString indent = mb->getIndentationString();
+ TQString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
- QString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
- QString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
- QString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
+ TQString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
+ TQString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
+ TQString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
if(body.isEmpty())
body = " \n";
@@ -460,7 +460,7 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
bgcolor = getState().hiddenColor;
}
- QString componentName = QString("<b>parentless method\?</b>");
+ TQString componentName = TQString("<b>parentless method\?</b>");
// ugly, but we need to know if there is a parent object here.
CodeOperation * op = dynamic_cast<CodeOperation*>(mb);
@@ -504,11 +504,11 @@ void CodeEditor::appendText (TextBlock * tb) {
if(!tb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!tb->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString str = tb->toString();
+ TQString str = tb->toString();
insert(str,tb,false,getState().fontColor,bgcolor);
}
@@ -521,14 +521,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
OwnedHierarchicalCodeBlock * test = dynamic_cast<OwnedHierarchicalCodeBlock *>(hblock);
UMLObject * parentObj = 0;
- QString componentName = QString("");
- QColor paperColor = getState().nonEditBlockColor;
+ TQString componentName = TQString("");
+ TQColor paperColor = getState().nonEditBlockColor;
if(test)
{
parentObj = test->getParentObject();
UMLClassifier *c = dynamic_cast<UMLClassifier*>(parentObj);
if (c) {
- QString typeStr;
+ TQString typeStr;
if (c->isInterface())
typeStr = "Interface";
else
@@ -545,9 +545,9 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
paperColor = getState().hiddenColor;
TextBlockList * items = hblock->getTextBlockList();
- QString indent = hblock->getIndentationString();
- QString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
- QString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
+ TQString indent = hblock->getIndentationString();
+ TQString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
+ TQString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
appendText(hblock->getComment(), hblock, parentObj, componentName);
@@ -559,14 +559,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
}
-void CodeEditor::insertParagraph ( const QString & text, int para )
+void CodeEditor::insertParagraph ( const TQString & text, int para )
{
- QTextEdit::insertParagraph(text,para);
+ TQTextEdit::insertParagraph(text,para);
}
void CodeEditor::removeParagraph ( int para )
{
- QTextEdit::removeParagraph(para);
+ TQTextEdit::removeParagraph(para);
}
// All umlobjects which may have pop-up boxes should return true here
@@ -623,10 +623,10 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected()
int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
@@ -645,21 +645,21 @@ void CodeEditor::slotInsertCodeBlockAfterSelected()
ParaInfo * lastpi = tbinfo->m_paraList.last();
int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
-QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
+TQPopupMenu * CodeEditor::createPopupMenu ( const TQPoint & pos )
{
TextBlock * tb = m_selectedTextBlock;
m_lastPara = paragraphAt(pos);
- QPopupMenu * menu = new QPopupMenu(this);
- // ugh. A bug in the Qt interaction between QTextEdit and Menu
+ TQPopupMenu * menu = new TQPopupMenu(this);
+ // ugh. A bug in the Qt interaction between TQTextEdit and Menu
// can sometimes trigger a clear() call of the text area after
// the popup menu is destroyed. The workaround is to disable
// the behavior by blocking the destroy signal from the menu.
@@ -668,26 +668,26 @@ QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
if (m_selectedTextBlock)
{
if(tb->getWriteOutText())
- menu->insertItem("Hide",this,SLOT(slotChangeSelectedBlockView()), Key_H, 0);
+ menu->insertItem("Hide",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_H, 0);
else
- menu->insertItem("Show",this,SLOT(slotChangeSelectedBlockView()), Key_S, 0);
+ menu->insertItem("Show",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_S, 0);
CodeBlockWithComments * cb = dynamic_cast<CodeBlockWithComments*>(tb);
if(cb)
if(cb->getComment()->getWriteOutText())
- menu->insertItem("Hide Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
+ menu->insertItem("Hide Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
else
- menu->insertItem("Show Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
+ menu->insertItem("Show Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
menu->insertSeparator();
- menu->insertItem("Insert Code Block Before",this,SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
- menu->insertItem("Insert Code Block After",this,SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
+ menu->insertItem("Insert Code Block Before",this,TQT_SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
+ menu->insertItem("Insert Code Block After",this,TQT_SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
menu->insertSeparator();
- menu->insertItem("Copy",this,SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
- menu->insertItem("Paste",this,SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
- menu->insertItem("Cut",this,SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
+ menu->insertItem("Copy",this,TQT_SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
+ menu->insertItem("Paste",this,TQT_SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
+ menu->insertItem("Cut",this,TQT_SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
// enable/disable based on conditions
if(m_selectedTextBlock == m_parentDoc->getHeader())
@@ -783,7 +783,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_parentDoc = parentDoc;
setUndoRedoEnabled( false );
- setCursor( QCursor( 0 ) );
+ setCursor( TQCursor( 0 ) );
setMouseTracking( true );
setReadOnly (true);
m_isHighlighted = getState().blocksAreHighlighted;
@@ -794,7 +794,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_textBlockToPaste = 0;
m_selectedTextBlock = 0;
m_lastTextBlockToBeEdited = 0;
- m_tbInfoMap = new QMap<TextBlock *, TextBlockInfo*>;
+ m_tbInfoMap = new TQMap<TextBlock *, TextBlockInfo*>;
setFont( getState().font );
@@ -808,15 +808,15 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
// set some viewability parameters
//int margin = fontMetrics().height();
- QBrush pbrush = QBrush ( getState().paperColor);
+ TQBrush pbrush = TQBrush ( getState().paperColor);
setPaper(pbrush);
// setMargin(margin);
- // connect(this,SIGNAL(newLinePressed()),this,SLOT(newLinePressed()));
- // connect(this,SIGNAL(backspacePressed()),this,SLOT(backspacePressed()));
- connect(this,SIGNAL(doubleClicked(int,int)),this,SLOT(doubleClicked(int,int)));
- connect(this,SIGNAL(cursorPositionChanged(int,int)),this,SLOT(cursorPositionChanged(int,int)));
+ // connect(this,TQT_SIGNAL(newLinePressed()),this,TQT_SLOT(newLinePressed()));
+ // connect(this,TQT_SIGNAL(backspacePressed()),this,TQT_SLOT(backspacePressed()));
+ connect(this,TQT_SIGNAL(doubleClicked(int,int)),this,TQT_SLOT(doubleClicked(int,int)));
+ connect(this,TQT_SIGNAL(cursorPositionChanged(int,int)),this,TQT_SLOT(cursorPositionChanged(int,int)));
// do this last
loadFromDocument();
@@ -828,16 +828,16 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
if (block) {
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(block);
- //QString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
- QString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
+ //TQString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
TextBlockInfo *info = (*m_tbInfoMap)[block];
UMLObject * parentObj = info->getParent();
int pstart = m_textBlockList.findRef(block);
- QString content = "";
+ TQString content = "";
// Assemble content from editiable paras
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if(item->isEditable)
@@ -847,7 +847,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
int lastLineToAddNewLine = lastpara + endEdit;
for(int para=(item->start+pstart);para<=lastpara;para++)
{
- QString line = block->unformatText(text(para), baseIndent);
+ TQString line = block->unformatText(text(para), baseIndent);
content += line;
// \n are implicit in the editor (!) so we should put them
// back in, if there is any content from the line
@@ -907,13 +907,13 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(tBlock);
// auto-indent new lines
- QString currentParaText = text(para);
- QString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString currentParaText = text(para);
+ TQString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
// cerr<<"AUTO INDENT:["<<baseIndent.latin1()<<"] isMethod?"<<(cmb?"true":"false")<<endl;
int minPos = baseIndent.length();
// add indent chars to the current line, if missing
- if(!m_backspacePressed && !currentParaText.contains(QRegExp('^'+baseIndent)))
+ if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent)))
{
insertAt(baseIndent,para,0);
setCursorPosition(para,pos+minPos);
@@ -929,7 +929,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
int endOfPriorLine = paragraphLength(para-1);
// IN this case, we remove old (para) line, and tack its
// contents on the line we are going to.
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
// this next thing happens when we arent deleting last line
@@ -949,7 +949,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// the indentation
if(m_backspacePressed && !priorParaIsEditable)
{
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
contents = baseIndent + contents.left(contents.length()-1); // left is to remove trailing space
insertParagraph(contents,para+1);
@@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// furthermore, IF its nothing but indentation + whitespace
// we switch this back to Auto-Generated.
- if(cmb && contents.contains(QRegExp('^'+baseIndent+"\\s$")))
+ if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$")))
{
cmb->setContentType(CodeBlock::AutoGenerated);
cmb->syncToParent();
@@ -1008,7 +1008,7 @@ bool CodeEditor::paraIsNotSingleLine (int para)
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
if((pstart+item->start) <= para && (item->start+pstart+item->size) >= para )
@@ -1032,7 +1032,7 @@ bool CodeEditor::isParaEditable (int para) {
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
int pstart = m_textBlockList.findRef(tBlock);
int relativeLine = para - pstart;
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if((item->start+pstart) <= para && (item->start+pstart+item->size) >= para)
@@ -1054,7 +1054,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected)
if(tBlock)
{
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
for(ParaInfo * item = list.first(); item; item=list.next())
for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++)
@@ -1115,7 +1115,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) {
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
bool lowerStartPosition = false;
for(ParaInfo * item = list.first(); item; item=list.next())
@@ -1148,7 +1148,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
// add this tBlock in
m_textBlockList.insert(priorPara,tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
// now update the paragraph information
@@ -1170,7 +1170,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
}
-void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
+void CodeEditor::contentsMouseMoveEvent ( TQMouseEvent * e )
{
int para = paragraphAt(e->pos());
@@ -1212,7 +1212,7 @@ void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
// If connections are right, then the UMLObject will send out the modified()
// signal which will trigger a call to re-generate the appropriate code within
// the code document. Our burden is to appropriately prepare the tool: we clear
-// out ALL the textblocks in the QTextEdit widget and then re-show them
+// out ALL the textblocks in the TQTextEdit widget and then re-show them
// after the dialog disappears
void CodeEditor::rebuildView( int startCursorPos ) {
diff --git a/umbrello/umbrello/dialogs/codeeditor.h b/umbrello/umbrello/dialogs/codeeditor.h
index 57f1fb37..5956e3ab 100644
--- a/umbrello/umbrello/dialogs/codeeditor.h
+++ b/umbrello/umbrello/dialogs/codeeditor.h
@@ -19,10 +19,10 @@
#ifndef CODEEDITOR_H
#define CODEEDITOR_H
-#include <qpopupmenu.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qtextedit.h>
+#include <tqpopupmenu.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
#include "../codeviewerstate.h"
#include "../textblocklist.h"
@@ -45,7 +45,7 @@ class CodeEditor : public QTextEdit
Q_OBJECT
public:
- explicit CodeEditor ( const QString & text, const QString & context = QString(), CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
+ explicit CodeEditor ( const TQString & text, const TQString & context = TQString(), CodeViewerDialog * parent = 0, const char * name = 0 , CodeDocument * doc = 0);
explicit CodeEditor ( CodeViewerDialog * parent, const char* name = 0, CodeDocument * doc = 0);
~CodeEditor ();
@@ -62,7 +62,7 @@ protected:
void appendText (CodeClassFieldDeclarationBlock * db );
void appendText (TextBlockList * items);
void appendText (CodeMethodBlock * mb);
- void appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj = 0, const QString & compName="");
+ void appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj = 0, const TQString & compName="");
void appendText (CodeBlockWithComments * cb );
// Rebuild our view of the document. Happens whenever we change
@@ -71,26 +71,26 @@ protected:
// If connections are right, then the UMLObject will send out the modified()
// signal which will trigger a call to re-generate the appropriate code within
// the code document. Our burden is to appropriately prepare the tool: we clear
- // out ALL the textblocks in the QTextEdit widget and then re-show them
+ // out ALL the textblocks in the TQTextEdit widget and then re-show them
// after the dialog disappears
void rebuildView( int startCursorPos );
// override the QT event so we can do appropriate things
- void contentsMouseMoveEvent ( QMouseEvent * e );
+ void contentsMouseMoveEvent ( TQMouseEvent * e );
// implemented so we may capture certain key presses, namely backspace
// and 'return' events.
- void keyPressEvent ( QKeyEvent * e );
+ void keyPressEvent ( TQKeyEvent * e );
// (re) load the parent code document into the editor
void loadFromDocument();
// specialized popup menu for our tool
- QPopupMenu * createPopupMenu ( const QPoint & pos );
+ TQPopupMenu * createPopupMenu ( const TQPoint & pos );
private:
- QString parentDocName;
+ TQString parentDocName;
CodeDocument * m_parentDoc;
CodeViewerDialog * m_parentDlg;
@@ -106,17 +106,17 @@ private:
TextBlock * m_selectedTextBlock;
TextBlock * m_lastTextBlockToBeEdited;
- QMap<TextBlock*, TextBlockInfo*> *m_tbInfoMap;
+ TQMap<TextBlock*, TextBlockInfo*> *m_tbInfoMap;
TextBlockList m_textBlockList;
// main insert routine. Will append if startline is not supplied.
- void insert (const QString & text, TextBlock * parent, bool isEditable = false,
- const QColor & fgcolor = QColor("black"), const QColor & bgcolor = QColor("white"),
- UMLObject * umlobj = 0, const QString & displayName = "", int startLine = -1);
+ void insert (const TQString & text, TextBlock * parent, bool isEditable = false,
+ const TQColor & fgcolor = TQColor("black"), const TQColor & bgcolor = TQColor("white"),
+ UMLObject * umlobj = 0, const TQString & displayName = "", int startLine = -1);
void editTextBlock(TextBlock * tBlock, int para);
void clearText();
- QLabel * getComponentLabel();
+ TQLabel * getComponentLabel();
bool paraIsNotSingleLine (int para);
void expandSelectedParagraph( int where );
void contractSelectedParagraph( int where );
@@ -131,11 +131,11 @@ private:
// return whether or not the passed string is empty or
// contains nothing but whitespace
- static bool StringIsBlank( const QString &str );
+ static bool StringIsBlank( const TQString &str );
public slots:
- void insertParagraph ( const QString & text, int para );
+ void insertParagraph ( const TQString & text, int para );
void removeParagraph ( int para );
void changeHighlighting(int signal);
void changeShowHidden (int signal);
@@ -167,8 +167,8 @@ class ParaInfo {
public:
int start; // this is a relative offset from the beginning of the tblock
int size;
- QColor fgcolor;
- QColor bgcolor;
+ TQColor fgcolor;
+ TQColor bgcolor;
bool isEditable;
ParaInfo () { isEditable = false; }
@@ -176,9 +176,9 @@ public:
class TextBlockInfo {
public:
- QPtrList<ParaInfo> m_paraList;
+ TQPtrList<ParaInfo> m_paraList;
UMLObject * m_parent;
- QString displayName;
+ TQString displayName;
bool isClickable;
bool isCodeAccessorMethod;
diff --git a/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp b/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
index f3dc25be..8fdb046c 100644
--- a/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationoptionspage.cpp
@@ -17,7 +17,7 @@
// own header
#include "codegenerationoptionspage.h"
// qt/kde includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
// app includes
#include "../codegenerator.h"
@@ -33,11 +33,11 @@
#include <klocale.h>
//qt include
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqbuttongroup.h>
-CodeGenerationOptionsPage::CodeGenerationOptionsPage(QWidget *parent)
+CodeGenerationOptionsPage::CodeGenerationOptionsPage(TQWidget *parent)
: CodeGenerationOptionsBase(parent)
{
init();
@@ -65,7 +65,7 @@ void CodeGenerationOptionsPage::init()
m_SelectIndentationTypeBox->setCurrentItem(indentTypeToInteger(policy->getIndentationType()));
m_SelectIndentationNumber->setValue(policy->getIndentationAmount());
- connect(this,SIGNAL(syncCodeDocumentsToParent()),gen,SLOT(syncCodeToDocument()));
+ connect(this,TQT_SIGNAL(syncCodeDocumentsToParent()),gen,TQT_SLOT(syncCodeToDocument()));
// now insert the language-dependant page, should there be one
updateCodeGenerationPolicyTab();
@@ -77,7 +77,7 @@ void CodeGenerationOptionsPage::setupActiveLanguageBox()
{
int indexCounter = 0;
while (indexCounter < Uml::pl_Reserved) {
- QString language = Model_Utils::progLangToString((Uml::Programming_Language) indexCounter);
+ TQString language = Model_Utils::progLangToString((Uml::Programming_Language) indexCounter);
m_SelectLanguageBox->insertItem(language, indexCounter);
indexCounter++;
}
@@ -135,7 +135,7 @@ void CodeGenerationOptionsPage::updateCodeGenerationPolicyTab() {
else
m_pCodePolicyPage = new DefaultCodeGenPolicyPage(languageOptionsFrame, "codelangpolicypage");
- connect(this,SIGNAL(applyClicked()),m_pCodePolicyPage,SLOT(apply()));
+ connect(this,TQT_SIGNAL(applyClicked()),m_pCodePolicyPage,TQT_SLOT(apply()));
}
@@ -145,7 +145,7 @@ void CodeGenerationOptionsPage::apply() {
m_parentPolicy->setCodeVerboseDocumentComments(m_forceDoc->isChecked());
m_parentPolicy->setCodeVerboseSectionComments(m_forceSections->isChecked());
- m_parentPolicy->setOutputDirectory(QDir(m_outputDir->text()));
+ m_parentPolicy->setOutputDirectory(TQDir(m_outputDir->text()));
m_parentPolicy->setIncludeHeadings(m_includeHeadings->isChecked());
m_parentPolicy->setHeadingFileDir(m_headingsDir->text());
m_parentPolicy->setOverwritePolicy((CodeGenerationPolicy::OverwritePolicy)m_overwriteGroup->id(m_overwriteGroup->selected()));
@@ -171,8 +171,8 @@ void CodeGenerationOptionsPage::setDefaults() {
void CodeGenerationOptionsPage::browseClicked() {
- QString button = sender()->name();
- QString dir = KFileDialog::getExistingDirectory();
+ TQString button = sender()->name();
+ TQString dir = KFileDialog::getExistingDirectory();
if(dir.isEmpty())
return;
if(button=="m_browseOutput")
@@ -181,7 +181,7 @@ void CodeGenerationOptionsPage::browseClicked() {
m_headingsDir->setText(dir);
}
-QString CodeGenerationOptionsPage::getCodeGenerationLanguage() {
+TQString CodeGenerationOptionsPage::getCodeGenerationLanguage() {
return m_SelectLanguageBox->currentText();
}
diff --git a/umbrello/umbrello/dialogs/codegenerationoptionspage.h b/umbrello/umbrello/dialogs/codegenerationoptionspage.h
index ff939d08..6cd7a2e7 100644
--- a/umbrello/umbrello/dialogs/codegenerationoptionspage.h
+++ b/umbrello/umbrello/dialogs/codegenerationoptionspage.h
@@ -21,7 +21,7 @@
#ifndef CODEGENERATIONOPTIONSPAGE_H
#define CODEGENERATIONOPTIONSPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codegenerationoptionsbase.h"
#include "../codegenerationpolicy.h"
#include "../umlnamespace.h"
@@ -40,10 +40,10 @@ class CodeGenerationPolicyPage;
class CodeGenerationOptionsPage : public CodeGenerationOptionsBase {
Q_OBJECT
public:
- CodeGenerationOptionsPage(QWidget *parent=0);
+ CodeGenerationOptionsPage(TQWidget *parent=0);
~CodeGenerationOptionsPage();
void setDefaults();
- QString getCodeGenerationLanguage();
+ TQString getCodeGenerationLanguage();
void updateCodeGenerationPolicyTab();
void apply();
diff --git a/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp b/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
index 8deb3387..0e488e75 100644
--- a/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationpolicypage.cpp
@@ -19,7 +19,7 @@
#include "codegenerationpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
// local includes
@@ -29,7 +29,7 @@
/** This is the page which comes up IF there is no special options for the
* code generator.
*/
-CodeGenerationPolicyPage::CodeGenerationPolicyPage( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
+CodeGenerationPolicyPage::CodeGenerationPolicyPage( TQWidget *parent, const char *name, CodeGenPolicyExt * policy )
:CodeGenerationPolicyBase(parent,name)
{
m_parentPolicy = policy;
diff --git a/umbrello/umbrello/dialogs/codegenerationpolicypage.h b/umbrello/umbrello/dialogs/codegenerationpolicypage.h
index 16590dd3..959e34aa 100644
--- a/umbrello/umbrello/dialogs/codegenerationpolicypage.h
+++ b/umbrello/umbrello/dialogs/codegenerationpolicypage.h
@@ -20,7 +20,7 @@
#ifndef CODEGENERATIONPOLICYPAGE_H
#define CODEGENERATIONPOLICYPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codegenerationpolicybase.h"
class CodeGenPolicyExt;
@@ -32,7 +32,7 @@ class CodeGenPolicyExt;
class CodeGenerationPolicyPage : public CodeGenerationPolicyBase {
Q_OBJECT
public:
- explicit CodeGenerationPolicyPage (QWidget *parent=0, const char *name=0, CodeGenPolicyExt * policy = 0);
+ explicit CodeGenerationPolicyPage (TQWidget *parent=0, const char *name=0, CodeGenPolicyExt * policy = 0);
virtual ~CodeGenerationPolicyPage();
diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.cpp b/umbrello/umbrello/dialogs/codegenerationwizard.cpp
index ca726398..b64e30dc 100644
--- a/umbrello/umbrello/dialogs/codegenerationwizard.cpp
+++ b/umbrello/umbrello/dialogs/codegenerationwizard.cpp
@@ -21,10 +21,10 @@
#include "codegenerationwizard.h"
// qt/kde includes
-#include <qdir.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
+#include <tqdir.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,18 +38,18 @@
CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
- : CodeGenerationWizardBase((QWidget*)UMLApp::app()) {
+ : CodeGenerationWizardBase((TQWidget*)UMLApp::app()) {
m_doc = UMLApp::app()->getDocument();
m_app = UMLApp::app();
m_availableList -> setAllColumnsShowFocus(true);
- m_availableList -> setResizeMode(QListView::AllColumns);
+ m_availableList -> setResizeMode(TQListView::AllColumns);
m_selectedList -> setAllColumnsShowFocus(true);
- m_selectedList -> setResizeMode(QListView::AllColumns);
+ m_selectedList -> setResizeMode(TQListView::AllColumns);
m_statusList -> setAllColumnsShowFocus(true);
- m_statusList -> setResizeMode(QListView::AllColumns);
+ m_statusList -> setResizeMode(TQListView::AllColumns);
m_CodeGenerationOptionsPage = new CodeGenerationOptionsPage(this);
- connect( m_CodeGenerationOptionsPage, SIGNAL(languageChanged()), this, SLOT(changeLanguage()) );
+ connect( m_CodeGenerationOptionsPage, TQT_SIGNAL(languageChanged()), this, TQT_SLOT(changeLanguage()) );
insertPage(m_CodeGenerationOptionsPage, i18n("Code Generation Options"), 1);
@@ -60,7 +60,7 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
classList = &cList;
}
for (UMLClassifier *c = classList->first(); c ; c = classList->next()) {
- new QListViewItem( m_selectedList, c->getFullyQualifiedName());
+ new TQListViewItem( m_selectedList, c->getFullyQualifiedName());
}
setNextEnabled(page(0),m_selectedList->childCount() > 0);
@@ -68,10 +68,10 @@ CodeGenerationWizard::CodeGenerationWizard(UMLClassifierList *classList)
setFinishEnabled(page(2),true);
finishButton()->disconnect();
finishButton()->setText(i18n("&Generate"));
- connect(finishButton(),SIGNAL(clicked()),this,SLOT(generateCode()));
- if ( QApplication::reverseLayout() )
+ connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(generateCode()));
+ if ( TQApplication::reverseLayout() )
{
- QPixmap tmpPixmap( *m_addButton->pixmap() );
+ TQPixmap tmpPixmap( *m_addButton->pixmap() );
m_addButton->setPixmap(*m_removeButton->pixmap());
m_removeButton->setPixmap(tmpPixmap);
}
@@ -105,13 +105,13 @@ void CodeGenerationWizard::generateCode() {
cancelButton()->setEnabled(false);
- connect( codeGenerator, SIGNAL(codeGenerated(UMLClassifier*, bool)),
- this, SLOT(classGenerated(UMLClassifier*, bool)) );
+ connect( codeGenerator, TQT_SIGNAL(codeGenerated(UMLClassifier*, bool)),
+ this, TQT_SLOT(classGenerated(UMLClassifier*, bool)) );
UMLClassifierList cList;
cList.setAutoDelete(false);
- for(QListViewItem *item = m_statusList->firstChild(); item;
+ for(TQListViewItem *item = m_statusList->firstChild(); item;
item = item-> nextSibling()) {
UMLClassifier *concept = m_doc->findUMLClassifier(item->text(0));
cList.append(concept);
@@ -119,13 +119,13 @@ void CodeGenerationWizard::generateCode() {
codeGenerator->writeCodeToFile(cList);
finishButton()->setText(i18n("Finish"));
finishButton()->disconnect();
- connect(finishButton(),SIGNAL(clicked()),this,SLOT(accept()));
+ connect(finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(accept()));
}
}
void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated) {
- QListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 );
+ TQListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 );
if( !item ) {
kError()<<"GenerationStatusPage::Error finding class in list view"<<endl;
} else if (generated) {
@@ -137,16 +137,16 @@ void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated
void CodeGenerationWizard::populateStatusList() {
m_statusList->clear();
- for(QListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) {
- new QListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated"));
+ for(TQListViewItem* item = m_selectedList->firstChild(); item; item = item->nextSibling()) {
+ new TQListViewItem(m_statusList,item->text(0),i18n("Not Yet Generated"));
}
}
-void CodeGenerationWizard::showPage(QWidget *page) {
+void CodeGenerationWizard::showPage(TQWidget *page) {
if (indexOf(page) == 2)
{
// first save the settings to the selected generator policy
- ((CodeGenerationOptionsPage*)QWizard::page(1))->apply();
+ ((CodeGenerationOptionsPage*)TQWizard::page(1))->apply();
// before going on to the final page, check that the output directory exists and is
// writable
@@ -155,14 +155,14 @@ void CodeGenerationWizard::showPage(QWidget *page) {
CodeGenerationPolicy *policy = UMLApp::app()->getCommonPolicy();
// get the output directory path
- QFileInfo info(policy->getOutputDirectory().absPath());
+ TQFileInfo info(policy->getOutputDirectory().absPath());
if(!info.exists())
{
if (KMessageBox::questionYesNo(this,
i18n("The folder %1 does not exist. Do you want to create it now?").arg(info.filePath()),
i18n("Output Folder Does Not Exist"), i18n("Create Folder"), i18n("Do Not Create")) == KMessageBox::Yes)
{
- QDir dir;
+ TQDir dir;
if(!dir.mkdir(info.filePath()))
{
KMessageBox::sorry(this,i18n("The folder could not be created.\nPlease make sure you have write access to its parent folder or select another, valid, folder."),
@@ -195,7 +195,7 @@ void CodeGenerationWizard::showPage(QWidget *page) {
}
}
populateStatusList();
- QWizard::showPage(page);
+ TQWizard::showPage(page);
}
CodeGenerator* CodeGenerationWizard::generator() {
@@ -213,7 +213,7 @@ CodeGenerator* CodeGenerationWizard::generator() {
return 0;
}
- QObject* o=fact->create(m_doc, 0, info->object.latin1());
+ TQObject* o=fact->create(m_doc, 0, info->object.latin1());
if(!o) {
kDebug()<<"could not create object"<<endl;
return 0;
@@ -226,14 +226,14 @@ CodeGenerator* CodeGenerationWizard::generator() {
return (CodeGenerator*) NULL;
}
-void CodeGenerationWizard::moveSelectedItems(QListView* fromList, QListView* toList) {
- QListViewItemIterator it(fromList, QListViewItemIterator::Selected);
+void CodeGenerationWizard::moveSelectedItems(TQListView* fromList, TQListView* toList) {
+ TQListViewItemIterator it(fromList, TQListViewItemIterator::Selected);
while (it.current()) {
- QListViewItem* selectedItem = it.current();
+ TQListViewItem* selectedItem = it.current();
- QString name = selectedItem->text(0);
+ TQString name = selectedItem->text(0);
if (!toList->findItem(name, 0)) {
- new QListViewItem(toList, name);
+ new TQListViewItem(toList, name);
}
++it;
diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.h b/umbrello/umbrello/dialogs/codegenerationwizard.h
index 14d5f157..2fec8046 100644
--- a/umbrello/umbrello/dialogs/codegenerationwizard.h
+++ b/umbrello/umbrello/dialogs/codegenerationwizard.h
@@ -21,8 +21,8 @@
#ifndef CODEGENERATIONWIZARD_H
#define CODEGENERATIONWIZARD_H
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include "codegenerationwizardbase.h"
#include "settingsdlg.h"
#include "../umlclassifierlist.h"
@@ -43,10 +43,10 @@ public:
CodeGenerationWizard(UMLClassifierList *classList);
~CodeGenerationWizard();
- void showPage(QWidget *);
+ void showPage(TQWidget *);
int exec() {
- return QWizard::exec();
+ return TQWizard::exec();
}
protected slots:
@@ -78,7 +78,7 @@ private:
* second. An item is added to the second list only if it isn't already
* there (no duplicated items are created).
*/
- void moveSelectedItems(QListView* fromList, QListView* toList);
+ void moveSelectedItems(TQListView* fromList, TQListView* toList);
UMLApp* m_app;
UMLDoc* m_doc;
diff --git a/umbrello/umbrello/dialogs/codeviewerdialog.cpp b/umbrello/umbrello/dialogs/codeviewerdialog.cpp
index 5672e576..479fcb6b 100644
--- a/umbrello/umbrello/dialogs/codeviewerdialog.cpp
+++ b/umbrello/umbrello/dialogs/codeviewerdialog.cpp
@@ -19,9 +19,9 @@
#include "codeviewerdialog.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -30,7 +30,7 @@
#include "../classifiercodedocument.h"
#include "codeeditor.h"
-CodeViewerDialog::CodeViewerDialog ( QWidget* parent, CodeDocument * doc,
+CodeViewerDialog::CodeViewerDialog ( TQWidget* parent, CodeDocument * doc,
Settings::CodeViewerState state,
const char* name, bool modal, WFlags fl )
: CodeViewerDialogBase ( parent, name, modal, fl )
@@ -69,7 +69,7 @@ void CodeViewerDialog::initGUI ( const char * name) {
CodeViewerDialogBaseLayout->setMargin(margin);
- resize( QSize(width, height).expandedTo(minimumSizeHint()) );
+ resize( TQSize(width, height).expandedTo(minimumSizeHint()) );
}
@@ -79,12 +79,12 @@ void CodeViewerDialog::initGUI ( const char * name) {
void CodeViewerDialog::addCodeDocument( CodeDocument * doc)
{
CodeEditor * page = new CodeEditor ( this, "_codedocumenteditor_", doc );
- QString fname = doc->getFileName();
- QString ext = doc->getFileExtension();
+ TQString fname = doc->getFileName();
+ TQString ext = doc->getFileExtension();
m_tabWidget->insertTab(page, (fname + (ext.isEmpty()? "" : ext)));
- connect( m_highlightCheckBox, SIGNAL( stateChanged(int) ), page, SLOT( changeHighlighting(int) ) );
- connect( m_showHiddenCodeCB, SIGNAL( stateChanged(int) ), page, SLOT( changeShowHidden(int) ) );
+ connect( m_highlightCheckBox, TQT_SIGNAL( stateChanged(int) ), page, TQT_SLOT( changeHighlighting(int) ) );
+ connect( m_showHiddenCodeCB, TQT_SIGNAL( stateChanged(int) ), page, TQT_SLOT( changeShowHidden(int) ) );
}
diff --git a/umbrello/umbrello/dialogs/codeviewerdialog.h b/umbrello/umbrello/dialogs/codeviewerdialog.h
index 7315384f..5367ef16 100644
--- a/umbrello/umbrello/dialogs/codeviewerdialog.h
+++ b/umbrello/umbrello/dialogs/codeviewerdialog.h
@@ -19,11 +19,11 @@
#ifndef CODEVIEWERDIALOG_H
#define CODEVIEWERDIALOG_H
-#include <qcolor.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qtextedit.h>
+#include <tqcolor.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqtextedit.h>
#include "../codeviewerstate.h"
#include "codeviewerdialogbase.h"
@@ -44,14 +44,14 @@ class CodeViewerDialog : public CodeViewerDialogBase
Q_OBJECT
public:
- CodeViewerDialog ( QWidget* parent, CodeDocument * doc, Settings::CodeViewerState state,
+ CodeViewerDialog ( TQWidget* parent, CodeDocument * doc, Settings::CodeViewerState state,
const char* name = 0, bool modal = false, WFlags fl = 0 );
~CodeViewerDialog ();
/** return the code viewer state */
Settings::CodeViewerState getState( );
- QString parentDocName;
+ TQString parentDocName;
/**
* Adds a code document to the tabbed output
diff --git a/umbrello/umbrello/dialogs/codevieweroptionspage.cpp b/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
index dd120569..f4715b0d 100644
--- a/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
+++ b/umbrello/umbrello/dialogs/codevieweroptionspage.cpp
@@ -26,7 +26,7 @@
#include <kcolorbutton.h>
-CodeViewerOptionsPage::CodeViewerOptionsPage( Settings::CodeViewerState options, QWidget *parent, const char *name )
+CodeViewerOptionsPage::CodeViewerOptionsPage( Settings::CodeViewerState options, TQWidget *parent, const char *name )
:CodeViewerOptionsBase(parent,name)
{
init (options);
diff --git a/umbrello/umbrello/dialogs/codevieweroptionspage.h b/umbrello/umbrello/dialogs/codevieweroptionspage.h
index ec01f170..fae3cb05 100644
--- a/umbrello/umbrello/dialogs/codevieweroptionspage.h
+++ b/umbrello/umbrello/dialogs/codevieweroptionspage.h
@@ -18,7 +18,7 @@
#ifndef CODEVIEWEROPTIONSPAGE_H
#define CODEVIEWEROPTIONSPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "codevieweroptionsbase.h"
#include "../codeviewerstate.h"
@@ -29,7 +29,7 @@
class CodeViewerOptionsPage : public CodeViewerOptionsBase {
Q_OBJECT
public:
- CodeViewerOptionsPage (Settings::CodeViewerState options, QWidget *parent, const char *name=0);
+ CodeViewerOptionsPage (Settings::CodeViewerState options, TQWidget *parent, const char *name=0);
~CodeViewerOptionsPage();
Settings::CodeViewerState getOptions();
diff --git a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
index 668d732d..3da163b7 100644
--- a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
+++ b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.cpp
@@ -22,17 +22,17 @@
#include "defaultcodegenpolicypage.h"
// qt/kde includes
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
/** This is the page which comes up IF there is no special options for the
* code generator.
*/
-DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( QWidget *parent, const char *name, CodeGenPolicyExt * policy )
+DefaultCodeGenPolicyPage::DefaultCodeGenPolicyPage ( TQWidget *parent, const char *name, CodeGenPolicyExt * policy )
:CodeGenerationPolicyPage(parent,name,policy)
{
- textLabel = new QLabel(parent,"textLabel");
+ textLabel = new TQLabel(parent,"textLabel");
textLabel->setText(tr2i18n("<p align=\"center\">No Options Available.</p>"));
}
diff --git a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
index c3d36332..74592684 100644
--- a/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
+++ b/umbrello/umbrello/dialogs/defaultcodegenpolicypage.h
@@ -11,8 +11,8 @@
#ifndef DEFAULTCODEGENPOLICYPAGE_H
#define DEFAULTCODEGENPOLICYPAGE_H
-#include <qvariant.h>
-#include <qwidget.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
#include "codegenerationpolicypage.h"
class QVBoxLayout;
@@ -27,11 +27,11 @@ class DefaultCodeGenPolicyPage : public CodeGenerationPolicyPage
public:
- explicit DefaultCodeGenPolicyPage( QWidget* parent = 0, const char* name = 0, CodeGenPolicyExt * policy =0);
+ explicit DefaultCodeGenPolicyPage( TQWidget* parent = 0, const char* name = 0, CodeGenPolicyExt * policy =0);
~DefaultCodeGenPolicyPage();
- QLabel* textLabel;
+ TQLabel* textLabel;
protected:
diff --git a/umbrello/umbrello/dialogs/diagramprintpage.cpp b/umbrello/umbrello/dialogs/diagramprintpage.cpp
index cf366197..8374def4 100644
--- a/umbrello/umbrello/dialogs/diagramprintpage.cpp
+++ b/umbrello/umbrello/dialogs/diagramprintpage.cpp
@@ -13,13 +13,13 @@
#include "diagramprintpage.h"
// qt/kde includes
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qlistbox.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqlistbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
#include <klocale.h>
// local includes
@@ -30,53 +30,53 @@
#include "../umlnamespace.h"
-DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDialogPage(parent), m_pDoc(m_pDoc) {
+DiagramPrintPage::DiagramPrintPage(TQWidget * parent, UMLDoc * m_pDoc) : KPrintDialogPage(parent), m_pDoc(m_pDoc) {
int margin = fontMetrics().height();
setTitle(i18n("&Diagrams"));
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
mainLayout -> setMargin(margin);
- m_pFilterBG = new QButtonGroup(i18n("Filter"), this);
+ m_pFilterBG = new TQButtonGroup(i18n("Filter"), this);
mainLayout -> addWidget(m_pFilterBG);
m_pFilterBG -> setExclusive(true);
- QVBoxLayout * filter = new QVBoxLayout(m_pFilterBG);
+ TQVBoxLayout * filter = new TQVBoxLayout(m_pFilterBG);
filter -> setSpacing(10);
filter-> setMargin(margin);
- m_pCurrentRB = new QRadioButton(i18n("&Current diagram"), m_pFilterBG);
+ m_pCurrentRB = new TQRadioButton(i18n("&Current diagram"), m_pFilterBG);
filter -> addWidget(m_pCurrentRB);
m_pCurrentRB -> setChecked(true);
m_pFilterBG -> insert(m_pCurrentRB, Current);
- m_pAllRB = new QRadioButton(i18n("&All diagrams"), m_pFilterBG);
+ m_pAllRB = new TQRadioButton(i18n("&All diagrams"), m_pFilterBG);
filter -> addWidget(m_pAllRB);
m_pFilterBG -> insert(m_pAllRB, All);
- m_pSelectRB = new QRadioButton(i18n("&Select diagrams"), m_pFilterBG);
+ m_pSelectRB = new TQRadioButton(i18n("&Select diagrams"), m_pFilterBG);
filter -> addWidget(m_pSelectRB);
m_pFilterBG -> insert(m_pSelectRB, Select);
- m_pTypeRB = new QRadioButton(i18n("&Type of diagram"), m_pFilterBG);
+ m_pTypeRB = new TQRadioButton(i18n("&Type of diagram"), m_pFilterBG);
filter -> addWidget(m_pTypeRB);
m_pFilterBG -> insert(m_pTypeRB, Type);
- m_pSelectGB = new QGroupBox(i18n("Selection"), this);
+ m_pSelectGB = new TQGroupBox(i18n("Selection"), this);
mainLayout -> addWidget(m_pSelectGB);
- QVBoxLayout * select = new QVBoxLayout(m_pSelectGB);
+ TQVBoxLayout * select = new TQVBoxLayout(m_pSelectGB);
select -> setSpacing(10);
select-> setMargin(margin);
- m_pTypeCB = new QComboBox(m_pSelectGB);
+ m_pTypeCB = new TQComboBox(m_pSelectGB);
select -> addWidget(m_pTypeCB);
m_pTypeCB -> setEnabled(false);
- m_pSelectLB = new QListBox(m_pSelectGB);
+ m_pSelectLB = new TQListBox(m_pSelectGB);
select -> addWidget(m_pSelectLB);
m_pSelectLB -> setEnabled(false);
- m_pSelectLB -> setSelectionMode(QListBox::Multi);
+ m_pSelectLB -> setSelectionMode(TQListBox::Multi);
m_pSelectLB -> insertItem(UMLApp::app()->getCurrentView()->getName());
m_pSelectLB -> setSelected(0, true);
m_nIdList.clear();
@@ -85,8 +85,8 @@ DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDi
m_ViewType = Uml::dt_Class;
- connect(m_pFilterBG, SIGNAL(clicked(int)), this, SLOT(slotClicked(int)));
- connect(m_pTypeCB, SIGNAL(activated(const QString&)), this, SLOT(slotActivated(const QString&)));
+ connect(m_pFilterBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotClicked(int)));
+ connect(m_pTypeCB, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotActivated(const TQString&)));
m_pTypeCB -> insertItem(i18n("Class"));
m_pTypeCB -> insertItem(i18n("Use Case"));
@@ -100,30 +100,30 @@ DiagramPrintPage::DiagramPrintPage(QWidget * parent, UMLDoc * m_pDoc) : KPrintDi
DiagramPrintPage::~DiagramPrintPage()
{
- disconnect(m_pFilterBG, SIGNAL(clicked(int)), this, SLOT(slotClicked(int)));
- disconnect(m_pTypeCB, SIGNAL(activated(const QString&)), this, SLOT(slotActivated(const QString&)));
+ disconnect(m_pFilterBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotClicked(int)));
+ disconnect(m_pTypeCB, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotActivated(const TQString&)));
}
-void DiagramPrintPage::getOptions( QMap<QString,QString>& opts, bool /*incldef = false*/ ) {
+void DiagramPrintPage::getOptions( TQMap<TQString,TQString>& opts, bool /*incldef = false*/ ) {
int listCount = m_pSelectLB -> count();
int count = 0;
- QString diagram(i18n("kde-uml-Diagram"));
+ TQString diagram(i18n("kde-uml-Diagram"));
for(int i=0;i<listCount;i++) {
if(m_pSelectLB -> isSelected(i)) {
UMLView *view = (UMLView *)m_pDoc -> findView(m_nIdList[i]);
- QString sCount = QString("%1").arg(count);
- QString sID = QString("%1").arg(ID2STR(view -> getID()));
+ TQString sCount = TQString("%1").arg(count);
+ TQString sID = TQString("%1").arg(ID2STR(view -> getID()));
opts.insert(diagram + sCount, sID);
count++;
}
}
- opts.insert("kde-uml-count", QString("%1").arg(count));
+ opts.insert("kde-uml-count", TQString("%1").arg(count));
}
-void DiagramPrintPage::setOptions( const QMap<QString,QString>& /*opts*/ ) {}
+void DiagramPrintPage::setOptions( const TQMap<TQString,TQString>& /*opts*/ ) {}
-bool DiagramPrintPage::isValid( QString& msg ) {
+bool DiagramPrintPage::isValid( TQString& msg ) {
int listCount = m_pSelectLB -> count();
bool sel = false;
for(int i =0;i<listCount;i++) {
@@ -139,7 +139,7 @@ bool DiagramPrintPage::isValid( QString& msg ) {
void DiagramPrintPage::slotClicked(int id) {
UMLViewList list = m_pDoc -> getViewIterator();
UMLView * view = 0;
- QString type;
+ TQString type;
// clear list with diagrams to print
m_nIdList.clear();
@@ -191,7 +191,7 @@ void DiagramPrintPage::slotClicked(int id) {
}
}
-void DiagramPrintPage::slotActivated(const QString & text) {
+void DiagramPrintPage::slotActivated(const TQString & text) {
UMLViewList list = m_pDoc -> getViewIterator();
UMLView * view = 0;
diff --git a/umbrello/umbrello/dialogs/diagramprintpage.h b/umbrello/umbrello/dialogs/diagramprintpage.h
index f2184a27..7321f1bf 100644
--- a/umbrello/umbrello/dialogs/diagramprintpage.h
+++ b/umbrello/umbrello/dialogs/diagramprintpage.h
@@ -43,7 +43,7 @@ public:
* @param parent The parent to the page.
* @param doc The @ref UMLDoc class instance being used.
*/
- DiagramPrintPage(QWidget * parent, UMLDoc *doc);
+ DiagramPrintPage(TQWidget * parent, UMLDoc *doc);
/**
* Stnadard deconstructor.
@@ -54,24 +54,24 @@ public:
* Overriden method. It builds a list with the diagram name and the diagram
* IDs.
*/
- void getOptions(QMap<QString,QString>& opts, bool /* incldef=false */);
+ void getOptions(TQMap<TQString,TQString>& opts, bool /* incldef=false */);
/**
* Overriden method.
*/
- void setOptions( const QMap<QString,QString>& /*opts*/ );
+ void setOptions( const TQMap<TQString,TQString>& /*opts*/ );
/**
* Overriden method.
*/
- bool isValid( QString& msg );
+ bool isValid( TQString& msg );
private:
- QButtonGroup * m_pFilterBG;
- QGroupBox * m_pSelectGB;
- QListBox * m_pSelectLB;
- QRadioButton * m_pAllRB, * m_pCurrentRB, * m_pSelectRB, * m_pTypeRB;
- QComboBox * m_pTypeCB;
+ TQButtonGroup * m_pFilterBG;
+ TQGroupBox * m_pSelectGB;
+ TQListBox * m_pSelectLB;
+ TQRadioButton * m_pAllRB, * m_pCurrentRB, * m_pSelectRB, * m_pTypeRB;
+ TQComboBox * m_pTypeCB;
UMLDoc * m_pDoc;
Uml::Diagram_Type m_ViewType;
@@ -79,7 +79,7 @@ private:
/**
* list containing the IDs of diagrams to print
*/
- QValueList<Uml::IDType> m_nIdList;
+ TQValueList<Uml::IDType> m_nIdList;
enum FilterType{Current = 0, All, Select, Type};
public slots:
@@ -95,7 +95,7 @@ public slots:
* Gets called when the user chooses another diagram type. Only diagrams of
* this type will be shown in the diagram box.
*/
- void slotActivated(const QString & text);
+ void slotActivated(const TQString & text);
};
#endif
diff --git a/umbrello/umbrello/dialogs/exportallviewsdialog.cpp b/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
index 9f47afa5..b72901be 100644
--- a/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
+++ b/umbrello/umbrello/dialogs/exportallviewsdialog.cpp
@@ -13,9 +13,9 @@
#include "exportallviewsdialog.h"
// include files for Qt
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
// kde include files
#include <kfilefiltercombo.h>
@@ -25,15 +25,15 @@
#include "../umlviewimageexportermodel.h"
ExportAllViewsDialog::ExportAllViewsDialog(
- QWidget* parent /* = 0 */,
+ TQWidget* parent /* = 0 */,
const char* name /* = 0 */,
bool modal /* = false */,
WFlags fl /* = 0*/,
- const QString &defaultMimeType /*= "image/png"*/)
+ const TQString &defaultMimeType /*= "image/png"*/)
: ExportAllViewsDialogBase(parent,name, modal,fl) {
// create and initialize m_imageType
m_imageType = new KFileFilterCombo(this, "m_imageType");
- m_imageType->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 0, 0, m_imageType->sizePolicy().hasHeightForWidth()));
+ m_imageType->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 0, m_imageType->sizePolicy().hasHeightForWidth()));
m_imageType->setEditable(false);
m_imageType->setMimeFilter(UMLViewImageExporterModel::supportedMimeTypes(), defaultMimeType);
@@ -48,7 +48,7 @@ ExportAllViewsDialog::ExportAllViewsDialog(
void ExportAllViewsDialog::languageChange() {
ExportAllViewsDialogBase::languageChange();
- QToolTip::add(m_imageType, tr2i18n("The format that the images will be exported to"));
+ TQToolTip::add(m_imageType, tr2i18n("The format that the images will be exported to"));
}
#include "exportallviewsdialog.moc"
diff --git a/umbrello/umbrello/dialogs/exportallviewsdialog.h b/umbrello/umbrello/dialogs/exportallviewsdialog.h
index 37b0a2f3..793f69b9 100644
--- a/umbrello/umbrello/dialogs/exportallviewsdialog.h
+++ b/umbrello/umbrello/dialogs/exportallviewsdialog.h
@@ -41,11 +41,11 @@ public:
* @param fl Window flags.
* @param defaultMimeType The default mime type that appears in the mime types list.
*
- * @see QDialog::QDialog
+ * @see TQDialog::QDialog
*/
- explicit ExportAllViewsDialog(QWidget* parent = 0, const char* name = 0,
+ explicit ExportAllViewsDialog(TQWidget* parent = 0, const char* name = 0,
bool modal = false, WFlags fl = 0,
- const QString& defaultMimeType = "image/png");
+ const TQString& defaultMimeType = "image/png");
/**
* Destructor for UMLViewImageExporterModel.
diff --git a/umbrello/umbrello/dialogs/notedialog.cpp b/umbrello/umbrello/dialogs/notedialog.cpp
index f310990d..effb585d 100644
--- a/umbrello/umbrello/dialogs/notedialog.cpp
+++ b/umbrello/umbrello/dialogs/notedialog.cpp
@@ -13,30 +13,30 @@
#include "notedialog.h"
// qt/kde includes
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlineedit.h>
+#include <tqgroupbox.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
-NoteDialog::NoteDialog( QWidget * parent, NoteWidget * pNote ) : KDialogBase(Plain, i18n("Note Documentation"), Help | Ok | Cancel , Ok, parent, "_NOTEDIALOG_", true, true) {
+NoteDialog::NoteDialog( TQWidget * parent, NoteWidget * pNote ) : KDialogBase(Plain, i18n("Note Documentation"), Help | Ok | Cancel , Ok, parent, "_NOTEDIALOG_", true, true) {
m_pNoteWidget = pNote;
int margin = fontMetrics().height();
- m_pDocGB = new QGroupBox(i18n("Documentation"), plainPage());
- QVBoxLayout * mainLayout = new QVBoxLayout(plainPage());
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), plainPage());
+ TQVBoxLayout * mainLayout = new TQVBoxLayout(plainPage());
mainLayout -> addWidget(m_pDocGB);
mainLayout -> setSpacing(10);
mainLayout -> setMargin(margin);
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setSpacing(10);
docLayout -> setMargin(margin);
- m_pDocTE = new QTextEdit( m_pDocGB );
+ m_pDocTE = new TQTextEdit( m_pDocGB );
m_pDocTE -> setFocus();
docLayout -> addWidget( m_pDocTE );
m_pDocTE -> setText( pNote -> getDoc() );
diff --git a/umbrello/umbrello/dialogs/notedialog.h b/umbrello/umbrello/dialogs/notedialog.h
index 3efd1404..c9062ec7 100644
--- a/umbrello/umbrello/dialogs/notedialog.h
+++ b/umbrello/umbrello/dialogs/notedialog.h
@@ -32,7 +32,7 @@ public:
/**
* Constructs an NoteDialog.
*/
- NoteDialog( QWidget * parent, NoteWidget * pNote );
+ NoteDialog( TQWidget * parent, NoteWidget * pNote );
/**
* Standard deconstructor.
@@ -43,8 +43,8 @@ public slots:
void slotOk();
private:
//GUI widgets
- QGroupBox * m_pDocGB;
- QTextEdit * m_pDocTE;
+ TQGroupBox * m_pDocGB;
+ TQTextEdit * m_pDocTE;
/**
* Note widget to show documentation for.
diff --git a/umbrello/umbrello/dialogs/overwritedialogue.cpp b/umbrello/umbrello/dialogs/overwritedialogue.cpp
index b7c4a4f4..c9cb8b92 100644
--- a/umbrello/umbrello/dialogs/overwritedialogue.cpp
+++ b/umbrello/umbrello/dialogs/overwritedialogue.cpp
@@ -13,25 +13,25 @@
#include "overwritedialogue.h"
// qt/kde includes
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
OverwriteDialogue::OverwriteDialogue(
- const QString& fileName,
- const QString& outputDirectory,
- bool applyToAllRemaining, QWidget* parent, const char* name) :
+ const TQString& fileName,
+ const TQString& outputDirectory,
+ bool applyToAllRemaining, TQWidget* parent, const char* name) :
KDialogBase(Plain, i18n("Destination File Already Exists"), Ok|Apply|Cancel, Yes, parent, name) {
- QVBoxLayout* layout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout* layout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
- QLabel* dialogueLabel = new QLabel(i18n("The file %1 already exists in %2.\n\nUmbrello can overwrite the file, generate a similar\nfile name or not generate this file.").arg(fileName).arg(outputDirectory), plainPage() );
+ TQLabel* dialogueLabel = new TQLabel(i18n("The file %1 already exists in %2.\n\nUmbrello can overwrite the file, generate a similar\nfile name or not generate this file.").arg(fileName).arg(outputDirectory), plainPage() );
layout->addWidget(dialogueLabel);
- m_applyToAllRemaining = new QCheckBox( i18n("&Apply to all remaining files"), plainPage() );
+ m_applyToAllRemaining = new TQCheckBox( i18n("&Apply to all remaining files"), plainPage() );
m_applyToAllRemaining->setChecked(applyToAllRemaining);
layout->addWidget(m_applyToAllRemaining);
diff --git a/umbrello/umbrello/dialogs/overwritedialogue.h b/umbrello/umbrello/dialogs/overwritedialogue.h
index a01e3366..36691466 100644
--- a/umbrello/umbrello/dialogs/overwritedialogue.h
+++ b/umbrello/umbrello/dialogs/overwritedialogue.h
@@ -34,8 +34,8 @@ public:
/**
* constructor sets up the dialog, adding checkbox and label
*/
- OverwriteDialogue(const QString& fileName, const QString& outputDirectory,
- bool applyToAllRemaining, QWidget* parent=0, const char* name=0);
+ OverwriteDialogue(const TQString& fileName, const TQString& outputDirectory,
+ bool applyToAllRemaining, TQWidget* parent=0, const char* name=0);
/**
* destrictor doesn't do anything
@@ -49,24 +49,24 @@ public:
protected slots:
/**
- * Overrides standard operation to call QDialog::done(Yes).
+ * Overrides standard operation to call TQDialog::done(Yes).
* This is a kludge, see note in class description.
*/
virtual void slotOk();
/**
- * Overrides standard operation to call QDialog::done(No).
+ * Overrides standard operation to call TQDialog::done(No).
*/
virtual void slotApply();
/**
- * Overrides standard operation to call QDialog::done(Cancel).
+ * Overrides standard operation to call TQDialog::done(Cancel).
*/
virtual void slotCancel();
private:
- QCheckBox* m_applyToAllRemaining;
+ TQCheckBox* m_applyToAllRemaining;
};
#endif
diff --git a/umbrello/umbrello/dialogs/parmpropdlg.cpp b/umbrello/umbrello/dialogs/parmpropdlg.cpp
index e8ddc245..38a75292 100644
--- a/umbrello/umbrello/dialogs/parmpropdlg.cpp
+++ b/umbrello/umbrello/dialogs/parmpropdlg.cpp
@@ -13,8 +13,8 @@
#include "parmpropdlg.h"
// qt includes
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
// kde includes
#include <klocale.h>
@@ -31,12 +31,12 @@
#include "parmpropdlg.moc"
-ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
+ParmPropDlg::ParmPropDlg(TQWidget * parent, UMLDoc * doc, UMLAttribute * a)
: KDialogBase(Plain, i18n("Parameter Properties"), Help | Ok | Cancel , Ok, parent, "_PARMPROPDLG_", true, true)
{
m_pUmldoc = doc;
m_pAtt = a;
- QString type, text, name, initialValue;
+ TQString type, text, name, initialValue;
if(!a) {
type = text = name = initialValue = "";
} else {
@@ -48,18 +48,18 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
int margin = fontMetrics().height();
setMinimumSize(300, 400);
//disableResize();
- QVBoxLayout * topLayout = new QVBoxLayout(plainPage());
+ TQVBoxLayout * topLayout = new TQVBoxLayout(plainPage());
topLayout -> setSpacing(10);
topLayout -> setMargin(margin);
- m_pParmGB = new QGroupBox(i18n("Properties"), plainPage());
+ m_pParmGB = new TQGroupBox(i18n("Properties"), plainPage());
topLayout -> addWidget(m_pParmGB);
- QGridLayout * propLayout = new QGridLayout(m_pParmGB, 4, 2);
+ TQGridLayout * propLayout = new TQGridLayout(m_pParmGB, 4, 2);
propLayout -> setSpacing(10);
propLayout -> setMargin(margin);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pParmGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pParmGB);
propLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(m_pParmGB);
@@ -74,36 +74,36 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
m_pInitialL, i18n("&Initial value:"),
m_pInitialLE, initialValue );
- m_pStereoTypeL = new QLabel( i18n("Stereotype name:"), m_pParmGB );
+ m_pStereoTypeL = new TQLabel( i18n("Stereotype name:"), m_pParmGB );
propLayout -> addWidget(m_pStereoTypeL, 3, 0);
m_pStereoTypeCB = new KComboBox(true, m_pParmGB );
propLayout -> addWidget(m_pStereoTypeCB, 3, 1);
- m_pKind = new QButtonGroup(i18n("Passing Direction"), plainPage());
+ m_pKind = new TQButtonGroup(i18n("Passing Direction"), plainPage());
m_pKind->setExclusive(true);
- QToolTip::add(m_pKind, i18n("\"in\" is a readonly parameter, \"out\" is a writeonly parameter and \"inout\" is a parameter for reading and writing."));
+ TQToolTip::add(m_pKind, i18n("\"in\" is a readonly parameter, \"out\" is a writeonly parameter and \"inout\" is a parameter for reading and writing."));
- QHBoxLayout * kindLayout = new QHBoxLayout( m_pKind );
+ TQHBoxLayout * kindLayout = new TQHBoxLayout( m_pKind );
kindLayout->setMargin(margin);
- m_pIn = new QRadioButton( "in", m_pKind );
+ m_pIn = new TQRadioButton( "in", m_pKind );
kindLayout->addWidget( m_pIn );
- m_pInOut = new QRadioButton( "inout", m_pKind );
+ m_pInOut = new TQRadioButton( "inout", m_pKind );
kindLayout->addWidget( m_pInOut );
- m_pOut = new QRadioButton( "out", m_pKind );
+ m_pOut = new TQRadioButton( "out", m_pKind );
kindLayout->addWidget( m_pOut );
topLayout -> addWidget(m_pKind);
- m_pDocGB = new QGroupBox(i18n("Documentation"), plainPage());
- QHBoxLayout * docLayout = new QHBoxLayout(m_pDocGB);
+ m_pDocGB = new TQGroupBox(i18n("Documentation"), plainPage());
+ TQHBoxLayout * docLayout = new TQHBoxLayout(m_pDocGB);
docLayout -> setMargin(margin);
- m_pDoc = new QMultiLineEdit(m_pDocGB);
+ m_pDoc = new TQMultiLineEdit(m_pDocGB);
///////////
- m_pDoc->setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDoc->setWordWrap(TQMultiLineEdit::WidgetWidth);
//////////
m_pDoc -> setText(text);
docLayout -> addWidget(m_pDoc);
@@ -147,7 +147,7 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == type ) { //getTypeName()
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -164,7 +164,7 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
// manage stereotypes
m_pStereoTypeCB->setDuplicatesEnabled(false); //only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_pUmldoc->getStereotypes()); it.current(); ++it) {
@@ -193,13 +193,13 @@ ParmPropDlg::ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a)
m_pNameLE->setFocus();
}
-void ParmPropDlg::insertType( const QString& type, int index )
+void ParmPropDlg::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
-void ParmPropDlg::insertStereotype( const QString& type, int index )
+void ParmPropDlg::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
@@ -218,7 +218,7 @@ void ParmPropDlg::slotOk() {
if (m_pAtt != NULL) {
m_pAtt->setParmKind( getParmKind() );
m_pAtt->setStereotype( m_pStereoTypeCB->currentText() );
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLClassifier * pConcept = dynamic_cast<UMLClassifier*>( m_pAtt->parent()->parent() );
if (pConcept == NULL) {
kError() << "ParmPropDlg::slotOk: grandparent of " << m_pAtt->getName()
diff --git a/umbrello/umbrello/dialogs/parmpropdlg.h b/umbrello/umbrello/dialogs/parmpropdlg.h
index 25a6153a..b8efd75b 100644
--- a/umbrello/umbrello/dialogs/parmpropdlg.h
+++ b/umbrello/umbrello/dialogs/parmpropdlg.h
@@ -14,14 +14,14 @@
#include <kdialogbase.h>
#include <kcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qmultilineedit.h>
-#include <qcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqmultilineedit.h>
+#include <tqcombobox.h>
#include "../attribute.h"
class UMLDoc;
@@ -44,7 +44,7 @@ public:
* @param parent The parent of the dialog.
* @param a The parameter to represent.
*/
- ParmPropDlg(QWidget * parent, UMLDoc * doc, UMLAttribute * a);
+ ParmPropDlg(TQWidget * parent, UMLDoc * doc, UMLAttribute * a);
/**
* Standard deconstructor.
@@ -56,7 +56,7 @@ public:
*
* @return Returns the documentation.
*/
- QString getDoc() {
+ TQString getDoc() {
return m_pDoc -> text();
}
@@ -65,7 +65,7 @@ public:
*
* @return Return the name of the parameter.
*/
- QString getName() {
+ TQString getName() {
return m_pNameLE -> text();
}
@@ -74,7 +74,7 @@ public:
*
* @return Return the initial value of the parameter.
*/
- QString getInitialValue() {
+ TQString getInitialValue() {
return m_pInitialLE -> text();
}
@@ -83,7 +83,7 @@ public:
*
* @return Return the type name of the parameter.
*/
- QString getTypeName() {
+ TQString getTypeName() {
return m_pTypeCB -> currentText();
}
@@ -102,22 +102,22 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* Inserts @p type into the stereotype-combobox as well as its completion object.
*/
- void insertStereotype( const QString& type, int index = -1 );
+ void insertStereotype( const TQString& type, int index = -1 );
private:
- QGroupBox * m_pParmGB, * m_pDocGB;
- QButtonGroup *m_pKind;
- QRadioButton * m_pIn, * m_pOut, *m_pInOut;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
+ TQGroupBox * m_pParmGB, * m_pDocGB;
+ TQButtonGroup *m_pKind;
+ TQRadioButton * m_pIn, * m_pOut, *m_pInOut;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
KComboBox * m_pTypeCB, * m_pStereoTypeCB;
- QLineEdit * m_pNameLE, * m_pInitialLE;
- QMultiLineEdit * m_pDoc;
+ TQLineEdit * m_pNameLE, * m_pInitialLE;
+ TQMultiLineEdit * m_pDoc;
UMLDoc * m_pUmldoc;
UMLAttribute * m_pAtt;
};
diff --git a/umbrello/umbrello/dialogs/pkgcontentspage.cpp b/umbrello/umbrello/dialogs/pkgcontentspage.cpp
index dd70f7fc..dce7c98b 100644
--- a/umbrello/umbrello/dialogs/pkgcontentspage.cpp
+++ b/umbrello/umbrello/dialogs/pkgcontentspage.cpp
@@ -10,57 +10,57 @@
***************************************************************************/
#include "pkgcontentspage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "../umlobjectlist.h"
#include "../uml.h"
#include "../umldoc.h"
#include "classpropdlg.h"
-PkgContentsPage::PkgContentsPage(QWidget *parent, UMLPackage *pkg)
- : QWidget(parent)
+PkgContentsPage::PkgContentsPage(TQWidget *parent, UMLPackage *pkg)
+ : TQWidget(parent)
{
m_pPackage = pkg;
int margin = fontMetrics().height();
- QHBoxLayout * mainLayout = new QHBoxLayout(this);
+ TQHBoxLayout * mainLayout = new TQHBoxLayout(this);
mainLayout -> setSpacing(10);
- m_pContentGB = new QGroupBox(i18n("Contained Items"), this);
+ m_pContentGB = new TQGroupBox(i18n("Contained Items"), this);
mainLayout -> addWidget(m_pContentGB);
- QHBoxLayout * layout = new QHBoxLayout(m_pContentGB);
+ TQHBoxLayout * layout = new TQHBoxLayout(m_pContentGB);
layout -> setSpacing(10);
layout -> setMargin(margin);
- m_pContentLB = new QListBox(m_pContentGB);
+ m_pContentLB = new TQListBox(m_pContentGB);
layout -> addWidget(m_pContentLB);
setMinimumSize(310, 330);
fillListBox();
m_pMenu = 0;
- connect(m_pContentLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ connect(m_pContentLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- connect(m_pContentLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pContentLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pContentLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pContentLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
PkgContentsPage::~PkgContentsPage() {
- disconnect(m_pContentLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotDoubleClick(QListBoxItem *)));
+ disconnect(m_pContentLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListBoxItem *)));
- disconnect(m_pContentLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonPressed(QListBoxItem *, const QPoint &)));
+ disconnect(m_pContentLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- disconnect(m_pContentLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotRightButtonClicked(QListBoxItem *, const QPoint &)));
+ disconnect(m_pContentLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotRightButtonClicked(TQListBoxItem *, const TQPoint &)));
}
-void PkgContentsPage::slotDoubleClick(QListBoxItem * i) {
+void PkgContentsPage::slotDoubleClick(TQListBoxItem * i) {
if (!i)
return;
int item = m_pContentLB -> currentItem();
@@ -82,27 +82,27 @@ void PkgContentsPage::fillListBox() {
}
}
-void PkgContentsPage::slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/) {
+void PkgContentsPage::slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void PkgContentsPage::slotRightButtonPressed(QListBoxItem * item, const QPoint & p) {
+void PkgContentsPage::slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p) {
if(!item)
return;
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, ListPopupMenu::mt_Association_Selected);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPopupMenuSel(int)));
}
void PkgContentsPage::slotPopupMenuSel(int id) {
diff --git a/umbrello/umbrello/dialogs/pkgcontentspage.h b/umbrello/umbrello/dialogs/pkgcontentspage.h
index 8659e672..b95e5348 100644
--- a/umbrello/umbrello/dialogs/pkgcontentspage.h
+++ b/umbrello/umbrello/dialogs/pkgcontentspage.h
@@ -12,10 +12,10 @@
#ifndef PKGCONTENTSPAGE_H
#define PKGCONTENTSPAGE_H
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqptrlist.h>
#include "../package.h"
#include "../listpopupmenu.h"
@@ -25,7 +25,7 @@
* @author Oliver Kellogg <okellogg@users.sourceforge.net>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class PkgContentsPage : public QWidget {
+class PkgContentsPage : public TQWidget {
Q_OBJECT
public:
/**
@@ -34,7 +34,7 @@ public:
* @param parent The parent of the page.
* @param pkg The UMLPackage being represented.
*/
- PkgContentsPage(QWidget *parent, UMLPackage *pkg);
+ PkgContentsPage(TQWidget *parent, UMLPackage *pkg);
/**
* Standard destructor.
@@ -43,8 +43,8 @@ public:
private:
UMLPackage * m_pPackage;
- QListBox * m_pContentLB;
- QGroupBox * m_pContentGB;
+ TQListBox * m_pContentLB;
+ TQGroupBox * m_pContentGB;
ListPopupMenu * m_pMenu;
/**
@@ -53,9 +53,9 @@ private:
void fillListBox();
public slots:
- void slotDoubleClick(QListBoxItem * i);
- void slotRightButtonClicked(QListBoxItem */* item*/, const QPoint &/* p*/);
- void slotRightButtonPressed(QListBoxItem * item, const QPoint & p);
+ void slotDoubleClick(TQListBoxItem * i);
+ void slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/);
+ void slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p);
void slotPopupMenuSel(int id);
};
diff --git a/umbrello/umbrello/dialogs/selectopdlg.cpp b/umbrello/umbrello/dialogs/selectopdlg.cpp
index cb9e344d..1c175752 100644
--- a/umbrello/umbrello/dialogs/selectopdlg.cpp
+++ b/umbrello/umbrello/dialogs/selectopdlg.cpp
@@ -13,7 +13,7 @@
#include "selectopdlg.h"
// qt includes
-#include <qlayout.h>
+#include <tqlayout.h>
// kde includes
#include <klocale.h>
@@ -30,12 +30,12 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
: KDialogBase(Plain, i18n("Select Operation"), Ok | Cancel , Ok, parent, "_SELOPDLG_", true, true)
{
m_pView = parent;
- QVBoxLayout * topLayout = new QVBoxLayout(plainPage());
+ TQVBoxLayout * topLayout = new TQVBoxLayout(plainPage());
- m_pOpGB = new QGroupBox(i18n("Select Operation"), plainPage());
+ m_pOpGB = new TQGroupBox(i18n("Select Operation"), plainPage());
topLayout -> addWidget(m_pOpGB);
- QGridLayout * mainLayout = new QGridLayout(m_pOpGB, 3, 2);
+ TQGridLayout * mainLayout = new TQGridLayout(m_pOpGB, 3, 2);
mainLayout -> setSpacing(spacingHint());
mainLayout -> setMargin(fontMetrics().height());
@@ -43,7 +43,7 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
m_pSeqL, i18n("Sequence number:"),
m_pSeqLE );
- m_pOpRB = new QRadioButton(i18n("Class operation:"), m_pOpGB);
+ m_pOpRB = new TQRadioButton(i18n("Class operation:"), m_pOpGB);
mainLayout -> addWidget(m_pOpRB, 1, 0);
m_pOpCB = new KComboBox(m_pOpGB);
@@ -51,13 +51,13 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
m_pOpCB->setDuplicatesEnabled(false);//only allow one of each type in box
mainLayout -> addWidget(m_pOpCB, 1, 1);
- m_pCustomRB = new QRadioButton(i18n("Custom operation:"), m_pOpGB);
+ m_pCustomRB = new TQRadioButton(i18n("Custom operation:"), m_pOpGB);
mainLayout -> addWidget(m_pCustomRB, 2, 0);
- m_pOpLE = new QLineEdit(m_pOpGB);
+ m_pOpLE = new TQLineEdit(m_pOpGB);
mainLayout -> addWidget(m_pOpLE, 2, 1);
- m_pOpBG = new QButtonGroup(0);
+ m_pOpBG = new TQButtonGroup(0);
m_pOpBG -> insert(m_pOpRB, OP);
m_pOpBG -> insert(m_pCustomRB, CUSTOM);
m_pOpBG -> setExclusive(true);
@@ -68,23 +68,23 @@ SelectOpDlg::SelectOpDlg(UMLView * parent, UMLClassifier * c)
insertOperation( obj->toString(Uml::st_SigNoVis) );
}
//disableResize();
- connect(m_pOpBG, SIGNAL(clicked(int)), this, SLOT(slotSelected(int)));
+ connect(m_pOpBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSelected(int)));
m_nOpCount = c -> operations();
slotSelected(OP);
}
SelectOpDlg::~SelectOpDlg() {
- disconnect(m_pOpBG, SIGNAL(clicked(int)), this, SLOT(slotSelected(int)));
+ disconnect(m_pOpBG, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSelected(int)));
delete m_pOpBG;
}
-void SelectOpDlg::insertOperation( const QString& type, int index )
+void SelectOpDlg::insertOperation( const TQString& type, int index )
{
m_pOpCB->insertItem( type, index );
m_pOpCB->completionObject()->addItem( type );
}
-QString SelectOpDlg::getOpText() {
+TQString SelectOpDlg::getOpText() {
if(m_pOpRB -> isChecked())
return m_pOpCB -> currentText();
else
@@ -107,7 +107,7 @@ void SelectOpDlg::slotSelected(int id) {
m_id = id;
}
-void SelectOpDlg::setCustomOp(const QString &op) {
+void SelectOpDlg::setCustomOp(const TQString &op) {
m_pOpLE -> setText(op);
if(op.length() > 0) {
slotSelected(CUSTOM);
@@ -115,7 +115,7 @@ void SelectOpDlg::setCustomOp(const QString &op) {
}
}
-bool SelectOpDlg::setClassOp(const QString &op) {
+bool SelectOpDlg::setClassOp(const TQString &op) {
for (int i = 1; i!= m_pOpCB->count(); ++i)
{
if ( m_pOpCB->text(i) == op ) {
@@ -128,11 +128,11 @@ bool SelectOpDlg::setClassOp(const QString &op) {
return false;
}
-QString SelectOpDlg::getSeqNumber() {
+TQString SelectOpDlg::getSeqNumber() {
return m_pSeqLE->text();
}
-void SelectOpDlg::setSeqNumber(const QString &num) {
+void SelectOpDlg::setSeqNumber(const TQString &num) {
m_pSeqLE->setText(num);
}
diff --git a/umbrello/umbrello/dialogs/selectopdlg.h b/umbrello/umbrello/dialogs/selectopdlg.h
index c5d8c93b..4bbcf52b 100644
--- a/umbrello/umbrello/dialogs/selectopdlg.h
+++ b/umbrello/umbrello/dialogs/selectopdlg.h
@@ -15,12 +15,12 @@
#include <kdialogbase.h>
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <kcombobox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
#include "../classifier.h"
class UMLView;
@@ -58,7 +58,7 @@ public:
*
* @return The operation to display.
*/
- QString getOpText();
+ TQString getOpText();
/**
* Return whether the user selected a class operation
@@ -74,41 +74,41 @@ public:
*
* @return Returns the sequence number for the operation.
*/
- QString getSeqNumber();
+ TQString getSeqNumber();
/**
* Set the sequence number text.
*
* @param num The number to set the sequence to.
*/
- void setSeqNumber(const QString &num);
+ void setSeqNumber(const TQString &num);
/**
* Set the custom operation text.
*
* @param op The operation to set as the custom operation.
*/
- void setCustomOp(const QString &op);
+ void setCustomOp(const TQString &op);
/**
* Set the class operation text.
*
* @param op The operation to set as the class operation.
* @return false if no such operation exists.
*/
- bool setClassOp(const QString &op);
+ bool setClassOp(const TQString &op);
protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertOperation( const QString& type, int index = -1 );
+ void insertOperation( const TQString& type, int index = -1 );
private:
- QGroupBox * m_pOpGB;
+ TQGroupBox * m_pOpGB;
KComboBox * m_pOpCB;
- QLabel * m_pSeqL;
- QLineEdit * m_pOpLE, * m_pSeqLE;
- QRadioButton * m_pCustomRB, * m_pOpRB;
- QButtonGroup * m_pOpBG, * m_pDocGB;
- QString m_Text;
+ TQLabel * m_pSeqL;
+ TQLineEdit * m_pOpLE, * m_pSeqLE;
+ TQRadioButton * m_pCustomRB, * m_pOpRB;
+ TQButtonGroup * m_pOpBG, * m_pDocGB;
+ TQString m_Text;
int m_nOpCount;
int m_id; ///< takes on the value OP or CUSTOM according to what the user selected
UMLView *m_pView;
diff --git a/umbrello/umbrello/dialogs/settingsdlg.cpp b/umbrello/umbrello/dialogs/settingsdlg.cpp
index 2bfaaf29..59b9ff28 100644
--- a/umbrello/umbrello/dialogs/settingsdlg.cpp
+++ b/umbrello/umbrello/dialogs/settingsdlg.cpp
@@ -13,9 +13,9 @@
#include "settingsdlg.h"
// qt includes
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
// kde includes
#include <kdebug.h>
#include <kiconloader.h>
@@ -26,12 +26,12 @@
#include "codevieweroptionspage.h"
#include "../dialog_utils.h"
-SettingsDlg::SettingsDlg( QWidget * parent, Settings::OptionState *state )
+SettingsDlg::SettingsDlg( TQWidget * parent, Settings::OptionState *state )
: KDialogBase( IconList, i18n("Umbrello Setup"),
Help | Default | Apply | Ok | Cancel, Ok, parent, 0, true, true ) {
m_bChangesApplied = false;
m_pOptionState = state;
- setHelp( "umbrello/index.html", QString::null );
+ setHelp( "umbrello/index.html", TQString::null );
setupGeneralPage();
setupFontPage();
setupUIPage();
@@ -44,33 +44,33 @@ SettingsDlg::~SettingsDlg() {}
void SettingsDlg::setupUIPage() {
//setup UI page
- QVBox * page = addVBoxPage( i18n("User Interface"), i18n("User Interface Settings"), DesktopIcon( "window_list") );
+ TQVBox * page = addVBoxPage( i18n("User Interface"), i18n("User Interface Settings"), DesktopIcon( "window_list") );
- m_UiWidgets.colorGB = new QGroupBox( i18n("Color"), page );
- QGridLayout * colorLayout = new QGridLayout( m_UiWidgets.colorGB, 3, 3 );
+ m_UiWidgets.colorGB = new TQGroupBox( i18n("Color"), page );
+ TQGridLayout * colorLayout = new TQGridLayout( m_UiWidgets.colorGB, 3, 3 );
colorLayout -> setSpacing( spacingHint() );
colorLayout -> setMargin( fontMetrics().height() );
- m_UiWidgets.lineColorL = new QLabel( i18n("Line color:"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineColorL = new TQLabel( i18n("Line color:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineColorL, 0, 0 );
m_UiWidgets.lineColorB = new KColorButton( m_pOptionState->uiState.lineColor, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineColorB, 0, 1 );
- m_UiWidgets.lineDefaultB = new QPushButton( i18n("D&efault Color"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineDefaultB = new TQPushButton( i18n("D&efault Color"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineDefaultB, 0, 2 );
- m_UiWidgets.fillColorL = new QLabel( i18n("Fill color:"), m_UiWidgets.colorGB );
+ m_UiWidgets.fillColorL = new TQLabel( i18n("Fill color:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillColorL, 1, 0 );
m_UiWidgets.fillColorB = new KColorButton( m_pOptionState->uiState.fillColor, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillColorB, 1, 1 );
- m_UiWidgets.fillDefaultB = new QPushButton( i18n("De&fault Color"), m_UiWidgets.colorGB );
+ m_UiWidgets.fillDefaultB = new TQPushButton( i18n("De&fault Color"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.fillDefaultB, 1, 2 );
- m_UiWidgets.lineWidthL = new QLabel( i18n("Line width:"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineWidthL = new TQLabel( i18n("Line width:"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthL, 2, 0 );
// Low-Limit: 0, High-Limit: 10, Step: 1, Initial-Val: m_pOptionState->uiState.lineWidth
@@ -78,62 +78,62 @@ void SettingsDlg::setupUIPage() {
m_UiWidgets.lineWidthB = new KIntSpinBox( 0, 10, 1, m_pOptionState->uiState.lineWidth, 10, m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthB, 2, 1 );
- m_UiWidgets.lineWidthDefaultB = new QPushButton( i18n("D&efault Width"), m_UiWidgets.colorGB );
+ m_UiWidgets.lineWidthDefaultB = new TQPushButton( i18n("D&efault Width"), m_UiWidgets.colorGB );
colorLayout -> addWidget( m_UiWidgets.lineWidthDefaultB, 2, 2 );
- m_UiWidgets.useFillColorCB = new QCheckBox( i18n("&Use fill color"), m_UiWidgets.colorGB );
+ m_UiWidgets.useFillColorCB = new TQCheckBox( i18n("&Use fill color"), m_UiWidgets.colorGB );
colorLayout -> setRowStretch( 3, 2 );
colorLayout -> addWidget( m_UiWidgets.useFillColorCB, 3, 0 );
m_UiWidgets.useFillColorCB -> setChecked( m_pOptionState->uiState.useFillColor );
//connect button signals up
- connect( m_UiWidgets.lineDefaultB, SIGNAL(clicked()), this, SLOT(slotLineBClicked()) );
- connect( m_UiWidgets.fillDefaultB, SIGNAL(clicked()), this, SLOT(slotFillBClicked()) );
+ connect( m_UiWidgets.lineDefaultB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLineBClicked()) );
+ connect( m_UiWidgets.fillDefaultB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFillBClicked()) );
}
void SettingsDlg::setupGeneralPage() {
//setup General page
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
// Set up undo setting
- m_GeneralWidgets.miscGB = new QGroupBox( i18n("Miscellaneous"), page );
+ m_GeneralWidgets.miscGB = new TQGroupBox( i18n("Miscellaneous"), page );
- QGridLayout * miscLayout = new QGridLayout( m_GeneralWidgets.miscGB, 2, 2 );
+ TQGridLayout * miscLayout = new TQGridLayout( m_GeneralWidgets.miscGB, 2, 2 );
miscLayout -> setSpacing( spacingHint() );
miscLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.undoCB = new QCheckBox( i18n("Enable undo"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.undoCB = new TQCheckBox( i18n("Enable undo"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.undoCB -> setChecked( m_pOptionState->generalState.undo );
miscLayout -> addWidget( m_GeneralWidgets.undoCB, 0, 0 );
- m_GeneralWidgets.tabdiagramsCB = new QCheckBox( i18n("Use tabbed diagrams"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.tabdiagramsCB = new TQCheckBox( i18n("Use tabbed diagrams"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.tabdiagramsCB -> setChecked( m_pOptionState->generalState.tabdiagrams );
miscLayout -> addWidget( m_GeneralWidgets.tabdiagramsCB, 0, 1 );
- m_GeneralWidgets.newcodegenCB = new QCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.newcodegenCB = new TQCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.newcodegenCB -> setChecked( m_pOptionState->generalState.newcodegen );
miscLayout -> addWidget( m_GeneralWidgets.newcodegenCB, 1, 0 );
- m_GeneralWidgets.angularLinesCB = new QCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB );
+ m_GeneralWidgets.angularLinesCB = new TQCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB );
m_GeneralWidgets.angularLinesCB -> setChecked( m_pOptionState->generalState.angularlines );
miscLayout -> addWidget( m_GeneralWidgets.angularLinesCB, 1, 1 );
//setup autosave settings
- m_GeneralWidgets.autosaveGB = new QGroupBox( i18n("Autosave"), page );
+ m_GeneralWidgets.autosaveGB = new TQGroupBox( i18n("Autosave"), page );
- QGridLayout * autosaveLayout = new QGridLayout( m_GeneralWidgets.autosaveGB, 3, 2 );
+ TQGridLayout * autosaveLayout = new TQGridLayout( m_GeneralWidgets.autosaveGB, 3, 2 );
autosaveLayout -> setSpacing( spacingHint() );
autosaveLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.autosaveCB = new QCheckBox( i18n("E&nable autosave"), m_GeneralWidgets.autosaveGB );
+ m_GeneralWidgets.autosaveCB = new TQCheckBox( i18n("E&nable autosave"), m_GeneralWidgets.autosaveGB );
m_GeneralWidgets.autosaveCB -> setChecked( m_pOptionState->generalState.autosave );
autosaveLayout -> addWidget( m_GeneralWidgets.autosaveCB, 0, 0 );
- m_GeneralWidgets.autosaveL = new QLabel( i18n("Select auto-save time interval (mins):"), m_GeneralWidgets.autosaveGB );
+ m_GeneralWidgets.autosaveL = new TQLabel( i18n("Select auto-save time interval (mins):"), m_GeneralWidgets.autosaveGB );
autosaveLayout -> addWidget( m_GeneralWidgets.autosaveL, 1, 0 );
m_GeneralWidgets.timeISB = new KIntSpinBox( 1, 600, 1, m_pOptionState->generalState.autosavetime, 10, m_GeneralWidgets.autosaveGB );
@@ -145,42 +145,42 @@ void SettingsDlg::setupGeneralPage() {
Dialog_Utils::makeLabeledEditField( m_GeneralWidgets.autosaveGB, autosaveLayout, 2,
m_GeneralWidgets.autosaveSuffixL, i18n("Set autosave suffix:"),
m_GeneralWidgets.autosaveSuffixT, m_pOptionState->generalState.autosavesuffix );
- QString autoSaveSuffixToolTip = i18n( "<qt><p>The autosave file will be saved to ~/autosave.xmi if the autosaving occurs "
+ TQString autoSaveSuffixToolTip = i18n( "<qt><p>The autosave file will be saved to ~/autosave.xmi if the autosaving occurs "
"before you have manually saved the file.</p>"
"<p>If you've already saved it, the autosave file will be saved in the same folder as the file "
"and will be named like the file's name, followed by the suffix specified.</p>"
"<p>If the suffix is equal to the suffix of the file you've saved, "
"the autosave will overwrite your file automatically.</p></qt>" );
- QToolTip::add( m_GeneralWidgets.autosaveSuffixL, autoSaveSuffixToolTip );
- QToolTip::add( m_GeneralWidgets.autosaveSuffixT, autoSaveSuffixToolTip );
+ TQToolTip::add( m_GeneralWidgets.autosaveSuffixL, autoSaveSuffixToolTip );
+ TQToolTip::add( m_GeneralWidgets.autosaveSuffixT, autoSaveSuffixToolTip );
//setup startup settings
- m_GeneralWidgets.startupGB = new QGroupBox( i18n("Startup"), page );
+ m_GeneralWidgets.startupGB = new TQGroupBox( i18n("Startup"), page );
- QGridLayout * startupLayout = new QGridLayout( m_GeneralWidgets.startupGB, 3, 2 );
+ TQGridLayout * startupLayout = new TQGridLayout( m_GeneralWidgets.startupGB, 3, 2 );
startupLayout -> setSpacing( spacingHint() );
startupLayout -> setMargin( fontMetrics().height() );
- m_GeneralWidgets.logoCB = new QCheckBox( i18n("Sta&rtup logo"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.logoCB = new TQCheckBox( i18n("Sta&rtup logo"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.logoCB -> setChecked( m_pOptionState->generalState.logo );
startupLayout -> addWidget( m_GeneralWidgets.logoCB, 0, 0 );
- m_GeneralWidgets.tipCB = new QCheckBox( i18n("&Tip of the day"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.tipCB = new TQCheckBox( i18n("&Tip of the day"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.tipCB -> setChecked( m_pOptionState->generalState.tip );
startupLayout -> addWidget( m_GeneralWidgets.tipCB, 0, 1 );
- m_GeneralWidgets.loadlastCB = new QCheckBox( i18n("&Load last project"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.loadlastCB = new TQCheckBox( i18n("&Load last project"), m_GeneralWidgets.startupGB );
m_GeneralWidgets.loadlastCB -> setChecked( m_pOptionState->generalState.loadlast );
startupLayout -> addWidget( m_GeneralWidgets.loadlastCB, 1, 0 );
- m_GeneralWidgets.startL = new QLabel( i18n("Start new project with:"), m_GeneralWidgets.startupGB );
+ m_GeneralWidgets.startL = new TQLabel( i18n("Start new project with:"), m_GeneralWidgets.startupGB );
startupLayout -> addWidget( m_GeneralWidgets.startL, 2, 0 );
m_GeneralWidgets.diagramKB = new KComboBox( m_GeneralWidgets.startupGB );
m_GeneralWidgets.diagramKB->setCompletionMode( KGlobalSettings::CompletionPopup );
startupLayout -> addWidget( m_GeneralWidgets.diagramKB, 2, 1 );
- QString diagrams [] = { i18n("No Diagram"), i18n("Class Diagram"),
+ TQString diagrams [] = { i18n("No Diagram"), i18n("Class Diagram"),
i18n("Use Case Diagram"), i18n("Sequence Diagram"),
i18n("Collaboration Diagram"), i18n("State Diagram"),
i18n("Activity Diagram"), i18n("Component Diagram"),
@@ -192,13 +192,13 @@ void SettingsDlg::setupGeneralPage() {
}
m_GeneralWidgets.diagramKB->setCurrentItem( (int)m_pOptionState->generalState.diagram-1 );
- connect( m_GeneralWidgets.autosaveCB, SIGNAL(clicked()), this, SLOT(slotAutosaveCBClicked()) );
+ connect( m_GeneralWidgets.autosaveCB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAutosaveCBClicked()) );
}
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertDiagram( const QString& type, int index )
+void SettingsDlg::insertDiagram( const TQString& type, int index )
{
m_GeneralWidgets.diagramKB->insertItem( type, index );
m_GeneralWidgets.diagramKB->completionObject()->addItem( type );
@@ -207,52 +207,52 @@ void SettingsDlg::insertDiagram( const QString& type, int index )
void SettingsDlg::setupClassPage() {
//setup class settings page
- QVBox * page = addVBoxPage( i18n("Class"), i18n("Class Settings"), DesktopIcon( "edit") );
- m_ClassWidgets.visibilityGB = new QGroupBox( i18n("Visibility"), page );
+ TQVBox * page = addVBoxPage( i18n("Class"), i18n("Class Settings"), DesktopIcon( "edit") );
+ m_ClassWidgets.visibilityGB = new TQGroupBox( i18n("Visibility"), page );
- QGridLayout * visibilityLayout = new QGridLayout( m_ClassWidgets.visibilityGB );
+ TQGridLayout * visibilityLayout = new TQGridLayout( m_ClassWidgets.visibilityGB );
visibilityLayout -> setSpacing( spacingHint() );
visibilityLayout -> setMargin( fontMetrics().height() );
- m_ClassWidgets.showVisibilityCB = new QCheckBox(i18n("Show &visibility"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showVisibilityCB = new TQCheckBox(i18n("Show &visibility"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showVisibilityCB -> setChecked( m_pOptionState->classState.showVisibility );
visibilityLayout -> addWidget( m_ClassWidgets.showVisibilityCB, 0, 0 );
- m_ClassWidgets.showAttsCB = new QCheckBox( i18n("Show attributes"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showAttsCB = new TQCheckBox( i18n("Show attributes"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showAttsCB -> setChecked( m_pOptionState->classState.showAtts );
visibilityLayout -> addWidget( m_ClassWidgets.showAttsCB, 0, 1 );
- m_ClassWidgets.showOpsCB = new QCheckBox( i18n("Show operations"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showOpsCB = new TQCheckBox( i18n("Show operations"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showOpsCB -> setChecked( m_pOptionState->classState.showOps );
visibilityLayout -> addWidget( m_ClassWidgets.showOpsCB, 1, 0 );
- m_ClassWidgets.showStereotypeCB = new QCheckBox( i18n("Show stereot&ype"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showStereotypeCB = new TQCheckBox( i18n("Show stereot&ype"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showStereotypeCB -> setChecked( m_pOptionState->classState.showStereoType );
visibilityLayout -> addWidget( m_ClassWidgets.showStereotypeCB, 1, 1 );
- m_ClassWidgets.showAttSigCB = new QCheckBox(i18n("Show attribute signature"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showAttSigCB = new TQCheckBox(i18n("Show attribute signature"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showAttSigCB -> setChecked( m_pOptionState->classState.showAttSig );
visibilityLayout -> addWidget( m_ClassWidgets.showAttSigCB, 2, 0 );
- m_ClassWidgets.showPackageCB = new QCheckBox(i18n("Show package"), m_ClassWidgets.visibilityGB);
+ m_ClassWidgets.showPackageCB = new TQCheckBox(i18n("Show package"), m_ClassWidgets.visibilityGB);
m_ClassWidgets.showPackageCB -> setChecked( m_pOptionState->classState.showPackage );
visibilityLayout -> addWidget( m_ClassWidgets.showPackageCB, 2, 1 );
- m_ClassWidgets.showOpSigCB = new QCheckBox( i18n("Show operation signature"), m_ClassWidgets.visibilityGB );
+ m_ClassWidgets.showOpSigCB = new TQCheckBox( i18n("Show operation signature"), m_ClassWidgets.visibilityGB );
m_ClassWidgets.showOpSigCB -> setChecked( m_pOptionState->classState.showOpSig );
visibilityLayout -> addWidget( m_ClassWidgets.showOpSigCB, 3, 0 );
visibilityLayout -> setRowStretch( 3, 1 );
- m_ClassWidgets.scopeGB = new QGroupBox( i18n("Starting Scope"), page );
- QGridLayout * scopeLayout = new QGridLayout( m_ClassWidgets.scopeGB );
+ m_ClassWidgets.scopeGB = new TQGroupBox( i18n("Starting Scope"), page );
+ TQGridLayout * scopeLayout = new TQGridLayout( m_ClassWidgets.scopeGB );
scopeLayout -> setSpacing( spacingHint() );
scopeLayout -> setMargin( fontMetrics().height() );
- m_ClassWidgets.attributeLabel = new QLabel( i18n("Default attribute scope:"), m_ClassWidgets.scopeGB);
+ m_ClassWidgets.attributeLabel = new TQLabel( i18n("Default attribute scope:"), m_ClassWidgets.scopeGB);
scopeLayout -> addWidget( m_ClassWidgets.attributeLabel, 0, 0 );
- m_ClassWidgets.operationLabel = new QLabel( i18n("Default operation scope:"), m_ClassWidgets.scopeGB);
+ m_ClassWidgets.operationLabel = new TQLabel( i18n("Default operation scope:"), m_ClassWidgets.scopeGB);
scopeLayout -> addWidget( m_ClassWidgets.operationLabel, 1, 0 );
m_ClassWidgets.m_pAttribScopeCB = new KComboBox(m_ClassWidgets.scopeGB);
@@ -275,7 +275,7 @@ void SettingsDlg::setupClassPage() {
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertAttribScope( const QString& type, int index )
+void SettingsDlg::insertAttribScope( const TQString& type, int index )
{
m_ClassWidgets.m_pAttribScopeCB->insertItem( type, index );
m_ClassWidgets.m_pAttribScopeCB->completionObject()->addItem( type );
@@ -283,7 +283,7 @@ void SettingsDlg::insertAttribScope( const QString& type, int index )
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
-void SettingsDlg::insertOperationScope( const QString& type, int index )
+void SettingsDlg::insertOperationScope( const TQString& type, int index )
{
m_ClassWidgets.m_pOperationScopeCB->insertItem( type, index );
m_ClassWidgets.m_pOperationScopeCB->completionObject()->addItem( type );
@@ -291,20 +291,20 @@ void SettingsDlg::insertOperationScope( const QString& type, int index )
void SettingsDlg::setupCodeGenPage() {
//setup code generation settings page
- QVBox * page = addVBoxPage( i18n("Code Generation"), i18n("Code Generation Settings"), DesktopIcon( "source") );
+ TQVBox * page = addVBoxPage( i18n("Code Generation"), i18n("Code Generation Settings"), DesktopIcon( "source") );
m_pCodeGenPage = new CodeGenerationOptionsPage(page);
- connect( m_pCodeGenPage, SIGNAL(languageChanged()), this, SLOT(slotApply()) );
+ connect( m_pCodeGenPage, TQT_SIGNAL(languageChanged()), this, TQT_SLOT(slotApply()) );
}
void SettingsDlg::setupCodeViewerPage(Settings::CodeViewerState options) {
//setup code generation settings page
- QVBox * page = addVBoxPage( i18n("Code Viewer"), i18n("Code Viewer Settings"), DesktopIcon( "source") );
+ TQVBox * page = addVBoxPage( i18n("Code Viewer"), i18n("Code Viewer Settings"), DesktopIcon( "source") );
m_pCodeViewerPage = new CodeViewerOptionsPage(options, page);
}
void SettingsDlg::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_FontWidgets.chooser = new KFontChooser( page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_FontWidgets.chooser = new KFontChooser( page, "font", false, TQStringList(), false);
m_FontWidgets.chooser->setFont( m_pOptionState->uiState.font );
}
@@ -348,7 +348,7 @@ void SettingsDlg::slotDefault() {
case Settings::page_UI:
m_UiWidgets.useFillColorCB -> setChecked( true );
- m_UiWidgets.fillColorB -> setColor( QColor( 255, 255, 192 ) );
+ m_UiWidgets.fillColorB -> setColor( TQColor( 255, 255, 192 ) );
m_UiWidgets.lineColorB -> setColor( Qt::red );
m_UiWidgets.lineWidthB -> setValue( 0 );
break;
@@ -429,14 +429,14 @@ void SettingsDlg::slotLineBClicked() {
}
void SettingsDlg::slotFillBClicked() {
- m_UiWidgets.fillColorB -> setColor( QColor(255, 255, 192) );
+ m_UiWidgets.fillColorB -> setColor( TQColor(255, 255, 192) );
}
void SettingsDlg::slotAutosaveCBClicked() {
m_GeneralWidgets.timeISB -> setEnabled( m_GeneralWidgets.autosaveCB -> isChecked() );
}
-QString SettingsDlg::getCodeGenerationLanguage() {
+TQString SettingsDlg::getCodeGenerationLanguage() {
return m_pCodeGenPage->getCodeGenerationLanguage();
}
diff --git a/umbrello/umbrello/dialogs/settingsdlg.h b/umbrello/umbrello/dialogs/settingsdlg.h
index 30579990..c00437b2 100644
--- a/umbrello/umbrello/dialogs/settingsdlg.h
+++ b/umbrello/umbrello/dialogs/settingsdlg.h
@@ -13,13 +13,13 @@
#ifndef SETTINGSDLG_H
#define SETTINGSDLG_H
//qt includes
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qdict.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqdict.h>
//kde includes
#include <kcombobox.h>
#include <kfontdialog.h>
@@ -45,7 +45,7 @@ class SettingsDlg : public KDialogBase {
Q_OBJECT
public:
- SettingsDlg(QWidget * parent, Settings::OptionState *state);
+ SettingsDlg(TQWidget * parent, Settings::OptionState *state);
~SettingsDlg();
//public methods
@@ -53,86 +53,86 @@ public:
return m_bChangesApplied;
}
- QString getCodeGenerationLanguage();
+ TQString getCodeGenerationLanguage();
protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertDiagram( const QString& type, int index = -1 );
+ void insertDiagram( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertAttribScope( const QString& type, int index = -1 );
+ void insertAttribScope( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertOperationScope( const QString& type, int index = -1 );
+ void insertOperationScope( const TQString& type, int index = -1 );
private:
//private structs
struct UIWidgets {
- QGroupBox * colorGB;
+ TQGroupBox * colorGB;
- QLabel * lineColorL;
- QLabel * fillColorL;
- QLabel * lineWidthL;
+ TQLabel * lineColorL;
+ TQLabel * fillColorL;
+ TQLabel * lineWidthL;
- QPushButton * lineDefaultB;
- QPushButton * fillDefaultB;
- QPushButton * lineWidthDefaultB;
+ TQPushButton * lineDefaultB;
+ TQPushButton * fillDefaultB;
+ TQPushButton * lineWidthDefaultB;
KColorButton * lineColorB;
KColorButton * fillColorB;
KIntSpinBox * lineWidthB;
- QCheckBox * useFillColorCB;
+ TQCheckBox * useFillColorCB;
}
;//end struct UIWidgets
struct GeneralWidgets {
- QGroupBox * miscGB;
- QGroupBox * autosaveGB;
- QGroupBox * startupGB;
+ TQGroupBox * miscGB;
+ TQGroupBox * autosaveGB;
+ TQGroupBox * startupGB;
KIntSpinBox * timeISB;
KComboBox * diagramKB;
- QCheckBox * undoCB;
- QCheckBox * tabdiagramsCB;
- QCheckBox * newcodegenCB;
- QCheckBox * angularLinesCB;
- QCheckBox * autosaveCB;
- QCheckBox * logoCB;
- QCheckBox * tipCB;
- QCheckBox * loadlastCB;
+ TQCheckBox * undoCB;
+ TQCheckBox * tabdiagramsCB;
+ TQCheckBox * newcodegenCB;
+ TQCheckBox * angularLinesCB;
+ TQCheckBox * autosaveCB;
+ TQCheckBox * logoCB;
+ TQCheckBox * tipCB;
+ TQCheckBox * loadlastCB;
// 2004-05-17 Achim Spangler: Allow definition of Suffix for autosave
// ( Default: ".xmi" )
- QLineEdit * autosaveSuffixT;
- QLabel * autosaveSuffixL;
+ TQLineEdit * autosaveSuffixT;
+ TQLabel * autosaveSuffixL;
// End AutoSave Suffix
- QLabel * startL;
- QLabel * autosaveL;
+ TQLabel * startL;
+ TQLabel * autosaveL;
}
;//end struct GeneralWidgets
struct ClassWidgets {
- QGroupBox * visibilityGB;
- QGroupBox * scopeGB;
+ TQGroupBox * visibilityGB;
+ TQGroupBox * scopeGB;
- QCheckBox * showVisibilityCB;
- QCheckBox * showAttsCB;
- QCheckBox * showOpsCB;
- QCheckBox * showStereotypeCB;
- QCheckBox * showAttSigCB;
- QCheckBox * showPackageCB;
+ TQCheckBox * showVisibilityCB;
+ TQCheckBox * showAttsCB;
+ TQCheckBox * showOpsCB;
+ TQCheckBox * showStereotypeCB;
+ TQCheckBox * showAttSigCB;
+ TQCheckBox * showPackageCB;
- QCheckBox * showOpSigCB;
+ TQCheckBox * showOpSigCB;
- QLabel * attributeLabel;
- QLabel * operationLabel;
+ TQLabel * attributeLabel;
+ TQLabel * operationLabel;
KComboBox* m_pAttribScopeCB;
KComboBox* m_pOperationScopeCB;
diff --git a/umbrello/umbrello/dialogs/statedialog.cpp b/umbrello/umbrello/dialogs/statedialog.cpp
index 691597e9..564146ec 100644
--- a/umbrello/umbrello/dialogs/statedialog.cpp
+++ b/umbrello/umbrello/dialogs/statedialog.cpp
@@ -13,11 +13,11 @@
#include "statedialog.h"
//qt includes
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmultilineedit.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmultilineedit.h>
+#include <tqgroupbox.h>
//kde includes
#include <kiconloader.h>
@@ -82,13 +82,13 @@ void StateDialog::applyPage( Page page ) {
}
void StateDialog::setupGeneralPage() {
- QString types[ ] = { i18n("Initial state"), i18n("State"), i18n("End state") };
+ TQString types[ ] = { i18n("Initial state"), i18n("State"), i18n("End state") };
StateWidget::StateType type = m_pStateWidget -> getStateType();
- QVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
- m_GenPageWidgets.generalGB = new QGroupBox( i18n( "Properties"), (QWidget *)page );
+ TQVBox * page = addVBoxPage( i18n("General"), i18n("General Properties"), DesktopIcon( "misc") );
+ m_GenPageWidgets.generalGB = new TQGroupBox( i18n( "Properties"), (TQWidget *)page );
- QGridLayout * generalLayout = new QGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
+ TQGridLayout * generalLayout = new TQGridLayout( m_GenPageWidgets.generalGB, 2, 2 );
generalLayout -> setSpacing( spacingHint() );
generalLayout -> setMargin( fontMetrics().height() );
@@ -101,13 +101,13 @@ void StateDialog::setupGeneralPage() {
m_GenPageWidgets.nameL, i18n("State name:"),
m_GenPageWidgets.nameLE );
- m_GenPageWidgets.docGB = new QGroupBox( i18n( "Documentation"), (QWidget *)page );
+ m_GenPageWidgets.docGB = new TQGroupBox( i18n( "Documentation"), (TQWidget *)page );
- QHBoxLayout * docLayout = new QHBoxLayout( m_GenPageWidgets.docGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_GenPageWidgets.docGB );
docLayout -> setSpacing( spacingHint() );
docLayout -> setMargin( fontMetrics().height() );
- m_GenPageWidgets.docMLE = new QMultiLineEdit( m_GenPageWidgets.docGB );
+ m_GenPageWidgets.docMLE = new TQMultiLineEdit( m_GenPageWidgets.docGB );
m_GenPageWidgets.docMLE -> setText( m_pStateWidget -> getDoc() );
docLayout -> addWidget( m_GenPageWidgets.docMLE );
@@ -121,21 +121,21 @@ void StateDialog::setupGeneralPage() {
void StateDialog::setupFontPage() {
if ( !m_pStateWidget )
return;
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pStateWidget -> getFont() );
}
void StateDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Widget Color"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Widget Color"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, m_pStateWidget );
m_pColorLayout -> addWidget(m_pColorPage);
}
void StateDialog::setupActivityPage() {
- QFrame * activityPage = addPage( i18n("Activities"), i18n("Activities"), DesktopIcon( "misc") );
- QHBoxLayout * activityLayout = new QHBoxLayout( activityPage );
+ TQFrame * activityPage = addPage( i18n("Activities"), i18n("Activities"), DesktopIcon( "misc") );
+ TQHBoxLayout * activityLayout = new TQHBoxLayout( activityPage );
m_pActivityPage = new ActivityPage( activityPage, m_pStateWidget );
activityLayout -> addWidget( m_pActivityPage );
}
diff --git a/umbrello/umbrello/dialogs/statedialog.h b/umbrello/umbrello/dialogs/statedialog.h
index d364d6be..07e60898 100644
--- a/umbrello/umbrello/dialogs/statedialog.h
+++ b/umbrello/umbrello/dialogs/statedialog.h
@@ -132,11 +132,11 @@ protected:
bool m_bChangesMade;
struct GeneralPageWidgets {
- QLabel * nameL, * typeL;
- QLineEdit * nameLE, * typeLE;
- QMultiLineEdit * docMLE;
+ TQLabel * nameL, * typeL;
+ TQLineEdit * nameLE, * typeLE;
+ TQMultiLineEdit * docMLE;
- QGroupBox * docGB, * generalGB;
+ TQGroupBox * docGB, * generalGB;
}
m_GenPageWidgets;
};
diff --git a/umbrello/umbrello/dialogs/umlattributedialog.cpp b/umbrello/umbrello/dialogs/umlattributedialog.cpp
index e6a52725..d6ea57ce 100644
--- a/umbrello/umbrello/dialogs/umlattributedialog.cpp
+++ b/umbrello/umbrello/dialogs/umlattributedialog.cpp
@@ -13,13 +13,13 @@
#include "umlattributedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
// kde includes
#include <kcombobox.h>
@@ -38,7 +38,7 @@
#include "../object_factory.h"
#include "../codeimport/import_utils.h"
-UMLAttributeDialog::UMLAttributeDialog( QWidget * pParent, UMLAttribute * pAttribute )
+UMLAttributeDialog::UMLAttributeDialog( TQWidget * pParent, UMLAttribute * pAttribute )
: KDialogBase( Plain, i18n("Attribute Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLATTRIBUTEDLG_", true, true) {
m_pAttribute = pAttribute;
setupDialog();
@@ -50,14 +50,14 @@ void UMLAttributeDialog::setupDialog() {
UMLDoc * pDoc = UMLApp::app()->getDocument();
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * valuesLayout = new QGridLayout(m_pValuesGB, 5, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * valuesLayout = new TQGridLayout(m_pValuesGB, 5, 2);
valuesLayout -> setMargin(margin);
valuesLayout -> setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(true, m_pValuesGB);
@@ -76,7 +76,7 @@ void UMLAttributeDialog::setupDialog() {
m_pStereoTypeL, i18n("Stereotype name:"),
m_pStereoTypeLE, m_pAttribute->getStereotype() );
- m_pStaticCB = new QCheckBox( i18n("Classifier &scope (\"static\")"), m_pValuesGB );
+ m_pStaticCB = new TQCheckBox( i18n("Classifier &scope (\"static\")"), m_pValuesGB );
m_pStaticCB -> setChecked( m_pAttribute -> getStatic() );
valuesLayout -> addWidget(m_pStaticCB, 4, 0);
@@ -84,20 +84,20 @@ void UMLAttributeDialog::setupDialog() {
mainLayout -> addWidget(m_pValuesGB);
- m_pScopeBG = new QButtonGroup(i18n("Visibility"), plainPage() );
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pScopeBG);
+ m_pScopeBG = new TQButtonGroup(i18n("Visibility"), plainPage() );
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout -> setMargin(margin);
- m_pPublicRB = new QRadioButton(i18n("&Public"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("&Public"), m_pScopeBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pScopeBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Prot&ected"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Prot&ected"), m_pScopeBG);
scopeLayout -> addWidget(m_pProtectedRB);
- m_pImplementationRB = new QRadioButton(i18n("I&mplementation"), m_pScopeBG);
+ m_pImplementationRB = new TQRadioButton(i18n("I&mplementation"), m_pScopeBG);
scopeLayout -> addWidget(m_pImplementationRB);
mainLayout -> addWidget(m_pScopeBG);
@@ -125,7 +125,7 @@ void UMLAttributeDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pAttribute->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -140,17 +140,17 @@ void UMLAttributeDialog::setupDialog() {
}
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLAttributeDialog::slotNameChanged( const QString &_text )
+void UMLAttributeDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
bool UMLAttributeDialog::apply() {
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if (name.isEmpty()) {
KMessageBox::error(this, i18n("You have entered an invalid attribute name."),
i18n("Attribute Name Invalid"), false);
@@ -184,7 +184,7 @@ bool UMLAttributeDialog::apply() {
m_pAttribute->setStereotype( m_pStereoTypeLE->text() );
m_pAttribute->setStatic( m_pStaticCB->isChecked() );
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLTemplate *tmplParam = pConcept->findTemplate(typeName);
if (tmplParam) {
m_pAttribute->setType(tmplParam);
@@ -225,7 +225,7 @@ void UMLAttributeDialog::slotOk() {
}
}
-void UMLAttributeDialog::insertType( const QString& type, int index )
+void UMLAttributeDialog::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
diff --git a/umbrello/umbrello/dialogs/umlattributedialog.h b/umbrello/umbrello/dialogs/umlattributedialog.h
index 92305d61..7994c187 100644
--- a/umbrello/umbrello/dialogs/umlattributedialog.h
+++ b/umbrello/umbrello/dialogs/umlattributedialog.h
@@ -30,7 +30,7 @@ class QLineEdit;
class UMLAttributeDialog : public KDialogBase {
Q_OBJECT
public:
- UMLAttributeDialog( QWidget * pParent, UMLAttribute * pAttribute );
+ UMLAttributeDialog( TQWidget * pParent, UMLAttribute * pAttribute );
~UMLAttributeDialog();
protected:
@@ -48,7 +48,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* The Attribute to represent
@@ -56,13 +56,13 @@ protected:
UMLAttribute * m_pAttribute;
//GUI Widgets
- QGroupBox * m_pAttsGB, * m_pValuesGB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pImplementationRB;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
+ TQGroupBox * m_pAttsGB, * m_pValuesGB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pImplementationRB;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL;
KComboBox * m_pTypeCB;
- QLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE;
- QCheckBox* m_pStaticCB;
+ TQLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE;
+ TQCheckBox* m_pStaticCB;
public slots:
/**
@@ -75,7 +75,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
#endif
diff --git a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
index ef6a5791..55a47857 100644
--- a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
+++ b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp
@@ -13,13 +13,13 @@
#include "umlentityattributedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
// kde includes
#include <kcombobox.h>
@@ -39,7 +39,7 @@
#include "../object_factory.h"
#include "../umlclassifierlist.h"
-UMLEntityAttributeDialog::UMLEntityAttributeDialog( QWidget * pParent, UMLEntityAttribute * pEntityAttribute )
+UMLEntityAttributeDialog::UMLEntityAttributeDialog( TQWidget * pParent, UMLEntityAttribute * pEntityAttribute )
: KDialogBase( Plain, i18n("Entity Attribute Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLENTITYATTRIBUTEDLG_", true, true) {
m_pEntityAttribute = pEntityAttribute;
setupDialog();
@@ -51,14 +51,14 @@ void UMLEntityAttributeDialog::setupDialog() {
UMLDoc * pDoc = UMLApp::app()->getDocument();
int margin = fontMetrics().height();
- QVBoxLayout * mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * valuesLayout = new QGridLayout(m_pValuesGB, 5, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * valuesLayout = new TQGridLayout(m_pValuesGB, 5, 2);
valuesLayout -> setMargin(margin);
valuesLayout -> setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout -> addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(true, m_pValuesGB);
@@ -81,15 +81,15 @@ void UMLEntityAttributeDialog::setupDialog() {
m_pValuesL, i18n("Length/Values:"),
m_pValuesLE, m_pEntityAttribute->getValues() );
- m_pAutoIncrementCB = new QCheckBox( i18n("&Auto increment"), m_pValuesGB );
+ m_pAutoIncrementCB = new TQCheckBox( i18n("&Auto increment"), m_pValuesGB );
m_pAutoIncrementCB->setChecked( m_pEntityAttribute->getAutoIncrement() );
valuesLayout->addWidget(m_pAutoIncrementCB, 5, 0);
- m_pNullCB = new QCheckBox( i18n("Allow &null"), m_pValuesGB );
+ m_pNullCB = new TQCheckBox( i18n("Allow &null"), m_pValuesGB );
m_pNullCB->setChecked( m_pEntityAttribute->getNull() );
valuesLayout->addWidget(m_pNullCB, 6, 0);
- m_pAttributesL = new QLabel(i18n("Attributes:"), m_pValuesGB);
+ m_pAttributesL = new TQLabel(i18n("Attributes:"), m_pValuesGB);
valuesLayout->addWidget(m_pAttributesL, 7, 0);
m_pAttributesCB = new KComboBox(true, m_pValuesGB);
@@ -105,20 +105,20 @@ void UMLEntityAttributeDialog::setupDialog() {
mainLayout -> addWidget(m_pValuesGB);
- m_pScopeBG = new QButtonGroup(i18n("Indexing"), plainPage() );
- QHBoxLayout* scopeLayout = new QHBoxLayout(m_pScopeBG);
+ m_pScopeBG = new TQButtonGroup(i18n("Indexing"), plainPage() );
+ TQHBoxLayout* scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout->setMargin(margin);
- m_pNoneRB = new QRadioButton(i18n("&None"), m_pScopeBG);
+ m_pNoneRB = new TQRadioButton(i18n("&None"), m_pScopeBG);
scopeLayout->addWidget(m_pNoneRB);
- m_pPublicRB = new QRadioButton(i18n("&Primary"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("&Primary"), m_pScopeBG);
scopeLayout->addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("&Index"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("&Index"), m_pScopeBG);
scopeLayout->addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("&Unique"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("&Unique"), m_pScopeBG);
scopeLayout->addWidget(m_pProtectedRB);
mainLayout->addWidget(m_pScopeBG);
@@ -154,7 +154,7 @@ void UMLEntityAttributeDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pEntityAttribute->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -169,17 +169,17 @@ void UMLEntityAttributeDialog::setupDialog() {
}
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLEntityAttributeDialog::slotNameChanged( const QString &_text )
+void UMLEntityAttributeDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
bool UMLEntityAttributeDialog::apply() {
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if (name.isEmpty()) {
KMessageBox::error(this, i18n("You have entered an invalid entity attribute name."),
i18n("Entity Attribute Name Invalid"), false);
@@ -212,7 +212,7 @@ bool UMLEntityAttributeDialog::apply() {
m_pEntityAttribute->setIndexType(Uml::None);
}
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLClassifierList dataTypes = pDoc->getDatatypes();
UMLClassifier *dat;
@@ -248,12 +248,12 @@ void UMLEntityAttributeDialog::slotOk() {
}
}
-void UMLEntityAttributeDialog::insertType( const QString& type, int index ) {
+void UMLEntityAttributeDialog::insertType( const TQString& type, int index ) {
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
-void UMLEntityAttributeDialog::insertAttribute( const QString& type, int index ) {
+void UMLEntityAttributeDialog::insertAttribute( const TQString& type, int index ) {
m_pAttributesCB->insertItem( type, index );
m_pAttributesCB->completionObject()->addItem( type );
}
diff --git a/umbrello/umbrello/dialogs/umlentityattributedialog.h b/umbrello/umbrello/dialogs/umlentityattributedialog.h
index 0b81472e..9b837e3e 100644
--- a/umbrello/umbrello/dialogs/umlentityattributedialog.h
+++ b/umbrello/umbrello/dialogs/umlentityattributedialog.h
@@ -30,7 +30,7 @@ class QLineEdit;
class UMLEntityAttributeDialog : public KDialogBase {
Q_OBJECT
public:
- UMLEntityAttributeDialog( QWidget* pParent, UMLEntityAttribute* pEntityAttribute );
+ UMLEntityAttributeDialog( TQWidget* pParent, UMLEntityAttribute* pEntityAttribute );
~UMLEntityAttributeDialog();
protected:
@@ -48,11 +48,11 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertAttribute( const QString& type, int index = -1 );
+ void insertAttribute( const TQString& type, int index = -1 );
/**
* The EntityAttribute to represent
@@ -60,15 +60,15 @@ protected:
UMLEntityAttribute * m_pEntityAttribute;
//GUI Widgets
- QGroupBox * m_pAttsGB, * m_pValuesGB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pNoneRB;
- QLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL, * m_pValuesL, * m_pAttributesL ;
+ TQGroupBox * m_pAttsGB, * m_pValuesGB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, * m_pNoneRB;
+ TQLabel * m_pTypeL, * m_pNameL, * m_pInitialL, * m_pStereoTypeL, * m_pValuesL, * m_pAttributesL ;
KComboBox * m_pTypeCB;
KComboBox * m_pAttributesCB;
- QLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE, * m_pValuesLE;
- QCheckBox* m_pAutoIncrementCB;
- QCheckBox* m_pNullCB;
+ TQLineEdit * m_pNameLE, * m_pInitialLE, * m_pStereoTypeLE, * m_pValuesLE;
+ TQCheckBox* m_pAutoIncrementCB;
+ TQCheckBox* m_pNullCB;
public slots:
/**
@@ -81,7 +81,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
#endif
diff --git a/umbrello/umbrello/dialogs/umloperationdialog.cpp b/umbrello/umbrello/dialogs/umloperationdialog.cpp
index 07c56d52..37e8f64c 100644
--- a/umbrello/umbrello/dialogs/umloperationdialog.cpp
+++ b/umbrello/umbrello/dialogs/umloperationdialog.cpp
@@ -13,15 +13,15 @@
#include "umloperationdialog.h"
//qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlistbox.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlistbox.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
//kde includes
#include <kcombobox.h>
@@ -46,7 +46,7 @@
#include "../stereotype.h"
#include "../uniqueid.h"
-UMLOperationDialog::UMLOperationDialog( QWidget * parent, UMLOperation * pOperation )
+UMLOperationDialog::UMLOperationDialog( TQWidget * parent, UMLOperation * pOperation )
: KDialogBase( Plain, i18n("Operation Properties"), Help | Ok | Cancel , Ok, parent, "_UMLOPERATIONDLG_", true, true) {
m_pOperation = pOperation;
m_doc = UMLApp::app()->getDocument();
@@ -59,10 +59,10 @@ UMLOperationDialog::~UMLOperationDialog() {}
void UMLOperationDialog::setupDialog() {
int margin = fontMetrics().height();
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage() );
- m_pGenGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout * genLayout = new QGridLayout(m_pGenGB, 3, 4 );
+ m_pGenGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout * genLayout = new TQGridLayout(m_pGenGB, 3, 4 );
genLayout -> setColStretch(1, 1);
genLayout -> setColStretch(3, 1);
genLayout -> addColSpacing(1, 200);
@@ -74,61 +74,61 @@ void UMLOperationDialog::setupDialog() {
m_pNameL, i18n("&Name:"),
m_pNameLE, m_pOperation->getName() );
- m_pRtypeL = new QLabel(i18n("&Type:"), m_pGenGB );
+ m_pRtypeL = new TQLabel(i18n("&Type:"), m_pGenGB );
genLayout -> addWidget(m_pRtypeL, 0, 2);
m_pRtypeCB = new KComboBox(true, m_pGenGB );
genLayout -> addWidget(m_pRtypeCB, 0, 3);
m_pRtypeL->setBuddy(m_pRtypeCB);
- m_pStereoTypeL = new QLabel( i18n("Stereotype name:"), m_pGenGB );
+ m_pStereoTypeL = new TQLabel( i18n("Stereotype name:"), m_pGenGB );
genLayout -> addWidget(m_pStereoTypeL, 1, 0);
m_pStereoTypeCB = new KComboBox(true, m_pGenGB );
genLayout -> addWidget(m_pStereoTypeCB, 1, 1);
- m_pAbstractCB = new QCheckBox( i18n("&Abstract operation"), m_pGenGB );
+ m_pAbstractCB = new TQCheckBox( i18n("&Abstract operation"), m_pGenGB );
m_pAbstractCB -> setChecked( m_pOperation->getAbstract() );
genLayout -> addWidget( m_pAbstractCB, 2, 0 );
- m_pStaticCB = new QCheckBox( i18n("Classifier &scope (\"static\")"), m_pGenGB );
+ m_pStaticCB = new TQCheckBox( i18n("Classifier &scope (\"static\")"), m_pGenGB );
m_pStaticCB -> setChecked( m_pOperation->getStatic() );
genLayout -> addWidget( m_pStaticCB, 2, 1 );
- m_pQueryCB = new QCheckBox( i18n("&Query (\"const\")"), m_pGenGB );
+ m_pQueryCB = new TQCheckBox( i18n("&Query (\"const\")"), m_pGenGB );
m_pQueryCB -> setChecked( m_pOperation->getConst() );
genLayout -> addWidget( m_pQueryCB, 2, 2 );
topLayout -> addWidget( m_pGenGB );
- m_pScopeBG = new QButtonGroup(i18n("Visibility"), plainPage() );
+ m_pScopeBG = new TQButtonGroup(i18n("Visibility"), plainPage() );
- QHBoxLayout * scopeLayout = new QHBoxLayout(m_pScopeBG);
+ TQHBoxLayout * scopeLayout = new TQHBoxLayout(m_pScopeBG);
scopeLayout -> setMargin(margin);
- m_pPublicRB = new QRadioButton(i18n("P&ublic"), m_pScopeBG);
+ m_pPublicRB = new TQRadioButton(i18n("P&ublic"), m_pScopeBG);
scopeLayout -> addWidget(m_pPublicRB);
- m_pPrivateRB = new QRadioButton(i18n("P&rivate"), m_pScopeBG);
+ m_pPrivateRB = new TQRadioButton(i18n("P&rivate"), m_pScopeBG);
scopeLayout -> addWidget(m_pPrivateRB);
- m_pProtectedRB = new QRadioButton(i18n("Prot&ected"), m_pScopeBG);
+ m_pProtectedRB = new TQRadioButton(i18n("Prot&ected"), m_pScopeBG);
scopeLayout -> addWidget(m_pProtectedRB);
- m_pImplementationRB = new QRadioButton(i18n("I&mplementation"), m_pScopeBG);
+ m_pImplementationRB = new TQRadioButton(i18n("I&mplementation"), m_pScopeBG);
scopeLayout -> addWidget(m_pImplementationRB);
topLayout -> addWidget(m_pScopeBG);
- m_pParmsGB = new QGroupBox(i18n("Parameters"), plainPage() );
- QVBoxLayout* parmsLayout = new QVBoxLayout(m_pParmsGB);
+ m_pParmsGB = new TQGroupBox(i18n("Parameters"), plainPage() );
+ TQVBoxLayout* parmsLayout = new TQVBoxLayout(m_pParmsGB);
parmsLayout->setMargin(margin);
parmsLayout->setSpacing(10);
//horizontal box contains the list box and the move up/down buttons
- QHBoxLayout* parmsHBoxLayout = new QHBoxLayout(parmsLayout);
- m_pParmsLB = new QListBox(m_pParmsGB);
+ TQHBoxLayout* parmsHBoxLayout = new TQHBoxLayout(parmsLayout);
+ m_pParmsLB = new TQListBox(m_pParmsGB);
parmsHBoxLayout->addWidget(m_pParmsLB);
//the move up/down buttons (another vertical box)
- QVBoxLayout* buttonLayout = new QVBoxLayout( parmsHBoxLayout );
+ TQVBoxLayout* buttonLayout = new TQVBoxLayout( parmsHBoxLayout );
m_pUpButton = new KArrowButton( m_pParmsGB );
m_pUpButton->setEnabled( false );
buttonLayout->addWidget( m_pUpButton );
@@ -138,10 +138,10 @@ void UMLOperationDialog::setupDialog() {
buttonLayout->addWidget( m_pDownButton );
KButtonBox* buttonBox = new KButtonBox(m_pParmsGB);
- buttonBox->addButton( i18n("Ne&w Parameter..."), this, SLOT(slotNewParameter()) );
- m_pDeleteButton = buttonBox->addButton( i18n("&Delete"), this, SLOT(slotDeleteParameter()) );
+ buttonBox->addButton( i18n("Ne&w Parameter..."), this, TQT_SLOT(slotNewParameter()) );
+ m_pDeleteButton = buttonBox->addButton( i18n("&Delete"), this, TQT_SLOT(slotDeleteParameter()) );
m_pPropertiesButton = buttonBox->addButton( i18n("&Properties"), this,
- SLOT(slotParameterProperties()) );
+ TQT_SLOT(slotParameterProperties()) );
parmsLayout->addWidget(buttonBox);
topLayout -> addWidget(m_pParmsGB);
@@ -179,7 +179,7 @@ void UMLOperationDialog::setupDialog() {
int returnBoxCount = 0;
bool foundReturnType = false;
while (returnBoxCount < m_pRtypeCB->count() && foundReturnType == false) {
- QString returnBoxString = m_pRtypeCB->text(returnBoxCount);
+ TQString returnBoxString = m_pRtypeCB->text(returnBoxCount);
if ( returnBoxString == m_pOperation->getTypeName() ) {
foundReturnType = true;
m_pRtypeCB->setCurrentItem(returnBoxCount);
@@ -213,7 +213,7 @@ void UMLOperationDialog::setupDialog() {
// manage stereotypes
m_pStereoTypeCB -> setDuplicatesEnabled(false);//only allow one of each type in box
m_pStereoTypeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
- insertStereotype (QString("")); // an empty stereotype is the default
+ insertStereotype (TQString("")); // an empty stereotype is the default
int defaultStereotype=0;
bool foundDefaultStereotype = false;
for (UMLStereotypeListIt it(m_doc->getStereotypes()); it.current(); ++it) {
@@ -232,35 +232,35 @@ void UMLOperationDialog::setupDialog() {
m_pStereoTypeCB->setCurrentItem(-1);
//setup parm list box signals
- connect( m_pUpButton, SIGNAL( clicked() ), this, SLOT( slotParameterUp() ) );
- connect( m_pDownButton, SIGNAL( clicked() ), this, SLOT( slotParameterDown() ) );
+ connect( m_pUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotParameterUp() ) );
+ connect( m_pDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotParameterDown() ) );
- connect(m_pParmsLB, SIGNAL(clicked(QListBoxItem*)),
- this, SLOT(slotParamsBoxClicked(QListBoxItem*)));
+ connect(m_pParmsLB, TQT_SIGNAL(clicked(TQListBoxItem*)),
+ this, TQT_SLOT(slotParamsBoxClicked(TQListBoxItem*)));
- connect(m_pParmsLB, SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),
- this, SLOT(slotParmRightButtonPressed(QListBoxItem *, const QPoint &)));
+ connect(m_pParmsLB, TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotParmRightButtonPressed(TQListBoxItem *, const TQPoint &)));
- connect(m_pParmsLB, SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),
- this, SLOT(slotParmRightButtonClicked(QListBoxItem *, const QPoint &)));
+ connect(m_pParmsLB, TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),
+ this, TQT_SLOT(slotParmRightButtonClicked(TQListBoxItem *, const TQPoint &)));
- connect(m_pParmsLB, SIGNAL(doubleClicked(QListBoxItem *)),
- this, SLOT(slotParmDoubleClick(QListBoxItem *)));
+ connect(m_pParmsLB, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),
+ this, TQT_SLOT(slotParmDoubleClick(TQListBoxItem *)));
m_pNameLE->setFocus();
- connect( m_pNameLE, SIGNAL( textChanged ( const QString & ) ), SLOT( slotNameChanged( const QString & ) ) );
+ connect( m_pNameLE, TQT_SIGNAL( textChanged ( const TQString & ) ), TQT_SLOT( slotNameChanged( const TQString & ) ) );
slotNameChanged(m_pNameLE->text() );
}
-void UMLOperationDialog::slotNameChanged( const QString &_text )
+void UMLOperationDialog::slotNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
-void UMLOperationDialog::slotParmRightButtonPressed(QListBoxItem *item, const QPoint &p) {
+void UMLOperationDialog::slotParmRightButtonPressed(TQListBoxItem *item, const TQPoint &p) {
ListPopupMenu::Menu_Type type = ListPopupMenu::mt_Undefined;
if(item)//pressed on an item
{
@@ -271,26 +271,26 @@ void UMLOperationDialog::slotParmRightButtonPressed(QListBoxItem *item, const QP
}
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(p);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
}
-void UMLOperationDialog::slotParmRightButtonClicked(QListBoxItem */*item*/, const QPoint &/*p*/) {
+void UMLOperationDialog::slotParmRightButtonClicked(TQListBoxItem */*item*/, const TQPoint &/*p*/) {
if(m_pMenu) {
m_pMenu -> hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotParmPopupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotParmPopupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-void UMLOperationDialog::slotParmDoubleClick(QListBoxItem *item) {
+void UMLOperationDialog::slotParmDoubleClick(TQListBoxItem *item) {
if(!item)
return;
slotParmPopupMenuSel(ListPopupMenu::mt_Properties);
@@ -311,12 +311,12 @@ void UMLOperationDialog::slotNewParameter() {
int result = 0;
UMLAttribute* pAtt = 0;
- QString currentName = m_pOperation->getUniqueParameterName();
+ TQString currentName = m_pOperation->getUniqueParameterName();
UMLAttribute* newAttribute = new UMLAttribute(m_pOperation, currentName, Uml::id_Reserved);
ParmPropDlg dlg(this, m_doc, newAttribute);
result = dlg.exec();
- QString name = dlg.getName();
+ TQString name = dlg.getName();
pAtt = m_pOperation -> findParm( name );
if( result ) {
if( name.length() == 0 ) {
@@ -369,7 +369,7 @@ void UMLOperationDialog::slotParameterProperties() {
}//should never occur
ParmPropDlg dlg(this, m_doc, pOldAtt);
result = dlg.exec();
- QString name = dlg.getName();
+ TQString name = dlg.getName();
pAtt = m_pOperation->findParm( name );
if( result ) {
if( name.length() == 0 ) {
@@ -381,7 +381,7 @@ void UMLOperationDialog::slotParameterProperties() {
pOldAtt->getDoc() != dlg.getDoc() ||
pOldAtt->getInitialValue() != dlg.getInitialValue() ) {
pOldAtt->setName( name );
- QString typeName = dlg.getTypeName();
+ TQString typeName = dlg.getTypeName();
if (pOldAtt->getTypeName() != typeName) {
UMLClassifierList namesList( m_doc->getConcepts() );
UMLClassifier* obj = NULL;
@@ -415,7 +415,7 @@ void UMLOperationDialog::slotParameterUp()
UMLAttribute* pOldAtt = m_pOperation->findParm( m_pParmsLB->currentText() );
m_pOperation->moveParmLeft( pOldAtt );
- QString tmp = m_pParmsLB->currentText();
+ TQString tmp = m_pParmsLB->currentText();
m_pParmsLB->changeItem( m_pParmsLB->item( m_pParmsLB->currentItem() - 1 )->text(), m_pParmsLB->currentItem() );
m_pParmsLB->changeItem( tmp, m_pParmsLB->currentItem() - 1 );
m_doc->setModified(true);
@@ -427,7 +427,7 @@ void UMLOperationDialog::slotParameterDown()
UMLAttribute* pOldAtt = m_pOperation->findParm( m_pParmsLB->currentText() );
m_pOperation->moveParmRight( pOldAtt );
- QString tmp = m_pParmsLB->currentText();
+ TQString tmp = m_pParmsLB->currentText();
m_pParmsLB->changeItem( m_pParmsLB->item( m_pParmsLB->currentItem() + 1 )->text(), m_pParmsLB->currentItem() );
m_pParmsLB->changeItem( tmp, m_pParmsLB->currentItem() + 1 );
@@ -435,7 +435,7 @@ void UMLOperationDialog::slotParameterDown()
slotParamsBoxClicked( m_pParmsLB->selectedItem() );
}
-void UMLOperationDialog::slotParamsBoxClicked(QListBoxItem* parameterItem) {
+void UMLOperationDialog::slotParamsBoxClicked(TQListBoxItem* parameterItem) {
if (parameterItem) {
m_pDeleteButton->setEnabled(true);
m_pPropertiesButton->setEnabled(true);
@@ -451,7 +451,7 @@ void UMLOperationDialog::slotParamsBoxClicked(QListBoxItem* parameterItem) {
bool UMLOperationDialog::apply()
{
- QString name = m_pNameLE -> text();
+ TQString name = m_pNameLE -> text();
if( name.length() == 0 ) {
KMessageBox::error(this, i18n("You have entered an invalid operation name."),
i18n("Operation Name Invalid"), false);
@@ -463,9 +463,9 @@ bool UMLOperationDialog::apply()
if( classifier != 0L &&
classifier->checkOperationSignature(name, m_pOperation->getParmList(), m_pOperation) )
{
- QString msg = QString(i18n("An operation with that signature already exists in %1.\n")).arg(classifier->getName())
+ TQString msg = TQString(i18n("An operation with that signature already exists in %1.\n")).arg(classifier->getName())
+
- QString(i18n("Choose a different name or parameter list." ));
+ TQString(i18n("Choose a different name or parameter list." ));
KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
return false;
}
@@ -480,7 +480,7 @@ bool UMLOperationDialog::apply()
else if (m_pImplementationRB -> isChecked() )
m_pOperation -> setVisibility( Uml::Visibility::Implementation );
- QString typeName = m_pRtypeCB->currentText();
+ TQString typeName = m_pRtypeCB->currentText();
UMLTemplate *tmplParam = classifier->findTemplate(typeName);
if (tmplParam)
m_pOperation->setType(tmplParam);
@@ -515,13 +515,13 @@ void UMLOperationDialog::slotOk() {
}
}
-void UMLOperationDialog::insertType( const QString& type, int index )
+void UMLOperationDialog::insertType( const TQString& type, int index )
{
m_pRtypeCB->insertItem( type, index );
m_pRtypeCB->completionObject()->addItem( type );
}
-void UMLOperationDialog::insertStereotype( const QString& type, int index )
+void UMLOperationDialog::insertStereotype( const TQString& type, int index )
{
m_pStereoTypeCB->insertItem( type, index );
m_pStereoTypeCB->completionObject()->addItem( type );
diff --git a/umbrello/umbrello/dialogs/umloperationdialog.h b/umbrello/umbrello/dialogs/umloperationdialog.h
index 1dee99ab..5d6d8ef9 100644
--- a/umbrello/umbrello/dialogs/umloperationdialog.h
+++ b/umbrello/umbrello/dialogs/umloperationdialog.h
@@ -42,7 +42,7 @@ public:
/**
* Constructor
*/
- UMLOperationDialog( QWidget * parent, UMLOperation * pOperation );
+ UMLOperationDialog( TQWidget * parent, UMLOperation * pOperation );
/**
* Deconstructor
@@ -64,7 +64,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
/**
* The operation to represent.
@@ -84,28 +84,28 @@ protected:
/**
* Inserts @p stereotype into the stereotype-combobox as well as its completion object.
*/
- void insertStereotype( const QString& type, int index = -1 );
+ void insertStereotype( const TQString& type, int index = -1 );
//GUI widgets
- QGroupBox * m_pParmsGB, * m_pGenGB;
- QListBox * m_pParmsLB;
- QButtonGroup * m_pScopeBG;
- QRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, *m_pImplementationRB;
- QLabel * m_pRtypeL, * m_pNameL, * m_pStereoTypeL;
+ TQGroupBox * m_pParmsGB, * m_pGenGB;
+ TQListBox * m_pParmsLB;
+ TQButtonGroup * m_pScopeBG;
+ TQRadioButton * m_pPublicRB, * m_pPrivateRB, * m_pProtectedRB, *m_pImplementationRB;
+ TQLabel * m_pRtypeL, * m_pNameL, * m_pStereoTypeL;
KComboBox * m_pRtypeCB, * m_pStereoTypeCB;
- QLineEdit * m_pNameLE;
- QCheckBox * m_pAbstractCB;
- QCheckBox * m_pStaticCB;
- QCheckBox * m_pQueryCB;
- QPushButton* m_pDeleteButton;
- QPushButton* m_pPropertiesButton;
+ TQLineEdit * m_pNameLE;
+ TQCheckBox * m_pAbstractCB;
+ TQCheckBox * m_pStaticCB;
+ TQCheckBox * m_pQueryCB;
+ TQPushButton* m_pDeleteButton;
+ TQPushButton* m_pPropertiesButton;
KArrowButton* m_pUpButton;
KArrowButton* m_pDownButton;
public slots:
- void slotParmRightButtonPressed(QListBoxItem *item, const QPoint &p);
- void slotParmRightButtonClicked(QListBoxItem *item, const QPoint &p);
- void slotParmDoubleClick(QListBoxItem *item);
+ void slotParmRightButtonPressed(TQListBoxItem *item, const TQPoint &p);
+ void slotParmRightButtonClicked(TQListBoxItem *item, const TQPoint &p);
+ void slotParmDoubleClick(TQListBoxItem *item);
void slotParmPopupMenuSel(int id);
void slotNewParameter();
void slotDeleteParameter();
@@ -116,7 +116,7 @@ public slots:
/**
* enables or disables buttons
*/
- void slotParamsBoxClicked(QListBoxItem* parameterItem);
+ void slotParamsBoxClicked(TQListBoxItem* parameterItem);
/**
* I don't think this is used, but if we had an apply button
@@ -128,7 +128,7 @@ public slots:
* Used when the OK button is clicked. Calls apply()
*/
void slotOk();
- void slotNameChanged( const QString & );
+ void slotNameChanged( const TQString & );
};
diff --git a/umbrello/umbrello/dialogs/umlroledialog.cpp b/umbrello/umbrello/dialogs/umlroledialog.cpp
index 91ad5c65..255f4010 100644
--- a/umbrello/umbrello/dialogs/umlroledialog.cpp
+++ b/umbrello/umbrello/dialogs/umlroledialog.cpp
@@ -13,7 +13,7 @@
#include "umlroledialog.h"
// qt/kde includes
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -21,7 +21,7 @@
#include "../umlrole.h"
#include "umlroleproperties.h"
-UMLRoleDialog::UMLRoleDialog( QWidget * parent, UMLRole * pRole )
+UMLRoleDialog::UMLRoleDialog( TQWidget * parent, UMLRole * pRole )
: KDialogBase( Plain, i18n("Role Properties"), Help | Ok | Cancel , Ok, parent, "_UMLROLEDLG_", true, true)
{
m_pRole = pRole;
@@ -31,11 +31,11 @@ UMLRoleDialog::UMLRoleDialog( QWidget * parent, UMLRole * pRole )
UMLRoleDialog::~UMLRoleDialog() {}
void UMLRoleDialog::setupDialog() {
- // UMLRoleDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "UMLRoleLayout");
+ // UMLRoleDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "UMLRoleLayout");
m_pRoleProps = new UMLRoleProperties(this, m_pRole);
setMainWidget( m_pRoleProps );
- resize( QSize(425, 620).expandedTo(minimumSizeHint()) );
+ resize( TQSize(425, 620).expandedTo(minimumSizeHint()) );
// topLayout -> addWidget( m_pParmsGB);
diff --git a/umbrello/umbrello/dialogs/umlroledialog.h b/umbrello/umbrello/dialogs/umlroledialog.h
index 09856d34..9f1ab218 100644
--- a/umbrello/umbrello/dialogs/umlroledialog.h
+++ b/umbrello/umbrello/dialogs/umlroledialog.h
@@ -29,7 +29,7 @@ public:
/**
* Constructor
*/
- UMLRoleDialog( QWidget * parent, UMLRole * pRole );
+ UMLRoleDialog( TQWidget * parent, UMLRole * pRole );
/**
* Deconstructor
diff --git a/umbrello/umbrello/dialogs/umlroleproperties.cpp b/umbrello/umbrello/dialogs/umlroleproperties.cpp
index 275d98f1..fe2e2f5f 100644
--- a/umbrello/umbrello/dialogs/umlroleproperties.cpp
+++ b/umbrello/umbrello/dialogs/umlroleproperties.cpp
@@ -13,15 +13,15 @@
#include "umlroleproperties.h"
// qt/kde includes
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kdebug.h>
-UMLRoleProperties::UMLRoleProperties ( QWidget *parent, UMLRole *role)
+UMLRoleProperties::UMLRoleProperties ( TQWidget *parent, UMLRole *role)
: UMLRolePropertiesBase (parent)
{
@@ -66,7 +66,7 @@ void UMLRoleProperties::constructWidget() {
// Documentation
//
m_pDocTE-> setText(m_pRole-> getDoc());
- //m_pDocTE->setWordWrap(QMultiLineEdit::WidgetWidth);
+ //m_pDocTE->setWordWrap(TQMultiLineEdit::WidgetWidth);
}
void UMLRoleProperties::updateObject() {
diff --git a/umbrello/umbrello/dialogs/umlroleproperties.h b/umbrello/umbrello/dialogs/umlroleproperties.h
index 34f7d3e9..61b7b8fe 100644
--- a/umbrello/umbrello/dialogs/umlroleproperties.h
+++ b/umbrello/umbrello/dialogs/umlroleproperties.h
@@ -32,7 +32,7 @@ public:
* @param parent The parent widget to the UMLRoleProperties.
* @param role The UMLRole to display the properties of.
*/
- UMLRoleProperties( QWidget *parent, UMLRole *role);
+ UMLRoleProperties( TQWidget *parent, UMLRole *role);
/**
* Standard deconstructor.
diff --git a/umbrello/umbrello/dialogs/umltemplatedialog.cpp b/umbrello/umbrello/dialogs/umltemplatedialog.cpp
index a183d95d..6075fbe4 100644
--- a/umbrello/umbrello/dialogs/umltemplatedialog.cpp
+++ b/umbrello/umbrello/dialogs/umltemplatedialog.cpp
@@ -13,11 +13,11 @@
#include "umltemplatedialog.h"
// qt includes
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
// kde includes
#include <kcombobox.h>
@@ -32,7 +32,7 @@
#include "../uml.h"
#include "../dialog_utils.h"
-UMLTemplateDialog::UMLTemplateDialog(QWidget* pParent, UMLTemplate* pTemplate)
+UMLTemplateDialog::UMLTemplateDialog(TQWidget* pParent, UMLTemplate* pTemplate)
: KDialogBase( Plain, i18n("Template Properties"), Help | Ok | Cancel , Ok, pParent, "_UMLTemplateDLG_", true, true) {
m_pTemplate = pTemplate;
setupDialog();
@@ -43,14 +43,14 @@ UMLTemplateDialog::~UMLTemplateDialog() {}
void UMLTemplateDialog::setupDialog() {
int margin = fontMetrics().height();
- QVBoxLayout* mainLayout = new QVBoxLayout( plainPage() );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( plainPage() );
- m_pValuesGB = new QGroupBox(i18n("General Properties"), plainPage() );
- QGridLayout* valuesLayout = new QGridLayout(m_pValuesGB, 3, 2);
+ m_pValuesGB = new TQGroupBox(i18n("General Properties"), plainPage() );
+ TQGridLayout* valuesLayout = new TQGridLayout(m_pValuesGB, 3, 2);
valuesLayout->setMargin(margin);
valuesLayout->setSpacing(10);
- m_pTypeL = new QLabel(i18n("&Type:"), m_pValuesGB);
+ m_pTypeL = new TQLabel(i18n("&Type:"), m_pValuesGB);
valuesLayout->addWidget(m_pTypeL, 0, 0);
m_pTypeCB = new KComboBox(m_pValuesGB);
@@ -86,7 +86,7 @@ void UMLTemplateDialog::setupDialog() {
int typeBoxCount = 0;
bool foundType = false;
while (typeBoxCount < m_pTypeCB->count() && foundType == false) {
- QString typeBoxString = m_pTypeCB->text(typeBoxCount);
+ TQString typeBoxString = m_pTypeCB->text(typeBoxCount);
if ( typeBoxString == m_pTemplate->getTypeName() ) {
foundType = true;
m_pTypeCB->setCurrentItem(typeBoxCount);
@@ -103,14 +103,14 @@ void UMLTemplateDialog::setupDialog() {
m_pNameLE->setFocus();
}
-void UMLTemplateDialog::insertType( const QString& type, int index )
+void UMLTemplateDialog::insertType( const TQString& type, int index )
{
m_pTypeCB->insertItem( type, index );
m_pTypeCB->completionObject()->addItem( type );
}
bool UMLTemplateDialog::apply() {
- QString typeName = m_pTypeCB->currentText();
+ TQString typeName = m_pTypeCB->currentText();
UMLDoc *pDoc = UMLApp::app()->getDocument();
UMLClassifierList namesList( pDoc->getConcepts() );
UMLClassifier* obj = 0;
@@ -123,7 +123,7 @@ bool UMLTemplateDialog::apply() {
// FIXME: This implementation is not good yet.
m_pTemplate->setTypeName( typeName );
}
- QString name = m_pNameLE->text();
+ TQString name = m_pNameLE->text();
if( name.length() == 0 ) {
KMessageBox::error(this, i18n("You have entered an invalid template name."),
i18n("Template Name Invalid"), false);
diff --git a/umbrello/umbrello/dialogs/umltemplatedialog.h b/umbrello/umbrello/dialogs/umltemplatedialog.h
index 3bdd321b..4ed1d584 100644
--- a/umbrello/umbrello/dialogs/umltemplatedialog.h
+++ b/umbrello/umbrello/dialogs/umltemplatedialog.h
@@ -32,7 +32,7 @@ class UMLTemplate;
class UMLTemplateDialog : public KDialogBase {
Q_OBJECT
public:
- UMLTemplateDialog(QWidget* pParent, UMLTemplate* pAttribute);
+ UMLTemplateDialog(TQWidget* pParent, UMLTemplate* pAttribute);
~UMLTemplateDialog();
protected:
@@ -53,11 +53,11 @@ protected:
UMLTemplate* m_pTemplate;
//GUI Widgets
- QGroupBox* m_pTemplateGB;
- QGroupBox* m_pValuesGB;
- QLabel *m_pTypeL, *m_pNameL, *m_pStereoTypeL;
+ TQGroupBox* m_pTemplateGB;
+ TQGroupBox* m_pValuesGB;
+ TQLabel *m_pTypeL, *m_pNameL, *m_pStereoTypeL;
KComboBox* m_pTypeCB;
- QLineEdit *m_pNameLE, *m_pStereoTypeLE;
+ TQLineEdit *m_pNameLE, *m_pStereoTypeLE;
public slots:
/**
@@ -74,7 +74,7 @@ protected:
/**
* Inserts @p type into the type-combobox as well as its completion object.
*/
- void insertType( const QString& type, int index = -1 );
+ void insertType( const TQString& type, int index = -1 );
};
diff --git a/umbrello/umbrello/dialogs/umlviewdialog.cpp b/umbrello/umbrello/dialogs/umlviewdialog.cpp
index 94f44059..76ef776d 100644
--- a/umbrello/umbrello/dialogs/umlviewdialog.cpp
+++ b/umbrello/umbrello/dialogs/umlviewdialog.cpp
@@ -13,14 +13,14 @@
#include "umlviewdialog.h"
// qt/kde includes
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qgroupbox.h>
-#include <qtextedit.h>
-#include <qspinbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqgroupbox.h>
+#include <tqtextedit.h>
+#include <tqspinbox.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,7 +35,7 @@
#include "diagrampropertiespage.h"
-UMLViewDialog::UMLViewDialog( QWidget * pParent, UMLView * pView ) : KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
+UMLViewDialog::UMLViewDialog( TQWidget * pParent, UMLView * pView ) : KDialogBase(IconList, i18n("Properties"), Ok | Apply | Cancel | Help,
Ok, pParent, "_VIEWDLG_", true, true) {
m_pView = pView;
m_options = m_pView -> getOptionState();
@@ -67,7 +67,7 @@ void UMLViewDialog::setupPages()
void UMLViewDialog::setupDiagramPropertiesPage()
{
- QVBox *page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
+ TQVBox *page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
m_diagramProperties = new DiagramPropertiesPage(page);
m_diagramProperties->diagramName->setText( m_pView->getName() );
@@ -90,22 +90,22 @@ void UMLViewDialog::setupClassPage() {
return;
}
- QFrame * newPage = addPage( i18n("Display"), i18n("Classes Display Options"), DesktopIcon( "info") );
- QHBoxLayout * m_pOptionsLayout = new QHBoxLayout( newPage );
+ TQFrame * newPage = addPage( i18n("Display"), i18n("Classes Display Options"), DesktopIcon( "info") );
+ TQHBoxLayout * m_pOptionsLayout = new TQHBoxLayout( newPage );
m_pOptionsPage = new ClassOptionsPage( newPage, &m_options );
m_pOptionsLayout -> addWidget( m_pOptionsPage );
}
void UMLViewDialog::setupColorPage() {
- QFrame * colorPage = addPage( i18n("Color"), i18n("Diagram Colors"), DesktopIcon( "colors") );
- QHBoxLayout * m_pColorLayout = new QHBoxLayout(colorPage);
+ TQFrame * colorPage = addPage( i18n("Color"), i18n("Diagram Colors"), DesktopIcon( "colors") );
+ TQHBoxLayout * m_pColorLayout = new TQHBoxLayout(colorPage);
m_pColorPage = new UMLWidgetColorPage( colorPage, &m_options );
m_pColorLayout -> addWidget(m_pColorPage);
}
void UMLViewDialog::setupFontPage() {
- QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
- m_pChooser = new KFontChooser( (QWidget*)page, "font", false, QStringList(), false);
+ TQVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
+ m_pChooser = new KFontChooser( (TQWidget*)page, "font", false, TQStringList(), false);
m_pChooser -> setFont( m_pView -> getOptionState().uiState.font );
}
@@ -157,7 +157,7 @@ void UMLViewDialog::applyPage( Page page ) {
}
void UMLViewDialog::checkName() {
- QString name = m_diagramProperties->diagramName-> text();
+ TQString name = m_diagramProperties->diagramName-> text();
UMLDoc * pDoc = UMLApp::app()-> getDocument();
UMLView * pView = pDoc -> findView( m_pView -> getType(), name );
if( name.length() == 0 ) {
diff --git a/umbrello/umbrello/dialogs/umlviewdialog.h b/umbrello/umbrello/dialogs/umlviewdialog.h
index b6fe4ebd..1a72c076 100644
--- a/umbrello/umbrello/dialogs/umlviewdialog.h
+++ b/umbrello/umbrello/dialogs/umlviewdialog.h
@@ -41,7 +41,7 @@ public:
/**
* Constructor
*/
- UMLViewDialog( QWidget * pParent, UMLView * pView );
+ UMLViewDialog( TQWidget * pParent, UMLView * pView );
/**
* Deconstructor
@@ -104,13 +104,13 @@ protected:
UMLWidgetColorPage * m_pColorPage;
//GUI widgets
- QLabel * m_pNameL, * m_pSpinXL, * m_pSpinYL;
- QLineEdit * m_pNameLE;
- QGroupBox * m_pDocGB, * m_pValuesGB;
- QCheckBox * m_pSnapToGridCB, * m_pShowSnapCB;
- QTextEdit * m_pDocTE;
- QSpinBox * m_pSnapXSB, * m_pSnapYSB;
- QSpinBox * m_pLineWidthSB;
+ TQLabel * m_pNameL, * m_pSpinXL, * m_pSpinYL;
+ TQLineEdit * m_pNameLE;
+ TQGroupBox * m_pDocGB, * m_pValuesGB;
+ TQCheckBox * m_pSnapToGridCB, * m_pShowSnapCB;
+ TQTextEdit * m_pDocTE;
+ TQSpinBox * m_pSnapXSB, * m_pSnapYSB;
+ TQSpinBox * m_pLineWidthSB;
public slots:
void slotOk();
void slotApply();
diff --git a/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp b/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
index e234a8c2..824d708f 100644
--- a/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
+++ b/umbrello/umbrello/dialogs/umlwidgetcolorpage.cpp
@@ -14,15 +14,15 @@
#include "../umlview.h"
#include "../umlwidget.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <kcolorbutton.h>
-UMLWidgetColorPage::UMLWidgetColorPage( QWidget *pParent, UMLWidget *pWidget ) : QWidget( pParent )
+UMLWidgetColorPage::UMLWidgetColorPage( TQWidget *pParent, UMLWidget *pWidget ) : TQWidget( pParent )
{
m_pUMLWidget = pWidget;
m_options = 0;
@@ -32,7 +32,7 @@ UMLWidgetColorPage::UMLWidgetColorPage( QWidget *pParent, UMLWidget *pWidget ) :
m_pUseFillColorCB->setChecked( pWidget -> getUseFillColour() );
}
-UMLWidgetColorPage::UMLWidgetColorPage( QWidget * pParent, Settings::OptionState *options ) : QWidget( pParent )
+UMLWidgetColorPage::UMLWidgetColorPage( TQWidget * pParent, Settings::OptionState *options ) : TQWidget( pParent )
{
m_options = options;
m_pUMLWidget = 0;
@@ -47,41 +47,41 @@ void UMLWidgetColorPage::init()
int margin = fontMetrics().height();
//setup GUI
- QVBoxLayout * topLayout = new QVBoxLayout( this );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( this );
topLayout -> setSpacing( 6 );
- m_pColorGB = new QGroupBox( i18n( "Color" ), this );
+ m_pColorGB = new TQGroupBox( i18n( "Color" ), this );
topLayout -> addWidget( m_pColorGB );
- QGridLayout * colorLayout = new QGridLayout( m_pColorGB, 3, 3 );
+ TQGridLayout * colorLayout = new TQGridLayout( m_pColorGB, 3, 3 );
colorLayout -> setMargin( margin );
- m_pLineColorL = new QLabel( i18n( "&Line:" ), m_pColorGB );
+ m_pLineColorL = new TQLabel( i18n( "&Line:" ), m_pColorGB );
colorLayout -> addWidget( m_pLineColorL, 0, 0 );
m_pLineColorB = new KColorButton( m_pColorGB );
colorLayout -> addWidget( m_pLineColorB, 0, 1 );
m_pLineColorL->setBuddy(m_pLineColorB);
- m_pLineDefaultB = new QPushButton( i18n( "&Default" ), m_pColorGB) ;
+ m_pLineDefaultB = new TQPushButton( i18n( "&Default" ), m_pColorGB) ;
colorLayout -> addWidget( m_pLineDefaultB, 0, 2 );
- m_pFillColorL = new QLabel( i18n( "&Fill:" ), m_pColorGB );
+ m_pFillColorL = new TQLabel( i18n( "&Fill:" ), m_pColorGB );
colorLayout -> addWidget( m_pFillColorL, 1, 0 );
m_pFillColorB = new KColorButton( m_pColorGB );
colorLayout -> addWidget( m_pFillColorB, 1, 1 );
m_pFillColorL->setBuddy(m_pFillColorB);
- m_pFillDefaultB = new QPushButton( i18n( "D&efault" ), m_pColorGB );
+ m_pFillDefaultB = new TQPushButton( i18n( "D&efault" ), m_pColorGB );
colorLayout -> addWidget( m_pFillDefaultB, 1, 2 );
- m_pUseFillColorCB = new QCheckBox( i18n( "&Use fill" ), m_pColorGB );
+ m_pUseFillColorCB = new TQCheckBox( i18n( "&Use fill" ), m_pColorGB );
colorLayout -> setRowStretch( 2, 2 );
colorLayout -> addWidget( m_pUseFillColorCB, 2, 0 );
//connect button signals up
- connect( m_pLineDefaultB, SIGNAL( clicked() ), this, SLOT( slotLineButtonClicked() )) ;
- connect( m_pFillDefaultB, SIGNAL( clicked() ), this, SLOT( slotFillButtonClicked() ) );
+ connect( m_pLineDefaultB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotLineButtonClicked() )) ;
+ connect( m_pFillDefaultB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFillButtonClicked() ) );
}
UMLWidgetColorPage::~UMLWidgetColorPage() {}
diff --git a/umbrello/umbrello/dialogs/umlwidgetcolorpage.h b/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
index 45826338..419868da 100644
--- a/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
+++ b/umbrello/umbrello/dialogs/umlwidgetcolorpage.h
@@ -12,7 +12,7 @@
#ifndef UMLWIDGETCOLORPAGE_H
#define UMLWIDGETCOLORPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "../optionstate.h"
/**
@@ -27,19 +27,19 @@ class QPushButton;
class QCheckBox;
class QGroupBox;
-class UMLWidgetColorPage : public QWidget {
+class UMLWidgetColorPage : public TQWidget {
Q_OBJECT
public:
/**
* Constructor - Observe a UMLWidget
*/
- UMLWidgetColorPage( QWidget * pParent, UMLWidget * pWidget );
+ UMLWidgetColorPage( TQWidget * pParent, UMLWidget * pWidget );
/**
* Constructor - Observe an OptionState structure
*/
- UMLWidgetColorPage( QWidget * pParent, Settings::OptionState *options );
+ UMLWidgetColorPage( TQWidget * pParent, Settings::OptionState *options );
/**
* destructor
@@ -73,10 +73,10 @@ protected:
Settings::OptionState *m_options;
//GUI widgets
- QGroupBox * m_pColorGB;
- QLabel * m_pLineColorL, * m_pFillColorL;
- QCheckBox * m_pUseFillColorCB;
- QPushButton * m_pLineDefaultB, * m_pFillDefaultB;
+ TQGroupBox * m_pColorGB;
+ TQLabel * m_pLineColorL, * m_pFillColorL;
+ TQCheckBox * m_pUseFillColorCB;
+ TQPushButton * m_pLineDefaultB, * m_pFillDefaultB;
KColorButton * m_pLineColorB, * m_pFillColorB;
private:
void init();
diff --git a/umbrello/umbrello/docgenerators/docbookgenerator.cpp b/umbrello/umbrello/docgenerators/docbookgenerator.cpp
index 9907d6f9..87a84d14 100644
--- a/umbrello/umbrello/docgenerators/docbookgenerator.cpp
+++ b/umbrello/umbrello/docgenerators/docbookgenerator.cpp
@@ -31,9 +31,9 @@
#include <kmessagebox.h>
#include <kio/job.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "uml.h"
#include "umldoc.h"
@@ -53,8 +53,8 @@ bool DocbookGenerator::generateDocbookForProject()
UMLApp *app = UMLApp::app();
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),"");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
generateDocbookForProjectInto(url);
@@ -68,7 +68,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
// export all views
umlDoc->writeToStatusBar(i18n("Exporting all views..."));
- QStringList errors = UMLViewImageExporterModel().exportAllViews(
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(
UMLViewImageExporterModel::mimeTypeToImageType("image/png"),
destDir, false);
if (!errors.empty())
@@ -76,8 +76,8 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
#if KDE_IS_VERSION(3,4,0)
KMessageBox::errorList(app, i18n("Some errors happened when exporting the images:"), errors);
#else
- QString errorsCaption;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ TQString errorsCaption;
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
errorsCaption += "\n" + *it;
}
KMessageBox::error(app, i18n("Some errors happened when exporting the images:") + errorsCaption);
@@ -86,12 +86,12 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
}
//write the XMI model in an in-memory char* string
- QString xmi;
- QTextOStream xmiStream(&xmi);
+ TQString xmi;
+ TQTextOStream xmiStream(&xmi);
KTempFile tmpfile; // we need this tmp file if we are writing to a remote file
- QFile file;
+ TQFile file;
file.setName( tmpfile.name() );
// lets open the file for writing
@@ -110,7 +110,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
int nbparams = 0;
params[nbparams] = NULL;
- QString xsltFile(KGlobal::dirs()->findResource("appdata","xmi2docbook.xsl"));
+ TQString xsltFile(KGlobal::dirs()->findResource("appdata","xmi2docbook.xsl"));
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
@@ -130,8 +130,8 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir)
xmlCleanupParser();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),".docbook");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),".docbook");
url.setPath(destDir.path());
url.addPath(fileName);
kDebug() << "Copying result to: " << url << endl;
diff --git a/umbrello/umbrello/docgenerators/docbookgenerator.h b/umbrello/umbrello/docgenerators/docbookgenerator.h
index 775a7383..24851380 100644
--- a/umbrello/umbrello/docgenerators/docbookgenerator.h
+++ b/umbrello/umbrello/docgenerators/docbookgenerator.h
@@ -19,7 +19,7 @@
#define DOCBOOKGENERATOR_H
#include <kurl.h>
-#include <qobject.h>
+#include <tqobject.h>
class UMLDoc;
diff --git a/umbrello/umbrello/docgenerators/main.cpp b/umbrello/umbrello/docgenerators/main.cpp
index d4b6fc4e..ea994daf 100644
--- a/umbrello/umbrello/docgenerators/main.cpp
+++ b/umbrello/umbrello/docgenerators/main.cpp
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
QCStringList xsltOpt = args->getOptionList("xslt");
if (xsltOpt.size() > 0)
{
- QString xsltFile(xsltOpt.last());
+ TQString xsltFile(xsltOpt.last());
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
diff --git a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
index 5da1ae75..a0555188 100644
--- a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
+++ b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp
@@ -31,9 +31,9 @@
#include <kmessagebox.h>
#include <kio/job.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
#include "uml.h"
#include "umldoc.h"
@@ -54,8 +54,8 @@ bool XhtmlGenerator::generateXhtmlForProject()
UMLApp *app = UMLApp::app();
UMLDoc* umlDoc = app->getDocument();
KURL url = umlDoc->URL();
- QString fileName = url.fileName();
- fileName.replace(QRegExp(".xmi$"),"");
+ TQString fileName = url.fileName();
+ fileName.replace(TQRegExp(".xmi$"),"");
url.setFileName(fileName);
kDebug() << "Exporting to directory: " << url << endl;
return generateXhtmlForProjectInto(url);
@@ -65,14 +65,14 @@ bool XhtmlGenerator::generateXhtmlForProjectInto(const KURL& destDir)
{
kDebug() << "First convert to docbook" << endl;
m_destDir = destDir;
-// KURL url(QString("file://")+m_tmpDir.name());
+// KURL url(TQString("file://")+m_tmpDir.name());
KIO::Job* docbookJob = DocbookGenerator().generateDocbookForProjectInto(destDir);
if (docbookJob == 0)
{
return false;
}
kDebug() << "Connecting..." << endl;
- connect(docbookJob, SIGNAL(result( KIO::Job * )), this, SLOT(slotDocbookToXhtml( KIO::Job *)));
+ connect(docbookJob, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotDocbookToXhtml( KIO::Job *)));
return true;
}
@@ -89,9 +89,9 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
UMLDoc* umlDoc = app->getDocument();
const KURL& url = umlDoc->URL();
- QString docbookName = url.fileName();
- docbookName.replace(QRegExp(".xmi$"),".docbook");
-// KURL docbookUrl(QString("file://")+m_tmpDir.name());
+ TQString docbookName = url.fileName();
+ docbookName.replace(TQRegExp(".xmi$"),".docbook");
+// KURL docbookUrl(TQString("file://")+m_tmpDir.name());
KURL docbookUrl = m_destDir;
docbookUrl.addPath(docbookName);
@@ -102,20 +102,20 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
int nbparams = 0;
params[nbparams] = NULL;
- QString xsltFileName(KGlobal::dirs()->findResource("appdata","docbook2xhtml.xsl"));
+ TQString xsltFileName(KGlobal::dirs()->findResource("appdata","docbook2xhtml.xsl"));
kDebug() << "XSLT file is'"<<xsltFileName<<"'" << endl;
- QFile xsltFile(xsltFileName);
+ TQFile xsltFile(xsltFileName);
xsltFile.open(IO_ReadOnly);
- QString xslt = xsltFile.readAll();
+ TQString xslt = xsltFile.readAll();
kDebug() << "XSLT is'"<<xslt<<"'" << endl;
xsltFile.close();
- QString localXsl = KGlobal::dirs()->findResource("data","ksgmltools2/docbook/xsl/html/docbook.xsl");
+ TQString localXsl = KGlobal::dirs()->findResource("data","ksgmltools2/docbook/xsl/html/docbook.xsl");
kDebug() << "Local xsl is'"<<localXsl<<"'" << endl;
if (!localXsl.isEmpty())
{
- localXsl = QString("href=\"file://") + localXsl + "\"";
- xslt.replace(QRegExp("href=\"http://[^\"]*\""),localXsl);
+ localXsl = TQString("href=\"file://") + localXsl + "\"";
+ xslt.replace(TQRegExp("href=\"http://[^\"]*\""),localXsl);
}
KTempFile tmpXsl;
*tmpXsl.textStream() << xslt;
@@ -144,17 +144,17 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob)
xsltCleanupGlobals();
xmlCleanupParser();
- QString xhtmlName = url.fileName();
- xhtmlName.replace(QRegExp(".xmi$"),".html");
+ TQString xhtmlName = url.fileName();
+ xhtmlName.replace(TQRegExp(".xmi$"),".html");
KURL xhtmlUrl = m_destDir;
xhtmlUrl.addPath(xhtmlName);
kDebug() << "Copying HTML result to: " << xhtmlUrl << endl;
KIO::Job* job = KIO::file_copy(tmpXhtml.file()->name(),xhtmlUrl,-1,true,false,false);
job->setAutoErrorHandlingEnabled(true);
- connect (job, SIGNAL(result( KIO::Job* )), this, SLOT(slotHtmlCopyFinished( KIO::Job* )));
+ connect (job, TQT_SIGNAL(result( KIO::Job* )), this, TQT_SLOT(slotHtmlCopyFinished( KIO::Job* )));
- QString cssFileName(KGlobal::dirs()->findResource("appdata","xmi.css"));
+ TQString cssFileName(KGlobal::dirs()->findResource("appdata","xmi.css"));
kDebug() << "CSS file is'"<<cssFileName<<"'" << endl;
KURL cssUrl = m_destDir;
cssUrl.addPath("xmi.css");
diff --git a/umbrello/umbrello/docgenerators/xhtmlgenerator.h b/umbrello/umbrello/docgenerators/xhtmlgenerator.h
index 46402382..ad5076cf 100644
--- a/umbrello/umbrello/docgenerators/xhtmlgenerator.h
+++ b/umbrello/umbrello/docgenerators/xhtmlgenerator.h
@@ -20,7 +20,7 @@
#include <kurl.h>
#include <ktempdir.h>
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
diff --git a/umbrello/umbrello/docwindow.cpp b/umbrello/umbrello/docwindow.cpp
index d92c13f4..ab935d00 100644
--- a/umbrello/umbrello/docwindow.cpp
+++ b/umbrello/umbrello/docwindow.cpp
@@ -13,9 +13,9 @@
#include "docwindow.h"
// qt/kde includes
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
#include <klocale.h>
// local includes
@@ -26,19 +26,19 @@
#include "umlwidget.h"
-DocWindow::DocWindow( UMLDoc * doc, QWidget *parent, const char *name ) : QWidget( parent, name ) {
+DocWindow::DocWindow( UMLDoc * doc, TQWidget *parent, const char *name ) : TQWidget( parent, name ) {
//setup visual display
- QHBoxLayout * mainLayout = new QHBoxLayout( this );
+ TQHBoxLayout * mainLayout = new TQHBoxLayout( this );
- m_pDocGB = new QGroupBox( i18n( "Documentation" ), this );
+ m_pDocGB = new TQGroupBox( i18n( "Documentation" ), this );
mainLayout -> addWidget( m_pDocGB );
- QHBoxLayout * docLayout = new QHBoxLayout( m_pDocGB );
- m_pDocMLE = new QMultiLineEdit( m_pDocGB );
+ TQHBoxLayout * docLayout = new TQHBoxLayout( m_pDocGB );
+ m_pDocMLE = new TQMultiLineEdit( m_pDocGB );
m_pDocMLE -> setText( "" );
docLayout -> setMargin( fontMetrics().height() );
docLayout -> addWidget( m_pDocMLE);
- m_pDocMLE -> setWordWrap(QMultiLineEdit::WidgetWidth);
+ m_pDocMLE -> setWordWrap(TQMultiLineEdit::WidgetWidth);
//setup the documentation variables
//show projects documentation to start
diff --git a/umbrello/umbrello/docwindow.h b/umbrello/umbrello/docwindow.h
index fb488c5f..2ab3fad0 100644
--- a/umbrello/umbrello/docwindow.h
+++ b/umbrello/umbrello/docwindow.h
@@ -12,7 +12,7 @@
#ifndef DOCWINDOW_H
#define DOCWINDOW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class AssociationWidget;
class QGroupBox;
@@ -27,13 +27,13 @@ class UMLWidget;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class DocWindow : public QWidget {
+class DocWindow : public TQWidget {
Q_OBJECT
public:
/**
* Constructor
*/
- explicit DocWindow( UMLDoc * doc, QWidget *parent = 0, const char *name = 0 );
+ explicit DocWindow( UMLDoc * doc, TQWidget *parent = 0, const char *name = 0 );
/**
* Deconstructor
@@ -160,8 +160,8 @@ private:
Showing_Type m_Showing;
//visual widgets
- QMultiLineEdit * m_pDocMLE;
- QGroupBox * m_pDocGB;
+ TQMultiLineEdit * m_pDocMLE;
+ TQGroupBox * m_pDocGB;
};
diff --git a/umbrello/umbrello/entity.cpp b/umbrello/umbrello/entity.cpp
index b3d842ac..31ef1513 100644
--- a/umbrello/umbrello/entity.cpp
+++ b/umbrello/umbrello/entity.cpp
@@ -23,7 +23,7 @@
#include "clipboard/idchangelog.h"
#include "dialogs/umlentityattributedialog.h"
-UMLEntity::UMLEntity(const QString& name, Uml::IDType id) : UMLClassifier(name, id) {
+UMLEntity::UMLEntity(const TQString& name, Uml::IDType id) : UMLClassifier(name, id) {
init();
}
@@ -52,9 +52,9 @@ void UMLEntity::init() {
m_BaseType = Uml::ot_Entity;
}
-UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObject *type /*=NULL*/) {
+UMLAttribute* UMLEntity::createAttribute(const TQString &name /*=null*/, UMLObject *type /*=NULL*/) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_EntityAttribute);
} else {
@@ -64,15 +64,15 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
Uml::Visibility scope = optionState.classState.defaultAttributeScope;
UMLEntityAttribute* newAttribute = new UMLEntityAttribute(this, currentName, id, scope, type);
- int button = QDialog::Accepted;
+ int button = TQDialog::Accepted;
bool goodName = false;
//check for name.isNull() stops dialog being shown
//when creating attribute via list view
- while (button==QDialog::Accepted && !goodName && name.isNull()) {
+ while (button==TQDialog::Accepted && !goodName && name.isNull()) {
UMLEntityAttributeDialog attributedialog(0, newAttribute);
button = attributedialog.exec();
- QString name = newAttribute->getName();
+ TQString name = newAttribute->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -83,7 +83,7 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
}
}
- if (button != QDialog::Accepted) {
+ if (button != TQDialog::Accepted) {
delete newAttribute;
return NULL;
}
@@ -95,24 +95,24 @@ UMLAttribute* UMLEntity::createAttribute(const QString &name /*=null*/, UMLObjec
return newAttribute;
}
-UMLObject* UMLEntity::addEntityAttribute(const QString& name, Uml::IDType id) {
+UMLObject* UMLEntity::addEntityAttribute(const TQString& name, Uml::IDType id) {
UMLEntityAttribute* literal = new UMLEntityAttribute(this, name, id);
m_List.append(literal);
emit entityAttributeAdded(literal);
UMLObject::emitModified();
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return literal;
}
bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* Log /* = 0*/) {
- QString name = (QString)attribute->getName();
+ TQString name = (TQString)attribute->getName();
if (findChildObject(name) == NULL) {
attribute->parent()->removeChild(attribute);
this->insertChild(attribute);
m_List.append(attribute);
emit entityAttributeAdded(attribute);
UMLObject::emitModified();
- connect(attribute,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID( attribute->getID() );
@@ -122,7 +122,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, IDChangeLog* L
}
bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position) {
- QString name = (QString)attribute->getName();
+ TQString name = (TQString)attribute->getName();
if (findChildObject(name) == NULL) {
attribute->parent()->removeChild(attribute);
this->insertChild(attribute);
@@ -133,7 +133,7 @@ bool UMLEntity::addEntityAttribute(UMLEntityAttribute* attribute, int position)
}
emit entityAttributeAdded(attribute);
UMLObject::emitModified();
- connect(attribute,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(attribute,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
return false;
@@ -147,8 +147,8 @@ int UMLEntity::removeEntityAttribute(UMLClassifierListItem* literal) {
emit entityAttributeRemoved(literal);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete literal;
return m_List.count();
}
@@ -175,8 +175,8 @@ bool UMLEntity::resolveRef() {
return success;
}
-void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement entityElement = UMLObject::save("UML:Entity", qDoc);
+void UMLEntity::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement entityElement = UMLObject::save("UML:Entity", qDoc);
//save operations
UMLClassifierListItemList entityAttributes = getFilteredList(Uml::ot_EntityAttribute);
UMLClassifierListItem* pEntityAttribute = 0;
@@ -187,15 +187,15 @@ void UMLEntity::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(entityElement);
}
-bool UMLEntity::load(QDomElement& element) {
- QDomNode node = element.firstChild();
+bool UMLEntity::load(TQDomElement& element) {
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "EntityAttribute")) { // for backward compatibility
UMLEntityAttribute* pEntityAttribute = new UMLEntityAttribute(this);
if( !pEntityAttribute->loadFromXMI(tempElement) ) {
diff --git a/umbrello/umbrello/entity.h b/umbrello/umbrello/entity.h
index 7a4a2ce9..a207fbd3 100644
--- a/umbrello/umbrello/entity.h
+++ b/umbrello/umbrello/entity.h
@@ -35,7 +35,7 @@ public:
* @param name The name of the Entity.
* @param id The unique id of the Entity.
*/
- explicit UMLEntity(const QString& name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLEntity(const TQString& name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -66,7 +66,7 @@ public:
* @param type An optional type, used by when creating through UMLListView
* @return The UMLEntityAttribute created
*/
- UMLAttribute* createAttribute(const QString &name = QString::null,
+ UMLAttribute* createAttribute(const TQString &name = TQString::null,
UMLObject *type = 0);
/**
@@ -77,7 +77,7 @@ public:
* If omitted a new ID is assigned internally.
* @return Pointer to the UMLEntityAttribute created.
*/
- UMLObject* addEntityAttribute(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject* addEntityAttribute(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created entityAttribute.
@@ -131,7 +131,7 @@ public:
/**
* Creates the <UML:Entity> element including its entityliterals.
*/
- virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ virtual void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
signals:
void entityAttributeAdded(UMLClassifierListItem*);
@@ -141,7 +141,7 @@ protected:
/**
* Loads the <UML:Entity> element including its entityAttributes.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
/**
diff --git a/umbrello/umbrello/entityattribute.cpp b/umbrello/umbrello/entityattribute.cpp
index 8855efcb..b8030fed 100644
--- a/umbrello/umbrello/entityattribute.cpp
+++ b/umbrello/umbrello/entityattribute.cpp
@@ -12,7 +12,7 @@
// own header
#include "entityattribute.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "umlcanvasobject.h"
@@ -21,9 +21,9 @@
#include "dialogs/umlentityattributedialog.h"
#include "object_factory.h"
-UMLEntityAttribute::UMLEntityAttribute( const UMLObject *parent, const QString& name,
+UMLEntityAttribute::UMLEntityAttribute( const UMLObject *parent, const TQString& name,
Uml::IDType id, Uml::Visibility s,
- UMLObject *type, const QString& iv )
+ UMLObject *type, const TQString& iv )
: UMLAttribute(parent, name, id, s, type, iv) {
init();
if (m_pSecondary) {
@@ -44,19 +44,19 @@ void UMLEntityAttribute::init() {
m_null = false;
}
-QString UMLEntityAttribute::getAttributes() const{
+TQString UMLEntityAttribute::getAttributes() const{
return m_attributes;
}
-void UMLEntityAttribute::setAttributes(const QString& attributes) {
+void UMLEntityAttribute::setAttributes(const TQString& attributes) {
m_attributes = attributes;
}
-QString UMLEntityAttribute::getValues() const{
+TQString UMLEntityAttribute::getValues() const{
return m_values;
}
-void UMLEntityAttribute::setValues(const QString& values) {
+void UMLEntityAttribute::setValues(const TQString& values) {
m_values = values;
}
@@ -84,8 +84,8 @@ void UMLEntityAttribute::setNull(const bool nullIn) {
m_null = nullIn;
}
-QString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
- QString s;
+TQString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
+ TQString s;
//FIXME
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig) {
@@ -94,7 +94,7 @@ QString UMLEntityAttribute::toString(Uml::Signature_Type sig) {
s = "";
if(sig == Uml::st_ShowSig || sig == Uml::st_SigNoVis) {
- QString string = s + getName() + " : " + getTypeName();
+ TQString string = s + getName() + " : " + getTypeName();
if(m_InitialValue.length() > 0)
string += " = " + m_InitialValue;
return string;
@@ -138,8 +138,8 @@ UMLObject* UMLEntityAttribute::clone() const
}
-void UMLEntityAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement entityattributeElement = UMLObject::save("UML:EntityAttribute", qDoc);
+void UMLEntityAttribute::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement entityattributeElement = UMLObject::save("UML:EntityAttribute", qDoc);
if (m_pSecondary == NULL) {
kDebug() << "UMLEntityAttribute::saveToXMI(" << m_Name
<< "): m_pSecondary is NULL, using local name "
@@ -157,7 +157,7 @@ void UMLEntityAttribute::saveToXMI( QDomDocument & qDoc, QDomElement & qElement
qElement.appendChild( entityattributeElement );
}
-bool UMLEntityAttribute::load( QDomElement & element ) {
+bool UMLEntityAttribute::load( TQDomElement & element ) {
if (! UMLAttribute::load(element))
return false;
int indexType = element.attribute( "dbindex_type", "1100" ).toInt();
@@ -169,7 +169,7 @@ bool UMLEntityAttribute::load( QDomElement & element ) {
return true;
}
-bool UMLEntityAttribute::showPropertiesDialog(QWidget* parent) {
+bool UMLEntityAttribute::showPropertiesDialog(TQWidget* parent) {
UMLEntityAttributeDialog dialog(parent, this);
return dialog.exec();
}
diff --git a/umbrello/umbrello/entityattribute.h b/umbrello/umbrello/entityattribute.h
index 76af37a7..31b3179c 100644
--- a/umbrello/umbrello/entityattribute.h
+++ b/umbrello/umbrello/entityattribute.h
@@ -37,10 +37,10 @@ public:
* @param type The type of this UMLEntityAttribute.
* @param iv The initial value of the entityattribute.
*/
- UMLEntityAttribute(const UMLObject* parent, const QString& name,
+ UMLEntityAttribute(const UMLObject* parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Private,
- UMLObject *type = 0, const QString& iv = 0);
+ UMLObject *type = 0, const TQString& iv = 0);
/**
* Sets up an entityattribute.
@@ -75,14 +75,14 @@ public:
*
* @return The value of the UMLEntityAttribute's attributes property.
*/
- QString getAttributes() const;
+ TQString getAttributes() const;
/**
* Sets the UMLEntityAttribute's attributes property.
*
* @param attributes The new value for the attributes property.
*/
- void setAttributes(const QString& attributes);
+ void setAttributes(const TQString& attributes);
/**
* Returns the UMLEntityAttribute's index type property.
@@ -103,14 +103,14 @@ public:
*
* @return The UMLEntityAttribute's length/values property.
*/
- QString getValues() const;
+ TQString getValues() const;
/**
* Sets the UMLEntityAttribute's length/values property.
*
* @param values The new value of the length/values property.
*/
- void setValues(const QString& values);
+ void setValues(const TQString& values);
/**
* Returns the UMLEntityAttribute's auto_increment boolean
@@ -147,17 +147,17 @@ public:
* initial value.
* @return Returns a string representation of the UMLEntityAttribute.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Creates the <UML:EntityAttribute> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the entityattribute.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
@@ -169,12 +169,12 @@ protected:
/**
* Loads the <UML:EntityAttribute> XMI element.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
Uml::DBIndex_Type m_indexType;
- QString m_values;
- QString m_attributes;
+ TQString m_values;
+ TQString m_attributes;
bool m_autoIncrement;
bool m_null;
};
diff --git a/umbrello/umbrello/entitywidget.cpp b/umbrello/umbrello/entitywidget.cpp
index 942de360..9dd7d7e3 100644
--- a/umbrello/umbrello/entitywidget.cpp
+++ b/umbrello/umbrello/entitywidget.cpp
@@ -13,7 +13,7 @@
#include "entitywidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -47,7 +47,7 @@ void EntityWidget::init() {
EntityWidget::~EntityWidget() {}
-void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void EntityWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
@@ -57,14 +57,14 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int fontHeight = fm.lineSpacing();
- const QString name = this->getName();
+ const TQString name = this->getName();
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
int y = 0;
@@ -96,13 +96,13 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
p.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y);
- QFontMetrics fontMetrics(font);
+ TQFontMetrics fontMetrics(font);
UMLClassifier *classifier = (UMLClassifier*)m_pObject;
UMLClassifierListItem* entityattribute = 0;
UMLClassifierListItemList list = classifier->getFilteredList(Uml::ot_EntityAttribute);
for (entityattribute = list.first(); entityattribute; entityattribute = list.next()) {
- QString text = entityattribute->getName();
- p.setPen( QPen(Qt::black) );
+ TQString text = entityattribute->getName();
+ p.setPen( TQPen(Qt::black) );
UMLEntityAttribute* casted = dynamic_cast<UMLEntityAttribute*>( entityattribute );
if( casted && casted->getIndexType() == Uml::Primary )
{
@@ -121,17 +121,17 @@ void EntityWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize EntityWidget::calculateSize() {
+TQSize EntityWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
const int fontHeight = fm.lineSpacing();
@@ -173,7 +173,7 @@ QSize EntityWidget::calculateSize() {
//allow for width margin
width += ENTITY_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void EntityWidget::slotMenuSelection(int sel) {
@@ -188,13 +188,13 @@ void EntityWidget::slotMenuSelection(int sel) {
UMLWidget::slotMenuSelection(sel);
}
-void EntityWidget::saveToXMI( QDomDocument& qDoc, QDomElement& qElement ) {
- QDomElement conceptElement = qDoc.createElement("entitywidget");
+void EntityWidget::saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("entitywidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
-bool EntityWidget::loadFromXMI( QDomElement & qElement ) {
+bool EntityWidget::loadFromXMI( TQDomElement & qElement ) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
diff --git a/umbrello/umbrello/entitywidget.h b/umbrello/umbrello/entitywidget.h
index 249f0984..e99da521 100644
--- a/umbrello/umbrello/entitywidget.h
+++ b/umbrello/umbrello/entitywidget.h
@@ -51,23 +51,23 @@ public:
/**
* Draws the entity as a rectangle with a box underneith with a list of literals
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "entitywidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from an "entitywidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
public slots:
/**
diff --git a/umbrello/umbrello/enum.cpp b/umbrello/umbrello/enum.cpp
index ba3be7b4..93ee1bdd 100644
--- a/umbrello/umbrello/enum.cpp
+++ b/umbrello/umbrello/enum.cpp
@@ -22,7 +22,7 @@
#include "uniqueid.h"
#include "clipboard/idchangelog.h"
-UMLEnum::UMLEnum(const QString& name, Uml::IDType id) : UMLClassifier(name, id) {
+UMLEnum::UMLEnum(const TQString& name, Uml::IDType id) : UMLClassifier(name, id) {
init();
}
@@ -52,9 +52,9 @@ void UMLEnum::init() {
setStereotype( "enum" );
}
-UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
+UMLObject* UMLEnum::createEnumLiteral(const TQString& name) {
Uml::IDType id = UniqueID::gen();
- QString currentName;
+ TQString currentName;
if (name.isNull()) {
currentName = uniqChildName(Uml::ot_EnumLiteral);
} else {
@@ -70,7 +70,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
//when creating enum literal via list view
while (ok && !goodName && name.isNull()) {
ok = newEnumLiteral->showPropertiesDialog( UMLApp::app() );
- QString name = newEnumLiteral->getName();
+ TQString name = newEnumLiteral->getName();
if(name.length() == 0) {
KMessageBox::error(0, i18n("That is an invalid name."), i18n("Invalid Name"));
@@ -91,7 +91,7 @@ UMLObject* UMLEnum::createEnumLiteral(const QString& name) {
return newEnumLiteral;
}
-UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::IDType id) {
+UMLObject* UMLEnum::addEnumLiteral(const TQString &name, Uml::IDType id) {
UMLObject *el = UMLCanvasObject::findChildObject(name);
if (el != NULL) {
kDebug() << "UMLEnum::addEnumLiteral: " << name
@@ -102,19 +102,19 @@ UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::IDType id) {
m_List.append(literal);
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return literal;
}
bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log /* = 0*/) {
- QString name = (QString)literal->getName();
+ TQString name = (TQString)literal->getName();
if (findChildObject(name) == NULL) {
literal->parent()->removeChild(literal);
this->insertChild(literal);
m_List.append(literal);
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
} else if (Log) {
Log->removeChangeByNewID( literal->getID() );
@@ -124,7 +124,7 @@ bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log /* = 0*/)
}
bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, int position) {
- QString name = (QString)literal->getName();
+ TQString name = (TQString)literal->getName();
if (findChildObject(name) == NULL) {
literal->parent()->removeChild(literal);
this->insertChild(literal);
@@ -135,7 +135,7 @@ bool UMLEnum::addEnumLiteral(UMLEnumLiteral* literal, int position) {
}
UMLObject::emitModified();
emit enumLiteralAdded(literal);
- connect(literal,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(literal,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
return true;
}
return false;
@@ -149,8 +149,8 @@ int UMLEnum::removeEnumLiteral(UMLEnumLiteral* literal) {
emit enumLiteralRemoved(literal);
UMLObject::emitModified();
// If we are deleting the object, then we don't need to disconnect..this is done auto-magically
- // for us by QObject. -b.t.
- // disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ // for us by TQObject. -b.t.
+ // disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
delete literal;
return m_List.count();
}
@@ -163,8 +163,8 @@ void UMLEnum::signalEnumLiteralRemoved(UMLClassifierListItem *elit) {
emit enumLiteralRemoved(elit);
}
-void UMLEnum::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement enumElement = UMLObject::save("UML:Enumeration", qDoc);
+void UMLEnum::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement enumElement = UMLObject::save("UML:Enumeration", qDoc);
// save enum literals
UMLClassifierListItemList enumLiterals = getFilteredList(Uml::ot_EnumLiteral);
UMLClassifierListItem* pEnumLiteral = 0;
@@ -175,15 +175,15 @@ void UMLEnum::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(enumElement);
}
-bool UMLEnum::load(QDomElement& element) {
- QDomNode node = element.firstChild();
+bool UMLEnum::load(TQDomElement& element) {
+ TQDomNode node = element.firstChild();
while( !node.isNull() ) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "EnumerationLiteral") ||
Uml::tagEq(tag, "EnumLiteral")) { // for backward compatibility
UMLEnumLiteral* pEnumLiteral = new UMLEnumLiteral(this);
diff --git a/umbrello/umbrello/enum.h b/umbrello/umbrello/enum.h
index 1845eb88..94532f68 100644
--- a/umbrello/umbrello/enum.h
+++ b/umbrello/umbrello/enum.h
@@ -35,7 +35,7 @@ public:
* @param name The name of the Enum.
* @param id The unique id of the Enum.
*/
- explicit UMLEnum(const QString& name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLEnum(const TQString& name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -63,7 +63,7 @@ public:
*
* @return The UMLEnum created
*/
- UMLObject* createEnumLiteral(const QString& name = QString());
+ UMLObject* createEnumLiteral(const TQString& name = TQString());
/**
* Adds an enumliteral to the enum.
@@ -73,7 +73,7 @@ public:
* If omitted a new ID is assigned internally.
* @return Pointer to the UMLEnumliteral created.
*/
- UMLObject* addEnumLiteral(const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject* addEnumLiteral(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Adds an already created enumliteral.
@@ -121,7 +121,7 @@ public:
/**
* Creates the <UML:Enum> element including its enumliterals.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
signals:
void enumLiteralAdded(UMLClassifierListItem*);
@@ -131,7 +131,7 @@ protected:
/**
* Loads the <UML:Enum> element including its enumliterals.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
/**
diff --git a/umbrello/umbrello/enumliteral.cpp b/umbrello/umbrello/enumliteral.cpp
index ea6eef49..8158e40e 100644
--- a/umbrello/umbrello/enumliteral.cpp
+++ b/umbrello/umbrello/enumliteral.cpp
@@ -16,7 +16,7 @@
#include <klocale.h>
UMLEnumLiteral::UMLEnumLiteral(const UMLObject *parent,
- const QString& name, Uml::IDType id)
+ const TQString& name, Uml::IDType id)
: UMLClassifierListItem(parent, name, id) {
m_BaseType = Uml::ot_EnumLiteral;
}
@@ -51,18 +51,18 @@ UMLObject* UMLEnumLiteral::clone() const
}
-void UMLEnumLiteral::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement attributeElement = UMLObject::save("UML:EnumerationLiteral", qDoc);
+void UMLEnumLiteral::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement attributeElement = UMLObject::save("UML:EnumerationLiteral", qDoc);
qElement.appendChild( attributeElement );
}
-bool UMLEnumLiteral::load(QDomElement& ) {
+bool UMLEnumLiteral::load(TQDomElement& ) {
return true;
}
-bool UMLEnumLiteral::showPropertiesDialog(QWidget* parent) {
+bool UMLEnumLiteral::showPropertiesDialog(TQWidget* parent) {
bool ok;
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), getName(), &ok, parent);
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), getName(), &ok, parent);
if ( ok && !name.isEmpty() ) {
setName(name);
return true;
diff --git a/umbrello/umbrello/enumliteral.h b/umbrello/umbrello/enumliteral.h
index 3484012e..e9a63b1a 100644
--- a/umbrello/umbrello/enumliteral.h
+++ b/umbrello/umbrello/enumliteral.h
@@ -34,7 +34,7 @@ public:
* @param id The unique id given to this UMLEnumLiteral.
*/
UMLEnumLiteral(const UMLObject* parent,
- const QString& name, Uml::IDType id = Uml::id_None);
+ const TQString& name, Uml::IDType id = Uml::id_None);
/**
* Sets up an enum literal.
@@ -67,18 +67,18 @@ public:
/**
* Creates the <UML:EnumLiteral> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the enum literal.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
* Loads the <UML:EnumLiteral> XMI element (empty.)
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
};
diff --git a/umbrello/umbrello/enumwidget.cpp b/umbrello/umbrello/enumwidget.cpp
index 2d642b31..0c03b209 100644
--- a/umbrello/umbrello/enumwidget.cpp
+++ b/umbrello/umbrello/enumwidget.cpp
@@ -13,7 +13,7 @@
#include "enumwidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -52,7 +52,7 @@ void EnumWidget::init() {
EnumWidget::~EnumWidget() {}
-void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void EnumWidget::draw(TQPainter& p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
@@ -62,9 +62,9 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString name;
+ TQString name;
if ( m_bShowPackage ) {
name = m_pObject->getFullyQualifiedName();
} else {
@@ -72,9 +72,9 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
p.drawRect(offsetX, offsetY, w, h);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
p.setFont(font);
p.drawText(offsetX + ENUM_MARGIN, offsetY,
@@ -95,13 +95,13 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
p.drawLine(offsetX, offsetY + y, offsetX + w - 1, offsetY + y);
- QFontMetrics fontMetrics(font);
+ TQFontMetrics fontMetrics(font);
UMLClassifier *classifier = (UMLClassifier*)m_pObject;
UMLClassifierListItem* enumLiteral = 0;
UMLClassifierListItemList list = classifier->getFilteredList(Uml::ot_EnumLiteral);
for (enumLiteral = list.first(); enumLiteral; enumLiteral = list.next()) {
- QString text = enumLiteral->getName();
- p.setPen( QPen(Qt::black) );
+ TQString text = enumLiteral->getName();
+ p.setPen( TQPen(Qt::black) );
p.drawText(offsetX + ENUM_MARGIN, offsetY + y,
fontMetrics.width(text), fontHeight, Qt::AlignVCenter, text);
y+=fontHeight;
@@ -112,17 +112,17 @@ void EnumWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-QSize EnumWidget::calculateSize() {
+TQSize EnumWidget::calculateSize() {
if (!m_pObject) {
return UMLWidget::calculateSize();
}
int width, height;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setItalic(false);
font.setUnderline(false);
font.setBold(false);
- const QFontMetrics fm(font);
+ const TQFontMetrics fm(font);
const int fontHeight = fm.lineSpacing();
@@ -164,7 +164,7 @@ QSize EnumWidget::calculateSize() {
//allow for width margin
width += ENUM_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
void EnumWidget::slotMenuSelection(int sel) {
@@ -189,19 +189,19 @@ bool EnumWidget::getShowPackage() const {
return m_bShowPackage;
}
-void EnumWidget::saveToXMI( QDomDocument& qDoc, QDomElement& qElement ) {
- QDomElement conceptElement = qDoc.createElement("enumwidget");
+void EnumWidget::saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement ) {
+ TQDomElement conceptElement = qDoc.createElement("enumwidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
conceptElement.setAttribute("showpackage", m_bShowPackage);
qElement.appendChild(conceptElement);
}
-bool EnumWidget::loadFromXMI( QDomElement & qElement ) {
+bool EnumWidget::loadFromXMI( TQDomElement & qElement ) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString showpackage = qElement.attribute("showpackage", "0");
+ TQString showpackage = qElement.attribute("showpackage", "0");
m_bShowPackage = (bool)showpackage.toInt();
diff --git a/umbrello/umbrello/enumwidget.h b/umbrello/umbrello/enumwidget.h
index 7022ac61..aa61f4ea 100644
--- a/umbrello/umbrello/enumwidget.h
+++ b/umbrello/umbrello/enumwidget.h
@@ -70,23 +70,23 @@ public:
/**
* Draws the enum as a rectangle with a box underneith with a list of literals
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "enumwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads from an "enumwidget" XMI element.
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
bool m_bShowPackage;
diff --git a/umbrello/umbrello/floatingtextwidget.cpp b/umbrello/umbrello/floatingtextwidget.cpp
index 44ea3373..fb278399 100644
--- a/umbrello/umbrello/floatingtextwidget.cpp
+++ b/umbrello/umbrello/floatingtextwidget.cpp
@@ -13,10 +13,10 @@
#include "floatingtextwidget.h"
// system includes
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qvalidator.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqvalidator.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -38,7 +38,7 @@
FloatingTextWidget::FloatingTextWidget(UMLView * view, Uml::Text_Role role,
- const QString& text, Uml::IDType id)
+ const TQString& text, Uml::IDType id)
: UMLWidget(view, id, new FloatingTextWidgetController(this))
{
init();
@@ -66,24 +66,24 @@ void FloatingTextWidget::init() {
FloatingTextWidget::~FloatingTextWidget() {
}
-void FloatingTextWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void FloatingTextWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
p.setFont( UMLWidget::getFont() );
- QColor textColor(50, 50, 50);
+ TQColor textColor(50, 50, 50);
p.setPen(textColor);
p.drawText( offsetX , offsetY,w,h, Qt::AlignCenter, getDisplayText() );
if(m_bSelected)
drawSelected(&p, offsetX, offsetY);
}
-void FloatingTextWidget::resizeEvent(QResizeEvent * /*re*/) {}
+void FloatingTextWidget::resizeEvent(TQResizeEvent * /*re*/) {}
-QSize FloatingTextWidget::calculateSize() {
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+TQSize FloatingTextWidget::calculateSize() {
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
int h = fm.lineSpacing();
int w = fm.width( getDisplayText() );
- return QSize(w + 8, h + 4); // give a small margin
+ return TQSize(w + 8, h + 4); // give a small margin
}
void FloatingTextWidget::slotMenuSelection(int sel) {
@@ -108,7 +108,7 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
UMLClassifier* c = m_pLink->getOperationOwner();
if (c == NULL) {
bool ok = false;
- QString opText = KInputDialog::getText(i18n("Name"),
+ TQString opText = KInputDialog::getText(i18n("Name"),
i18n("Enter operation name:"),
getText(), &ok, m_pView);
if (ok)
@@ -133,7 +133,7 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Change_Font:
{
- QFont font = getFont();
+ TQFont font = getFont();
if( KFontDialog::getFont( font, false, m_pView ) ) {
if( m_Role == Uml::tr_Floating || m_Role == Uml::tr_Seq_Message ) {
setFont( font );
@@ -156,8 +156,8 @@ void FloatingTextWidget::slotMenuSelection(int sel) {
}
void FloatingTextWidget::handleRename() {
- QRegExpValidator v(QRegExp(".*"), 0);
- QString t;
+ TQRegExpValidator v(TQRegExp(".*"), 0);
+ TQString t;
if( m_Role == Uml::tr_RoleAName || m_Role == Uml::tr_RoleBName ) {
t = i18n("Enter role name:");
} else if (m_Role == Uml::tr_MultiA || m_Role == Uml::tr_MultiB) {
@@ -175,13 +175,13 @@ void FloatingTextWidget::handleRename() {
t = i18n("ERROR");
}
bool ok = false;
- QString newText = KInputDialog::getText(i18n("Rename"), t, getText(), &ok,
+ TQString newText = KInputDialog::getText(i18n("Rename"), t, getText(), &ok,
m_pView, NULL, &v);
if (!ok || newText == getText())
return;
}
-void FloatingTextWidget::changeName(const QString& newText)
+void FloatingTextWidget::changeName(const TQString& newText)
{
if (m_pLink && !isTextValid(newText)) {
@@ -189,16 +189,16 @@ void FloatingTextWidget::changeName(const QString& newText)
if (assoc) {
switch (m_Role) {
case Uml::tr_MultiA:
- assoc->setMulti(QString(), Uml::A);
+ assoc->setMulti(TQString(), Uml::A);
break;
case Uml::tr_MultiB:
- assoc->setMulti(QString(), Uml::B);
+ assoc->setMulti(TQString(), Uml::B);
break;
case Uml::tr_RoleAName:
- assoc->setRoleName(QString(), Uml::A);
+ assoc->setRoleName(TQString(), Uml::A);
break;
case Uml::tr_RoleBName:
- assoc->setRoleName(QString(), Uml::B);
+ assoc->setRoleName(TQString(), Uml::B);
break;
case Uml::tr_ChangeA:
assoc->setChangeability(Uml::chg_Changeable, Uml::A);
@@ -207,13 +207,13 @@ void FloatingTextWidget::changeName(const QString& newText)
assoc->setChangeability(Uml::chg_Changeable, Uml::B);
break;
default:
- assoc->setName(QString());
+ assoc->setName(TQString());
break;
}
} else {
MessageWidget *msg = dynamic_cast<MessageWidget*>(m_pLink);
if (msg) {
- msg->setName(QString());
+ msg->setName(TQString());
m_pView->removeWidget(this);
}
}
@@ -230,13 +230,13 @@ void FloatingTextWidget::changeName(const QString& newText)
update();
}
-void FloatingTextWidget::setText(const QString &t) {
+void FloatingTextWidget::setText(const TQString &t) {
if (m_Role == Uml::tr_Seq_Message || m_Role == Uml::tr_Seq_Message_Self) {
- QString seqNum, op;
+ TQString seqNum, op;
m_pLink->getSeqNumAndOp(seqNum, op);
if (seqNum.length() > 0 || op.length() > 0) {
if (! m_pView->getShowOpSig())
- op.replace( QRegExp("\\(.*\\)"), "()" );
+ op.replace( TQRegExp("\\(.*\\)"), "()" );
m_Text = seqNum.append(": ").append( op );
} else
m_Text = t;
@@ -246,14 +246,14 @@ void FloatingTextWidget::setText(const QString &t) {
update();
}
-void FloatingTextWidget::setPreText (const QString &t)
+void FloatingTextWidget::setPreText (const TQString &t)
{
m_PreText = t;
updateComponentSize();
update();
}
-void FloatingTextWidget::setPostText(const QString &t) {
+void FloatingTextWidget::setPostText(const TQString &t) {
m_PostText = t;
updateComponentSize();
update();
@@ -261,7 +261,7 @@ void FloatingTextWidget::setPostText(const QString &t) {
void FloatingTextWidget::changeTextDlg() {
bool ok = false;
- QString newText = KInputDialog::getText(i18n("Change Text"), i18n("Enter new text:"), getText(), &ok, m_pView);
+ TQString newText = KInputDialog::getText(i18n("Change Text"), i18n("Enter new text:"), getText(), &ok, m_pView);
if(ok && newText != getText() && isTextValid(newText)) {
setText( newText );
@@ -278,7 +278,7 @@ void FloatingTextWidget::showOpDlg() {
kError() << "FloatingTextWidget::showOpDlg: m_pLink is NULL" << endl;
return;
}
- QString seqNum, opText;
+ TQString seqNum, opText;
UMLClassifier* c = m_pLink->getSeqNumAndOp(seqNum, opText);
if (c == NULL) {
kError() << "FloatingTextWidget::showOpDlg: "
@@ -320,7 +320,7 @@ void FloatingTextWidget::showOpDlg() {
if (od.m_pReturnType)
op->setType(od.m_pReturnType);
m_pLink->setOperation(op);
- opText = QString();
+ opText = TQString();
} else {
m_pLink->setOperation(NULL);
}
@@ -331,15 +331,15 @@ void FloatingTextWidget::showOpDlg() {
setMessageText();
}
-QString FloatingTextWidget::getPreText() const {
+TQString FloatingTextWidget::getPreText() const {
return m_PreText;
}
-QString FloatingTextWidget::getPostText() const {
+TQString FloatingTextWidget::getPostText() const {
return m_PostText;
}
-QString FloatingTextWidget::getText() const {
+TQString FloatingTextWidget::getText() const {
//test to make sure not just the ":" between the seq number
//and the actual message widget
// hmm. this section looks like it could have been avoided by using pre-, post- text
@@ -352,9 +352,9 @@ QString FloatingTextWidget::getText() const {
return m_Text;
}
-QString FloatingTextWidget::getDisplayText() const
+TQString FloatingTextWidget::getDisplayText() const
{
- QString displayText = m_Text;
+ TQString displayText = m_Text;
displayText.prepend(m_PreText);
displayText.append(m_PostText);
return displayText;
@@ -383,7 +383,7 @@ Uml::Text_Role FloatingTextWidget::getRole() const {
return m_Role;
}
-bool FloatingTextWidget::isTextValid( const QString &text ) {
+bool FloatingTextWidget::isTextValid( const TQString &text ) {
int length = text.length();
if(length < 1)
return false;
@@ -405,8 +405,8 @@ void FloatingTextWidget::showProperties() {
}
}
-void FloatingTextWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement textElement = qDoc.createElement( "floatingtext" );
+void FloatingTextWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement textElement = qDoc.createElement( "floatingtext" );
UMLWidget::saveToXMI( qDoc, textElement );
textElement.setAttribute( "text", m_Text );
textElement.setAttribute( "pretext", m_PreText );
@@ -421,11 +421,11 @@ void FloatingTextWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement
qElement.appendChild( textElement );
}
-bool FloatingTextWidget::loadFromXMI( QDomElement & qElement ) {
+bool FloatingTextWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
- QString role = qElement.attribute( "role", "" );
+ TQString role = qElement.attribute( "role", "" );
if( !role.isEmpty() )
m_Role = (Uml::Text_Role)role.toInt();
diff --git a/umbrello/umbrello/floatingtextwidget.h b/umbrello/umbrello/floatingtextwidget.h
index a8a1bfa8..75e25be0 100644
--- a/umbrello/umbrello/floatingtextwidget.h
+++ b/umbrello/umbrello/floatingtextwidget.h
@@ -59,7 +59,7 @@ public:
* @param id The ID to assign (-1 will prompt a new ID.)
*/
explicit FloatingTextWidget(UMLView * view, Uml::Text_Role role = Uml::tr_Floating,
- const QString& text = "", Uml::IDType id = Uml::id_None);
+ const TQString& text = "", Uml::IDType id = Uml::id_None);
/**
* destructor
@@ -71,47 +71,47 @@ public:
*
* @param t The text to display.
*/
- void setText(const QString &t);
+ void setText(const TQString &t);
/**
* Set some text to be prepended to the main body of text.
* @param t The text to prepend to main body which is displayed.
*/
- void setPreText(const QString &t);
+ void setPreText(const TQString &t);
/**
* Set some text to be appended to the main body of text.
* @param t The text to append to main body which is displayed.
*/
- void setPostText(const QString &t);
+ void setPostText(const TQString &t);
/**
* Set the sequence number to display.
*
* @param sn The sequence number to display.
*/
- void setSeqNum(const QString &sn);
+ void setSeqNum(const TQString &sn);
/**
* Return the sequence number.
*
* @return The sequence number.
*/
- QString getSeqNum() const;
+ TQString getSeqNum() const;
/**
* Set the operation to display.
*
* @param op The operation to display.
*/
- void setOperation(const QString &op);
+ void setOperation(const TQString &op);
/**
* Return the operation that is displayed.
*
* @return The operation that is displayed.
*
- QString getOperation() const;
+ TQString getOperation() const;
*/
/**
@@ -120,7 +120,7 @@ public:
*
* @return The main text currently being displayed by the widget.
*/
- QString getText() const;
+ TQString getText() const;
/**
* Use to get the pre-text which is prepended to the main body of
@@ -128,7 +128,7 @@ public:
*
* @return The pre-text currently displayed by the widget.
*/
- QString getPreText() const;
+ TQString getPreText() const;
/**
* Use to get the post-text which is appended to the main body of
@@ -136,7 +136,7 @@ public:
*
* @return The post-text currently displayed by the widget.
*/
- QString getPostText() const;
+ TQString getPostText() const;
/**
* Use to get the total text (prepended + main body + appended)
@@ -144,7 +144,7 @@ public:
*
* @return The text currently being displayed by the widget.
*/
- QString getDisplayText() const;
+ TQString getDisplayText() const;
/**
* Displays a dialog box to change the text.
@@ -204,12 +204,12 @@ public:
* @param text The string to analyze.
* @return True if the given text is valid.
*/
- static bool isTextValid(const QString &text);
+ static bool isTextValid(const TQString &text);
/**
* Overrides default method
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Handle the ListPopupMenu::mt_Rename case of the slotMenuSelection.
@@ -220,7 +220,7 @@ public:
/**
* Change Name
*/
- void changeName(const QString& newText);
+ void changeName(const TQString& newText);
/**
* Shows an operation dialog box.
@@ -238,12 +238,12 @@ public:
/**
* Creates the "floatingtext" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the "floatingtext" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
/**
@@ -265,7 +265,7 @@ protected:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
@@ -276,7 +276,7 @@ private:
/**
* Override default method
*/
- void resizeEvent(QResizeEvent* /*re*/);
+ void resizeEvent(TQResizeEvent* /*re*/);
/**
* The association or message widget we may be linked to.
@@ -286,12 +286,12 @@ private:
//////////////////// Data loaded/saved:
/// Prepended text (such as for scope of association Role or method)
- QString m_PreText;
+ TQString m_PreText;
/**
* Ending text (such as bracket on changability notation for
* association Role)
*/
- QString m_PostText;
+ TQString m_PostText;
/**
* The role the text widget will enact.
diff --git a/umbrello/umbrello/floatingtextwidgetcontroller.cpp b/umbrello/umbrello/floatingtextwidgetcontroller.cpp
index 4c6a4aa8..df315687 100644
--- a/umbrello/umbrello/floatingtextwidgetcontroller.cpp
+++ b/umbrello/umbrello/floatingtextwidgetcontroller.cpp
@@ -30,7 +30,7 @@ FloatingTextWidgetController::FloatingTextWidgetController(FloatingTextWidget *f
FloatingTextWidgetController::~FloatingTextWidgetController() {
}
-void FloatingTextWidgetController::saveWidgetValues(QMouseEvent *me) {
+void FloatingTextWidgetController::saveWidgetValues(TQMouseEvent *me) {
UMLWidgetController::saveWidgetValues(me);
m_unconstrainedPositionX = m_widget->getX();
@@ -39,7 +39,7 @@ void FloatingTextWidgetController::saveWidgetValues(QMouseEvent *me) {
m_movementDirectionY = 0;
}
-bool FloatingTextWidgetController::isInResizeArea(QMouseEvent* /*me*/) {
+bool FloatingTextWidgetController::isInResizeArea(TQMouseEvent* /*me*/) {
return false;
}
@@ -54,7 +54,7 @@ void FloatingTextWidgetController::moveWidgetBy(int diffX, int diffY) {
m_unconstrainedPositionX += diffX;
m_unconstrainedPositionY += diffY;
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ TQPoint constrainedPosition = constrainPosition(diffX, diffY);
int newX = constrainedPosition.x();
int newY = constrainedPosition.y();
@@ -98,13 +98,13 @@ void FloatingTextWidgetController::moveWidgetBy(int diffX, int diffY) {
}
void FloatingTextWidgetController::constrainMovementForAllWidgets(int &diffX, int &diffY) {
- QPoint constrainedPosition = constrainPosition(diffX, diffY);
+ TQPoint constrainedPosition = constrainPosition(diffX, diffY);
diffX = constrainedPosition.x() - m_floatingTextWidget->getX();
diffY = constrainedPosition.y() - m_floatingTextWidget->getY();
}
-QPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
+TQPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
int newX = m_floatingTextWidget->getX() + diffX;
int newY = m_floatingTextWidget->getY() + diffY;
@@ -114,6 +114,6 @@ QPoint FloatingTextWidgetController::constrainPosition(int diffX, int diffY) {
m_floatingTextWidget->m_Role);
}
- return QPoint(newX, newY);
+ return TQPoint(newX, newY);
}
diff --git a/umbrello/umbrello/floatingtextwidgetcontroller.h b/umbrello/umbrello/floatingtextwidgetcontroller.h
index f73b359a..bb40e778 100644
--- a/umbrello/umbrello/floatingtextwidgetcontroller.h
+++ b/umbrello/umbrello/floatingtextwidgetcontroller.h
@@ -58,9 +58,9 @@ protected:
* Calls parent method and then saves the value of m_unconstrainedPositionX/Y
* and m_movementDirectionX/Y.
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Overridden from UMLWidgetController.
@@ -70,7 +70,7 @@ protected:
* @param me The QMouseEVent to check.
* @return true if the mouse is in resize area, false otherwise.
*/
- virtual bool isInResizeArea(QMouseEvent *me);
+ virtual bool isInResizeArea(TQMouseEvent *me);
/**
* Overridden from UMLWidgetController.
@@ -117,9 +117,9 @@ private:
*
* @param diffX The difference between current X position and new X position.
* @param diffY The difference between current Y position and new Y position.
- * @return A QPoint with the constrained new position.
+ * @return A TQPoint with the constrained new position.
*/
- QPoint constrainPosition(int diffX, int diffY);
+ TQPoint constrainPosition(int diffX, int diffY);
/**
* The floating text widget which uses the controller.
diff --git a/umbrello/umbrello/folder.cpp b/umbrello/umbrello/folder.cpp
index 8317bab1..c3f97dc4 100644
--- a/umbrello/umbrello/folder.cpp
+++ b/umbrello/umbrello/folder.cpp
@@ -12,7 +12,7 @@
// own header
#include "folder.h"
// qt/kde includes
-#include <qfile.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -25,7 +25,7 @@
#include "object_factory.h"
#include "model_utils.h"
-UMLFolder::UMLFolder(const QString & name, Uml::IDType id)
+UMLFolder::UMLFolder(const TQString & name, Uml::IDType id)
: UMLPackage(name, id) {
init();
}
@@ -45,11 +45,11 @@ UMLObject* UMLFolder::clone() const {
return clone;
}
-void UMLFolder::setLocalName(const QString& localName) {
+void UMLFolder::setLocalName(const TQString& localName) {
m_localName = localName;
}
-QString UMLFolder::getLocalName() {
+TQString UMLFolder::getLocalName() {
return m_localName;
}
@@ -119,7 +119,7 @@ UMLView *UMLFolder::findView(Uml::IDType id) {
return v;
}
-UMLView *UMLFolder::findView(Uml::Diagram_Type type, const QString &name, bool searchAllScopes) {
+UMLView *UMLFolder::findView(Uml::Diagram_Type type, const TQString &name, bool searchAllScopes) {
UMLView *v = NULL;
for (UMLViewListIt vit(m_diagrams); (v = vit.current()) != NULL; ++vit) {
if (v->getType() == type && v->getName() == name)
@@ -166,16 +166,16 @@ void UMLFolder::removeAllViews() {
m_diagrams.clear();
}
-void UMLFolder::setFolderFile(const QString& fileName) {
+void UMLFolder::setFolderFile(const TQString& fileName) {
m_folderFile = fileName;
}
-QString UMLFolder::getFolderFile() {
+TQString UMLFolder::getFolderFile() {
return m_folderFile;
}
-void UMLFolder::saveContents(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
+void UMLFolder::saveContents(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
UMLObject *obj;
// Save contained objects if any.
for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
@@ -186,30 +186,30 @@ void UMLFolder::saveContents(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(ownedElement);
// Save diagrams to `extension'.
if (m_diagrams.count()) {
- QDomElement diagramsElement = qDoc.createElement("diagrams");
+ TQDomElement diagramsElement = qDoc.createElement("diagrams");
UMLView *pView;
for (UMLViewListIt vit(m_diagrams); (pView = vit.current()) != NULL; ++vit) {
pView->saveToXMI(qDoc, diagramsElement);
}
- QDomElement extension = qDoc.createElement("XMI.extension");
+ TQDomElement extension = qDoc.createElement("XMI.extension");
extension.setAttribute("xmi.extender", "umbrello");
extension.appendChild( diagramsElement );
qElement.appendChild(extension);
}
}
-void UMLFolder::save(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLFolder::save(TQDomDocument& qDoc, TQDomElement& qElement) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
- QString elementName("UML:Package");
+ TQString elementName("UML:Package");
const Uml::Model_Type mt = umldoc->rootFolderType(this);
if (mt != Uml::N_MODELTYPES)
elementName = "UML:Model";
- QDomElement folderElement = UMLObject::save(elementName, qDoc);
+ TQDomElement folderElement = UMLObject::save(elementName, qDoc);
saveContents(qDoc, folderElement);
qElement.appendChild(folderElement);
}
-void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLFolder::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
if (m_folderFile.isEmpty()) {
save(qDoc, qElement);
return;
@@ -217,30 +217,30 @@ void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
// See if we can create the external file.
// If not then internalize the folder.
UMLDoc *umldoc = UMLApp::app()->getDocument();
- QString fileName = umldoc->URL().directory() + '/' + m_folderFile;
- QFile file(fileName);
+ TQString fileName = umldoc->URL().directory() + '/' + m_folderFile;
+ TQFile file(fileName);
if (!file.open(IO_WriteOnly)) {
kError() << "UMLFolder::saveToXMI(" << m_folderFile << "): "
<< "cannot create file, contents will be saved in main model file"
<< endl;
- m_folderFile = QString::null;
+ m_folderFile = TQString::null;
save(qDoc, qElement);
return;
}
// Okay, external file is writable. Wrap up main file.
- QDomElement folderElement = UMLObject::save("UML:Package", qDoc);
- QDomElement extension = qDoc.createElement("XMI.extension");
+ TQDomElement folderElement = UMLObject::save("UML:Package", qDoc);
+ TQDomElement extension = qDoc.createElement("XMI.extension");
extension.setAttribute("xmi.extender", "umbrello");
- QDomElement fileElement = qDoc.createElement("external_file");
+ TQDomElement fileElement = qDoc.createElement("external_file");
fileElement.setAttribute("name", m_folderFile);
extension.appendChild(fileElement);
folderElement.appendChild(extension);
qElement.appendChild(folderElement);
// Save folder to external file.
- QDomDocument folderDoc;
- QDomElement folderRoot;
- QDomProcessingInstruction xmlHeading =
+ TQDomDocument folderDoc;
+ TQDomElement folderRoot;
+ TQDomProcessingInstruction xmlHeading =
folderDoc.createProcessingInstruction("xml",
"version=\"1.0\" encoding=\"UTF-8\"");
folderDoc.appendChild(xmlHeading);
@@ -252,19 +252,19 @@ void UMLFolder::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
folderRoot.setAttribute("parent", m_pUMLPackage->getFullyQualifiedName("::", true));
saveContents(folderDoc, folderRoot);
folderDoc.appendChild(folderRoot);
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << folderDoc.toString();
file.close();
}
-bool UMLFolder::loadDiagramsFromXMI(QDomNode& diagrams) {
+bool UMLFolder::loadDiagramsFromXMI(TQDomNode& diagrams) {
const Settings::OptionState optionState = Settings::getOptionState();
UMLDoc *umldoc = UMLApp::app()->getDocument();
bool totalSuccess = true;
- for (QDomElement diagram = diagrams.toElement(); !diagram.isNull();
+ for (TQDomElement diagram = diagrams.toElement(); !diagram.isNull();
diagrams = diagrams.nextSibling(), diagram = diagrams.toElement()) {
- QString tag = diagram.tagName();
+ TQString tag = diagram.tagName();
if (tag != "diagram") {
kDebug() << "UMLFolder::loadDiagramsFromXMI: ignoring "
<< tag << " in <diagrams>" << endl;
@@ -283,8 +283,8 @@ bool UMLFolder::loadDiagramsFromXMI(QDomNode& diagrams) {
return totalSuccess;
}
-bool UMLFolder::loadFolderFile(const QString& path) {
- QFile file(path);
+bool UMLFolder::loadFolderFile(const TQString& path) {
+ TQFile file(path);
if (!file.exists()) {
KMessageBox::error(0, i18n("The folderfile %1 does not exist.").arg(path), i18n("Load Error"));
return false;
@@ -293,18 +293,18 @@ bool UMLFolder::loadFolderFile(const QString& path) {
KMessageBox::error(0, i18n("The folderfile %1 cannot be opened.").arg(path), i18n("Load Error"));
return false;
}
- QTextStream stream(&file);
- QString data = stream.read();
+ TQTextStream stream(&file);
+ TQString data = stream.read();
file.close();
- QDomDocument doc;
- QString error;
+ TQDomDocument doc;
+ TQString error;
int line;
if (!doc.setContent( data, false, &error, &line)) {
kError() << "UMLFolder::loadFolderFile: Can't set content:"
<< error << " line:" << line << endl;
return false;
}
- QDomNode rootNode = doc.firstChild();
+ TQDomNode rootNode = doc.firstChild();
while (rootNode.isComment() || rootNode.isProcessingInstruction()) {
rootNode = rootNode.nextSibling();
}
@@ -312,8 +312,8 @@ bool UMLFolder::loadFolderFile(const QString& path) {
kError() << "UMLFolder::loadFolderFile: Root node is Null" << endl;
return false;
}
- QDomElement element = rootNode.toElement();
- QString type = element.tagName();
+ TQDomElement element = rootNode.toElement();
+ TQString type = element.tagName();
if (type != "external_file") {
kError() << "UMLFolder::loadFolderFile: Root node has unknown type "
<< type << endl;
@@ -322,15 +322,15 @@ bool UMLFolder::loadFolderFile(const QString& path) {
return load(element);
}
-bool UMLFolder::load(QDomElement& element) {
+bool UMLFolder::load(TQDomElement& element) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
bool totalSuccess = true;
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (Uml::tagEq(type, "Namespace.ownedElement") ||
@@ -345,18 +345,18 @@ bool UMLFolder::load(QDomElement& element) {
}
continue;
} else if (type == "XMI.extension") {
- for (QDomNode xtnode = node.firstChild(); !xtnode.isNull();
+ for (TQDomNode xtnode = node.firstChild(); !xtnode.isNull();
xtnode = xtnode.nextSibling()) {
- QDomElement el = xtnode.toElement();
- const QString xtag = el.tagName();
+ TQDomElement el = xtnode.toElement();
+ const TQString xtag = el.tagName();
if (xtag == "diagrams") {
- QDomNode diagramNode = xtnode.firstChild();
+ TQDomNode diagramNode = xtnode.firstChild();
if (!loadDiagramsFromXMI(diagramNode))
totalSuccess = false;
} else if (xtag == "external_file") {
- const QString rootDir(umldoc->URL().directory());
- QString fileName = el.attribute("name", "");
- const QString path(rootDir + '/' + fileName);
+ const TQString rootDir(umldoc->URL().directory());
+ TQString fileName = el.attribute("name", "");
+ const TQString path(rootDir + '/' + fileName);
if (loadFolderFile(path))
m_folderFile = fileName;
} else {
@@ -371,7 +371,7 @@ bool UMLFolder::load(QDomElement& element) {
// it already exists.
UMLFolder *logicalView = umldoc->getRootFolder(Uml::mt_Logical);
if (this == logicalView && Uml::tagEq(type, "Package")) {
- QString thisName = tempElement.attribute("name", "");
+ TQString thisName = tempElement.attribute("name", "");
if (thisName == "Datatypes") {
UMLFolder *datatypeFolder = umldoc->getDatatypeFolder();
if (!datatypeFolder->loadFromXMI(tempElement))
@@ -381,7 +381,7 @@ bool UMLFolder::load(QDomElement& element) {
}
UMLObject *pObject = NULL;
// Avoid duplicate creation of forward declared object
- QString idStr = tempElement.attribute("xmi.id", "");
+ TQString idStr = tempElement.attribute("xmi.id", "");
if (!idStr.isEmpty()) {
Uml::IDType id = STR2ID(idStr);
pObject = umldoc->findObjectById(id);
@@ -391,7 +391,7 @@ bool UMLFolder::load(QDomElement& element) {
}
}
if (pObject == NULL) {
- QString stereoID = tempElement.attribute("stereotype", "");
+ TQString stereoID = tempElement.attribute("stereotype", "");
pObject = Object_Factory::makeObjectFromXMI(type, stereoID);
if (!pObject) {
kWarning() << "UMLFolder::load: "
diff --git a/umbrello/umbrello/folder.h b/umbrello/umbrello/folder.h
index 2e4d23f6..365795f0 100644
--- a/umbrello/umbrello/folder.h
+++ b/umbrello/umbrello/folder.h
@@ -41,7 +41,7 @@ public:
* @param id The unique id of the Folder. A new ID will be generated
* if this argument is left away.
*/
- explicit UMLFolder(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLFolder(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -64,13 +64,13 @@ public:
* UseCase, Component, Deployment, EntityRelationship,
* and the Datatypes folder inside the Logical View.)
*/
- void setLocalName(const QString& localName);
+ void setLocalName(const TQString& localName);
/**
* Return the localized name of this folder.
* Only useful for the predefined root folders.
*/
- QString getLocalName();
+ TQString getLocalName();
/**
* Add a view to the diagram list.
@@ -114,7 +114,7 @@ public:
* @param searchAllScopes Search in all subfolders (default: true.)
* @return Pointer to the view found, or NULL if not found.
*/
- UMLView * findView(Uml::Diagram_Type type, const QString &name, bool searchAllScopes = true);
+ UMLView * findView(Uml::Diagram_Type type, const TQString &name, bool searchAllScopes = true);
/**
* Set the options for the views in this folder.
@@ -129,19 +129,19 @@ public:
/**
* Set the folder file name for a separate submodel.
*/
- void setFolderFile(const QString& fileName);
+ void setFolderFile(const TQString& fileName);
/**
* Get the folder file name for a separate submodel.
*/
- QString getFolderFile();
+ TQString getFolderFile();
/**
* Creates a UML:Model or UML:Package element:
* UML:Model is created for the predefined fixed folders,
* UML:Package with stereotype "folder" is created for all else.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
@@ -149,7 +149,7 @@ protected:
* Can be used regardless of whether saving to the main model file
* or to an external folder file (see m_folderFile.)
*/
- void saveContents(QDomDocument& qDoc, QDomElement& qElement);
+ void saveContents(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to saveToXMI(): Creates a <UML:Model> element when saving
@@ -157,13 +157,13 @@ protected:
* user created folder. Invokes saveContents() with the newly created
* element.
*/
- void save(QDomDocument& qDoc, QDomElement& qElement);
+ void save(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Auxiliary to load():
* Load the diagrams from the "diagrams" in the <XMI.extension>
*/
- bool loadDiagramsFromXMI(QDomNode& diagrams);
+ bool loadDiagramsFromXMI(TQDomNode& diagrams);
/**
* Folders in the listview can be marked such that their contents
@@ -176,15 +176,15 @@ protected:
* plus file name.
* @return True for success.
*/
- bool loadFolderFile(const QString& path);
+ bool loadFolderFile(const TQString& path);
/**
* Loads the UML:Component element.
*/
- bool load(QDomElement & element);
+ bool load(TQDomElement & element);
private:
- QString m_localName; ///< i18n name, only used for predefined root folders
+ TQString m_localName; ///< i18n name, only used for predefined root folders
/**
* If m_folderFile is not empty then it contains a file name to which
* this folder is saved.
@@ -192,7 +192,7 @@ private:
* What is saved in the main model is not the folder contents but a
* reference to the folder file.
*/
- QString m_folderFile;
+ TQString m_folderFile;
UMLViewList m_diagrams;
};
diff --git a/umbrello/umbrello/forkjoinwidget.cpp b/umbrello/umbrello/forkjoinwidget.cpp
index 5a1ce3b8..a720a6cd 100644
--- a/umbrello/umbrello/forkjoinwidget.cpp
+++ b/umbrello/umbrello/forkjoinwidget.cpp
@@ -12,7 +12,7 @@
// own header
#include "forkjoinwidget.h"
//qt includes
-#include <qdom.h>
+#include <tqdom.h>
//kde includes
#include <kcursor.h>
#include <kdebug.h>
@@ -33,23 +33,23 @@ void ForkJoinWidget::init() {
ForkJoinWidget::~ForkJoinWidget() {
}
-QSize ForkJoinWidget::calculateSize() {
+TQSize ForkJoinWidget::calculateSize() {
if (m_drawVertical) {
- return QSize(4, 40);
+ return TQSize(4, 40);
} else {
- return QSize(40, 4);
+ return TQSize(40, 4);
}
}
-void ForkJoinWidget::draw(QPainter& p, int offsetX, int offsetY) {
- p.fillRect( offsetX, offsetY, width(), height(), QBrush( Qt::black ));
+void ForkJoinWidget::draw(TQPainter& p, int offsetX, int offsetY) {
+ p.fillRect( offsetX, offsetY, width(), height(), TQBrush( Qt::black ));
if (m_bSelected) {
drawSelected(&p, offsetX, offsetY);
}
}
-void ForkJoinWidget::drawSelected(QPainter *, int /*offsetX*/, int /*offsetY*/) {
+void ForkJoinWidget::drawSelected(TQPainter *, int /*offsetX*/, int /*offsetY*/) {
}
void ForkJoinWidget::constrain(int& width, int& height) {
@@ -94,18 +94,18 @@ bool ForkJoinWidget::getDrawVertical() const {
return m_drawVertical;
}
-void ForkJoinWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement fjElement = qDoc.createElement("forkjoin");
+void ForkJoinWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement fjElement = qDoc.createElement("forkjoin");
UMLWidget::saveToXMI(qDoc, fjElement);
fjElement.setAttribute("drawvertical", m_drawVertical);
qElement.appendChild(fjElement);
}
-bool ForkJoinWidget::loadFromXMI(QDomElement& qElement) {
+bool ForkJoinWidget::loadFromXMI(TQDomElement& qElement) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString drawVertical = qElement.attribute("drawvertical", "0");
+ TQString drawVertical = qElement.attribute("drawvertical", "0");
setDrawVertical( (bool)drawVertical.toInt() );
return true;
}
diff --git a/umbrello/umbrello/forkjoinwidget.h b/umbrello/umbrello/forkjoinwidget.h
index bf8c47c8..8ee869ea 100644
--- a/umbrello/umbrello/forkjoinwidget.h
+++ b/umbrello/umbrello/forkjoinwidget.h
@@ -12,7 +12,7 @@
#ifndef FORKJOINWIDGET_H
#define FORKJOINWIDGET_H
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//app includes
#include "boxwidget.h"
@@ -61,17 +61,17 @@ public:
/**
* Draws a slim solid black rectangle.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves the widget to the "forkjoinwidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads the widget from the "forkjoinwidget" XMI element.
*/
- bool loadFromXMI(QDomElement & qElement);
+ bool loadFromXMI(TQDomElement & qElement);
protected:
/**
@@ -79,12 +79,12 @@ protected:
* Although the ForkJoinWidget supports resizing, we suppress the
* resize corner because it is too large for this very slim widget.
*/
- void drawSelected(QPainter * p, int offsetX, int offsetY);
+ void drawSelected(TQPainter * p, int offsetX, int offsetY);
/**
* Overrides the function from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Reimplement method from UMLWidget.
diff --git a/umbrello/umbrello/hierarchicalcodeblock.cpp b/umbrello/umbrello/hierarchicalcodeblock.cpp
index 7c04a960..eff7f463 100644
--- a/umbrello/umbrello/hierarchicalcodeblock.cpp
+++ b/umbrello/umbrello/hierarchicalcodeblock.cpp
@@ -31,7 +31,7 @@
// Constructors/Destructors
//
-HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const QString &start, const QString &endString, const QString &comment )
+HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const TQString &start, const TQString &endString, const TQString &comment )
: CodeBlockWithComments (doc, start, comment), CodeGenObjectWithTextBlocks(doc)
{
setEndText(endString);
@@ -51,7 +51,7 @@ HierarchicalCodeBlock::~HierarchicalCodeBlock ( ) { }
* Set the value of m_endText
* @param new_var the new value of m_endText
*/
-void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
+void HierarchicalCodeBlock::setEndText ( const TQString &new_var ) {
m_endText = new_var;
}
@@ -59,16 +59,16 @@ void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
* Get the value of m_endText
* @return the value of m_endText
*/
-QString HierarchicalCodeBlock::getEndText ( ) {
+TQString HierarchicalCodeBlock::getEndText ( ) {
return m_endText;
}
-QString HierarchicalCodeBlock::getUniqueTag()
+TQString HierarchicalCodeBlock::getUniqueTag()
{
return getUniqueTag("hblock_tag");
}
-QString HierarchicalCodeBlock::getUniqueTag( const QString& prefix )
+TQString HierarchicalCodeBlock::getUniqueTag( const TQString& prefix )
{
return getParentDocument()->getUniqueTag(prefix);
}
@@ -113,7 +113,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
if(!newBlock || !existingBlock)
return false;
- QString tag = existingBlock->getTag();
+ TQString tag = existingBlock->getTag();
// FIX: just do a quick check if the parent DOCUMENT has this.
// IF it does, then the lack of an index will force us into
// a search of any child hierarchical codeblocks we may have
@@ -140,7 +140,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
// if we get here.. it was in this object so insert
// check for tag FIRST
- QString new_tag = newBlock->getTag();
+ TQString new_tag = newBlock->getTag();
// assign a tag if one doesn't already exist
if(new_tag.isEmpty())
@@ -184,7 +184,7 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
}
// IF we get here, the text block was in THIS object (and not a child)..
- QString tag = remove_object->getTag();
+ TQString tag = remove_object->getTag();
if(!(tag.isEmpty()))
{
m_textBlockTagMap.erase(tag);
@@ -197,14 +197,14 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
/**
* @param text
*/
-void HierarchicalCodeBlock::setStartText ( const QString &text ) {
+void HierarchicalCodeBlock::setStartText ( const TQString &text ) {
m_startText = text;
}
/**
* @return QString
*/
-QString HierarchicalCodeBlock::getStartText ( ) {
+TQString HierarchicalCodeBlock::getStartText ( ) {
return m_startText;
}
@@ -221,7 +221,7 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
CodeAccessorMethod * method;
for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
- QString tag = method->getTag();
+ TQString tag = method->getTag();
if(tag.isEmpty())
{
tag = getUniqueTag();
@@ -239,15 +239,15 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
/**
* Save the XMI representation of this object
*/
-void HierarchicalCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
+void HierarchicalCodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
setAttributesOnNode(doc, blockElement);
root.appendChild( blockElement );
}
-void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void HierarchicalCodeBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -256,7 +256,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
// set local class attributes
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
elem.setAttribute("startText",encodeText(getStartText(),endLine));
elem.setAttribute("endText",encodeText(getEndText(),endLine));
}
@@ -265,7 +265,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
/**
* load params from the appropriate XMI element node.
*/
-void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
+void HierarchicalCodeBlock::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
@@ -273,7 +273,7 @@ void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
/** set the class attributes of this object from
* the passed element node.
*/
-void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
+void HierarchicalCodeBlock::setAttributesFromNode ( TQDomElement & root)
{
// set attributes from the XMI
@@ -281,7 +281,7 @@ void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setStartText(decodeText(root.attribute("startText",""),endLine));
setEndText(decodeText(root.attribute("endText",""),endLine));
}
@@ -312,22 +312,22 @@ void HierarchicalCodeBlock::setAttributesFromObject (TextBlock * obj) {
/**
* @return QString
*/
-QString HierarchicalCodeBlock::toString ( ) {
+TQString HierarchicalCodeBlock::toString ( ) {
- QString string = QString();
+ TQString string = TQString();
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString startText = "";
- QString endText = "";
+ TQString indent = getIndentationString();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString startText = "";
+ TQString endText = "";
if (!getStartText().isEmpty())
startText = formatMultiLineText (getStartText(), indent, endLine);
if (!getEndText().isEmpty())
endText = formatMultiLineText (getEndText(), indent, endLine);
- QString body = childTextBlocksToString();
- QString comment = getComment()->toString();
+ TQString body = childTextBlocksToString();
+ TQString comment = getComment()->toString();
// tack in text, if there is something there..
if(!comment.isEmpty() && getComment()->getWriteOutText())
@@ -346,19 +346,19 @@ QString HierarchicalCodeBlock::toString ( ) {
return string;
}
-QString HierarchicalCodeBlock::childTextBlocksToString() {
+TQString HierarchicalCodeBlock::childTextBlocksToString() {
TextBlockList* list = getTextBlockList();
- QString retString = "";
+ TQString retString = "";
for(TextBlock *block = list->first() ; block; block=list->next())
{
- QString blockValue = block->toString();
+ TQString blockValue = block->toString();
if(!blockValue.isEmpty())
retString.append(blockValue);
}
return retString;
}
-TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const QString &tag )
+TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const TQString &tag )
{
ClassifierCodeDocument * cdoc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
diff --git a/umbrello/umbrello/hierarchicalcodeblock.h b/umbrello/umbrello/hierarchicalcodeblock.h
index 3c0dcbc1..ef145753 100644
--- a/umbrello/umbrello/hierarchicalcodeblock.h
+++ b/umbrello/umbrello/hierarchicalcodeblock.h
@@ -18,8 +18,8 @@
#ifndef HIERARCHICALCODEBLOCK_H
#define HIERARCHICALCODEBLOCK_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include "codegenobjectwithtextblocks.h"
#include "codeblockwithcomments.h"
@@ -37,7 +37,7 @@ public:
/**
* Constructor
*/
- explicit HierarchicalCodeBlock ( CodeDocument * doc , const QString &startString = "", const QString &endString = "", const QString &comment = "");
+ explicit HierarchicalCodeBlock ( CodeDocument * doc , const TQString &startString = "", const TQString &endString = "", const TQString &comment = "");
/**
* Empty Destructor
@@ -54,13 +54,13 @@ public:
* Set the value of m_endText
* @param new_var the new value of m_endText
*/
- void setEndText ( const QString &new_var );
+ void setEndText ( const TQString &new_var );
/**
* Get the value of m_endText
* @return the value of m_endText
*/
- QString getEndText ( );
+ TQString getEndText ( );
/**
* Add a TextBlock object to the m_textblockVector List
@@ -82,31 +82,31 @@ public:
/**
* @param text
*/
- void setStartText ( const QString &text );
+ void setStartText ( const TQString &text );
/**
* @return QString
*/
- QString getStartText ( );
+ TQString getStartText ( );
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root );
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root );
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root );
+ virtual void loadFromXMI ( TQDomElement & root );
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
// return a unique, and currently unallocated, text block tag for this hblock
- QString getUniqueTag();
- QString getUniqueTag( const QString& prefix );
+ TQString getUniqueTag();
+ TQString getUniqueTag( const TQString& prefix );
/**
* Utility method to add accessormethods in this object
@@ -128,26 +128,26 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & elem );
+ virtual void setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem );
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
virtual void setAttributesFromObject (TextBlock * obj);
// look for specific text blocks which belong to code classfields
- TextBlock * findCodeClassFieldTextBlockByTag ( const QString &tag );
+ TextBlock * findCodeClassFieldTextBlockByTag ( const TQString &tag );
private:
- QString m_startText;
- QString m_endText;
+ TQString m_startText;
+ TQString m_endText;
- QString childTextBlocksToString();
+ TQString childTextBlocksToString();
void initAttributes ( ) ;
};
diff --git a/umbrello/umbrello/import_rose.cpp b/umbrello/umbrello/import_rose.cpp
index aeaeb7fb..3968e72a 100644
--- a/umbrello/umbrello/import_rose.cpp
+++ b/umbrello/umbrello/import_rose.cpp
@@ -13,12 +13,12 @@
#include "import_rose.h"
// qt includes
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qmessagebox.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqmessagebox.h>
#include <klocale.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
namespace Import_Rose {
-typedef QPtrList<PetalNode> PetalNodeList;
+typedef TQPtrList<PetalNode> PetalNodeList;
uint nClosures; // Multiple closing parentheses may appear on a single
// line. The parsing is done line-by-line and using
@@ -41,35 +41,35 @@ uint nClosures; // Multiple closing parentheses may appear on a single
// have been seen.
uint linum; // line number
-QString g_methodName;
-void methodName(const QString& m) {
+TQString g_methodName;
+void methodName(const TQString& m) {
g_methodName = m;
}
/**
* Auxiliary function for diagnostics: Return current location.
*/
-QString loc() {
- return "Import_Rose::" + g_methodName + " line " + QString::number(linum) + ": ";
+TQString loc() {
+ return "Import_Rose::" + g_methodName + " line " + TQString::number(linum) + ": ";
}
/**
* Split a line into lexemes.
*/
-QStringList scan(const QString& lin) {
- QStringList result;
- QString line = lin.stripWhiteSpace();
+TQStringList scan(const TQString& lin) {
+ TQStringList result;
+ TQString line = lin.stripWhiteSpace();
if (line.isEmpty())
return result; // empty
- QString lexeme;
+ TQString lexeme;
const uint len = line.length();
bool inString = false;
for (uint i = 0; i < len; i++) {
- QChar c = line[i];
+ TQChar c = line[i];
if (c == '"') {
lexeme += c;
if (inString) {
result.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
inString = !inString;
} else if (inString ||
@@ -78,10 +78,10 @@ QStringList scan(const QString& lin) {
} else {
if (!lexeme.isEmpty()) {
result.append(lexeme);
- lexeme = QString();
+ lexeme = TQString();
}
if (! c.isSpace()) {
- result.append(QString(c));
+ result.append(TQString(c));
}
}
}
@@ -93,8 +93,8 @@ QStringList scan(const QString& lin) {
/**
* Emulate perl shift().
*/
-QString shift(QStringList& l) {
- QString first = l.first();
+TQString shift(TQStringList& l) {
+ TQString first = l.first();
l.pop_front();
return first;
}
@@ -102,7 +102,7 @@ QString shift(QStringList& l) {
/**
* Check for closing of one or more scopes.
*/
-bool checkClosing(QStringList& tokens) {
+bool checkClosing(TQStringList& tokens) {
if (tokens.count() == 0)
return false;
if (tokens.last() == ")") {
@@ -124,8 +124,8 @@ bool checkClosing(QStringList& tokens) {
* @return True if the given text is a natural or negative number
* or a quoted string.
*/
-bool isImmediateValue(QString s) {
- return s.contains(QRegExp("^[\\d\\-\"]"));
+bool isImmediateValue(TQString s) {
+ return s.contains(TQRegExp("^[\\d\\-\"]"));
}
/**
@@ -140,12 +140,12 @@ bool isImmediateValue(QString s) {
* or
* "\"SomeText\" 888"
*/
-QString extractImmediateValues(QStringList& l) {
+TQString extractImmediateValues(TQStringList& l) {
if (l.count() == 0)
- return QString();
+ return TQString();
if (l.first() == "(")
l.pop_front();
- QString result;
+ TQString result;
bool start = true;
while (l.count() && isImmediateValue(l.first())) {
if (start)
@@ -165,9 +165,9 @@ QString extractImmediateValues(QStringList& l) {
return result;
}
-QString collectVerbatimText(QTextStream& stream) {
- QString result;
- QString line;
+TQString collectVerbatimText(TQTextStream& stream) {
+ TQString result;
+ TQString line;
methodName("collectVerbatimText");
while (!(line = stream.readLine()).isNull()) {
linum++;
@@ -176,21 +176,21 @@ QString collectVerbatimText(QTextStream& stream) {
break;
if (line[0] != '|') {
kError() << loc() << "expecting '|' at start of verbatim text" << endl;
- return QString();
+ return TQString();
} else {
result += line.mid(1) + '\n';
}
}
if (line.isNull()) {
kError() << loc() << "premature EOF" << endl;
- return QString();
+ return TQString();
}
if (! line.isEmpty()) {
for (uint i = 0; i < line.length(); i++) {
- const QChar& clParenth = line[i];
+ const TQChar& clParenth = line[i];
if (clParenth != ')') {
kError() << loc() << "expected ')', found: " << clParenth << endl;
- return QString();
+ return TQString();
}
nClosures++;
}
@@ -218,19 +218,19 @@ QString collectVerbatimText(QTextStream& stream) {
* In this case the two lines are extracted without the leading '|'.
* The line ending '\n' of each line is preserved.
*/
-QString extractValue(QStringList& l, QTextStream& stream) {
+TQString extractValue(TQStringList& l, TQTextStream& stream) {
methodName("extractValue");
if (l.count() == 0)
- return QString();
+ return TQString();
if (l.first() == "(")
l.pop_front();
if (l.first() != "value")
- return QString();
+ return TQString();
l.pop_front(); // remove "value"
l.pop_front(); // remove the value type: could be e.g. "Text" or "cardinality"
- QString result;
+ TQString result;
if (l.count() == 0) { // expect verbatim text to follow on subsequent lines
- QString text = collectVerbatimText(stream);
+ TQString text = collectVerbatimText(stream);
nClosures--; // expect own closure
return text;
} else {
@@ -252,17 +252,17 @@ QString extractValue(QStringList& l, QTextStream& stream) {
* Read attributes of a node.
* @param initialArgs Tokens on the line of the opening "(" of the node
* but with leading whitespace and the opening "(" removed.
- * @param stream The QTextStream from which to read following lines.
+ * @param stream The TQTextStream from which to read following lines.
* @return Pointer to the created PetalNode or NULL on error.
*/
-PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
+PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) {
methodName("readAttributes");
if (initialArgs.count() == 0) {
kError() << loc() << "initialArgs is empty" << endl;
return NULL;
}
PetalNode::NodeType nt;
- QString type = shift(initialArgs);
+ TQString type = shift(initialArgs);
if (type == "object")
nt = PetalNode::nt_object;
else if (type == "list")
@@ -277,16 +277,16 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
if (seenClosing)
return node;
PetalNode::NameValueList attrs;
- QString line;
+ TQString line;
while (!(line = stream.readLine()).isNull()) {
linum++;
line = line.stripWhiteSpace();
if (line.isEmpty())
continue;
- QStringList tokens = scan(line);
- QString stringOrNodeOpener = shift(tokens);
- QString name;
- if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(QRegExp("^[A-Za-z]"))) {
+ TQStringList tokens = scan(line);
+ TQString stringOrNodeOpener = shift(tokens);
+ TQString name;
+ if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(TQRegExp("^[A-Za-z]"))) {
kError() << loc() << "unexpected line " << line << endl;
return NULL;
}
@@ -322,7 +322,7 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
continue;
}
if (stringOrNodeOpener == "(") {
- QString nxt = tokens.first();
+ TQString nxt = tokens.first();
if (isImmediateValue(nxt)) {
value.string = extractImmediateValues(tokens);
} else if (nxt == "value" || nxt.startsWith("\"")) {
@@ -357,25 +357,25 @@ PetalNode *readAttributes(QStringList initialArgs, QTextStream& stream) {
return node;
}
-bool loadFromMDL(QIODevice& file) {
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::Latin1);
- QString line;
+bool loadFromMDL(TQIODevice& file) {
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::Latin1);
+ TQString line;
PetalNode *root = NULL;
linum = 0;
while (!(line = stream.readLine()).isNull()) {
linum++;
- if (line.contains( QRegExp("^\\s*\\(object Petal") )) {
+ if (line.contains( TQRegExp("^\\s*\\(object Petal") )) {
while (!(line = stream.readLine()).isNull() && !line.contains(')')) {
linum++; // CHECK: do we need petal version info?
}
if (line.isNull())
break;
} else {
- QRegExp objectRx("^\\s*\\(object ");
+ TQRegExp objectRx("^\\s*\\(object ");
if (line.contains(objectRx)) {
nClosures = 0;
- QStringList initialArgs = scan(line);
+ TQStringList initialArgs = scan(line);
initialArgs.pop_front(); // remove opening parenthesis
root = readAttributes(initialArgs, stream);
}
diff --git a/umbrello/umbrello/import_rose.h b/umbrello/umbrello/import_rose.h
index b5090db3..6ab84da2 100644
--- a/umbrello/umbrello/import_rose.h
+++ b/umbrello/umbrello/import_rose.h
@@ -12,7 +12,7 @@
#ifndef IMPORT_ROSE__H
#define IMPORT_ROSE__H
-#include <qiodevice.h>
+#include <tqiodevice.h>
/**
* Rose model import
@@ -28,7 +28,7 @@ namespace Import_Rose {
*
* @return True for success, false in case of error.
*/
- bool loadFromMDL(QIODevice & file);
+ bool loadFromMDL(TQIODevice & file);
}
diff --git a/umbrello/umbrello/kplayerslideraction.cpp b/umbrello/umbrello/kplayerslideraction.cpp
index ae5c3f97..05ce0100 100644
--- a/umbrello/umbrello/kplayerslideraction.cpp
+++ b/umbrello/umbrello/kplayerslideraction.cpp
@@ -20,8 +20,8 @@
#include <kapplication.h>
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
#include "kplayerslideraction.h"
#include "kplayerslideraction.moc"
-void KPlayerPopupFrame::keyPressEvent (QKeyEvent* ev)
+void KPlayerPopupFrame::keyPressEvent (TQKeyEvent* ev)
{
switch ( ev -> key() )
{
@@ -42,21 +42,21 @@ void KPlayerPopupFrame::keyPressEvent (QKeyEvent* ev)
}
}
-/*void KPlayerPopupFrame::closeEvent (QCloseEvent* ev)
+/*void KPlayerPopupFrame::closeEvent (TQCloseEvent* ev)
{
- QFrame::closeEvent (ev);
+ TQFrame::closeEvent (ev);
}
-void KPlayerPopupFrame::mousePressEvent (QMouseEvent* ev)
+void KPlayerPopupFrame::mousePressEvent (TQMouseEvent* ev)
{
- QFrame::mousePressEvent (ev);
+ TQFrame::mousePressEvent (ev);
//if ( ! rect().contains (ev -> pos()) )
// m_outside_mouse_press = true;
}
-void KPlayerPopupFrame::mouseReleaseEvent (QMouseEvent* ev)
+void KPlayerPopupFrame::mouseReleaseEvent (TQMouseEvent* ev)
{
- QFrame::mouseReleaseEvent (ev);
+ TQFrame::mouseReleaseEvent (ev);
if ( m_outside_mouse_press )
{
m_outside_mouse_press = false;
@@ -65,19 +65,19 @@ void KPlayerPopupFrame::mouseReleaseEvent (QMouseEvent* ev)
}
}*/
-KPlayerPopupSliderAction::KPlayerPopupSliderAction (const QString& text,
- const QString& pix, const KShortcut& shortcut, const QObject* receiver,
- const char* slot, QObject* parent, const char* name)
+KPlayerPopupSliderAction::KPlayerPopupSliderAction (const TQString& text,
+ const TQString& pix, const KShortcut& shortcut, const TQObject* receiver,
+ const char* slot, TQObject* parent, const char* name)
: KAction (text, pix, shortcut, parent, name)
{
m_frame = new KPlayerPopupFrame;
- m_frame -> setFrameStyle (QFrame::PopupPanel | QFrame::Raised);
+ m_frame -> setFrameStyle (TQFrame::PopupPanel | TQFrame::Raised);
m_frame -> setLineWidth (2);
m_slider = new KPlayerSlider (Qt::Vertical, m_frame);
m_frame -> resize (36, m_slider -> sizeHint().height() + 4);
m_slider -> setGeometry (m_frame -> contentsRect());
//CHANGED kdDebug() << "Popup slider size " << m_slider -> width() << "x" << m_slider -> height() << "\n";
- connect (m_slider, SIGNAL (changed (int)), receiver, slot);
+ connect (m_slider, TQT_SIGNAL (changed (int)), receiver, slot);
}
KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
@@ -86,7 +86,7 @@ KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
m_frame = 0;
}
-/*int KPlayerPopupSliderAction::plug (QWidget* widget, int index)
+/*int KPlayerPopupSliderAction::plug (TQWidget* widget, int index)
{
Q_ASSERT (m_slider);
Q_ASSERT (widget);
@@ -98,11 +98,11 @@ KPlayerPopupSliderAction::~KPlayerPopupSliderAction()
return -1;
int retval = KAction::plug (widget, index);
// if ( retval >= 0 )
-// m_slider -> reparent (widget, QPoint());
+// m_slider -> reparent (widget, TQPoint());
return retval;
}
-void KPlayerPopupSliderAction::unplug (QWidget* widget)
+void KPlayerPopupSliderAction::unplug (TQWidget* widget)
{
Q_ASSERT (m_slider);
Q_ASSERT (widget);
@@ -110,19 +110,19 @@ void KPlayerPopupSliderAction::unplug (QWidget* widget)
Q_ASSERT (widget -> inherits ("KToolBar"));
if ( ! m_slider || ! widget || ! isPlugged() || ! widget -> inherits ("KToolBar") )
return;
-//m_slider -> reparent (0, QPoint());
+//m_slider -> reparent (0, TQPoint());
KAction::unplug (widget);
}*/
void KPlayerPopupSliderAction::slotActivated (void)
{
KAction::slotActivated();
- QWidget* button = 0;
+ TQWidget* button = 0;
if ( sender() )
{
//CHANGED kdDebug() << "Sender class name: " << sender() -> className() << "\n";
if ( sender() -> inherits ("KToolBarButton") )
- button = (QWidget*) sender();
+ button = (TQWidget*) sender();
else if ( sender() -> inherits ("KToolBar") )
{
KToolBar* toolbar = (KToolBar*) sender();
@@ -131,16 +131,16 @@ void KPlayerPopupSliderAction::slotActivated (void)
button = toolbar -> getButton (itemId (index));
}
}
- QPoint point;
+ TQPoint point;
if ( button )
- point = button -> mapToGlobal (QPoint (0, button -> height()));
+ point = button -> mapToGlobal (TQPoint (0, button -> height()));
else
{
- point = QCursor::pos() - QPoint (m_frame -> width() / 2, m_frame -> height() / 2);
- if ( point.x() + m_frame -> width() > QApplication::desktop() -> width() )
- point.setX (QApplication::desktop() -> width() - m_frame -> width());
- if ( point.y() + m_frame -> height() > QApplication::desktop() -> height() )
- point.setY (QApplication::desktop() -> height() - m_frame -> height());
+ point = TQCursor::pos() - TQPoint (m_frame -> width() / 2, m_frame -> height() / 2);
+ if ( point.x() + m_frame -> width() > TQApplication::desktop() -> width() )
+ point.setX (TQApplication::desktop() -> width() - m_frame -> width());
+ if ( point.y() + m_frame -> height() > TQApplication::desktop() -> height() )
+ point.setY (TQApplication::desktop() -> height() - m_frame -> height());
if ( point.x() < 0 )
point.setX (0);
if ( point.y() < 0 )
@@ -150,27 +150,27 @@ void KPlayerPopupSliderAction::slotActivated (void)
m_frame -> move (point);
/*if ( kapp && kapp -> activeWindow() )
{
- QMouseEvent me (QEvent::MouseButtonRelease, QPoint(0,0), QPoint(0,0), QMouseEvent::LeftButton, QMouseEvent::NoButton);
- QApplication::sendEvent (kapp -> activeWindow(), &me);
+ TQMouseEvent me (TQEvent::MouseButtonRelease, TQPoint(0,0), TQPoint(0,0), TQMouseEvent::LeftButton, TQMouseEvent::NoButton);
+ TQApplication::sendEvent (kapp -> activeWindow(), &me);
}*/
m_frame -> show();
m_slider -> setFocus();
}
-KPlayerSliderAction::KPlayerSliderAction (const QString& text, const KShortcut& cut,
- const QObject* receiver, const char* slot, KActionCollection* parent, const char* name)
+KPlayerSliderAction::KPlayerSliderAction (const TQString& text, const KShortcut& cut,
+ const TQObject* receiver, const char* slot, KActionCollection* parent, const char* name)
: KWidgetAction (new KPlayerSlider (Qt::Horizontal, 0, name), text, cut, receiver, slot, parent, name)
//: KAction (text, 0, parent, name)
{
setAutoSized (true);
- connect (slider(), SIGNAL (changed (int)), receiver, slot);
+ connect (slider(), TQT_SIGNAL (changed (int)), receiver, slot);
}
KPlayerSliderAction::~KPlayerSliderAction()
{
}
-int KPlayerSliderAction::plug (QWidget* widget, int index)
+int KPlayerSliderAction::plug (TQWidget* widget, int index)
{
//Q_ASSERT (widget);
//Q_ASSERT (! isPlugged());
@@ -188,26 +188,26 @@ int KPlayerSliderAction::plug (QWidget* widget, int index)
KToolBar* toolbar = (KToolBar*) widget;
//int id = getToolButtonID();
//kdDebug() << "Orientation: " << toolbar -> orientation() << "\n";
- //m_slider -> reparent (toolbar, QPoint());
+ //m_slider -> reparent (toolbar, TQPoint());
//toolbar -> insertWidget (id, 0, m_slider, index);
//toolbar -> setItemAutoSized (id, true);
- //QWhatsThis::remove (m_slider);
+ //TQWhatsThis::remove (m_slider);
//if ( ! whatsThis().isEmpty() )
- // QWhatsThis::add (m_slider, whatsThis());
+ // TQWhatsThis::add (m_slider, whatsThis());
//if ( ! text().isEmpty() )
- // QToolTip::add (m_slider, text());
+ // TQToolTip::add (m_slider, text());
//addContainer (toolbar, id);
//setupToolbar (toolbar -> orientation(), toolbar);
orientationChanged (toolbar -> orientation());
- connect (toolbar, SIGNAL (orientationChanged (Orientation)), this, SLOT (orientationChanged (Orientation)));
- //connect (toolbar, SIGNAL (destroyed()), this, SLOT (toolbarDestroyed()));
+ connect (toolbar, TQT_SIGNAL (orientationChanged (Orientation)), this, TQT_SLOT (orientationChanged (Orientation)));
+ //connect (toolbar, TQT_SIGNAL (destroyed()), this, TQT_SLOT (toolbarDestroyed()));
//if ( parentCollection() )
// parentCollection() -> connectHighlight (toolbar, this);
//return containerCount() - 1;
return result;
}
-void KPlayerSliderAction::unplug (QWidget* widget)
+void KPlayerSliderAction::unplug (TQWidget* widget)
{
//Q_ASSERT (m_slider);
//Q_ASSERT (isPlugged());
@@ -216,9 +216,9 @@ void KPlayerSliderAction::unplug (QWidget* widget)
if ( ! slider() || ! isPlugged() || widget != slider() -> parent() )
return;
//KToolBar* toolbar = (KToolBar*) widget;
- disconnect (widget, SIGNAL (orientationChanged (Orientation)), this, SLOT (orientationChanged (Orientation)));
- //disconnect (toolbar, SIGNAL (destroyed()), this, SLOT (toolbarDestroyed()));
- //m_slider -> reparent (0, QPoint());
+ disconnect (widget, TQT_SIGNAL (orientationChanged (Orientation)), this, TQT_SLOT (orientationChanged (Orientation)));
+ //disconnect (toolbar, TQT_SIGNAL (destroyed()), this, TQT_SLOT (toolbarDestroyed()));
+ //m_slider -> reparent (0, TQPoint());
/*int index = findContainer (toolbar);
if ( index == -1 )
return;
@@ -261,16 +261,16 @@ void KPlayerSliderAction::orientationChanged (Qt::Orientation orientation)
/*void KPlayerSliderAction::toolbarDestroyed (void)
{
if ( m_slider )
- m_slider -> reparent (0, QPoint());
+ m_slider -> reparent (0, TQPoint());
}*/
-KPlayerSlider::KPlayerSlider (Qt::Orientation orientation, QWidget* parent, const char* name)
-//CHANGED : QSlider (orientation, parent, name)
- : QSlider (300, 2200, 400, 1000, orientation, parent, name)
+KPlayerSlider::KPlayerSlider (Qt::Orientation orientation, TQWidget* parent, const char* name)
+//CHANGED : TQSlider (orientation, parent, name)
+ : TQSlider (300, 2200, 400, 1000, orientation, parent, name)
{
m_changing_orientation = false;
- setTickmarks (QSlider::Both);
- connect (this, SIGNAL (valueChanged (int)), this, SLOT (sliderValueChanged (int)));
+ setTickmarks (TQSlider::Both);
+ connect (this, TQT_SIGNAL (valueChanged (int)), this, TQT_SLOT (sliderValueChanged (int)));
}
KPlayerSlider::~KPlayerSlider()
@@ -278,9 +278,9 @@ KPlayerSlider::~KPlayerSlider()
//CHANGED kdDebug() << "KPlayerSlider destroyed\n";
}
-QSize KPlayerSlider::sizeHint() const
+TQSize KPlayerSlider::sizeHint() const
{
- QSize hint = QSlider::sizeHint();
+ TQSize hint = TQSlider::sizeHint();
//CHANGED int length = kPlayerSettings() -> preferredSliderLength();
int length = 200;
if ( orientation() == Qt::Horizontal )
@@ -296,10 +296,10 @@ QSize KPlayerSlider::sizeHint() const
return hint;
}
-QSize KPlayerSlider::minimumSizeHint() const
+TQSize KPlayerSlider::minimumSizeHint() const
{
//kdDebug() << "KPlayerSlider minimum size hint\n";
- QSize hint = QSlider::minimumSizeHint();
+ TQSize hint = TQSlider::minimumSizeHint();
//CHANGED int length = kPlayerSettings() -> minimumSliderLength();
int length = 200;
if ( orientation() == Qt::Horizontal )
@@ -320,80 +320,80 @@ void KPlayerSlider::setOrientation (Qt::Orientation o)
if ( o == orientation() )
return;
m_changing_orientation = true;
- int minValue = QSlider::minValue();
- int maxValue = QSlider::maxValue();
- int value = QSlider::value();
- QSlider::setOrientation (o);
- QSlider::setMinValue (- maxValue);
- QSlider::setMaxValue (- minValue);
- QSlider::setValue (- value);
+ int minValue = TQSlider::minValue();
+ int maxValue = TQSlider::maxValue();
+ int value = TQSlider::value();
+ TQSlider::setOrientation (o);
+ TQSlider::setMinValue (- maxValue);
+ TQSlider::setMaxValue (- minValue);
+ TQSlider::setValue (- value);
m_changing_orientation = false;
}
int KPlayerSlider::minValue (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::minValue();
- return - QSlider::maxValue();
+ return TQSlider::minValue();
+ return - TQSlider::maxValue();
}
void KPlayerSlider::setMinValue (int minValue)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setMinValue (minValue);
+ TQSlider::setMinValue (minValue);
else
- QSlider::setMaxValue (- minValue);
+ TQSlider::setMaxValue (- minValue);
}
int KPlayerSlider::maxValue (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::maxValue();
- return - QSlider::minValue();
+ return TQSlider::maxValue();
+ return - TQSlider::minValue();
}
void KPlayerSlider::setMaxValue (int maxValue)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setMaxValue (maxValue);
+ TQSlider::setMaxValue (maxValue);
else
- QSlider::setMinValue (- maxValue);
+ TQSlider::setMinValue (- maxValue);
}
int KPlayerSlider::lineStep (void) const
{
- return QSlider::lineStep();
+ return TQSlider::lineStep();
}
void KPlayerSlider::setLineStep (int lineStep)
{
- QSlider::setLineStep (lineStep);
+ TQSlider::setLineStep (lineStep);
}
int KPlayerSlider::pageStep (void) const
{
- return QSlider::pageStep();
+ return TQSlider::pageStep();
}
void KPlayerSlider::setPageStep (int pageStep)
{
- QSlider::setPageStep (pageStep);
+ TQSlider::setPageStep (pageStep);
setTickInterval (pageStep);
}
int KPlayerSlider::value (void) const
{
if ( orientation() == Qt::Horizontal )
- return QSlider::value();
- return - QSlider::value();
+ return TQSlider::value();
+ return - TQSlider::value();
}
void KPlayerSlider::setValue (int value, int)
{
if ( orientation() == Qt::Horizontal )
- QSlider::setValue (value);
+ TQSlider::setValue (value);
else
- QSlider::setValue (- value);
+ TQSlider::setValue (- value);
}
void KPlayerSlider::setup (int minValue, int maxValue, int value, int pageStep, int lineStep)
diff --git a/umbrello/umbrello/kplayerslideraction.h b/umbrello/umbrello/kplayerslideraction.h
index e8bb6ff9..076ebf22 100644
--- a/umbrello/umbrello/kplayerslideraction.h
+++ b/umbrello/umbrello/kplayerslideraction.h
@@ -17,7 +17,7 @@
#define KPLAYERSLIDERACTION_H
#include <kaction.h>
-#include <qslider.h>
+#include <tqslider.h>
/**KPlayer's slider widget. Works around the Qt upside-down slider bug.
* Taken from kplayer CVS 2003-09-21 (kplayer > 0.3.1) by Jonathan Riddell
@@ -28,19 +28,19 @@ class KPlayerSlider : public QSlider
Q_OBJECT
public:
- /** The KPlayerSlider constructor. Parameters are passed on to QSlider.
+ /** The KPlayerSlider constructor. Parameters are passed on to TQSlider.
*/
- explicit KPlayerSlider (Qt::Orientation, QWidget* parent = 0, const char* name = 0);
+ explicit KPlayerSlider (Qt::Orientation, TQWidget* parent = 0, const char* name = 0);
/** The KPlayerSlider destructor. Does nothing.
*/
virtual ~KPlayerSlider();
/** The size hint.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/** The minimum size hint.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/** The minimum value.
*/
@@ -69,7 +69,7 @@ public:
/** The current value.
*/
int value (void) const;
- /** Sets the current value. The extra parameter prevents overriding of the virtual QSlider::setValue.
+ /** Sets the current value. The extra parameter prevents overriding of the virtual TQSlider::setValue.
*/
void setValue (int, int = 0); // do not override the virtual setValue
@@ -86,7 +86,7 @@ signals:
void changed (int);
protected slots:
- /** Receives the valueChanged signal from QSlider.
+ /** Receives the valueChanged signal from TQSlider.
*/
void sliderValueChanged (int);
@@ -106,10 +106,10 @@ class KPlayerPopupFrame : public QFrame
Q_OBJECT
public:
- /** The KPlayerPopupFrame constructor. Parameters are passed on to QFrame.
+ /** The KPlayerPopupFrame constructor. Parameters are passed on to TQFrame.
*/
- KPlayerPopupFrame (QWidget* parent = 0, const char* name = 0)
- : QFrame (parent, name, Qt::WType_Popup) { }
+ KPlayerPopupFrame (TQWidget* parent = 0, const char* name = 0)
+ : TQFrame (parent, name, Qt::WType_Popup) { }
/** The KPlayerPopupFrame destructor. Does nothing.
*/
virtual ~KPlayerPopupFrame() { }
@@ -117,7 +117,7 @@ public:
protected:
/** Closes the popup frame when Alt, Tab, Esc, Enter or Return is pressed.
*/
- virtual void keyPressEvent (QKeyEvent*);
+ virtual void keyPressEvent (TQKeyEvent*);
};
/**Action representing a popup slider activated by a toolbar button.
@@ -130,8 +130,8 @@ class KPlayerPopupSliderAction : public KAction
public:
/** The KPlayerPopupSliderAction constructor. Parameters are passed on to KAction.
*/
- KPlayerPopupSliderAction (const QString& text, const QString& pix, const KShortcut& shortcut,
- const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0);
+ KPlayerPopupSliderAction (const TQString& text, const TQString& pix, const KShortcut& shortcut,
+ const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0);
/** The KPlayerPopupSliderAction destructor. Deletes the KPlayerPopupFrame.
*/
virtual ~KPlayerPopupSliderAction();
@@ -142,9 +142,9 @@ public:
{ return m_slider; }
/** Plugs the action into the toolbar. Reparents the slider into the toolbar. */
- //virtual int plug (QWidget*, int = -1);
+ //virtual int plug (TQWidget*, int = -1);
/** Unplugs the action from the toolbar. Reparents the slider out of the toolbar. */
- //virtual void unplug (QWidget*);
+ //virtual void unplug (TQWidget*);
protected slots:
/** Pops up the slider.
@@ -170,7 +170,7 @@ class KPlayerSliderAction : public KWidgetAction
public:
/** The KPlayerSliderAction constructor. Parameters are passed on to KAction.
*/
- KPlayerSliderAction (const QString& text, const KShortcut&, const QObject* receiver,
+ KPlayerSliderAction (const TQString& text, const KShortcut&, const TQObject* receiver,
const char* slot, KActionCollection* parent = 0, const char* name = 0);
/** The KPlayerSliderAction destructor. Does nothing.
*/
@@ -183,10 +183,10 @@ public:
/** Plugs the slider into the toolbar.
*/
- virtual int plug (QWidget* widget, int index = -1);
+ virtual int plug (TQWidget* widget, int index = -1);
/** Unplugs the slider from the toolbar.
*/
- virtual void unplug (QWidget* widget);
+ virtual void unplug (TQWidget* widget);
protected slots:
/** Changes the slider orientation when the toolbar orientation changes.
diff --git a/umbrello/umbrello/kstartuplogo.cpp b/umbrello/umbrello/kstartuplogo.cpp
index 5cefe463..7f768260 100644
--- a/umbrello/umbrello/kstartuplogo.cpp
+++ b/umbrello/umbrello/kstartuplogo.cpp
@@ -15,23 +15,23 @@
#include "kstartuplogo.h"
#include <kapplication.h>
#include <kstandarddirs.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KStartupLogo::KStartupLogo(QWidget * parent, const char *name)
- : QWidget(parent,name, Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WDestructiveClose )
+KStartupLogo::KStartupLogo(TQWidget * parent, const char *name)
+ : TQWidget(parent,name, Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WDestructiveClose )
,m_bReadyToHide(false) {
//pm.load(locate("appdata", "pics/startlogo.png"));
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
- QPixmap pm(dataDir + "startlogo.png");
+ TQPixmap pm(dataDir + "startlogo.png");
setBackgroundPixmap(pm);
- setGeometry(QApplication::desktop()->width()/2-pm.width()/2,
- QApplication::desktop()->height()/2-pm.height()/2,
+ setGeometry(TQApplication::desktop()->width()/2-pm.width()/2,
+ TQApplication::desktop()->height()/2-pm.height()/2,
pm.width(),pm.height());
- timer = new QTimer(this);
- connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) );
+ timer = new TQTimer(this);
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) );
timer->start(2000, true);
}
@@ -39,7 +39,7 @@ KStartupLogo::~KStartupLogo() {
delete timer;
}
-void KStartupLogo::mousePressEvent( QMouseEvent*) {
+void KStartupLogo::mousePressEvent( TQMouseEvent*) {
// for the haters of raising startlogos
if (m_bReadyToHide)
hide();
diff --git a/umbrello/umbrello/kstartuplogo.h b/umbrello/umbrello/kstartuplogo.h
index d8f4af7a..71181891 100644
--- a/umbrello/umbrello/kstartuplogo.h
+++ b/umbrello/umbrello/kstartuplogo.h
@@ -16,7 +16,7 @@
#ifndef KSTARTUPLOGO_H
#define KSTARTUPLOGO_H
-#include <qwidget.h>
+#include <tqwidget.h>
/**
@@ -24,17 +24,17 @@
* This class is mostly borrowed from another project, probably KMyMoney2.
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class KStartupLogo : public QWidget {
+class KStartupLogo : public TQWidget {
Q_OBJECT
public:
- KStartupLogo(QWidget *parent=0, const char *name=0);
+ KStartupLogo(TQWidget *parent=0, const char *name=0);
~KStartupLogo();
void setHideEnabled(bool bEnabled);
protected:
- virtual void mousePressEvent( QMouseEvent*);
+ virtual void mousePressEvent( TQMouseEvent*);
bool m_bReadyToHide;
- QTimer* timer;
+ TQTimer* timer;
public slots:
void timerDone();
diff --git a/umbrello/umbrello/linepath.cpp b/umbrello/umbrello/linepath.cpp
index 59cf105f..b79ed8ac 100644
--- a/umbrello/umbrello/linepath.cpp
+++ b/umbrello/umbrello/linepath.cpp
@@ -17,9 +17,9 @@
#include <cmath>
// qt includes
-#include <qcanvas.h>
-#include <qdatastream.h>
-#include <qdom.h>
+#include <tqcanvas.h>
+#include <tqdatastream.h>
+#include <tqdom.h>
// kde includes
#include <kdebug.h>
@@ -32,27 +32,27 @@
#include "umldoc.h"
#include "uml.h"
-LinePath::Circle::Circle(QCanvas * canvas, int radius /* = 0 */)
- : QCanvasEllipse(radius * 2, radius * 2, canvas) {
+LinePath::Circle::Circle(TQCanvas * canvas, int radius /* = 0 */)
+ : TQCanvasEllipse(radius * 2, radius * 2, canvas) {
}
void LinePath::Circle::setX(int x) {
- QCanvasItem::setX( (double) x );
+ TQCanvasItem::setX( (double) x );
}
void LinePath::Circle::setY(int y) {
- QCanvasItem::setY( (double) y );
+ TQCanvasItem::setY( (double) y );
}
void LinePath::Circle::setRadius(int radius) {
- QCanvasEllipse::setSize(radius * 2, radius * 2);
+ TQCanvasEllipse::setSize(radius * 2, radius * 2);
}
int LinePath::Circle::getRadius() const {
- return (QCanvasEllipse::height() / 2);
+ return (TQCanvasEllipse::height() / 2);
}
-void LinePath::Circle::drawShape(QPainter& p) {
+void LinePath::Circle::drawShape(TQPainter& p) {
int diameter = height();
int radius = diameter / 2;
p.drawEllipse( (int)x() - radius, (int)y() - radius, diameter, diameter);
@@ -85,24 +85,24 @@ void LinePath::setAssociation(AssociationWidget * association ) {
if( getAssocType() == Uml::at_Coll_Message )
setupParallelLine();
UMLView * view = (UMLView *)m_pAssociation -> parent();
- connect( view, SIGNAL( sigColorChanged( Uml::IDType ) ), this, SLOT( slotLineColorChanged( Uml::IDType ) ) );
- connect( view, SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, SLOT( slotLineWidthChanged( Uml::IDType ) ) );
+ connect( view, TQT_SIGNAL( sigColorChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineColorChanged( Uml::IDType ) ) );
+ connect( view, TQT_SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineWidthChanged( Uml::IDType ) ) );
}
-QPoint LinePath::getPoint( int pointIndex ) {
+TQPoint LinePath::getPoint( int pointIndex ) {
int count = m_LineList.count();
if( count == 0 || pointIndex > count || pointIndex < 0)
- return QPoint( -1, -1 );
+ return TQPoint( -1, -1 );
if( pointIndex == count ) {
- QCanvasLine * line = m_LineList.last();
+ TQCanvasLine * line = m_LineList.last();
return line -> endPoint();
}
- QCanvasLine * line = m_LineList.at( pointIndex );
+ TQCanvasLine * line = m_LineList.at( pointIndex );
return line -> startPoint();
}
-bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
+bool LinePath::setPoint( int pointIndex, const TQPoint &point ) {
int count = m_LineList.count();
if( count == 0 || pointIndex > count || pointIndex < 0)
return false;
@@ -112,23 +112,23 @@ bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
}
if( pointIndex == count) {
- QCanvasLine * line = m_LineList.last();
- QPoint p = line -> startPoint();
+ TQCanvasLine * line = m_LineList.last();
+ TQPoint p = line -> startPoint();
line -> setPoints( p.x(), p.y(), point.x(), point.y() );
moveSelected( pointIndex );
update();
return true;
}
if( pointIndex == 0 ) {
- QCanvasLine * line = m_LineList.first();
- QPoint p = line -> endPoint();
+ TQCanvasLine * line = m_LineList.first();
+ TQPoint p = line -> endPoint();
line -> setPoints( point.x(), point.y(), p.x(), p.y() );
moveSelected( pointIndex );
update();
return true;
}
- QCanvasLine * line = m_LineList.at( pointIndex );
- QPoint p = line -> endPoint();
+ TQCanvasLine * line = m_LineList.at( pointIndex );
+ TQPoint p = line -> endPoint();
line -> setPoints( point.x(), point.y(), p.x(), p.y() );
line = m_LineList.at( pointIndex - 1 );
p = line -> startPoint();
@@ -138,12 +138,12 @@ bool LinePath::setPoint( int pointIndex, const QPoint &point ) {
return true;
}
-bool LinePath::isPoint( int pointIndex, const QPoint &point, unsigned short delta) {
+bool LinePath::isPoint( int pointIndex, const TQPoint &point, unsigned short delta) {
int count = m_LineList.count();
if ( pointIndex >= count )
return false;
- QCanvasLine * line = m_LineList.at( pointIndex );
+ TQCanvasLine * line = m_LineList.at( pointIndex );
/* check if the given point is the start or end point of the line */
if ( (
@@ -161,18 +161,18 @@ bool LinePath::isPoint( int pointIndex, const QPoint &point, unsigned short delt
return false;
}
-bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
+bool LinePath::insertPoint( int pointIndex, const TQPoint &point ) {
int count = m_LineList.count();
if( count == 0 )
return false;
const bool bLoading = UMLApp::app()->getDocument()->loading();
if( count == 1 || pointIndex == 1) {
- QCanvasLine * first = m_LineList.first();
- QPoint sp = first -> startPoint();
- QPoint ep = first -> endPoint();
+ TQCanvasLine * first = m_LineList.first();
+ TQPoint sp = first -> startPoint();
+ TQPoint ep = first -> endPoint();
first -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setZ( -2 );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setPen( getPen() );
@@ -183,11 +183,11 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
return true;
}
if( count + 1 == pointIndex ) {
- QCanvasLine * before = m_LineList.last();
- QPoint sp = before -> startPoint();
- QPoint ep = before -> endPoint();
+ TQCanvasLine * before = m_LineList.last();
+ TQPoint sp = before -> startPoint();
+ TQPoint ep = before -> endPoint();
before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -197,11 +197,11 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
setupSelected();
return true;
}
- QCanvasLine * before = m_LineList.at( pointIndex - 1 );
- QPoint sp = before -> startPoint();
- QPoint ep = before -> endPoint();
+ TQCanvasLine * before = m_LineList.at( pointIndex - 1 );
+ TQPoint sp = before -> startPoint();
+ TQPoint ep = before -> endPoint();
before -> setPoints( sp.x(), sp.y(), point.x(), point.y() );
- QCanvasLine * line = new QCanvasLine(getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine(getCanvas() );
line -> setPoints( point.x(), point.y(), ep.x(), ep.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -212,7 +212,7 @@ bool LinePath::insertPoint( int pointIndex, const QPoint &point ) {
return true;
}
-bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short delta )
+bool LinePath::removePoint( int pointIndex, const TQPoint &point, unsigned short delta )
{
/* get the number of line segments */
int count = m_LineList.count();
@@ -221,7 +221,7 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* we don't know if the user clicked on the start- or endpoint of a
* line segment */
- QCanvasLine * current_line = m_LineList.at( pointIndex );
+ TQCanvasLine * current_line = m_LineList.at( pointIndex );
if (abs( current_line -> endPoint().x() - point.x() ) <= delta
&&
abs( current_line -> endPoint().y() - point.y() ) <= delta)
@@ -233,9 +233,9 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* the next segment will get the starting point from the current one,
* which is going to be removed */
- QCanvasLine * next_line = m_LineList.at( pointIndex + 1 );
- QPoint startPoint = current_line -> startPoint();
- QPoint endPoint = next_line -> endPoint();
+ TQCanvasLine * next_line = m_LineList.at( pointIndex + 1 );
+ TQPoint startPoint = current_line -> startPoint();
+ TQPoint endPoint = next_line -> endPoint();
next_line -> setPoints(startPoint.x(), startPoint.y(),
endPoint.x(), endPoint.y());
@@ -251,9 +251,9 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
/* the previous segment will get the end point from the current one,
* which is going to be removed */
- QCanvasLine * previous_line = m_LineList.at( pointIndex - 1 );
- QPoint startPoint = previous_line -> startPoint();
- QPoint endPoint = current_line -> endPoint();
+ TQCanvasLine * previous_line = m_LineList.at( pointIndex - 1 );
+ TQPoint startPoint = previous_line -> startPoint();
+ TQPoint endPoint = current_line -> endPoint();
previous_line -> setPoints(startPoint.x(), startPoint.y(),
endPoint.x(), endPoint.y());
} else {
@@ -269,11 +269,11 @@ bool LinePath::removePoint( int pointIndex, const QPoint &point, unsigned short
return true;
}
-bool LinePath::setStartEndPoints( const QPoint &start, const QPoint &end ) {
+bool LinePath::setStartEndPoints( const TQPoint &start, const TQPoint &end ) {
int count = m_LineList.count();
if( count == 0 ) {
- QCanvasLine * line = new QCanvasLine(getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine(getCanvas() );
line -> setPoints( start.x(), start.y(), end.x(), end.y() );
line -> setZ( -2 );
line -> setPen( getPen() );
@@ -291,13 +291,13 @@ int LinePath::count() {
return m_LineList.count() + 1;
}
-int LinePath::onLinePath( const QPoint &position ) {
- QCanvasItemList list = getCanvas() -> collisions( position );
+int LinePath::onLinePath( const TQPoint &position ) {
+ TQCanvasItemList list = getCanvas() -> collisions( position );
int index = -1;
- QCanvasItemList::iterator end(list.end());
- for(QCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
- if( ( index = m_LineList.findRef( (QCanvasLine*)*item_it ) ) != -1 )
+ TQCanvasItemList::iterator end(list.end());
+ for(TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) {
+ if( ( index = m_LineList.findRef( (TQCanvasLine*)*item_it ) ) != -1 )
break;
}//end for
return index;
@@ -312,7 +312,7 @@ void LinePath::setSelected( bool select ) {
void LinePath::setAssocType( Uml::Association_Type type ) {
LineListIt it( m_LineList );
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
while( ( line = it.current() ) ) {
line -> setPen( getPen() );
++it;
@@ -351,36 +351,36 @@ void LinePath::slotLineColorChanged( Uml::IDType viewID ) {
}
-void LinePath::setLineColor( const QColor &color ) {
- QCanvasLine * line = 0;
+void LinePath::setLineColor( const TQColor &color ) {
+ TQCanvasLine * line = 0;
uint linewidth = 0;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++it;
}
LineListIt hit( m_HeadList );
while( ( line = hit.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++hit;
}
LineListIt pit( m_ParallelList );
while( ( line = pit.current() ) ) {
linewidth = line->pen().width();
- line -> setPen( QPen( color, linewidth ) );
+ line -> setPen( TQPen( color, linewidth ) );
++pit;
}
if( getAssocType() == Uml::at_Aggregation )
- if (m_pClearPoly) m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ if (m_pClearPoly) m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
else if( getAssocType() == Uml::at_Composition )
- if (m_pClearPoly) m_pClearPoly -> setBrush( QBrush( color ) );
+ if (m_pClearPoly) m_pClearPoly -> setBrush( TQBrush( color ) );
if( m_pCircle ) {
linewidth = m_pCircle->pen().width();
- m_pCircle->setPen( QPen(color, linewidth) );
+ m_pCircle->setPen( TQPen(color, linewidth) );
}
}
@@ -392,30 +392,30 @@ void LinePath::slotLineWidthChanged( Uml::IDType viewID ) {
}
void LinePath::setLineWidth( uint width ) {
- QCanvasLine * line = 0;
- QColor linecolor;
+ TQCanvasLine * line = 0;
+ TQColor linecolor;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++it;
}
LineListIt hit( m_HeadList );
while( ( line = hit.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++hit;
}
LineListIt pit( m_ParallelList );
while( ( line = pit.current() ) ) {
linecolor = line->pen().color();
- line -> setPen( QPen( linecolor, width ) );
+ line -> setPen( TQPen( linecolor, width ) );
++pit;
}
if( m_pCircle ) {
linecolor = m_pCircle->pen().color();
- m_pCircle->setPen( QPen(linecolor, width) );
+ m_pCircle->setPen( TQPen(linecolor, width) );
}
}
@@ -427,11 +427,11 @@ void LinePath::moveSelected( int pointIndex ) {
}
if( (int)m_RectList.count() + 1 != lineCount )
setupSelected();
- QCanvasRectangle * rect = 0;
- QCanvasLine * line = 0;
+ TQCanvasRectangle * rect = 0;
+ TQCanvasLine * line = 0;
if( pointIndex == lineCount || lineCount == 1) {
line = m_LineList.last();
- QPoint p = line -> endPoint();
+ TQPoint p = line -> endPoint();
rect = m_RectList.last();
rect -> setX( p.x() );
rect -> setY( p.y() );
@@ -439,7 +439,7 @@ void LinePath::moveSelected( int pointIndex ) {
return;
}
line = m_LineList.at( pointIndex );
- QPoint p = line -> startPoint();
+ TQPoint p = line -> startPoint();
rect = m_RectList.at( pointIndex );
rect -> setX( p.x() );
rect -> setY( p.y() );
@@ -448,32 +448,32 @@ void LinePath::moveSelected( int pointIndex ) {
void LinePath::setupSelected() {
m_RectList.clear();
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
LineListIt it( m_LineList );
while( ( line = it.current() ) ) {
- QPoint sp = line -> startPoint();
- QCanvasRectangle *rect = Widget_Utils::decoratePoint(sp);
+ TQPoint sp = line -> startPoint();
+ TQCanvasRectangle *rect = Widget_Utils::decoratePoint(sp);
m_RectList.append( rect );
++it;
}
//special case for last point
line = m_LineList.last();
- QPoint p = line -> endPoint();
- QCanvasRectangle *rect = Widget_Utils::decoratePoint(p);
+ TQPoint p = line -> endPoint();
+ TQCanvasRectangle *rect = Widget_Utils::decoratePoint(p);
m_RectList.append( rect );
update();
}
-QPen LinePath::getPen() {
+TQPen LinePath::getPen() {
Uml::Association_Type type = getAssocType();
if( type == Uml::at_Dependency || type == Uml::at_Realization || type == Uml::at_Anchor )
- return QPen( getLineColor(), getLineWidth(), Qt::DashLine );
- return QPen( getLineColor(), getLineWidth() );
+ return TQPen( getLineColor(), getLineWidth(), Qt::DashLine );
+ return TQPen( getLineColor(), getLineWidth() );
}
void LinePath::calculateHead() {
uint size = m_LineList.count();
- QPoint farPoint;
+ TQPoint farPoint;
int halfLength = 10;
double arrowAngle = 0.2618; // 0.5 * atan(sqrt(3.0) / 3.0) = 0.2618
Uml::Association_Type at = getAssocType();
@@ -544,7 +544,7 @@ void LinePath::calculateHead() {
m_PointArray.setPoint( 2, m_ArrowPointB );
m_PointArray.setPoint( 3, m_EgdePoint );
} else {
- QPoint diamondFarPoint;
+ TQPoint diamondFarPoint;
diamondFarPoint.setX( (int)rint(xb + cosx * 2) );
diamondFarPoint.setY( (int)rint(yb + siny * 2) );
m_PointArray.setPoint(2, diamondFarPoint);
@@ -555,7 +555,7 @@ void LinePath::calculateHead() {
void LinePath::updateHead() {
int count = m_HeadList.count();
- QCanvasLine * line = 0;
+ TQCanvasLine * line = 0;
switch( getAssocType() ) {
case Uml::at_State:
@@ -639,9 +639,9 @@ void LinePath::updateHead() {
}
void LinePath::growList(LineList &list, int by) {
- QPen pen( getLineColor(), getLineWidth() );
+ TQPen pen( getLineColor(), getLineWidth() );
for (int i = 0; i < by; i++) {
- QCanvasLine * line = new QCanvasLine( getCanvas() );
+ TQCanvasLine * line = new TQCanvasLine( getCanvas() );
line -> setZ( 0 );
line -> setPen( pen );
line -> setVisible( true );
@@ -651,7 +651,7 @@ void LinePath::growList(LineList &list, int by) {
void LinePath::createHeadLines() {
m_HeadList.clear();
- QCanvas * canvas = getCanvas();
+ TQCanvas * canvas = getCanvas();
switch( getAssocType() ) {
case Uml::at_Activity:
case Uml::at_State:
@@ -664,21 +664,21 @@ void LinePath::createHeadLines() {
case Uml::at_Generalization:
case Uml::at_Realization:
growList(m_HeadList, 3);
- m_pClearPoly = new QCanvasPolygon( canvas );
+ m_pClearPoly = new TQCanvasPolygon( canvas );
m_pClearPoly -> setVisible( true );
- m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
m_pClearPoly -> setZ( -1 );
break;
case Uml::at_Composition:
case Uml::at_Aggregation:
growList(m_HeadList, 4);
- m_pClearPoly = new QCanvasPolygon( canvas );
+ m_pClearPoly = new TQCanvasPolygon( canvas );
m_pClearPoly -> setVisible( true );
if( getAssocType() == Uml::at_Aggregation )
- m_pClearPoly -> setBrush( QBrush( Qt::white ) );
+ m_pClearPoly -> setBrush( TQBrush( Qt::white ) );
else
- m_pClearPoly -> setBrush( QBrush( getLineColor() ) );
+ m_pClearPoly -> setBrush( TQBrush( getLineColor() ) );
m_pClearPoly -> setZ( -1 );
break;
@@ -687,7 +687,7 @@ void LinePath::createHeadLines() {
if (!m_pCircle) {
m_pCircle = new Circle( canvas, 6 );
m_pCircle->show();
- m_pCircle->setPen( QPen( getLineColor(), getLineWidth() ) );
+ m_pCircle->setPen( TQPen( getLineColor(), getLineWidth() ) );
}
break;
default:
@@ -701,8 +701,8 @@ void LinePath::calculateParallelLine() {
double ATAN = atan(1.0);
int lineDist = 10;
//get 1/8(M) and 7/8(T) point
- QPoint a = getPoint( midCount - 1 );
- QPoint b = getPoint( midCount );
+ TQPoint a = getPoint( midCount - 1 );
+ TQPoint b = getPoint( midCount );
int mx = ( a.x() + b.x() ) / 2;
int my = ( a.y() + b.y() ) / 2;
int tx = ( mx + b.x() ) / 2;
@@ -717,7 +717,7 @@ void LinePath::calculateParallelLine() {
//find point from M to start line from.
double cosx = cos( angle ) * lineDist;
double siny = sin( angle ) * lineDist;
- QPoint pointM( mx + (int)cosx, my + (int)siny );
+ TQPoint pointM( mx + (int)cosx, my + (int)siny );
//find dist between P(xb, yb)
distX = ( tx - b.x() );
distX *= distX;
@@ -727,7 +727,7 @@ void LinePath::calculateParallelLine() {
//find point from T to end line
cosx = cos( angle ) * lineDist;
siny = sin( angle ) * lineDist;
- QPoint pointT( tx + (int)cosx, ty + (int)siny );
+ TQPoint pointT( tx + (int)cosx, ty + (int)siny );
m_ParallelLines[ 1 ] = pointM;
m_ParallelLines[ 0 ] = pointT;
@@ -737,11 +737,11 @@ void LinePath::calculateParallelLine() {
double arrowSlope = angle + ATAN;
cosx = ( cos( arrowSlope ) ) * arrowDist;
siny = ( sin( arrowSlope ) ) * arrowDist;
- m_ParallelLines[ 2 ] = QPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
+ m_ParallelLines[ 2 ] = TQPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
arrowSlope = angle - ATAN;
cosx = ( cos( arrowSlope ) ) * arrowDist;
siny = ( sin( arrowSlope ) ) * arrowDist;
- m_ParallelLines[ 3 ] = QPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
+ m_ParallelLines[ 3 ] = TQPoint( pointT.x() - (int)cosx, pointT.y() - (int)siny );
}
void LinePath::setupParallelLine() {
@@ -753,9 +753,9 @@ void LinePath::setupParallelLine() {
void LinePath::updateParallelLine() {
if( !m_bParallelLineCreated )
return;
- QCanvasLine * line = 0;
- QPoint common = m_ParallelLines.at( 0 );
- QPoint p = m_ParallelLines.at( 1 );
+ TQCanvasLine * line = 0;
+ TQPoint common = m_ParallelLines.at( 0 );
+ TQPoint p = m_ParallelLines.at( 1 );
line = m_ParallelList.at( 0 );
line -> setPoints( common.x(), common.y(), p.x(), p.y() );
@@ -800,7 +800,7 @@ LinePath & LinePath::operator=( LinePath & rhs ) {
return *this;
}
-QCanvas * LinePath::getCanvas() {
+TQCanvas * LinePath::getCanvas() {
if( !m_pAssociation )
return 0;
const UMLView * view = m_pAssociation->getUMLView();
@@ -813,7 +813,7 @@ Uml::Association_Type LinePath::getAssocType() {
return Uml::at_Association;
}
-QColor LinePath::getLineColor() {
+TQColor LinePath::getLineColor() {
if( !m_pAssociation )
return Qt::black;
return m_pAssociation -> getLineColor();
@@ -849,8 +849,8 @@ void LinePath::cleanup() {
if( m_pAssociation ) {
UMLView * view = (UMLView *)m_pAssociation -> parent();
if(view) {
- disconnect( view, SIGNAL( sigColorChanged( Uml::IDType ) ), this, SLOT( slotLineColorChanged( Uml::IDType ) ) );
- disconnect( view, SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, SLOT( slotLineWidthChanged( Uml::IDType ) ) );
+ disconnect( view, TQT_SIGNAL( sigColorChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineColorChanged( Uml::IDType ) ) );
+ disconnect( view, TQT_SIGNAL( sigLineWidthChanged( Uml::IDType ) ), this, TQT_SLOT( slotLineWidthChanged( Uml::IDType ) ) );
}
m_pAssociation = NULL;
}
@@ -869,26 +869,26 @@ bool LinePath::hasPoints () {
void LinePath::dumpPoints () {
int count = m_LineList.count();
for( int i = 1; i < count; i++ ) {
- QPoint point = getPoint( i );
+ TQPoint point = getPoint( i );
kDebug()<<" * point x:"<<point.x()<<" y:"<<point.y()<<endl;
}
}
-void LinePath::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void LinePath::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
int count = m_LineList.count();
- QPoint point = getPoint( 0 );
- QDomElement lineElement = qDoc.createElement( "linepath" );
- QDomElement startElement = qDoc.createElement( "startpoint" );
+ TQPoint point = getPoint( 0 );
+ TQDomElement lineElement = qDoc.createElement( "linepath" );
+ TQDomElement startElement = qDoc.createElement( "startpoint" );
startElement.setAttribute( "startx", point.x() );
startElement.setAttribute( "starty", point.y() );
lineElement.appendChild( startElement );
- QDomElement endElement = qDoc.createElement( "endpoint" );
+ TQDomElement endElement = qDoc.createElement( "endpoint" );
point = getPoint( count );
endElement.setAttribute( "endx", point.x() );
endElement.setAttribute( "endy", point.y() );
lineElement.appendChild( endElement );
for( int i = 1; i < count; i++ ) {
- QDomElement pointElement = qDoc.createElement( "point" );
+ TQDomElement pointElement = qDoc.createElement( "point" );
point = getPoint( i );
pointElement.setAttribute( "x", point.x() );
pointElement.setAttribute( "y", point.y() );
@@ -897,30 +897,30 @@ void LinePath::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( lineElement );
}
-bool LinePath::loadFromXMI( QDomElement & qElement ) {
- QDomNode node = qElement.firstChild();
- QDomElement startElement = node.toElement();
+bool LinePath::loadFromXMI( TQDomElement & qElement ) {
+ TQDomNode node = qElement.firstChild();
+ TQDomElement startElement = node.toElement();
if( startElement.isNull() || startElement.tagName() != "startpoint" )
return false;
- QString x = startElement.attribute( "startx", "0" );
+ TQString x = startElement.attribute( "startx", "0" );
int nX = x.toInt();
- QString y = startElement.attribute( "starty", "0" );
+ TQString y = startElement.attribute( "starty", "0" );
int nY = y.toInt();
- QPoint startPoint( nX, nY );
+ TQPoint startPoint( nX, nY );
node = startElement.nextSibling();
- QDomElement endElement = node.toElement();
+ TQDomElement endElement = node.toElement();
if( endElement.isNull() || endElement.tagName() != "endpoint" )
return false;
x = endElement.attribute( "endx", "0" );
nX = x.toInt();
y = endElement.attribute( "endy", "0" );
nY = y.toInt();
- QPoint endPoint( nX, nY );
+ TQPoint endPoint( nX, nY );
setStartEndPoints( startPoint, endPoint );
- QPoint point;
+ TQPoint point;
node = endElement.nextSibling();
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
int i = 1;
while( !element.isNull() ) {
if( element.tagName() == "point" ) {
@@ -942,11 +942,11 @@ void LinePath::activate() {
int count = m_LineList.count();
if (count == 0)
return;
- QCanvas * canvas = getCanvas();
+ TQCanvas * canvas = getCanvas();
if (canvas == NULL)
return;
for (int i = 0; i < count ; i++) {
- QCanvasLine *line = m_LineList.at(i);
+ TQCanvasLine *line = m_LineList.at(i);
line -> setCanvas( canvas );
line -> setPen( getPen() );
}
diff --git a/umbrello/umbrello/linepath.h b/umbrello/umbrello/linepath.h
index 434749e3..e2cf73db 100644
--- a/umbrello/umbrello/linepath.h
+++ b/umbrello/umbrello/linepath.h
@@ -11,12 +11,12 @@
#ifndef LINEPATH_H
#define LINEPATH_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qpoint.h>
-#include <qpointarray.h>
-#include <qcanvas.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqpoint.h>
+#include <tqpointarray.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
#include "umlnamespace.h"
/* how many pixels a user could click around a point */
@@ -31,18 +31,18 @@ class QDomDocument;
class QDomElement;
// typedefs
-typedef QPtrList<QCanvasLine> LineList;
-typedef QPtrListIterator<QCanvasLine> LineListIt;
+typedef TQPtrList<TQCanvasLine> LineList;
+typedef TQPtrListIterator<TQCanvasLine> LineListIt;
-typedef QPtrList<QCanvasRectangle> RectList;
-typedef QPtrListIterator<QCanvasRectangle> RectListIt;
+typedef TQPtrList<TQCanvasRectangle> RectList;
+typedef TQPtrListIterator<TQCanvasRectangle> RectListIt;
/**
*@author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class LinePath : public QObject {
+class LinePath : public TQObject {
Q_OBJECT
public:
/**
@@ -83,35 +83,35 @@ public:
/**
* Returns the point at the point index.
*/
- QPoint getPoint( int pointIndex );
+ TQPoint getPoint( int pointIndex );
/**
* Sets the position of an already set point.
*/
- bool setPoint( int pointIndex, const QPoint &point );
+ bool setPoint( int pointIndex, const TQPoint &point );
/**
* Checks, if we are at an end of the segment or somewhere in the middle.
* We use the delta, because with the mouse it is hard to find the
* exactly point.
*/
- bool isPoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
+ bool isPoint( int pointIndex, const TQPoint &point, unsigned short delta = 0 );
/**
* Inserts a point at the given index.
*/
- bool insertPoint( int pointIndex, const QPoint &point );
+ bool insertPoint( int pointIndex, const TQPoint &point );
/**
* Removes the point on the line given by the index, at the coordinates
* given by point with a fuzzy of delta
*/
- bool removePoint( int pointIndex, const QPoint &point, unsigned short delta = 0 );
+ bool removePoint( int pointIndex, const TQPoint &point, unsigned short delta = 0 );
/**
* Sets the start and end points.
*/
- bool setStartEndPoints( const QPoint &start, const QPoint &end );
+ bool setStartEndPoints( const TQPoint &start, const TQPoint &end );
/**
* Returns the amount of POINTS on the line.
@@ -124,12 +124,12 @@ public:
* else returns the line segment the point is on.
* Use the value to insert points at the point position.
*/
- int onLinePath( const QPoint &position );
+ int onLinePath( const TQPoint &position );
/**
* Sets the canvas to be used.
*/
- void setCanvas( QCanvas * canvas );
+ void setCanvas( TQCanvas * canvas );
/**
* Sets the Association type.
@@ -159,9 +159,9 @@ public:
*/
void setSelected( bool select );
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
/**
* Activates the line list.
@@ -182,12 +182,12 @@ public:
/**
* Returns the type of pen to use depending on the type of Association.
*/
- QPen getPen();
+ TQPen getPen();
/**
* Sets the line color used by the line.
*/
- void setLineColor( const QColor &color );
+ void setLineColor( const TQColor &color );
/**
* Sets the line width used by the line.
*/
@@ -197,20 +197,20 @@ protected:
/**
* Draw a (hollow) circle.
- * We can't use QCanvasEllipse directly for this because it doesn't
- * use the pen, i.e. QCanvasEllipse only draws filled ellipses.
+ * We can't use TQCanvasEllipse directly for this because it doesn't
+ * use the pen, i.e. TQCanvasEllipse only draws filled ellipses.
*/
- class Circle : public QCanvasEllipse {
+ class Circle : public TQCanvasEllipse {
public:
- explicit Circle(QCanvas * canvas, int radius = 0);
+ explicit Circle(TQCanvas * canvas, int radius = 0);
void setRadius(int radius);
int getRadius() const;
void setX(int x);
void setY(int y);
/**
- * The beef: Override method from QCanvasEllipse.
+ * The beef: Override method from TQCanvasEllipse.
*/
- void drawShape(QPainter& p);
+ void drawShape(TQPainter& p);
};
/**
@@ -220,7 +220,7 @@ protected:
* This class doesn't hold this information but is a wrapper
* method to stop calls to undefined variable like m_pAssociation.
*/
- QCanvas * getCanvas();
+ TQCanvas * getCanvas();
/**
* Returns the Association type.
@@ -238,7 +238,7 @@ protected:
* This class doesn't hold this information but is a wrapper
* method to stop calls to undefined variable like m_pAssociation.
*/
- QColor getLineColor();
+ TQColor getLineColor();
/**
* Returns the Line Width to use.
* Returns 0 if association not set.
@@ -332,17 +332,17 @@ protected:
/**
* Contains calculated points used to draw the line head.
*/
- QPointArray m_PointArray;
+ TQPointArray m_PointArray;
/**
* Contains calculated points used to draw the line head.
*/
- QPoint m_ArrowPointA, m_ArrowPointB, m_MidPoint, m_EgdePoint;
+ TQPoint m_ArrowPointA, m_ArrowPointB, m_MidPoint, m_EgdePoint;
/**
* A polygon object to blank out any lines we don't want to see.
*/
- QCanvasPolygon * m_pClearPoly;
+ TQCanvasPolygon * m_pClearPoly;
/**
* The transparent circle required by containment associations.
@@ -353,7 +353,7 @@ protected:
* Contains the calculated points for the parallel line
* on a collaboration message to use.
*/
- QPointArray m_ParallelLines;
+ TQPointArray m_ParallelLines;
/**
* Region where the line docks
diff --git a/umbrello/umbrello/linkwidget.cpp b/umbrello/umbrello/linkwidget.cpp
index b1b176de..508de933 100644
--- a/umbrello/umbrello/linkwidget.cpp
+++ b/umbrello/umbrello/linkwidget.cpp
@@ -33,7 +33,7 @@ UMLClassifier *LinkWidget::getOperationOwner() {
return static_cast<UMLClassifier*>(op->parent());
}
-QString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
+TQString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
UMLOperation *op = getOperation();
if (op == NULL)
return getCustomOpText();
@@ -44,7 +44,7 @@ QString LinkWidget::getOperationText(UMLView *view /* = NULL */) {
sigType = Uml::st_SigNoVis;
else
sigType = Uml::st_NoSigNoVis;
- QString opText = op->toString(sigType);
+ TQString opText = op->toString(sigType);
return opText;
}
diff --git a/umbrello/umbrello/linkwidget.h b/umbrello/umbrello/linkwidget.h
index 0e85d615..310a5248 100644
--- a/umbrello/umbrello/linkwidget.h
+++ b/umbrello/umbrello/linkwidget.h
@@ -12,7 +12,7 @@
#ifndef LINKWIDGET_H
#define LINKWIDGET_H
-#include <qfont.h>
+#include <tqfont.h>
#include "umlnamespace.h"
@@ -45,7 +45,7 @@ public:
*
* @param font Font to be set.
*/
- virtual void lwSetFont(QFont font) = 0;
+ virtual void lwSetFont(TQFont font) = 0;
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)
@@ -65,17 +65,17 @@ public:
/**
* Motivated by getOperationText()
*/
- virtual QString getCustomOpText() = 0;
+ virtual TQString getCustomOpText() = 0;
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Operation)
*/
- virtual void setCustomOpText(const QString &opText) = 0;
+ virtual void setCustomOpText(const TQString &opText) = 0;
/**
* Uses getOperation() if set, else calls getCustomOpText().
*/
- QString getOperationText(UMLView *view = NULL);
+ TQString getOperationText(UMLView *view = NULL);
/**
* Motivated by FloatingTextWidget::slotMenuSelection(mt_Reset_Label_Positions)
@@ -91,7 +91,7 @@ public:
/**
* Motivated by FloatingTextWidget::handleRename()
*/
- virtual void setText(FloatingTextWidget *ft, const QString &newText) = 0;
+ virtual void setText(FloatingTextWidget *ft, const TQString &newText) = 0;
/**
* Motivated by FloatingTextWidget::mouseDoubleClickEvent()
@@ -102,12 +102,12 @@ public:
/**
* Motivated by FloatingTextWidget::showOpDlg()
*/
- virtual UMLClassifier *getSeqNumAndOp(QString& seqNum, QString& op) = 0;
+ virtual UMLClassifier *getSeqNumAndOp(TQString& seqNum, TQString& op) = 0;
/**
* Motivated by FloatingTextWidget::showOpDlg()
*/
- virtual void setSeqNumAndOp(const QString &seqNum, const QString &op) = 0;
+ virtual void setSeqNumAndOp(const TQString &seqNum, const TQString &op) = 0;
/**
* Abstract operation implemented by inheriting classes.
diff --git a/umbrello/umbrello/listpopupmenu.cpp b/umbrello/umbrello/listpopupmenu.cpp
index 816d661b..d94f8c18 100644
--- a/umbrello/umbrello/listpopupmenu.cpp
+++ b/umbrello/umbrello/listpopupmenu.cpp
@@ -37,14 +37,14 @@
#include "objectwidget.h"
//ListPopupMenu for a UMLView (diagram)
-ListPopupMenu::ListPopupMenu(QWidget *parent, Menu_Type type, UMLView * view)
+ListPopupMenu::ListPopupMenu(TQWidget *parent, Menu_Type type, UMLView * view)
: KPopupMenu(parent) {
init();
setupMenu(type, view);
}
//ListPopupMenu for the tree list view
-ListPopupMenu::ListPopupMenu(QWidget *parent, Uml::ListView_Type type)
+ListPopupMenu::ListPopupMenu(TQWidget *parent, Uml::ListView_Type type)
: KPopupMenu(parent) {
init();
Menu_Type mt = mt_Undefined;
@@ -205,7 +205,7 @@ ListPopupMenu::ListPopupMenu(QWidget *parent, Uml::ListView_Type type)
}
//ListPopupMenu for a canvas widget
-ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
+ListPopupMenu::ListPopupMenu(TQWidget * parent, UMLWidget * object,
bool multi, bool unique)
: KPopupMenu(parent)
{
@@ -249,11 +249,11 @@ ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
}
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
return;
}
@@ -437,11 +437,11 @@ ListPopupMenu::ListPopupMenu(QWidget * parent, UMLWidget * object,
}//end switch
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
bool bCutState = UMLApp::app() -> getCutCopyState();
setItemEnabled( mt_Cut, bCutState );
@@ -621,7 +621,7 @@ void ListPopupMenu::insertContainerItems(bool folderAndDiagrams) {
insertFileNew();
}
-void ListPopupMenu::insertAssocItem(const QString &label, Menu_Type mt) {
+void ListPopupMenu::insertAssocItem(const TQString &label, Menu_Type mt) {
insertItem(label, mt);
insertStdItem(mt_Change_Font);
insertStdItem(mt_Reset_Label_Positions);
@@ -651,7 +651,7 @@ void ListPopupMenu::insertSubmodelAction() {
<< "current->getUMLObject (" << o->getName() << ") is not a Folder" << endl;
return;
}
- QString submodelFile = f->getFolderFile();
+ TQString submodelFile = f->getFolderFile();
if (submodelFile.isEmpty())
insertStdItem(mt_Externalize_Folder);
else
@@ -827,7 +827,7 @@ void ListPopupMenu::setupMenu(Menu_Type type, UMLView* view) {
m_pColor = 0;
KStandardDirs* dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs->findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
m_pixmap[pm_Class] .load(dataDir+"class.png", "PNG");
m_pixmap[pm_Package] .load(dataDir+"package.png", "PNG");
@@ -1321,11 +1321,11 @@ void ListPopupMenu::setupMenu(Menu_Type type, UMLView* view) {
setItemEnabled( mt_Paste, UMLApp::app() -> getPasteState() );
}
if(m_pInsert)
- connect(m_pInsert, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pInsert, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pShow)
- connect(m_pShow, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pShow, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
if(m_pColor)
- connect(m_pColor, SIGNAL(activated(int)), this, SIGNAL(activated(int)));
+ connect(m_pColor, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated(int)));
}
void ListPopupMenu::setupDiagramMenu(UMLView* view) {
diff --git a/umbrello/umbrello/listpopupmenu.h b/umbrello/umbrello/listpopupmenu.h
index 58d779ab..e7030090 100644
--- a/umbrello/umbrello/listpopupmenu.h
+++ b/umbrello/umbrello/listpopupmenu.h
@@ -191,7 +191,7 @@ public:
* @param type The type of menu to display.
* @param view The UMLView in which this ListPopupMenu is going to be displayed
*/
- explicit ListPopupMenu(QWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
+ explicit ListPopupMenu(TQWidget* parent, Menu_Type type = mt_Undefined, UMLView* view = 0);
/**
* Constructs the popup menu for a list view item.
@@ -199,7 +199,7 @@ public:
* @param parent The parent to ListPopupMenu.
* @param type The type of menu to display.
*/
- ListPopupMenu(QWidget* parent, Uml::ListView_Type type);
+ ListPopupMenu(TQWidget* parent, Uml::ListView_Type type);
/**
* Constructs the popup menu for a canvas widget.
@@ -210,7 +210,7 @@ public:
* @param unique True if multiple selected items all have
* the same type (e.g. Class, Interface)
*/
- ListPopupMenu(QWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
+ ListPopupMenu(TQWidget* parent, UMLWidget* object, bool multi = false, bool unique = false);
/**
* Standard deconstructor.
@@ -273,7 +273,7 @@ private:
* @param label The menu text.
* @param mt The menu type.
*/
- void insertAssocItem(const QString &label, Menu_Type mt);
+ void insertAssocItem(const TQString &label, Menu_Type mt);
/**
* Inserts a menu item for externalization/de-externalization
@@ -320,7 +320,7 @@ private:
pm_Subsystem,
pm_NUMBER_OF_PIXMAPS
};
- QPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
+ TQPixmap m_pixmap[pm_NUMBER_OF_PIXMAPS];
KPopupMenu * m_pInsert, * m_pShow, * m_pColor;
void setupColor(bool fc);
void setupColorSelection(bool fc);
diff --git a/umbrello/umbrello/main.cpp b/umbrello/umbrello/main.cpp
index faba82d3..5d104d4f 100644
--- a/umbrello/umbrello/main.cpp
+++ b/umbrello/umbrello/main.cpp
@@ -161,7 +161,7 @@ KStartupLogo* showStartupLogo(KConfig* cfg, bool showGUI) {
#endif
KWin::setState(startLogo->winId(), NET::KeepAbove);
startLogo->show();
- QApplication::flushX();
+ TQApplication::flushX();
}
return startLogo;
@@ -173,7 +173,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
} else {
cfg->setGroup( "General Options" );
bool last = cfg->readBoolEntry( "loadlast", false );
- QString file = cfg->readPathEntry( "lastFile" );
+ TQString file = cfg->readPathEntry( "lastFile" );
if( last && !file.isEmpty() ) {
UMLApp::app()->openDocumentFile( KURL( file ) );
} else {
@@ -183,7 +183,7 @@ void initDocument(KCmdLineArgs *args, KConfig* cfg) {
}
void exportAllViews(KCmdLineArgs *args, const QCStringList &exportOpt) {
- QString extension(exportOpt.last());
+ TQString extension(exportOpt.last());
kDebug() << "extension: " << extension << endl;
// export to the specified directory, or the directory where the file is saved
diff --git a/umbrello/umbrello/messagewidget.cpp b/umbrello/umbrello/messagewidget.cpp
index 3cefc99d..1139b58c 100644
--- a/umbrello/umbrello/messagewidget.cpp
+++ b/umbrello/umbrello/messagewidget.cpp
@@ -13,7 +13,7 @@
#include "messagewidget.h"
//qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
//kde includes
#include <kdebug.h>
#include <kcursor.h>
@@ -78,7 +78,7 @@ void MessageWidget::updateResizability() {
UMLWidget::m_bResizable = false;
}
-void MessageWidget::draw(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::draw(TQPainter& p, int offsetX, int offsetY) {
if(!m_pOw[Uml::A] || !m_pOw[Uml::B]) {
return;
}
@@ -94,18 +94,18 @@ void MessageWidget::draw(QPainter& p, int offsetX, int offsetY) {
}
}
-void MessageWidget::drawSolidArrowhead(QPainter& p, int x, int y, Qt::ArrowType direction) {
+void MessageWidget::drawSolidArrowhead(TQPainter& p, int x, int y, Qt::ArrowType direction) {
int arrowheadExtentX = 4;
if (direction == Qt::RightArrow) {
arrowheadExtentX = -arrowheadExtentX;
}
- QPointArray points;
+ TQPointArray points;
points.putPoints(0, 3, x, y, x + arrowheadExtentX, y - 3, x + arrowheadExtentX, y + 3);
- p.setBrush( QBrush(p.pen().color()) );
+ p.setBrush( TQBrush(p.pen().color()) );
p.drawPolygon(points);
}
-void MessageWidget::drawArrow(QPainter& p, int x, int y, int w,
+void MessageWidget::drawArrow(TQPainter& p, int x, int y, int w,
Qt::ArrowType direction, bool useDottedLine /* = false */) {
int arrowheadStartX = x;
int arrowheadExtentX = 4;
@@ -119,14 +119,14 @@ void MessageWidget::drawArrow(QPainter& p, int x, int y, int w,
p.drawLine(arrowheadStartX, y, arrowheadStartX + arrowheadExtentX, y + 3);
// draw arrow line
if (useDottedLine) {
- QPen pen = p.pen();
+ TQPen pen = p.pen();
pen.setStyle(Qt::DotLine);
p.setPen(pen);
}
p.drawLine(x, y, x + w, y);
}
-void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawSynchronous(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -135,7 +135,7 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
bool messageOverlaps = m_pOw[Uml::A] -> messageOverlap( getY(), this );
if(m_pOw[Uml::A] == m_pOw[Uml::B]) {
- p.fillRect( offsetX, offsetY, 17, h, QBrush(Qt::white) ); //box
+ p.fillRect( offsetX, offsetY, 17, h, TQBrush(Qt::white) ); //box
p.drawRect(offsetX, offsetY, 17, h); //box
offsetX += 17;
w -= 17;
@@ -154,9 +154,9 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
offsetX += 8;
w -= 8;
}
- QPen pen = p.pen();
+ TQPen pen = p.pen();
int startX = offsetX + w - 16;
- p.fillRect(startX, offsetY, 17, h, QBrush(Qt::white)); //box
+ p.fillRect(startX, offsetY, 17, h, TQBrush(Qt::white)); //box
p.drawRect(startX, offsetY, 17, h); //box
p.drawLine(offsetX, offsetY + 4, startX, offsetY + 4); //arrow line
drawSolidArrowhead(p, startX - 1, offsetY + 4, Qt::RightArrow);
@@ -168,8 +168,8 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
if (messageOverlaps) {
w -=8;
}
- QPen pen = p.pen();
- p.fillRect( offsetX, offsetY, 17, h, QBrush(Qt::white) ); //box
+ TQPen pen = p.pen();
+ p.fillRect( offsetX, offsetY, 17, h, TQBrush(Qt::white) ); //box
p.drawRect(offsetX, offsetY, 17, h); //box
p.drawLine(offsetX + 18, offsetY + 4, offsetX + w, offsetY + 4); //arrow line
drawSolidArrowhead(p, offsetX + 17, offsetY + 4, Qt::LeftArrow);
@@ -181,7 +181,7 @@ void MessageWidget::drawSynchronous(QPainter& p, int offsetX, int offsetY) {
}
}
-void MessageWidget::drawAsynchronous(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawAsynchronous(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -224,7 +224,7 @@ void MessageWidget::drawAsynchronous(QPainter& p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-void MessageWidget::drawCreation(QPainter& p, int offsetX, int offsetY) {
+void MessageWidget::drawCreation(TQPainter& p, int offsetX, int offsetY) {
int x1 = m_pOw[Uml::A]->getX();
int x2 = m_pOw[Uml::B]->getX();
int w = getWidth() - 1;
@@ -253,7 +253,7 @@ void MessageWidget::drawCreation(QPainter& p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-int MessageWidget::onWidget(const QPoint & p) {
+int MessageWidget::onWidget(const TQPoint & p) {
if (m_sequenceMessageType != Uml::sequence_message_synchronous) {
return UMLWidget::onWidget(p);
}
@@ -331,7 +331,7 @@ void MessageWidget::setLinkAndTextPos() {
setTextPosition();
}
-void MessageWidget::moveEvent(QMoveEvent* /*m*/) {
+void MessageWidget::moveEvent(TQMoveEvent* /*m*/) {
//kDebug() << "MessageWidget::moveEvent: m_pFText is " << m_pFText << endl;
if (!m_pFText) {
return;
@@ -346,7 +346,7 @@ void MessageWidget::moveEvent(QMoveEvent* /*m*/) {
emit sigMessageMoved();
}
-void MessageWidget::resizeEvent(QResizeEvent* /*re*/) {
+void MessageWidget::resizeEvent(TQResizeEvent* /*re*/) {
}
void MessageWidget::calculateWidget() {
@@ -447,7 +447,7 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
if (op) {
// If the UMLOperation is set, m_CustomOp isn't used anyway.
// Just setting it empty for the sake of sanity.
- m_CustomOp = QString::null;
+ m_CustomOp = TQString::null;
}
}
@@ -463,14 +463,14 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
setLinkAndTextPos();
m_pFText -> setText("");
m_pFText->setActivated();
- QString messageText = m_pFText->getText();
+ TQString messageText = m_pFText->getText();
m_pFText->setVisible( messageText.length() > 1 );
- connect(m_pOw[Uml::A], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
- connect(m_pOw[Uml::B], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
+ connect(m_pOw[Uml::A], TQT_SIGNAL(sigWidgetMoved(Uml::IDType)), this, TQT_SLOT(slotWidgetMoved(Uml::IDType)));
+ connect(m_pOw[Uml::B], TQT_SIGNAL(sigWidgetMoved(Uml::IDType)), this, TQT_SLOT(slotWidgetMoved(Uml::IDType)));
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
- connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
+ connect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::A], TQT_SLOT(slotMessageMoved()) );
+ connect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::B], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::A] -> messageAdded(this);
m_pOw[Uml::B] -> messageAdded(this);
calculateDimensions();
@@ -482,30 +482,30 @@ bool MessageWidget::activate(IDChangeLog * Log /*= 0*/) {
void MessageWidget::setMessageText(FloatingTextWidget *ft) {
if (ft == NULL)
return;
- QString displayText = m_SequenceNumber + ": " + getOperationText(m_pView);
+ TQString displayText = m_SequenceNumber + ": " + getOperationText(m_pView);
ft->setText(displayText);
setTextPosition();
}
-void MessageWidget::setText(FloatingTextWidget *ft, const QString &newText) {
+void MessageWidget::setText(FloatingTextWidget *ft, const TQString &newText) {
ft->setText(newText);
UMLApp::app()->getDocument()->setModified(true);
}
-void MessageWidget::setSeqNumAndOp(const QString &seqNum, const QString &op) {
+void MessageWidget::setSeqNumAndOp(const TQString &seqNum, const TQString &op) {
setSequenceNumber( seqNum );
m_CustomOp = op; ///FIXME m_pOperation
}
-void MessageWidget::setSequenceNumber( const QString &sequenceNumber ) {
+void MessageWidget::setSequenceNumber( const TQString &sequenceNumber ) {
m_SequenceNumber = sequenceNumber;
}
-QString MessageWidget::getSequenceNumber() const {
+TQString MessageWidget::getSequenceNumber() const {
return m_SequenceNumber;
}
-void MessageWidget::lwSetFont (QFont font) {
+void MessageWidget::lwSetFont (TQFont font) {
UMLWidget::setFont( font );
}
@@ -523,22 +523,22 @@ UMLOperation *MessageWidget::getOperation() {
void MessageWidget::setOperation(UMLOperation *op) {
if (m_pObject && m_pFText)
- disconnect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
+ disconnect(m_pObject, TQT_SIGNAL(modified()), m_pFText, TQT_SLOT(setMessageText()));
m_pObject = op;
if (m_pObject && m_pFText)
- connect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
+ connect(m_pObject, TQT_SIGNAL(modified()), m_pFText, TQT_SLOT(setMessageText()));
}
-QString MessageWidget::getCustomOpText() {
+TQString MessageWidget::getCustomOpText() {
return m_CustomOp;
}
-void MessageWidget::setCustomOpText(const QString &opText) {
+void MessageWidget::setCustomOpText(const TQString &opText) {
m_CustomOp = opText;
m_pFText->setMessageText();
}
-UMLClassifier * MessageWidget::getSeqNumAndOp(QString& seqNum, QString& op) {
+UMLClassifier * MessageWidget::getSeqNumAndOp(TQString& seqNum, TQString& op) {
seqNum = m_SequenceNumber;
UMLOperation *pOperation = getOperation();
if (pOperation != NULL) {
@@ -661,11 +661,11 @@ void MessageWidget::calculateDimensionsCreation() {
void MessageWidget::cleanup() {
if (m_pOw[Uml::A]) {
- disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
+ disconnect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::A], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::A]->messageRemoved(this);
}
if (m_pOw[Uml::B]) {
- disconnect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
+ disconnect(this, TQT_SIGNAL(sigMessageMoved()), m_pOw[Uml::B], TQT_SLOT(slotMessageMoved()) );
m_pOw[Uml::B]->messageRemoved(this);
}
@@ -727,8 +727,8 @@ ObjectWidget* MessageWidget::getWidget(Uml::Role_Type role) {
return m_pOw[role];
}
-void MessageWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement messageElement = qDoc.createElement( "messagewidget" );
+void MessageWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement messageElement = qDoc.createElement( "messagewidget" );
UMLWidget::saveToXMI( qDoc, messageElement );
messageElement.setAttribute( "widgetaid", ID2STR(m_pOw[Uml::A]->getLocalID()) );
messageElement.setAttribute( "widgetbid", ID2STR(m_pOw[Uml::B]->getLocalID()) );
@@ -749,16 +749,16 @@ void MessageWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( messageElement );
}
-bool MessageWidget::loadFromXMI(QDomElement& qElement) {
+bool MessageWidget::loadFromXMI(TQDomElement& qElement) {
if ( !UMLWidget::loadFromXMI(qElement) ) {
return false;
}
- QString textid = qElement.attribute( "textid", "-1" );
- QString widgetaid = qElement.attribute( "widgetaid", "-1" );
- QString widgetbid = qElement.attribute( "widgetbid", "-1" );
+ TQString textid = qElement.attribute( "textid", "-1" );
+ TQString widgetaid = qElement.attribute( "widgetaid", "-1" );
+ TQString widgetbid = qElement.attribute( "widgetbid", "-1" );
m_CustomOp = qElement.attribute( "operation", "" );
m_SequenceNumber = qElement.attribute( "seqnum", "" );
- QString sequenceMessageType = qElement.attribute( "sequencemessagetype", "1001" );
+ TQString sequenceMessageType = qElement.attribute( "sequencemessagetype", "1001" );
m_sequenceMessageType = (Uml::Sequence_Message_Type)sequenceMessageType.toInt();
m_widgetAId = STR2ID(widgetaid);
@@ -770,10 +770,10 @@ bool MessageWidget::loadFromXMI(QDomElement& qElement) {
tr = Uml::tr_Seq_Message_Self;
//now load child elements
- QDomNode node = qElement.firstChild();
- QDomElement element = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement element = node.toElement();
if ( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "floatingtext") {
m_pFText = new FloatingTextWidget( m_pView, tr, getOperationText(m_pView), m_textId );
if( ! m_pFText->loadFromXMI(element) ) {
diff --git a/umbrello/umbrello/messagewidget.h b/umbrello/umbrello/messagewidget.h
index 66f2f639..29383405 100644
--- a/umbrello/umbrello/messagewidget.h
+++ b/umbrello/umbrello/messagewidget.h
@@ -78,14 +78,14 @@ public:
virtual ~MessageWidget();
/**
- * Write property of QString m_SequenceNumber.
+ * Write property of TQString m_SequenceNumber.
*/
- void setSequenceNumber( const QString &sequenceNumber );
+ void setSequenceNumber( const TQString &sequenceNumber );
/**
- * Read property of QString m_SequenceNumber.
+ * Read property of TQString m_SequenceNumber.
*/
- QString getSequenceNumber() const;
+ TQString getSequenceNumber() const;
/**
* Returns whether the message is synchronous or asynchronous
@@ -139,7 +139,7 @@ public:
* Implements operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void lwSetFont (QFont font);
+ void lwSetFont (TQFont font);
/**
* Overrides operation from LinkWidget.
@@ -164,13 +164,13 @@ public:
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- QString getCustomOpText();
+ TQString getCustomOpText();
/**
* Overrides operation from LinkWidget.
* Required by FloatingTextWidget.
*/
- void setCustomOpText(const QString &opText);
+ void setCustomOpText(const TQString &opText);
/**
* Overrides operation from LinkWidget.
@@ -187,7 +187,7 @@ public:
* @param ft The text widget which to update.
* @param newText The new text to set.
*/
- void setText(FloatingTextWidget *ft, const QString &newText);
+ void setText(FloatingTextWidget *ft, const TQString &newText);
/**
* Overrides operation from LinkWidget.
@@ -196,7 +196,7 @@ public:
* @param seqNum The new sequence number string to set.
* @param op The new operation string to set.
*/
- void setSeqNumAndOp(const QString &seqNum, const QString &op);
+ void setSeqNumAndOp(const TQString &seqNum, const TQString &op);
/**
* Overrides operation from LinkWidget.
@@ -205,7 +205,7 @@ public:
* @param seqNum Return this MessageWidget's sequence number string.
* @param op Return this MessageWidget's operation string.
*/
- UMLClassifier * getSeqNumAndOp(QString& seqNum, QString& op);
+ UMLClassifier * getSeqNumAndOp(TQString& seqNum, TQString& op);
/**
* Calculate the geometry of the widget.
@@ -244,26 +244,26 @@ public:
/**
* Calls drawSynchronous() or drawAsynchronous()
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Draws the calling arrow with filled in arrowhead, the
* timeline box and the returning arrow with a dashed line and
* stick arrowhead.
*/
- void drawSynchronous(QPainter& p, int offsetX, int offsetY);
+ void drawSynchronous(TQPainter& p, int offsetX, int offsetY);
/**
* Draws a solid arrow line and a stick arrow head.
*/
- void drawAsynchronous(QPainter& p, int offsetX, int offsetY);
+ void drawAsynchronous(TQPainter& p, int offsetX, int offsetY);
/**
* Draws a solid arrow line and a stick arrow head to the
* edge of the target object widget instead of to the
* sequence line.
*/
- void drawCreation(QPainter& p, int offsetX, int offsetY);
+ void drawCreation(TQPainter& p, int offsetX, int offsetY);
/**
* Sets the text position relative to the sequence message.
@@ -319,17 +319,17 @@ public:
* between call line and return line does not count, i.e. if
* the point is located in that space the function returns 0.
*/
- int onWidget(const QPoint & p);
+ int onWidget(const TQPoint & p);
/**
* Saves to the "messagewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads from the "messagewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
@@ -350,14 +350,14 @@ protected:
* like so: --->
* The direction can be either Qt::LeftArrow or Qt::RightArrow.
*/
- static void drawArrow( QPainter& p, int x, int y, int w,
+ static void drawArrow( TQPainter& p, int x, int y, int w,
Qt::ArrowType direction, bool useDottedLine = false );
/**
* Draw a solid (triangular) arrowhead pointing in the given direction.
* The direction can be either Qt::LeftArrow or Qt::RightArrow.
*/
- static void drawSolidArrowhead(QPainter& p, int x, int y, Qt::ArrowType direction);
+ static void drawSolidArrowhead(TQPainter& p, int x, int y, Qt::ArrowType direction);
/**
* Update the UMLWidget::m_bResizable flag according to the
@@ -366,16 +366,16 @@ protected:
void updateResizability();
// Data loaded/saved
- QString m_SequenceNumber;
- QString m_CustomOp;
+ TQString m_SequenceNumber;
+ TQString m_CustomOp;
/**
* Whether the message is synchronous or asynchronous
*/
Uml::Sequence_Message_Type m_sequenceMessageType;
private:
- void moveEvent(QMoveEvent */*m*/);
- void resizeEvent(QResizeEvent */*re*/);
+ void moveEvent(TQMoveEvent */*m*/);
+ void resizeEvent(TQResizeEvent */*re*/);
ObjectWidget * m_pOw[2];
FloatingTextWidget * m_pFText;
diff --git a/umbrello/umbrello/messagewidgetcontroller.cpp b/umbrello/umbrello/messagewidgetcontroller.cpp
index 8ffac822..dfe6a804 100644
--- a/umbrello/umbrello/messagewidgetcontroller.cpp
+++ b/umbrello/umbrello/messagewidgetcontroller.cpp
@@ -31,13 +31,13 @@ MessageWidgetController::MessageWidgetController(MessageWidget* messageWidget):
MessageWidgetController::~MessageWidgetController() {
}
-void MessageWidgetController::saveWidgetValues(QMouseEvent *me) {
+void MessageWidgetController::saveWidgetValues(TQMouseEvent *me) {
UMLWidgetController::saveWidgetValues(me);
m_unconstrainedPositionY = m_widget->getY();
}
-QCursor MessageWidgetController::getResizeCursor() {
+TQCursor MessageWidgetController::getResizeCursor() {
return KCursor::sizeVerCursor();
}
@@ -73,7 +73,7 @@ void MessageWidgetController::constrainMovementForAllWidgets(int &diffX, int &di
diffY = constrainPositionY(diffY) - m_widget->getY();
}
-void MessageWidgetController::doMouseDoubleClick(QMouseEvent *me) {
+void MessageWidgetController::doMouseDoubleClick(TQMouseEvent *me) {
if (m_messageWidget->m_pFText != NULL) {
m_messageWidget->m_pFText->slotMenuSelection(ListPopupMenu::mt_Select_Operation);
}
diff --git a/umbrello/umbrello/messagewidgetcontroller.h b/umbrello/umbrello/messagewidgetcontroller.h
index 921fd2bf..a691f465 100644
--- a/umbrello/umbrello/messagewidgetcontroller.h
+++ b/umbrello/umbrello/messagewidgetcontroller.h
@@ -66,9 +66,9 @@ protected:
* Saves the values of the widget needed for move/resize.
* Calls parent method and then saves the value of m_unconstrainedPositionY
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Overriden from UMLWidgetController.
@@ -77,7 +77,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Overriden from UMLWidgetController.
@@ -122,9 +122,9 @@ protected:
* Executes the action for double click in the widget.
* Shows the dialog to select the operation of the message.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
private:
diff --git a/umbrello/umbrello/messagewidgetlist.h b/umbrello/umbrello/messagewidgetlist.h
index 559a4cf7..e171384b 100644
--- a/umbrello/umbrello/messagewidgetlist.h
+++ b/umbrello/umbrello/messagewidgetlist.h
@@ -12,11 +12,11 @@
#ifndef MESSAGEWIDGETLIST_H
#define MESSAGEWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class MessageWidget;
-typedef QPtrList<MessageWidget> MessageWidgetList;
-typedef QPtrListIterator<MessageWidget> MessageWidgetListIt;
+typedef TQPtrList<MessageWidget> MessageWidgetList;
+typedef TQPtrListIterator<MessageWidget> MessageWidgetListIt;
#endif
diff --git a/umbrello/umbrello/model_utils.cpp b/umbrello/umbrello/model_utils.cpp
index 89e1cf33..f120a80c 100644
--- a/umbrello/umbrello/model_utils.cpp
+++ b/umbrello/umbrello/model_utils.cpp
@@ -13,8 +13,8 @@
#include "model_utils.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -101,12 +101,12 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList) {
}
UMLObject* findUMLObject(const UMLObjectList& inList,
- const QString& inName,
+ const TQString& inName,
Uml::Object_Type type /* = ot_UMLObject */,
UMLObject *currentObj /* = NULL */) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
- QString name = inName;
- QStringList components;
+ TQString name = inName;
+ TQStringList components;
#ifdef TRY_BUGFIX_120682
// If we have a pointer or a reference in cpp we need to remove
// the asterisks and ampersands in order to find the appropriate object
@@ -117,11 +117,11 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
name.remove("&");
}
#endif
- QString nameWithoutFirstPrefix;
+ TQString nameWithoutFirstPrefix;
if (name.contains("::"))
- components = QStringList::split("::", name);
+ components = TQStringList::split("::", name);
else if (name.contains("."))
- components = QStringList::split(".", name);
+ components = TQStringList::split(".", name);
if (components.size() > 1) {
name = components.front();
components.pop_front();
@@ -235,8 +235,8 @@ UMLObject* findUMLObject(const UMLObjectList& inList,
return NULL;
}
-QString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, QString prefix) {
- QString currentName = prefix;
+TQString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, TQString prefix) {
+ TQString currentName = prefix;
if (currentName.isEmpty()) {
if(type == Uml::ot_Class)
currentName = i18n("new_class");
@@ -270,14 +270,14 @@ QString uniqObjectName(Uml::Object_Type type, UMLPackage *parentPkg, QString pre
}
}
UMLDoc *doc = UMLApp::app()->getDocument();
- QString name = currentName;
+ TQString name = currentName;
for (int number = 1; !doc->isUnique(name, parentPkg); number++) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
-bool isCommonXMIAttribute( const QString &tag ) {
+bool isCommonXMIAttribute( const TQString &tag ) {
bool retval = (Uml::tagEq(tag, "name") ||
Uml::tagEq(tag, "visibility") ||
Uml::tagEq(tag, "isRoot") ||
@@ -296,14 +296,14 @@ bool isCommonXMIAttribute( const QString &tag ) {
return retval;
}
-bool isCommonDataType(QString type) {
+bool isCommonDataType(TQString type) {
CodeGenerator *gen = UMLApp::app()->getGenerator();
if (gen == NULL)
return false;
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
- QStringList dataTypes = gen->defaultDatatypes();
- QStringList::Iterator end(dataTypes.end());
- for (QStringList::Iterator it = dataTypes.begin(); it != end; ++it) {
+ TQStringList dataTypes = gen->defaultDatatypes();
+ TQStringList::Iterator end(dataTypes.end());
+ for (TQStringList::Iterator it = dataTypes.begin(); it != end; ++it) {
if (caseSensitive) {
if (type == *it)
return true;
@@ -389,12 +389,12 @@ Uml::Model_Type guessContainer(UMLObject *o) {
return mt;
}
-int stringToDirection(QString input, Uml::Parameter_Direction & result) {
- QRegExp dirx("^(in|out|inout)");
+int stringToDirection(TQString input, Uml::Parameter_Direction & result) {
+ TQRegExp dirx("^(in|out|inout)");
int pos = dirx.search(input);
if (pos == -1)
return 0;
- const QString& dirStr = dirx.capturedTexts().first();
+ const TQString& dirStr = dirx.capturedTexts().first();
uint dirLen = dirStr.length();
if (input.length() > dirLen && !input[dirLen].isSpace())
return 0; // no match after all.
@@ -407,7 +407,7 @@ int stringToDirection(QString input, Uml::Parameter_Direction & result) {
return dirLen;
}
-Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningScope) {
+Parse_Status parseTemplate(TQString t, NameAndType& nmTp, UMLClassifier *owningScope) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
@@ -415,7 +415,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
if (t.isEmpty())
return PS_Empty;
- QStringList nameAndType = QStringList::split( QRegExp("\\s*:\\s*"), t);
+ TQStringList nameAndType = TQStringList::split( TQRegExp("\\s*:\\s*"), t);
if (nameAndType.count() == 2) {
UMLObject *pType = NULL;
if (nameAndType[1] != "class") {
@@ -430,7 +430,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
return PS_OK;
}
-Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningScope,
+Parse_Status parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owningScope,
Uml::Visibility *vis /* = 0 */) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
@@ -443,15 +443,15 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
nmTp = NameAndType(a, NULL);
return PS_OK;
}
- QString name = a.left(colonPos).stripWhiteSpace();
+ TQString name = a.left(colonPos).stripWhiteSpace();
if (vis) {
- QRegExp mnemonicVis("^([\\+\\#\\-\\~] *)");
+ TQRegExp mnemonicVis("^([\\+\\#\\-\\~] *)");
int pos = mnemonicVis.search(name);
if (pos == -1) {
*vis = Uml::Visibility::Private; // default value
} else {
- QString caption = mnemonicVis.cap(1);
- QString strVis = caption.left(1);
+ TQString caption = mnemonicVis.cap(1);
+ TQString strVis = caption.left(1);
if (strVis == "+")
*vis = Uml::Visibility::Public;
else if (strVis == "#")
@@ -479,14 +479,14 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
nmTp = NameAndType(name, NULL, pd);
return PS_OK;
}
- QStringList typeAndInitialValue = QStringList::split( QRegExp("\\s*=\\s*"), a );
- const QString &type = typeAndInitialValue[0];
+ TQStringList typeAndInitialValue = TQStringList::split( TQRegExp("\\s*=\\s*"), a );
+ const TQString &type = typeAndInitialValue[0];
UMLObject *pType = pDoc->findUMLObject(type, Uml::ot_UMLObject, owningScope);
if (pType == NULL) {
nmTp = NameAndType(name, NULL, pd);
return PS_Unknown_ArgType;
}
- QString initialValue;
+ TQString initialValue;
if (typeAndInitialValue.count() == 2) {
initialValue = typeAndInitialValue[1];
}
@@ -494,33 +494,33 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
return PS_OK;
}
-Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owningScope) {
+Parse_Status parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *owningScope) {
UMLDoc *pDoc = UMLApp::app()->getDocument();
m = m.simplifyWhiteSpace();
if (m.isEmpty())
return PS_Empty;
- if (m.contains(QRegExp("operator *()"))) {
+ if (m.contains(TQRegExp("operator *()"))) {
// C++ special case: two sets of parentheses
desc.m_name = "operator()";
- m.remove(QRegExp("operator *()"));
+ m.remove(TQRegExp("operator *()"));
} else {
/**
* The search pattern includes everything up to the opening parenthesis
* because UML also permits non programming-language oriented designs
* using narrative names, for example "check water temperature".
*/
- QRegExp beginningUpToOpenParenth( "^([^\\(]+)" );
+ TQRegExp beginningUpToOpenParenth( "^([^\\(]+)" );
int pos = beginningUpToOpenParenth.search(m);
if (pos == -1)
return PS_Illegal_MethodName;
desc.m_name = beginningUpToOpenParenth.cap(1);
}
desc.m_pReturnType = NULL;
- QRegExp pat = QRegExp("\\) *:(.*)$");
+ TQRegExp pat = TQRegExp("\\) *:(.*)$");
int pos = pat.search(m);
if (pos != -1) { // return type is optional
- QString retType = pat.cap(1);
+ TQString retType = pat.cap(1);
retType = retType.stripWhiteSpace();
if (retType != "void") {
UMLObject *pRetType = owningScope->findTemplate(retType);
@@ -533,18 +533,18 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
}
}
// Remove possible empty parentheses ()
- m.remove( QRegExp("\\s*\\(\\s*\\)") );
+ m.remove( TQRegExp("\\s*\\(\\s*\\)") );
desc.m_args.clear();
- pat = QRegExp( "\\((.*)\\)" );
+ pat = TQRegExp( "\\((.*)\\)" );
pos = pat.search(m);
if (pos == -1) // argument list is optional
return PS_OK;
- QString arglist = pat.cap(1);
+ TQString arglist = pat.cap(1);
arglist = arglist.stripWhiteSpace();
if (arglist.isEmpty())
return PS_OK;
- QStringList args = QStringList::split( QRegExp("\\s*,\\s*"), arglist);
- for (QStringList::Iterator lit = args.begin(); lit != args.end(); ++lit) {
+ TQStringList args = TQStringList::split( TQRegExp("\\s*,\\s*"), arglist);
+ for (TQStringList::Iterator lit = args.begin(); lit != args.end(); ++lit) {
NameAndType nmTp;
Parse_Status ps = parseAttribute(*lit, nmTp, owningScope);
if (ps)
@@ -554,8 +554,8 @@ Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owning
return PS_OK;
}
-QString psText(Parse_Status value) {
- const QString text[] = {
+TQString psText(Parse_Status value) {
+ const TQString text[] = {
i18n("OK"), i18n("Empty"), i18n("Malformed argument"),
i18n("Unknown argument type"), i18n("Illegal method name"),
i18n("Unknown return type"), i18n("Unspecified error")
@@ -563,7 +563,7 @@ QString psText(Parse_Status value) {
return text[(unsigned) value];
}
-QString progLangToString(Uml::Programming_Language pl) {
+TQString progLangToString(Uml::Programming_Language pl) {
switch (pl) {
case Uml::pl_ActionScript:
return "ActionScript";
@@ -602,10 +602,10 @@ QString progLangToString(Uml::Programming_Language pl) {
default:
break;
}
- return QString::null;
+ return TQString::null;
}
-Uml::Programming_Language stringToProgLang(QString str) {
+Uml::Programming_Language stringToProgLang(TQString str) {
if (str == "ActionScript")
return Uml::pl_ActionScript;
if (str == "Ada")
diff --git a/umbrello/umbrello/model_utils.h b/umbrello/umbrello/model_utils.h
index 3fa19afb..9e1468c0 100644
--- a/umbrello/umbrello/model_utils.h
+++ b/umbrello/umbrello/model_utils.h
@@ -12,8 +12,8 @@
#ifndef MODEL_UTILS_H
#define MODEL_UTILS_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include "umlnamespace.h"
#include "umlobjectlist.h"
@@ -66,7 +66,7 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList);
* @return Pointer to the UMLObject found, or NULL if not found.
*/
UMLObject* findUMLObject( const UMLObjectList& inList,
- const QString& name,
+ const TQString& name,
Uml::Object_Type type = Uml::ot_UMLObject,
UMLObject *currentObj = NULL);
@@ -80,9 +80,9 @@ UMLObject* findUMLObject( const UMLObjectList& inList,
* If no prefix is given then a type related
* prefix will be chosen internally.
*/
-QString uniqObjectName(Uml::Object_Type type,
+TQString uniqObjectName(Uml::Object_Type type,
UMLPackage *parentPkg,
- QString prefix = QString::null);
+ TQString prefix = TQString::null);
/**
* Return true if the given tag is a one of the common XMI
@@ -90,14 +90,14 @@ QString uniqObjectName(Uml::Object_Type type,
* "name" | "visibility" | "isRoot" | "isLeaf" | "isAbstract" |
* "isActive" | "ownerScope"
*/
-bool isCommonXMIAttribute(const QString &tag);
+bool isCommonXMIAttribute(const TQString &tag);
/**
* Return true if the given type is common among the majority
* of programming languages, such as "bool" or "boolean".
* TODO: Make this depend on the active programming language.
*/
-bool isCommonDataType(QString type);
+bool isCommonDataType(TQString type);
/**
* Return true if the given object type is a classifier list item type.
@@ -221,17 +221,17 @@ Uml::Model_Type guessContainer(UMLObject *o);
* @return Length of the string matched, excluding the optional
* whitespace.
*/
-int stringToDirection(QString input, Uml::Parameter_Direction & result);
+int stringToDirection(TQString input, Uml::Parameter_Direction & result);
/**
* Return string corresponding to the given Uml::Programming_Language.
*/
-QString progLangToString(Uml::Programming_Language pl);
+TQString progLangToString(Uml::Programming_Language pl);
/**
* Return Uml::Programming_Language corresponding to the given string.
*/
-Uml::Programming_Language stringToProgLang(QString str);
+Uml::Programming_Language stringToProgLang(TQString str);
/**
* Return type of parseOperation()
@@ -245,15 +245,15 @@ enum Parse_Status {
* Data structure filled by parseAttribute()
*/
struct NameAndType {
- QString m_name;
+ TQString m_name;
UMLObject *m_type;
Uml::Parameter_Direction m_direction;
- QString m_initialValue;
+ TQString m_initialValue;
NameAndType() : m_type(0), m_direction(Uml::pd_In) {
}
- NameAndType(QString name, UMLObject *type,
+ NameAndType(TQString name, UMLObject *type,
Uml::Parameter_Direction direction = Uml::pd_In,
- QString initialValue = QString::null)
+ TQString initialValue = TQString::null)
: m_name(name), m_type(type),
m_direction(direction), m_initialValue(initialValue) {
}
@@ -262,14 +262,14 @@ struct NameAndType {
/**
* Auxiliary type for OpDescriptor
*/
-typedef QValueList<NameAndType> NameAndType_List;
-typedef QValueListIterator<NameAndType> NameAndType_ListIt;
+typedef TQValueList<NameAndType> NameAndType_List;
+typedef TQValueListIterator<NameAndType> NameAndType_ListIt;
/**
* Data structure filled by parseOperation()
*/
struct OpDescriptor {
- QString m_name;
+ TQString m_name;
NameAndType_List m_args;
UMLObject *m_pReturnType;
};
@@ -284,7 +284,7 @@ struct OpDescriptor {
* @param owningScope Pointer to the owning scope of the template param.
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningScope);
+Parse_Status parseTemplate(TQString t, NameAndType& nmTp, UMLClassifier *owningScope);
/**
* Parses an attribute given in UML syntax.
@@ -303,7 +303,7 @@ Parse_Status parseTemplate(QString t, NameAndType& nmTp, UMLClassifier *owningSc
*
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningScope,
+Parse_Status parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owningScope,
Uml::Visibility *vis = 0);
/**
@@ -316,12 +316,12 @@ Parse_Status parseAttribute(QString a, NameAndType& nmTp, UMLClassifier *owningS
* @param owningScope Pointer to the owning scope of the operation.
* @return Error status of the parse, PS_OK for success.
*/
-Parse_Status parseOperation(QString m, OpDescriptor& desc, UMLClassifier *owningScope);
+Parse_Status parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *owningScope);
/**
* Returns the Parse_Status as a text.
*/
-QString psText(Parse_Status value);
+TQString psText(Parse_Status value);
}
diff --git a/umbrello/umbrello/node.cpp b/umbrello/umbrello/node.cpp
index 0070f481..f035f32a 100644
--- a/umbrello/umbrello/node.cpp
+++ b/umbrello/umbrello/node.cpp
@@ -13,7 +13,7 @@
#include <kdebug.h>
#include <klocale.h>
-UMLNode::UMLNode(const QString & name, Uml::IDType id)
+UMLNode::UMLNode(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -31,12 +31,12 @@ UMLObject* UMLNode::clone() const {
return clone;
}
-void UMLNode::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement nodeElement = UMLObject::save("UML:Node", qDoc);
+void UMLNode::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement nodeElement = UMLObject::save("UML:Node", qDoc);
qElement.appendChild(nodeElement);
}
-bool UMLNode::load(QDomElement& ) {
+bool UMLNode::load(TQDomElement& ) {
return true;
}
diff --git a/umbrello/umbrello/node.h b/umbrello/umbrello/node.h
index 057ea219..6d9df54e 100644
--- a/umbrello/umbrello/node.h
+++ b/umbrello/umbrello/node.h
@@ -34,7 +34,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLNode(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLNode(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -54,13 +54,13 @@ public:
/**
* Creates the <UML:Node> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:Node> XMI element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
diff --git a/umbrello/umbrello/nodewidget.cpp b/umbrello/umbrello/nodewidget.cpp
index 2bd78a93..8214b7b6 100644
--- a/umbrello/umbrello/nodewidget.cpp
+++ b/umbrello/umbrello/nodewidget.cpp
@@ -13,7 +13,7 @@
#include "nodewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -33,7 +33,7 @@ NodeWidget::NodeWidget(UMLView * view, UMLNode *n )
NodeWidget::~NodeWidget() {}
-void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NodeWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
p.setBrush( UMLWidget::getFillColour() );
@@ -47,13 +47,13 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
const int bodyOffsetY = offsetY + hDepth;
const int bodyWidth = w - wDepth;
const int bodyHeight = h - hDepth;
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
- QPointArray pointArray(5);
+ TQPointArray pointArray(5);
pointArray.setPoint(0, offsetX, bodyOffsetY);
pointArray.setPoint(1, offsetX + wDepth, offsetY);
pointArray.setPoint(2, offsetX + w - 1, offsetY);
@@ -63,12 +63,12 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawRect(offsetX, bodyOffsetY, bodyWidth, bodyHeight);
p.drawLine(offsetX + w - 1, offsetY, offsetX + bodyWidth - 2, bodyOffsetY + 1);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
if (m_pObject) {
- QString stereotype = m_pObject->getStereotype();
+ TQString stereotype = m_pObject->getStereotype();
if (!stereotype.isEmpty()) {
p.drawText(offsetX, bodyOffsetY + (bodyHeight/2) - fontHeight,
bodyWidth, fontHeight, Qt::AlignCenter, m_pObject->getStereotype(true));
@@ -95,16 +95,16 @@ void NodeWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize NodeWidget::calculateSize() {
+TQSize NodeWidget::calculateSize() {
if (m_pObject == NULL) {
kDebug() << "NodeWidget::calculateSize: m_pObject is NULL" << endl;
return UMLWidget::calculateSize();
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
- QString name = m_pObject->getName();
+ TQString name = m_pObject->getName();
if ( UMLWidget::getIsInstance() ) {
name = UMLWidget::getInstanceName() + " : " + name;
}
@@ -121,11 +121,11 @@ QSize NodeWidget::calculateSize() {
int height = (2*fontHeight) + DEPTH;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void NodeWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("nodewidget");
+void NodeWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("nodewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/nodewidget.h b/umbrello/umbrello/nodewidget.h
index 90d28f63..c06ea759 100644
--- a/umbrello/umbrello/nodewidget.h
+++ b/umbrello/umbrello/nodewidget.h
@@ -44,19 +44,19 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "nodewidget" XMI element.
* Note: For loading we use the method inherited from UMLWidget.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
static const int DEPTH = 30; ///< pixels on Z axis
};
diff --git a/umbrello/umbrello/notewidget.cpp b/umbrello/umbrello/notewidget.cpp
index 0cc7d079..9badeef5 100644
--- a/umbrello/umbrello/notewidget.cpp
+++ b/umbrello/umbrello/notewidget.cpp
@@ -12,10 +12,10 @@
// own header
#include "notewidget.h"
//qt includes
-#include <qpointarray.h>
-#include <qpainter.h>
-#include <qtextedit.h>
-#include <qframe.h>
+#include <tqpointarray.h>
+#include <tqpainter.h>
+#include <tqtextedit.h>
+#include <tqframe.h>
// kde includes
#include <kdebug.h>
#include <kcolordialog.h>
@@ -38,15 +38,15 @@ NoteWidget::NoteWidget(UMLView * view, Uml::IDType id)
#ifdef NOTEWIDGET_EMBED_EDITOR
// NB: This code is currently deactivated because
// Zoom does not yet work with the embedded text editor.
- m_pEditor = new QTextEdit(view);
- m_pEditor->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- m_pEditor->setHScrollBarMode(QScrollView::AlwaysOff);
- m_pEditor->setVScrollBarMode(QScrollView::AlwaysOff);
+ m_pEditor = new TQTextEdit(view);
+ m_pEditor->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ m_pEditor->setHScrollBarMode(TQScrollView::AlwaysOff);
+ m_pEditor->setVScrollBarMode(TQScrollView::AlwaysOff);
m_pEditor->setTextFormat(Qt::RichText);
m_pEditor->setShown(true);
setEditorGeometry();
- connect(m_pView, SIGNAL(contentsMoving(int, int)),
- this, SLOT(slotViewScrolled(int, int)));
+ connect(m_pView, TQT_SIGNAL(contentsMoving(int, int)),
+ this, TQT_SLOT(slotViewScrolled(int, int)));
#endif
}
@@ -69,7 +69,7 @@ void NoteWidget::setDiagramLink(Uml::IDType viewID) {
<< "): no view found for this ID." << endl;
return;
}
- QString linkText("Diagram: " + view->getName());
+ TQString linkText("Diagram: " + view->getName());
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setUnderline(true);
m_pEditor->insert(linkText);
@@ -89,7 +89,7 @@ void NoteWidget::slotViewScrolled(int x, int y) {
setEditorGeometry(x, y);
}
-void NoteWidget::setFont(QFont font) {
+void NoteWidget::setFont(TQFont font) {
UMLWidget::setFont(font);
#ifdef NOTEWIDGET_EMBED_EDITOR
m_pEditor->setFont(font);
@@ -98,7 +98,7 @@ void NoteWidget::setFont(QFont font) {
void NoteWidget::setEditorGeometry(int dx /*=0*/, int dy /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
- const QRect editorGeometry( UMLWidget::getX() - dx + 6,
+ const TQRect editorGeometry( UMLWidget::getX() - dx + 6,
UMLWidget::getY() - dy + 10,
UMLWidget::getWidth() - 16,
UMLWidget::getHeight() - 16);
@@ -119,7 +119,7 @@ void NoteWidget::setY( int y ) {
setEditorGeometry();
}
-QString NoteWidget::getDoc() const {
+TQString NoteWidget::getDoc() const {
#if defined (NOTEWIDGET_EMBED_EDITOR)
return m_pEditor->text();
#else
@@ -127,7 +127,7 @@ QString NoteWidget::getDoc() const {
#endif
}
-void NoteWidget::setDoc(const QString &newText) {
+void NoteWidget::setDoc(const TQString &newText) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText(newText);
#else
@@ -135,12 +135,12 @@ void NoteWidget::setDoc(const QString &newText) {
#endif
}
-void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void NoteWidget::draw(TQPainter & p, int offsetX, int offsetY) {
int margin = 10;
int w = width()-1;
int h= height()-1;
- QPointArray poly(6);
+ TQPointArray poly(6);
poly.setPoint(0, offsetX, offsetY);
poly.setPoint(1, offsetX, offsetY + h);
poly.setPoint(2, offsetX + w, offsetY + h);
@@ -149,7 +149,7 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
poly.setPoint(5, offsetX, offsetY);
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() ) {
- QBrush brush( UMLWidget::getFillColour() );
+ TQBrush brush( UMLWidget::getFillColour() );
p.setBrush(brush);
p.drawPolygon(poly);
#if defined (NOTEWIDGET_EMBED_EDITOR)
@@ -166,8 +166,8 @@ void NoteWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawText(&p, offsetX, offsetY);
}
-QSize NoteWidget::calculateSize() {
- return QSize(50, 50);
+TQSize NoteWidget::calculateSize() {
+ return TQSize(50, 50);
}
void NoteWidget::slotMenuSelection(int sel) {
@@ -197,7 +197,7 @@ void NoteWidget::slotMenuSelection(int sel) {
}
}
-void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
+void NoteWidget::drawText(TQPainter * p /*=NULL*/, int offsetX /*=0*/, int offsetY /*=0*/) {
#if defined (NOTEWIDGET_EMBED_EDITOR)
m_pEditor->setText( getDoc() );
m_pEditor->setShown(true);
@@ -213,23 +213,23 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
start new line on \n character
*/
p->setPen( Qt::black );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
p->setFont( font );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
- QString text = getDoc();
+ TQString text = getDoc();
if( text.length() == 0 )
return;
- QString word = "";
- QString fullLine = "";
- QString testCombineLine = "";
+ TQString word = "";
+ TQString fullLine = "";
+ TQString testCombineLine = "";
const int margin = fm.width( "W" );
int textY = fontHeight / 2;
int textX = margin;
const int width = this -> width() - margin * 2;
const int height = this -> height() - fontHeight;
- QChar returnChar('\n');
- QChar c;
+ TQChar returnChar('\n');
+ TQChar c;
for (uint i = 0; i <= text.length(); i++) {
if (i < text.length()) {
c = text[i];
@@ -291,8 +291,8 @@ void NoteWidget::drawText(QPainter * p /*=NULL*/, int offsetX /*=0*/, int offset
#endif
}
-void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement noteElement = qDoc.createElement( "notewidget" );
+void NoteWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement noteElement = qDoc.createElement( "notewidget" );
UMLWidget::saveToXMI( qDoc, noteElement );
noteElement.setAttribute( "text", getDoc() );
if (m_DiagramLink != Uml::id_None)
@@ -300,12 +300,12 @@ void NoteWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( noteElement );
}
-bool NoteWidget::loadFromXMI( QDomElement & qElement ) {
+bool NoteWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
setZ( 20 ); //make sure always on top.
setDoc( qElement.attribute("text", "") );
- QString diagramlink = qElement.attribute("diagramlink", "");
+ TQString diagramlink = qElement.attribute("diagramlink", "");
if (!diagramlink.isEmpty())
m_DiagramLink = STR2ID(diagramlink);
return true;
diff --git a/umbrello/umbrello/notewidget.h b/umbrello/umbrello/notewidget.h
index 298839cb..0f3b2ba5 100644
--- a/umbrello/umbrello/notewidget.h
+++ b/umbrello/umbrello/notewidget.h
@@ -55,21 +55,21 @@ public:
/**
* Overrides method from UMLWidget.
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Returns the text in the box.
*
* @return The text in the box.
*/
- QString getDoc() const;
+ TQString getDoc() const;
/**
* Sets the note documentation.
*
* @param newText The text to set the documentation to.
*/
- void setDoc(const QString &newText);
+ void setDoc(const TQString &newText);
/**
* Set the ID of the diagram hyperlinked to this note.
@@ -90,12 +90,12 @@ public:
/**
* Override default method.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Override method from UMLWidget.
*/
- void setFont(QFont font);
+ void setFont(TQFont font);
/**
* Override method from UMLWidget.
@@ -110,12 +110,12 @@ public:
/**
* Saves to the "notewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads a "notewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
void slotMenuSelection(int sel);
@@ -128,7 +128,7 @@ protected:
/**
* Draws the text. Auxiliary to draw().
*/
- void drawText(QPainter * p = NULL, int offsetX = 0, int offsetY = 0);
+ void drawText(TQPainter * p = NULL, int offsetX = 0, int offsetY = 0);
private:
/**
* Initializes key variables for the class.
@@ -137,9 +137,9 @@ private:
void setEditorGeometry(int dx = 0, int dy = 0);
#if defined (NOTEWIDGET_EMBED_EDITOR)
- QTextEdit *m_pEditor;
+ TQTextEdit *m_pEditor;
#else
- QString m_Text;
+ TQString m_Text;
#endif
};
diff --git a/umbrello/umbrello/notewidgetcontroller.cpp b/umbrello/umbrello/notewidgetcontroller.cpp
index e61a7d76..2ef8758d 100644
--- a/umbrello/umbrello/notewidgetcontroller.cpp
+++ b/umbrello/umbrello/notewidgetcontroller.cpp
@@ -24,12 +24,12 @@ NoteWidgetController::NoteWidgetController(NoteWidget *noteWidget):
NoteWidgetController::~NoteWidgetController() {
}
-void NoteWidgetController::mouseMoveEvent(QMouseEvent *me) {
+void NoteWidgetController::mouseMoveEvent(TQMouseEvent *me) {
UMLWidgetController::mouseMoveEvent(me);
m_noteWidget->setEditorGeometry();
}
-void NoteWidgetController::mouseReleaseEvent(QMouseEvent *me) {
+void NoteWidgetController::mouseReleaseEvent(TQMouseEvent *me) {
UMLWidgetController::mouseReleaseEvent(me);
//TODO why is it needed? drawText is already called in draw,
//and draw is (well, I think that is) called when the canvas rectangle is resized
@@ -38,7 +38,7 @@ void NoteWidgetController::mouseReleaseEvent(QMouseEvent *me) {
}
}
-void NoteWidgetController::doMouseDoubleClick(QMouseEvent *me) {
+void NoteWidgetController::doMouseDoubleClick(TQMouseEvent *me) {
//TODO Copied from old code. What it does?
if (m_noteWidget->m_DiagramLink == Uml::id_None) {
m_noteWidget->slotMenuSelection(ListPopupMenu::mt_Rename);
diff --git a/umbrello/umbrello/notewidgetcontroller.h b/umbrello/umbrello/notewidgetcontroller.h
index f3295ce7..081556ed 100644
--- a/umbrello/umbrello/notewidgetcontroller.h
+++ b/umbrello/umbrello/notewidgetcontroller.h
@@ -46,18 +46,18 @@ public:
* Handles a mouse move event.
* Executes base code and then sets the geometry of the editor.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Overriden from UMLWidgetController.
* Handles a mouse release event.
* Executes base code and then draws the text in the note.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
protected:
@@ -66,9 +66,9 @@ protected:
* Executes the action for double click in the widget.
* Shows the dialog to change the text of the note.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
private:
diff --git a/umbrello/umbrello/object_factory.cpp b/umbrello/umbrello/object_factory.cpp
index f6fcbe41..7b8d16b2 100644
--- a/umbrello/umbrello/object_factory.cpp
+++ b/umbrello/umbrello/object_factory.cpp
@@ -13,8 +13,8 @@
#include "object_factory.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -59,7 +59,7 @@ bool assignUniqueIdOnCreation() {
return (g_predefinedId == Uml::id_None);
}
-UMLObject* createNewUMLObject(Uml::Object_Type type, const QString &name,
+UMLObject* createNewUMLObject(Uml::Object_Type type, const TQString &name,
UMLPackage *parentPkg) {
if (parentPkg == NULL) {
kError() << "Object_Factory::createNewUMLObject(" << name
@@ -122,7 +122,7 @@ UMLObject* createNewUMLObject(Uml::Object_Type type, const QString &name,
return o;
}
-UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
+UMLObject* createUMLObject(Uml::Object_Type type, const TQString &n,
UMLPackage *parentPkg /* = NULL */,
bool solicitNewName /* = true */) {
UMLDoc *doc = UMLApp::app()->getDocument();
@@ -147,10 +147,10 @@ UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
}
}
bool ok = false;
- QString name = Model_Utils::uniqObjectName(type, parentPkg, n);
+ TQString name = Model_Utils::uniqObjectName(type, parentPkg, n);
bool bValidNameEntered = false;
do {
- name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (QWidget*)UMLApp::app());
+ name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), name, &ok, (TQWidget*)UMLApp::app());
if (!ok) {
return 0;
}
@@ -176,7 +176,7 @@ UMLObject* createUMLObject(Uml::Object_Type type, const QString &n,
return o;
}
-UMLAttribute *createAttribute(UMLObject *parent, const QString& name, UMLObject *type) {
+UMLAttribute *createAttribute(UMLObject *parent, const TQString& name, UMLObject *type) {
UMLAttribute *attr = new UMLAttribute(parent);
attr->setName(name);
attr->setType(type);
@@ -185,7 +185,7 @@ UMLAttribute *createAttribute(UMLObject *parent, const QString& name, UMLObject
return attr;
}
-UMLOperation *createOperation(UMLClassifier *parent, const QString& name) {
+UMLOperation *createOperation(UMLClassifier *parent, const TQString& name) {
UMLOperation *op = new UMLOperation(parent, name, g_predefinedId);
return op;
}
@@ -225,8 +225,8 @@ UMLClassifierListItem* createChildObject(UMLClassifier* parent, Uml::Object_Type
return static_cast<UMLClassifierListItem*>(returnObject);
}
-UMLObject* makeObjectFromXMI(const QString& xmiTag,
- const QString& stereoID /* = QString::null */) {
+UMLObject* makeObjectFromXMI(const TQString& xmiTag,
+ const TQString& stereoID /* = TQString::null */) {
UMLObject* pObject = 0;
if (Uml::tagEq(xmiTag, "UseCase")) {
pObject = new UMLUseCase();
diff --git a/umbrello/umbrello/object_factory.h b/umbrello/umbrello/object_factory.h
index c7bf71d9..a4007bf6 100644
--- a/umbrello/umbrello/object_factory.h
+++ b/umbrello/umbrello/object_factory.h
@@ -12,7 +12,7 @@
#ifndef OBJECT_FACTORY__H
#define OBJECT_FACTORY__H
-#include <qstring.h>
+#include <tqstring.h>
#include "umlnamespace.h"
class UMLObject;
@@ -39,7 +39,7 @@ namespace Object_Factory {
* The default is to ask for the new name.
*/
UMLObject* createUMLObject(Uml::Object_Type type,
- const QString &n = QString::null,
+ const TQString &n = TQString::null,
UMLPackage *parentPkg = 0,
bool solicitNewName = true);
@@ -53,10 +53,10 @@ UMLObject* createUMLObject(Uml::Object_Type type,
*/
UMLClassifierListItem* createChildObject(UMLClassifier *parent, Uml::Object_Type type);
-UMLAttribute *createAttribute(UMLObject *parent, const QString& name,
+UMLAttribute *createAttribute(UMLObject *parent, const TQString& name,
UMLObject *type = 0);
-UMLOperation *createOperation(UMLClassifier *parent, const QString& name);
+UMLOperation *createOperation(UMLClassifier *parent, const TQString& name);
/**
* Control whether the createUMLObject() solicits a new unique ID for the
@@ -76,8 +76,8 @@ bool assignUniqueIdOnCreation();
* Make a new UMLObject according to the given XMI tag.
* Used by loadFromXMI and clipboard paste.
*/
-UMLObject* makeObjectFromXMI(const QString& xmiTag,
- const QString& stereoID = QString::null);
+UMLObject* makeObjectFromXMI(const TQString& xmiTag,
+ const TQString& stereoID = TQString::null);
}
diff --git a/umbrello/umbrello/objectwidget.cpp b/umbrello/umbrello/objectwidget.cpp
index 35e7bdde..6ae111f0 100644
--- a/umbrello/umbrello/objectwidget.cpp
+++ b/umbrello/umbrello/objectwidget.cpp
@@ -13,9 +13,9 @@
#include "objectwidget.h"
// system includes
-#include <qpainter.h>
-#include <qvalidator.h>
-#include <qevent.h>
+#include <tqpainter.h>
+#include <tqvalidator.h>
+#include <tqevent.h>
#include <klocale.h>
#include <kdebug.h>
#include <kinputdialog.h>
@@ -68,7 +68,7 @@ void ObjectWidget::init() {
ObjectWidget::~ObjectWidget() {}
-void ObjectWidget::draw(QPainter & p , int offsetX, int offsetY) {
+void ObjectWidget::draw(TQPainter & p , int offsetX, int offsetY) {
if ( m_bDrawAsActor )
drawActor( p, offsetX, offsetY );
else
@@ -80,12 +80,12 @@ void ObjectWidget::draw(QPainter & p , int offsetX, int offsetY) {
}
void ObjectWidget::slotMenuSelection(int sel) {
- QString name = "";
+ TQString name = "";
switch(sel) {
case ListPopupMenu::mt_Rename_Object:
{
bool ok;
- QRegExpValidator* validator = new QRegExpValidator(QRegExp(".*"), 0);
+ TQRegExpValidator* validator = new TQRegExpValidator(TQRegExp(".*"), 0);
name = KInputDialog::getText
(i18n("Rename Object"),
i18n("Enter object name:"),
@@ -125,11 +125,11 @@ void ObjectWidget::slotMenuSelection(int sel) {
}
}
-QSize ObjectWidget::calculateSize() {
+TQSize ObjectWidget::calculateSize() {
int width, height;
- const QFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
+ const TQFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
const int fontHeight = fm.lineSpacing();
- const QString t = m_InstanceName + " : " + m_pObject->getName();
+ const TQString t = m_InstanceName + " : " + m_pObject->getName();
const int textWidth = fm.width(t);
if ( m_bDrawAsActor ) {
width = textWidth > A_WIDTH?textWidth:A_WIDTH;
@@ -145,7 +145,7 @@ QSize ObjectWidget::calculateSize() {
}
}//end else drawasactor
- return QSize(width, height);
+ return TQSize(width, height);
}
void ObjectWidget::setDrawAsActor( bool drawAsActor ) {
@@ -181,7 +181,7 @@ void ObjectWidget::setY( int y ) {
moveEvent(0);
}
-void ObjectWidget::moveEvent(QMoveEvent */*m*/) {
+void ObjectWidget::moveEvent(TQMoveEvent */*m*/) {
emit sigWidgetMoved( m_nLocalID );
if (m_pLine) {
const int x = getX(); // for debugging: gdb has a problem evaluating getX() etc
@@ -197,7 +197,7 @@ void ObjectWidget::slotColorChanged(Uml::IDType /*viewID*/) {
UMLWidget::setLineColor( m_pView->getLineColor() );
if( m_pLine)
- m_pLine -> setPen( QPen( UMLWidget::getLineColor(), UMLWidget::getLineWidth(), Qt::DashLine ) );
+ m_pLine -> setPen( TQPen( UMLWidget::getLineColor(), UMLWidget::getLineWidth(), Qt::DashLine ) );
}
void ObjectWidget::cleanup() {
@@ -212,7 +212,7 @@ void ObjectWidget::cleanup() {
void ObjectWidget::showProperties() {
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg *dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ ClassPropDlg *dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this);
if (dlg->exec()) {
docwindow->showDocumentation(this, true);
UMLApp::app()->getDocument()->setModified(true);
@@ -220,10 +220,10 @@ void ObjectWidget::showProperties() {
dlg->close(true);//wipe from memory
}
-void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
+void ObjectWidget::drawObject(TQPainter & p, int offsetX, int offsetY) {
- QFont oldFont = p.font();
- QFont font = UMLWidget::getFont();
+ TQFont oldFont = p.font();
+ TQFont font = UMLWidget::getFont();
font.setUnderline( true );
p.setFont( font );
@@ -235,7 +235,7 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
const int w = width();
const int h = height();
- const QString t = m_InstanceName + " : " + m_pObject -> getName();
+ const TQString t = m_InstanceName + " : " + m_pObject -> getName();
int multiInstOfst = 0;
if ( m_bMultipleInstance ) {
p.drawRect(offsetX + 10, offsetY + 10, w - 10, h - 10);
@@ -243,7 +243,7 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
multiInstOfst = 10;
}
p.drawRect(offsetX, offsetY, w - multiInstOfst, h - multiInstOfst);
- p.setPen(QPen(Qt::black));
+ p.setPen(TQPen(Qt::black));
p.drawText(offsetX + O_MARGIN, offsetY + O_MARGIN,
w - O_MARGIN * 2 - multiInstOfst, h - O_MARGIN * 2 - multiInstOfst,
Qt::AlignCenter, t);
@@ -251,8 +251,8 @@ void ObjectWidget::drawObject(QPainter & p, int offsetX, int offsetY) {
p.setFont( oldFont );
}
-void ObjectWidget::drawActor(QPainter & p, int offsetX, int offsetY) {
- const QFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
+void ObjectWidget::drawActor(TQPainter & p, int offsetX, int offsetY) {
+ const TQFontMetrics &fm = getFontMetrics(FT_UNDERLINE);
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
@@ -274,8 +274,8 @@ void ObjectWidget::drawActor(QPainter & p, int offsetX, int offsetY) {
p.drawLine(middleX - A_WIDTH / 2, offsetY + thirdH + thirdH / 2,
middleX + A_WIDTH / 2, offsetY + thirdH + thirdH / 2);//arms
//draw text
- p.setPen(QPen(Qt::black));
- QString t = m_InstanceName + " : " + m_pObject -> getName();
+ p.setPen(TQPen(Qt::black));
+ TQString t = m_InstanceName + " : " + m_pObject -> getName();
p.drawText(offsetX + A_MARGIN, offsetY + textStartY,
w - A_MARGIN * 2, fontHeight, Qt::AlignCenter, t);
}
@@ -372,8 +372,8 @@ SeqLineWidget *ObjectWidget::getSeqLine() {
return m_pLine;
}
-void ObjectWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement objectElement = qDoc.createElement( "objectwidget" );
+void ObjectWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement objectElement = qDoc.createElement( "objectwidget" );
UMLWidget::saveToXMI( qDoc, objectElement );
objectElement.setAttribute( "instancename", m_InstanceName );
objectElement.setAttribute( "drawasactor", m_bDrawAsActor );
@@ -383,14 +383,14 @@ void ObjectWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( objectElement );
}
-bool ObjectWidget::loadFromXMI( QDomElement & qElement ) {
+bool ObjectWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_InstanceName = qElement.attribute( "instancename", "" );
- QString draw = qElement.attribute( "drawasactor", "0" );
- QString multi = qElement.attribute( "multipleinstance", "0" );
- QString localid = qElement.attribute( "localid", "0" );
- QString decon = qElement.attribute( "decon", "0" );
+ TQString draw = qElement.attribute( "drawasactor", "0" );
+ TQString multi = qElement.attribute( "multipleinstance", "0" );
+ TQString localid = qElement.attribute( "localid", "0" );
+ TQString decon = qElement.attribute( "decon", "0" );
m_bDrawAsActor = (bool)draw.toInt();
m_bMultipleInstance = (bool)multi.toInt();
diff --git a/umbrello/umbrello/objectwidget.h b/umbrello/umbrello/objectwidget.h
index bbf63053..837c6ff1 100644
--- a/umbrello/umbrello/objectwidget.h
+++ b/umbrello/umbrello/objectwidget.h
@@ -81,7 +81,7 @@ public:
*
* @return The instance name.
*/
- QString getInstanceName() const {
+ TQString getInstanceName() const {
return m_InstanceName;
}
@@ -90,7 +90,7 @@ public:
*
* @param name The name to set the instance name to.
*/
- void setInstanceName(const QString &name) {
+ void setInstanceName(const TQString &name) {
m_InstanceName = name;
}
@@ -127,12 +127,12 @@ public:
/**
* Override default method.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Overrides the standard operation.
*/
- virtual void moveEvent(QMoveEvent */*m*/);
+ virtual void moveEvent(TQMoveEvent */*m*/);
/**
* Used to cleanup any other widget it may need to delete.
@@ -232,12 +232,12 @@ public:
/**
* Saves to the "objectwidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads from a "objectwidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
public slots:
/**
@@ -263,17 +263,17 @@ protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Draw the object as an actor.
*/
- void drawActor(QPainter & p, int offsetX, int offsetY);
+ void drawActor(TQPainter & p, int offsetX, int offsetY);
/**
* Draw the object as an object (default).
*/
- void drawObject(QPainter & p, int offsetX, int offsetY);
+ void drawObject(TQPainter & p, int offsetX, int offsetY);
/**
* Move the object up on a sequence diagram.
@@ -290,7 +290,7 @@ protected:
/**
* Instance name of object.
*/
- QString m_InstanceName;
+ TQString m_InstanceName;
/**
* Local ID used on views. Needed as a it can represent a class
diff --git a/umbrello/umbrello/objectwidgetcontroller.cpp b/umbrello/umbrello/objectwidgetcontroller.cpp
index 1594b3fa..f921b627 100644
--- a/umbrello/umbrello/objectwidgetcontroller.cpp
+++ b/umbrello/umbrello/objectwidgetcontroller.cpp
@@ -27,7 +27,7 @@ ObjectWidgetController::ObjectWidgetController(ObjectWidget* objectWidget):
ObjectWidgetController::~ObjectWidgetController() {
}
-QCursor ObjectWidgetController::getResizeCursor() {
+TQCursor ObjectWidgetController::getResizeCursor() {
return KCursor::sizeHorCursor();
}
diff --git a/umbrello/umbrello/objectwidgetcontroller.h b/umbrello/umbrello/objectwidgetcontroller.h
index 1d8d699a..b72cc0e2 100644
--- a/umbrello/umbrello/objectwidgetcontroller.h
+++ b/umbrello/umbrello/objectwidgetcontroller.h
@@ -54,7 +54,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Overriden from UMLWidgetController.
diff --git a/umbrello/umbrello/operation.cpp b/umbrello/umbrello/operation.cpp
index 1052c469..dce9b41e 100644
--- a/umbrello/umbrello/operation.cpp
+++ b/umbrello/umbrello/operation.cpp
@@ -13,7 +13,7 @@
#include "operation.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -25,7 +25,7 @@
#include "uniqueid.h"
#include "dialogs/umloperationdialog.h"
-UMLOperation::UMLOperation(const UMLClassifier *parent, const QString& name,
+UMLOperation::UMLOperation(const UMLClassifier *parent, const TQString& name,
Uml::IDType id, Uml::Visibility s, UMLObject *rt)
: UMLClassifierListItem(parent, name, id)
{
@@ -63,7 +63,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmLeft(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm left " << a->getName() << endl;
@@ -83,7 +83,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a) {
}
kDebug() << "UMLOperation::moveParmRight(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
int idx;
if ( (idx=m_List.find( a )) == -1 ) {
kDebug() << "Error move parm right " << a->getName() << endl;
@@ -104,7 +104,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
}
kDebug() << "UMLOperation::removeParm(" << a->getName() << ") called"
<< endl;
- disconnect(a,SIGNAL(modified()),this,SIGNAL(modified()));
+ disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
if(!m_List.remove(a))
kDebug() << "Error removing parm " << a->getName() << endl;
@@ -112,7 +112,7 @@ void UMLOperation::removeParm(UMLAttribute * a, bool emitModifiedSignal /* =true
emit modified();
}
-UMLAttribute* UMLOperation::findParm(const QString &name) {
+UMLAttribute* UMLOperation::findParm(const TQString &name) {
UMLAttribute * obj=0;
for (obj = m_List.first(); obj; obj = m_List.next()) {
if (obj->getName() == name)
@@ -121,8 +121,8 @@ UMLAttribute* UMLOperation::findParm(const QString &name) {
return 0;
}
-QString UMLOperation::toString(Uml::Signature_Type sig) {
- QString s = "";
+TQString UMLOperation::toString(Uml::Signature_Type sig) {
+ TQString s = "";
if(sig == Uml::st_ShowSig || sig == Uml::st_NoSig)
s = m_Vis.toString(true) + ' ';
@@ -151,7 +151,7 @@ QString UMLOperation::toString(Uml::Signature_Type sig) {
s.append("()");
}
UMLClassifier *ownParent = static_cast<UMLClassifier*>(parent());
- QString returnType;
+ TQString returnType;
UMLClassifier *retType = UMLClassifierListItem::getType();
if (retType) {
UMLPackage *retVisibility = retType->getUMLPackage();
@@ -178,14 +178,14 @@ void UMLOperation::addParm(UMLAttribute *parameter, int position) {
else
m_List.append( parameter );
UMLObject::emitModified();
- connect(parameter,SIGNAL(modified()),this,SIGNAL(modified()));
+ connect(parameter,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified()));
}
-QString UMLOperation::getUniqueParameterName() {
- QString currentName = i18n("new_parameter");
- QString name = currentName;
+TQString UMLOperation::getUniqueParameterName() {
+ TQString currentName = i18n("new_parameter");
+ TQString name = currentName;
for (int number = 1; findParm(name); number++) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
@@ -239,13 +239,13 @@ bool UMLOperation::resolveRef() {
bool UMLOperation::isConstructorOperation() {
// if an operation has the stereotype constructor
// return true
- QString strConstructor ("constructor");
+ TQString strConstructor ("constructor");
if (getStereotype() == strConstructor)
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// It's a constructor operation if the operation name
// matches that of the parent classifier.
return (cName == opName);
@@ -256,14 +256,14 @@ bool UMLOperation::isDestructorOperation() {
return true;
UMLClassifier * c = static_cast<UMLClassifier*>(this->parent());
- QString cName = c->getName();
- QString opName = getName();
+ TQString cName = c->getName();
+ TQString opName = getName();
// Special support for C++ syntax:
// It's a destructor operation if the operation name begins
// with "~" followed by the name of the parent classifier.
if (! opName.startsWith("~"))
return false;
- opName.remove( QRegExp("^~\\s*") );
+ opName.remove( TQRegExp("^~\\s*") );
return (cName == opName);
}
@@ -279,17 +279,17 @@ bool UMLOperation::getConst() const {
return m_bConst;
}
-bool UMLOperation::showPropertiesDialog(QWidget* parent) {
+bool UMLOperation::showPropertiesDialog(TQWidget* parent) {
UMLOperationDialog dialog(parent, this);
return dialog.exec();
}
-void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
+void UMLOperation::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
operationElement.setAttribute( "isQuery", m_bConst ? "true" : "false" );
- QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
+ TQDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
if (m_pSecondary) {
- QDomElement retElement = qDoc.createElement("UML:Parameter");
+ TQDomElement retElement = qDoc.createElement("UML:Parameter");
if (m_returnId == Uml::id_None) {
kDebug() << "UMLOperation::saveToXMI(" << m_Name
<< "): m_returnId is not set, setting it now." << endl;
@@ -306,7 +306,7 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
//save each attribute here, type different
UMLAttribute* pAtt = 0;
for( pAtt = m_List.first(); pAtt != 0; pAtt = m_List.next() ) {
- QDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
+ TQDomElement attElement = pAtt->UMLObject::save("UML:Parameter", qDoc);
UMLClassifier *attrType = pAtt->getType();
if (attrType) {
attElement.setAttribute( "type", ID2STR(attrType->getID()) );
@@ -329,32 +329,32 @@ void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( operationElement );
}
-bool UMLOperation::load( QDomElement & element ) {
+bool UMLOperation::load( TQDomElement & element ) {
m_SecondaryId = element.attribute( "type", "" );
- QString isQuery = element.attribute( "isQuery", "" );
+ TQString isQuery = element.attribute( "isQuery", "" );
if (!isQuery.isEmpty()) {
// We need this extra test for isEmpty() because load() might have been
// called again by the processing for BehavioralFeature.parameter (see below)
m_bConst = (isQuery == "true");
}
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
if (node.isComment())
node = node.nextSibling();
- QDomElement attElement = node.toElement();
+ TQDomElement attElement = node.toElement();
while( !attElement.isNull() ) {
- QString tag = attElement.tagName();
+ TQString tag = attElement.tagName();
if (Uml::tagEq(tag, "BehavioralFeature.parameter")) {
if (! load(attElement))
return false;
} else if (Uml::tagEq(tag, "Parameter")) {
- QString kind = attElement.attribute("kind", "");
+ TQString kind = attElement.attribute("kind", "");
if (kind.isEmpty()) {
// Perhaps the kind is stored in a child node:
- for (QDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for (TQDomNode n = attElement.firstChild(); !n.isNull(); n = n.nextSibling()) {
if (n.isComment())
continue;
- QDomElement tempElement = n.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = n.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "kind"))
continue;
kind = tempElement.attribute( "xmi.value", "" );
@@ -367,20 +367,20 @@ bool UMLOperation::load( QDomElement & element ) {
}
}
if (kind == "return") {
- QString returnId = attElement.attribute("xmi.id", "");
+ TQString returnId = attElement.attribute("xmi.id", "");
if (!returnId.isEmpty())
m_returnId = STR2ID(returnId);
m_SecondaryId = attElement.attribute( "type", "" );
if (m_SecondaryId.isEmpty()) {
// Perhaps the type is stored in a child node:
- QDomNode node = attElement.firstChild();
+ TQDomNode node = attElement.firstChild();
while (!node.isNull()) {
if (node.isComment()) {
node = node.nextSibling();
continue;
}
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (!Uml::tagEq(tag, "type")) {
node = node.nextSibling();
continue;
@@ -389,8 +389,8 @@ bool UMLOperation::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute( "xmi.idref", "" );
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = node.firstChild();
- QDomElement tmpElem = inner.toElement();
+ TQDomNode inner = node.firstChild();
+ TQDomElement tmpElem = inner.toElement();
m_SecondaryId = tmpElem.attribute( "xmi.id", "" );
if (m_SecondaryId.isEmpty())
m_SecondaryId = tmpElem.attribute( "xmi.idref", "" );
diff --git a/umbrello/umbrello/operation.h b/umbrello/umbrello/operation.h
index eb94576e..4ceef15a 100644
--- a/umbrello/umbrello/operation.h
+++ b/umbrello/umbrello/operation.h
@@ -37,7 +37,7 @@ public:
* @param s The visibility of the operation.
* @param rt The return type of the operation.
*/
- UMLOperation(const UMLClassifier * parent, const QString& name,
+ UMLOperation(const UMLClassifier * parent, const TQString& name,
Uml::IDType id = Uml::id_None,
Uml::Visibility s = Uml::Visibility::Public,
UMLObject *rt = 0);
@@ -120,7 +120,7 @@ public:
* @param name The parameter name to search for.
* @return The found parameter, 0 if not found.
*/
- UMLAttribute * findParm(const QString &name);
+ UMLAttribute * findParm(const TQString &name);
/**
* Returns a string representation of the operation.
@@ -128,7 +128,7 @@ public:
* @param sig What type of operation string to show.
* @return The string representation of the operation.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Add a parameter to the operation.
@@ -151,12 +151,12 @@ public:
/**
* Returns an unused parameter name for a new parameter.
*/
- QString getUniqueParameterName();
+ TQString getUniqueParameterName();
/**
* Display the properties configuration dialog for the template.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
/**
* Returns whether this operation is a constructor.
@@ -192,13 +192,13 @@ public:
/**
* Saves to the <UML:Operation> XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads a <UML:Operation> XMI element.
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
private:
Uml::IDType m_returnId; ///< Holds the xmi.id of the <UML:Parameter kind="return">
diff --git a/umbrello/umbrello/optionstate.h b/umbrello/umbrello/optionstate.h
index b8429f62..e5f3b850 100644
--- a/umbrello/umbrello/optionstate.h
+++ b/umbrello/umbrello/optionstate.h
@@ -37,20 +37,20 @@ struct GeneralState {
bool autosave;
int time; //old autosave time, kept for compatibility
int autosavetime;
- QString autosavesuffix; ///< Text input field for suffix of autosave
+ TQString autosavesuffix; ///< Text input field for suffix of autosave
bool logo;
bool tip;
bool loadlast;
Uml::Diagram_Type diagram;
- QString lastFile;
+ TQString lastFile;
};
struct UIState {
bool useFillColor;
- QColor fillColor;
- QColor lineColor;
+ TQColor fillColor;
+ TQColor lineColor;
uint lineWidth;
- QFont font;
+ TQFont font;
};
struct ClassState {
diff --git a/umbrello/umbrello/ownedcodeblock.cpp b/umbrello/umbrello/ownedcodeblock.cpp
index 99b3c865..f80fd315 100644
--- a/umbrello/umbrello/ownedcodeblock.cpp
+++ b/umbrello/umbrello/ownedcodeblock.cpp
@@ -35,7 +35,7 @@
//
OwnedCodeBlock::OwnedCodeBlock ( UMLObject * parent )
- : QObject ( (QObject*)parent, "anOwnedCodeBlock" )
+ : TQObject ( (TQObject*)parent, "anOwnedCodeBlock" )
{
initFields(parent);
}
@@ -81,7 +81,7 @@ void OwnedCodeBlock::setAttributesFromObject (TextBlock * obj) {
/** set attributes of the node that represents this class
* in the XMI document.
*/
-void OwnedCodeBlock::setAttributesOnNode(QDomDocument& /*doc*/, QDomElement& elem) {
+void OwnedCodeBlock::setAttributesOnNode(TQDomDocument& /*doc*/, TQDomElement& elem) {
// set local class attributes
// setting ID's takes special treatment
@@ -108,10 +108,10 @@ void OwnedCodeBlock::setAttributesOnNode(QDomDocument& /*doc*/, QDomElement& ele
/** set the class attributes of this object from
* the passed element node.
*/
-void OwnedCodeBlock::setAttributesFromNode ( QDomElement & elem) {
+void OwnedCodeBlock::setAttributesFromNode ( TQDomElement & elem) {
// set local attributes, parent object first
- QString idStr = elem.attribute("parent_id","-1");
+ TQString idStr = elem.attribute("parent_id","-1");
Uml::IDType id = STR2ID(idStr);
// always disconnect from current parent
@@ -168,7 +168,7 @@ void OwnedCodeBlock::initFields(UMLObject * parent )
// this code block and the parent UMLObject..when the parent
// signals a change has been made, we automatically update
// ourselves
- connect(m_parentObject, SIGNAL(modified()), this, SLOT(syncToParent()));
+ connect(m_parentObject, TQT_SIGNAL(modified()), this, TQT_SLOT(syncToParent()));
}
/**
diff --git a/umbrello/umbrello/ownedcodeblock.h b/umbrello/umbrello/ownedcodeblock.h
index b089e50e..0a71f50c 100644
--- a/umbrello/umbrello/ownedcodeblock.h
+++ b/umbrello/umbrello/ownedcodeblock.h
@@ -17,9 +17,9 @@
#ifndef OWNEDCODEBLOCK_H
#define OWNEDCODEBLOCK_H
-#include <qdom.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqobject.h>
class TextBlock;
class CodeDocument;
@@ -69,12 +69,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
diff --git a/umbrello/umbrello/ownedhierarchicalcodeblock.cpp b/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
index bb2b38ad..078a02b7 100644
--- a/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
+++ b/umbrello/umbrello/ownedhierarchicalcodeblock.cpp
@@ -31,7 +31,7 @@
// Constructors/Destructors
//
-OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock ( UMLObject *parent, CodeDocument * doc, const QString &start, const QString &end, const QString &comment)
+OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock ( UMLObject *parent, CodeDocument * doc, const TQString &start, const TQString &end, const TQString &comment)
: HierarchicalCodeBlock ( doc, start, end, comment), OwnedCodeBlock(parent)
{
@@ -61,7 +61,7 @@ void OwnedHierarchicalCodeBlock::setAttributesFromObject (TextBlock * obj) {
OwnedCodeBlock::setAttributesFromObject(obj);
}
-void OwnedHierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void OwnedHierarchicalCodeBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
HierarchicalCodeBlock::setAttributesOnNode(doc, elem);
@@ -86,7 +86,7 @@ void OwnedHierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomEl
/** set the class attributes of this object from
* the passed element node.
*/
-void OwnedHierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
+void OwnedHierarchicalCodeBlock::setAttributesFromNode ( TQDomElement & root)
{
// set attributes from the XMI
diff --git a/umbrello/umbrello/ownedhierarchicalcodeblock.h b/umbrello/umbrello/ownedhierarchicalcodeblock.h
index af5ade94..04717381 100644
--- a/umbrello/umbrello/ownedhierarchicalcodeblock.h
+++ b/umbrello/umbrello/ownedhierarchicalcodeblock.h
@@ -35,10 +35,10 @@ public:
// Constructors/Destructors
//
- /** constructor with QString so we can create & populate it in
+ /** constructor with TQString so we can create & populate it in
* one step.
*/
- OwnedHierarchicalCodeBlock ( UMLObject * parent, CodeDocument * parentDoc, const QString &start="", const QString &end="", const QString &comment="" );
+ OwnedHierarchicalCodeBlock ( UMLObject * parent, CodeDocument * parentDoc, const TQString &start="", const TQString &end="", const TQString &comment="" );
/**
* Empty Destructor
@@ -55,12 +55,12 @@ public:
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0;
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root ) = 0;
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root ) = 0;
+ virtual void loadFromXMI ( TQDomElement & root ) = 0;
protected:
@@ -73,12 +73,12 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
/** set the class attributes from a passed object
*/
diff --git a/umbrello/umbrello/package.cpp b/umbrello/umbrello/package.cpp
index 54dc18a5..04e8c14d 100644
--- a/umbrello/umbrello/package.cpp
+++ b/umbrello/umbrello/package.cpp
@@ -28,7 +28,7 @@
using namespace Uml;
-UMLPackage::UMLPackage(const QString & name, Uml::IDType id)
+UMLPackage::UMLPackage(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -154,7 +154,7 @@ UMLObjectList UMLPackage::containedObjects() {
return m_objects;
}
-UMLObject * UMLPackage::findObject(const QString &name) {
+UMLObject * UMLPackage::findObject(const TQString &name) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
for (UMLObjectListIt oit(m_objects); oit.current(); ++oit) {
UMLObject *obj = oit.current();
@@ -246,9 +246,9 @@ bool UMLPackage::resolveRef() {
return overallSuccess;
}
-void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement packageElement = UMLObject::save("UML:Package", qDoc);
- QDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
+void UMLPackage::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement packageElement = UMLObject::save("UML:Package", qDoc);
+ TQDomElement ownedElement = qDoc.createElement("UML:Namespace.ownedElement");
UMLObject *obj;
// save classifiers etc.
for (UMLObjectListIt oit(m_objects); (obj = oit.current()) != NULL; ++oit)
@@ -261,13 +261,13 @@ void UMLPackage::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
qElement.appendChild(packageElement);
}
-bool UMLPackage::load(QDomElement& element) {
- for (QDomNode node = element.firstChild(); !node.isNull();
+bool UMLPackage::load(TQDomElement& element) {
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (tagEq(type, "Namespace.ownedElement") ||
diff --git a/umbrello/umbrello/package.h b/umbrello/umbrello/package.h
index b7d51000..65b0cb5c 100644
--- a/umbrello/umbrello/package.h
+++ b/umbrello/umbrello/package.h
@@ -40,7 +40,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLPackage(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLPackage(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Empty deconstructor.
@@ -112,7 +112,7 @@ public:
* @param name The name to seek.
* @return Pointer to the UMLObject found or NULL if not found.
*/
- UMLObject * findObject(const QString &name);
+ UMLObject * findObject(const TQString &name);
/**
* Find the object of the given ID in the list of contained objects.
@@ -178,14 +178,14 @@ public:
/**
* Creates the <UML:Package> XMI element.
*/
- virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ virtual void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Loads the <UML:Package> XMI element.
* Auxiliary to UMLObject::loadFromXMI.
*/
- virtual bool load(QDomElement& element);
+ virtual bool load(TQDomElement& element);
/**
* References to the objects contained in this package.
diff --git a/umbrello/umbrello/packagewidget.cpp b/umbrello/umbrello/packagewidget.cpp
index 002f723e..c4289b74 100644
--- a/umbrello/umbrello/packagewidget.cpp
+++ b/umbrello/umbrello/packagewidget.cpp
@@ -13,7 +13,7 @@
#include "packagewidget.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// app includes
@@ -47,7 +47,7 @@ void PackageWidget::init() {
PackageWidget::~PackageWidget() {}
-void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void PackageWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
@@ -56,13 +56,13 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
int w = width();
int h = height();
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold(true);
//FIXME italic is true when a package is first created until you click elsewhere, not sure why
font.setItalic(false);
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
- QString name = getName();
+ TQString name = getName();
p.drawRect(offsetX, offsetY, 50, fontHeight);
if (m_pObject->getStereotype() == "subsystem") {
@@ -76,12 +76,12 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
p.drawRect(offsetX, offsetY + fontHeight - 1, w, h - fontHeight);
- p.setPen( QPen(Qt::black) );
+ p.setPen( TQPen(Qt::black) );
p.setFont(font);
int lines = 1;
if (m_pObject != NULL) {
- QString stereotype = m_pObject->getStereotype();
+ TQString stereotype = m_pObject->getStereotype();
if (!stereotype.isEmpty()) {
p.drawText(offsetX, offsetY + fontHeight + PACKAGE_MARGIN,
w, fontHeight, Qt::AlignCenter, m_pObject->getStereotype(true));
@@ -97,12 +97,12 @@ void PackageWidget::draw(QPainter & p, int offsetX, int offsetY) {
}
}
-QSize PackageWidget::calculateSize() {
+TQSize PackageWidget::calculateSize() {
if ( !m_pObject ) {
return UMLWidget::calculateSize();
}
- const QFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD_ITALIC);
const int fontHeight = fm.lineSpacing();
int lines = 1;
@@ -122,11 +122,11 @@ QSize PackageWidget::calculateSize() {
int height = (lines*fontHeight) + fontHeight + (PACKAGE_MARGIN * 2);
- return QSize(width, height);
+ return TQSize(width, height);
}
-void PackageWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement conceptElement = qDoc.createElement("packagewidget");
+void PackageWidget::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement conceptElement = qDoc.createElement("packagewidget");
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
}
diff --git a/umbrello/umbrello/packagewidget.h b/umbrello/umbrello/packagewidget.h
index 5acb63d1..3cff4ed6 100644
--- a/umbrello/umbrello/packagewidget.h
+++ b/umbrello/umbrello/packagewidget.h
@@ -46,18 +46,18 @@ public:
/**
* Overrides standard method.
*/
- void draw(QPainter& p, int offsetX, int offsetY);
+ void draw(TQPainter& p, int offsetX, int offsetY);
/**
* Saves to the "packagewidget" XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
private:
/**
diff --git a/umbrello/umbrello/petalnode.cpp b/umbrello/umbrello/petalnode.cpp
index 9d9aa0ad..e64d88cf 100644
--- a/umbrello/umbrello/petalnode.cpp
+++ b/umbrello/umbrello/petalnode.cpp
@@ -23,13 +23,13 @@ PetalNode::NodeType PetalNode::type() const {
return m_type;
}
-QStringList PetalNode::initialArgs() const {
+TQStringList PetalNode::initialArgs() const {
return m_initialArgs;
}
-QString PetalNode::name() const {
+TQString PetalNode::name() const {
if (m_initialArgs.count() == 0)
- return QString();
+ return TQString();
return m_initialArgs.first();
}
@@ -43,7 +43,7 @@ void PetalNode::setType(PetalNode::NodeType t) {
}
*/
-void PetalNode::setInitialArgs(const QStringList& args) {
+void PetalNode::setInitialArgs(const TQStringList& args) {
m_initialArgs = args;
}
@@ -51,7 +51,7 @@ void PetalNode::setAttributes(PetalNode::NameValueList vl) {
m_attributes = vl;
}
-PetalNode::StringOrNode PetalNode::findAttribute(const QString& name) const {
+PetalNode::StringOrNode PetalNode::findAttribute(const TQString& name) const {
for (uint i = 0; i < m_attributes.count(); i++) {
if (m_attributes[i].first == name)
return m_attributes[i].second;
diff --git a/umbrello/umbrello/petalnode.h b/umbrello/umbrello/petalnode.h
index 705de417..c9f52bde 100644
--- a/umbrello/umbrello/petalnode.h
+++ b/umbrello/umbrello/petalnode.h
@@ -12,10 +12,10 @@
#ifndef PETALNODE__H
#define PETALNODE__H
-#include <qstring.h>
-#include <qpair.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
/**
* Rose petal node - parse tree for model import
@@ -46,14 +46,14 @@ public:
* (Perhaps this should be a union but that is ugly.)
*/
struct StringOrNode {
- QString string;
+ TQString string;
PetalNode *node;
StringOrNode() { node = 0; }
virtual ~StringOrNode() { }
bool isEmpty() { return (string.isEmpty() && node == 0); }
};
- typedef QPair<QString, StringOrNode> NameValue;
- typedef QValueList<NameValue> NameValueList;
+ typedef QPair<TQString, StringOrNode> NameValue;
+ typedef TQValueList<NameValue> NameValueList;
enum NodeType { nt_object, nt_list };
@@ -62,12 +62,12 @@ public:
// getters
NodeType type() const;
- QStringList initialArgs() const; // name and other initial args
- QString name() const; // convenience function: equal to initialArgs().first()
+ TQStringList initialArgs() const; // name and other initial args
+ TQString name() const; // convenience function: equal to initialArgs().first()
NameValueList attributes() const;
// setters
//void setType(NodeType nt); see constructor
- void setInitialArgs(const QStringList& args);
+ void setInitialArgs(const TQStringList& args);
void setAttributes(NameValueList vl);
// utilities
/**
@@ -75,10 +75,10 @@ public:
* @return The value of the attribute. StringOrNode::isEmpty() returns true
* if the name could not be found.
*/
- StringOrNode findAttribute(const QString& name) const;
+ StringOrNode findAttribute(const TQString& name) const;
private:
NodeType m_type;
- QStringList m_initialArgs;
+ TQStringList m_initialArgs;
NameValueList m_attributes;
};
diff --git a/umbrello/umbrello/petaltree2uml.cpp b/umbrello/umbrello/petaltree2uml.cpp
index 41563785..c8cccdc2 100644
--- a/umbrello/umbrello/petaltree2uml.cpp
+++ b/umbrello/umbrello/petaltree2uml.cpp
@@ -12,7 +12,7 @@
// own header
#include "petaltree2uml.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
#include "petalnode.h"
@@ -38,12 +38,12 @@ namespace Import_Rose {
* Return the given string without surrounding quotation marks.
* Also remove a possible prefix "Logical View::", it is not modeled in Umbrello.
*/
-QString clean(const QString& s) {
+TQString clean(const TQString& s) {
if (s.isNull())
- return QString();
- QString str = s;
+ return TQString();
+ TQString str = s;
str.remove("\"");
- str.remove(QRegExp("^Logical View::"));
+ str.remove(TQRegExp("^Logical View::"));
return str;
}
@@ -51,7 +51,7 @@ QString clean(const QString& s) {
* Extract the quid attribute from a petal node and return it as a Uml::IDType.
*/
Uml::IDType quid(const PetalNode *node) {
- QString quidStr = node->findAttribute("quid").string;
+ TQString quidStr = node->findAttribute("quid").string;
if (quidStr.isEmpty())
return Uml::id_None;
quidStr.remove("\"");
@@ -61,10 +61,10 @@ Uml::IDType quid(const PetalNode *node) {
/**
* Extract the quidu attribute from a petal node.
*/
-QString quidu(const PetalNode *node) {
- QString quiduStr = node->findAttribute("quidu").string;
+TQString quidu(const PetalNode *node) {
+ TQString quiduStr = node->findAttribute("quidu").string;
if (quiduStr.isEmpty())
- return QString();
+ return TQString();
quiduStr.remove("\"");
return quiduStr;
}
@@ -74,10 +74,10 @@ QString quidu(const PetalNode *node) {
* If the given name consists only of letters, digits, underscores, and
* scope separators, then return Uml::ot_Class, else return Uml::ot_Datatype.
*/
-Uml::Object_Type typeToCreate(const QString& name) {
- QString n = name;
- n.remove(QRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces
- Uml::Object_Type t = (n.contains(QRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
+Uml::Object_Type typeToCreate(const TQString& name) {
+ TQString n = name;
+ n.remove(TQRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces
+ Uml::Object_Type t = (n.contains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class);
return t;
}
@@ -88,7 +88,7 @@ Uml::Object_Type typeToCreate(const QString& name) {
* @param to Pointer to UMLObject in which to set the Uml::Visibility
*/
void transferVisibility(const PetalNode *from, UMLObject *to) {
- QString vis = from->findAttribute("exportControl").string;
+ TQString vis = from->findAttribute("exportControl").string;
if (!vis.isEmpty()) {
Uml::Visibility v = Uml::Visibility::fromString(clean(vis.lower()));
to->setVisibility(v);
@@ -119,7 +119,7 @@ public:
virtual UMLObject *createListItem() = 0;
virtual void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
if (!quid.isEmpty()) {
item->setSecondaryId(quid);
}
@@ -148,7 +148,7 @@ public:
* - invoke insertAtParent() with the new classifier list item as the argument
* This is the user entry point.
*/
- void read(const PetalNode *node, const QString& name) {
+ void read(const PetalNode *node, const TQString& name) {
PetalNode *attributes = node->findAttribute(m_attributeTag).node;
if (attributes == NULL) {
#ifdef VERBOSE_DEBUGGING
@@ -160,7 +160,7 @@ public:
PetalNode::NameValueList attributeList = attributes->attributes();
for (uint i = 0; i < attributeList.count(); i++) {
PetalNode *attNode = attributeList[i].second.node;
- QStringList initialArgs = attNode->initialArgs();
+ TQStringList initialArgs = attNode->initialArgs();
if (attNode->name() != m_elementName) {
kDebug() << "read(" << name << "): expecting " << m_elementName
<< ", " << "found " << initialArgs[0] << endl;
@@ -170,18 +170,18 @@ public:
if (initialArgs.count() > 1)
item->setName(clean(initialArgs[1]));
item->setID(quid(attNode));
- QString quidref = quidu(attNode);
- QString type = clean(attNode->findAttribute(m_itemTypeDesignator).string);
+ TQString quidref = quidu(attNode);
+ TQString type = clean(attNode->findAttribute(m_itemTypeDesignator).string);
setTypeReferences(item, quidref, type);
transferVisibility(attNode, item);
- QString doc = attNode->findAttribute("documentation").string;
+ TQString doc = attNode->findAttribute("documentation").string;
if (! doc.isEmpty())
item->setDoc(doc);
insertAtParent(attNode, item);
}
}
protected:
- const QString m_attributeTag, m_elementName, m_itemTypeDesignator;
+ const TQString m_attributeTag, m_elementName, m_itemTypeDesignator;
};
class AttributesReader : public ClassifierListReader {
@@ -253,7 +253,7 @@ public:
* UMLAssociation itself but for its role B object.
*/
void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
UMLAssociation *assoc = static_cast<UMLAssociation*>(item);
if (!quid.isEmpty()) {
assoc->getUMLRole(Uml::B)->setSecondaryId(quid);
@@ -286,7 +286,7 @@ public:
* UMLAssociation itself but for its role B object.
*/
void setTypeReferences(UMLObject *item,
- const QString& quid, const QString& type) {
+ const TQString& quid, const TQString& type) {
UMLAssociation *assoc = static_cast<UMLAssociation*>(item);
if (!quid.isEmpty()) {
assoc->getUMLRole(Uml::B)->setSecondaryId(quid);
@@ -313,11 +313,11 @@ protected:
* @param parentPkg Pointer to the current parent UMLPackage.
* @return True if the node actually contained a controlled unit.
*/
-bool handleControlledUnit(PetalNode *node, const QString& name, Uml::IDType id, UMLPackage *parentPkg) {
+bool handleControlledUnit(PetalNode *node, const TQString& name, Uml::IDType id, UMLPackage *parentPkg) {
if (node->findAttribute("is_unit").string != "TRUE")
return false;
bool is_loaded = (node->findAttribute("is_loaded").string != "FALSE");
- QString file_name = node->findAttribute("file_name").string;
+ TQString file_name = node->findAttribute("file_name").string;
if (file_name.isEmpty()) {
kError() << "handleControlledUnit(" << name
<< "): attribute file_name not found (?)" << endl;
@@ -340,9 +340,9 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
kError() << "umbrellify: node is NULL" << endl;
return false;
}
- QStringList args = node->initialArgs();
- QString objType = args[0];
- QString name = clean(args[1]);
+ TQStringList args = node->initialArgs();
+ TQString objType = args[0];
+ TQString name = clean(args[1]);
Uml::IDType id = quid(node);
if (objType == "Class_Category") {
@@ -365,7 +365,7 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
o->setID(id);
UMLClassifier *c = static_cast<UMLClassifier*>(o);
// set stereotype
- QString stereotype = clean(node->findAttribute("stereotype").string);
+ TQString stereotype = clean(node->findAttribute("stereotype").string);
if (!stereotype.isEmpty()) {
if (stereotype.lower() == "interface")
c->setBaseType(Uml::ot_Interface);
@@ -407,42 +407,42 @@ bool umbrellify(PetalNode *node, UMLPackage *parentPkg = NULL) {
// index 0 corresponds to Umbrello roleB
// index 1 corresponds to Umbrello roleA
UMLRole *role = assoc->getUMLRole((Uml::Role_Type) !i);
- QStringList initialArgs = roleNode->initialArgs();
+ TQStringList initialArgs = roleNode->initialArgs();
if (initialArgs.count() > 1) {
- QString roleName = clean(initialArgs[1]);
+ TQString roleName = clean(initialArgs[1]);
if (! roleName.startsWith("$UNNAMED"))
role->setName(roleName);
}
role->setID(quid(roleNode));
- QString quidref = quidu(roleNode);
- QString type = clean(roleNode->findAttribute("supplier").string);
+ TQString quidref = quidu(roleNode);
+ TQString type = clean(roleNode->findAttribute("supplier").string);
if (!quidref.isEmpty()) {
role->setSecondaryId(quidref);
}
if (!type.isEmpty()) {
role->setSecondaryFallback(type);
}
- QString label = clean(roleNode->findAttribute("label").string);
+ TQString label = clean(roleNode->findAttribute("label").string);
if (!label.isEmpty()) {
role->setName(label);
}
- QString client_cardinality = clean(roleNode->findAttribute("client_cardinality").string);
+ TQString client_cardinality = clean(roleNode->findAttribute("client_cardinality").string);
if (!client_cardinality.isEmpty()) {
role->setMultiplicity(client_cardinality);
}
- QString is_navigable = clean(roleNode->findAttribute("is_navigable").string);
+ TQString is_navigable = clean(roleNode->findAttribute("is_navigable").string);
if (is_navigable == "FALSE") {
assoc->setAssocType(Uml::at_Association);
}
- QString is_aggregate = clean(roleNode->findAttribute("is_aggregate").string);
+ TQString is_aggregate = clean(roleNode->findAttribute("is_aggregate").string);
if (is_aggregate == "TRUE") {
assoc->setAssocType(Uml::at_Aggregation);
}
- QString containment = clean(roleNode->findAttribute("Containment").string);
+ TQString containment = clean(roleNode->findAttribute("Containment").string);
if (containment == "By Value") {
assoc->setAssocType(Uml::at_Composition);
}
- QString doc = roleNode->findAttribute("documentation").string;
+ TQString doc = roleNode->findAttribute("documentation").string;
if (! doc.isEmpty())
role->setDoc(doc);
}
@@ -488,14 +488,14 @@ Uml::ListView_Type folderType(UMLListViewItem *parent) {
* Given a PetalNode for which the mapping to Umbrello is not yet
* implemented umbrellify() is a no-op but also returns true.
*/
-bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *parent) {
+bool umbrellify(PetalNode *node, const TQString& modelsName, UMLListViewItem *parent) {
if (node == NULL) {
kError() << "umbrellify(" << modelsName << "): node is NULL" << endl;
return false;
}
- QStringList args = node->initialArgs();
- QString objType = args[0];
- QString name = clean(args[1]);
+ TQStringList args = node->initialArgs();
+ TQString objType = args[0];
+ TQString name = clean(args[1]);
Uml::IDType id = quid(node);
UMLObject *obj = NULL;
UMLListViewItem *item = NULL;
@@ -504,7 +504,7 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
Uml::ListView_Type lvType = folderType(parent);
item = new UMLListViewItem( parent, name, lvType, id );
} else if (objType == "Class") {
- QString stereotype = clean(node->findAttribute("stereotype").string);
+ TQString stereotype = clean(node->findAttribute("stereotype").string);
if (stereotype == "Actor") {
UMLActor *act = new UMLActor(name, id);
item = new UMLListViewItem(parent, name, Uml::lvt_Actor, act);
@@ -540,7 +540,7 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
}
}
if (obj) {
- QString doc = node->findAttribute("documentation").string;
+ TQString doc = node->findAttribute("documentation").string;
if (! doc.isEmpty())
obj->setDoc(doc);
UMLDoc *theDocument = UMLApp::app()->getDocument();
@@ -552,8 +552,8 @@ bool umbrellify(PetalNode *node, const QString& modelsName, UMLListViewItem *par
/**
* Auxiliary function for UseCase/Component/Deployment view import
*/
-bool importView(PetalNode *root, const QString& rootName,
- const QString& modelsName, UMLListViewItem *lvParent) {
+bool importView(PetalNode *root, const TQString& rootName,
+ const TQString& modelsName, UMLListViewItem *lvParent) {
PetalNode *viewRoot = root->findAttribute(rootName).node;
if (viewRoot == NULL) {
kDebug() << "importView: cannot find " << rootName << endl;
diff --git a/umbrello/umbrello/plugin.cpp b/umbrello/umbrello/plugin.cpp
index 1447afcd..8a751374 100644
--- a/umbrello/umbrello/plugin.cpp
+++ b/umbrello/umbrello/plugin.cpp
@@ -28,10 +28,10 @@
using namespace Umbrello;
-Plugin::Plugin(QObject *parent,
+Plugin::Plugin(TQObject *parent,
const char *name,
- const QStringList & /* args */) :
- QObject(parent, name),
+ const TQStringList & /* args */) :
+ TQObject(parent, name),
Configurable(),
_ref(0),
_instanceName(name),
@@ -55,7 +55,7 @@ Plugin::unload()
_ref--;
if(_ref == 0) {
// save the name
- QString pluginName = _instanceName;
+ TQString pluginName = _instanceName;
// shutdown and delete
shutdown();
@@ -150,7 +150,7 @@ Plugin::configure()
loadPlugins(conf, "Load");
// only load GUI plugins if this is not a terminal app
- if(KApplication::kApplication()->type() != QApplication::Tty) {
+ if(KApplication::kApplication()->type() != TQApplication::Tty) {
loadPlugins(conf, "LoadGUI");
}
}
@@ -161,7 +161,7 @@ Plugin::configure()
QString
Plugin::category()
{
- return QString("miscellaneous");
+ return TQString("miscellaneous");
}
#include "plugin.moc"
diff --git a/umbrello/umbrello/plugin.h b/umbrello/umbrello/plugin.h
index 8d1eacc8..c7fc7638 100644
--- a/umbrello/umbrello/plugin.h
+++ b/umbrello/umbrello/plugin.h
@@ -20,7 +20,7 @@
#define UMBRELLO_PLUGIN_H
// Qt includes
-#include <qobject.h>
+#include <tqobject.h>
// KDE includes
#include <kgenericfactory.h>
@@ -85,7 +85,7 @@ class PluginLoader;
* is constructed.
*/
class Plugin :
- public QObject,
+ public TQObject,
public Configurable
{
Q_OBJECT
@@ -95,13 +95,13 @@ public:
virtual ~Plugin();
/** Return the instance name of the plugin */
- QCString instanceName() const;
+ TQCString instanceName() const;
/** Return the configuration record for the plugin */
KConfig *config();
/** Return the category descriptor string */
- virtual QString category();
+ virtual TQString category();
/**
* Unload the plugin. This method actually only decrements
@@ -112,7 +112,7 @@ public:
protected:
/** Construct a plugin */
- Plugin(QObject *parent, const char *name, const QStringList &args);
+ Plugin(TQObject *parent, const char *name, const TQStringList &args);
/** Can be reimplemented to define plugin specific startup behavior */
virtual bool onInit();
@@ -155,7 +155,7 @@ private:
protected:
uint _ref; ///< Reference counter
- QCString _instanceName; ///< Instance name of the plugin
+ TQCString _instanceName; ///< Instance name of the plugin
KConfig *_config; ///< Configuration record
};
}
diff --git a/umbrello/umbrello/pluginloader.cpp b/umbrello/umbrello/pluginloader.cpp
index db79bca1..583b3858 100644
--- a/umbrello/umbrello/pluginloader.cpp
+++ b/umbrello/umbrello/pluginloader.cpp
@@ -17,7 +17,7 @@
#include "pluginloader.h"
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kdebug.h>
@@ -53,7 +53,7 @@ PluginLoader::instance()
}
Plugin *
-PluginLoader::loadPlugin(const QString &name)
+PluginLoader::loadPlugin(const TQString &name)
{
KLibrary *lib = NULL;
KLibFactory *factory = NULL;
@@ -87,7 +87,7 @@ PluginLoader::loadPlugin(const QString &name)
// use the factory to create the plugin
if(success) {
- plugin = dynamic_cast<Plugin *>(factory->create((QObject*)0, name.latin1()));
+ plugin = dynamic_cast<Plugin *>(factory->create((TQObject*)0, name.latin1()));
if(!plugin) {
kdError() << "failed to create a plugin object for " << name << endl;
success = false;
@@ -117,14 +117,14 @@ PluginLoader::loadPlugin(const QString &name)
// reference to it
if(success) {
plugin->ref();
- connect(plugin, SIGNAL(destroyed(QObject *)), SLOT(slotDestroyed(QObject *)));
+ connect(plugin, TQT_SIGNAL(destroyed(TQObject *)), TQT_SLOT(slotDestroyed(TQObject *)));
}
return plugin;
}
Plugin *
-PluginLoader::findPlugin(const QString &name)
+PluginLoader::findPlugin(const TQString &name)
{
Plugin *ret = NULL;
PluginMap::iterator it = _plugins.find(name);
@@ -135,7 +135,7 @@ PluginLoader::findPlugin(const QString &name)
}
void
-PluginLoader::unloadPlugin(const QString &name)
+PluginLoader::unloadPlugin(const TQString &name)
{
KLibLoader::self()->unloadLibrary(name.latin1());
}
@@ -153,7 +153,7 @@ PluginLoader::categories() const
}
void
-PluginLoader::slotDestroyed(QObject *obj)
+PluginLoader::slotDestroyed(TQObject *obj)
{
Plugin *plugin = static_cast<Plugin *>(obj);
diff --git a/umbrello/umbrello/pluginloader.h b/umbrello/umbrello/pluginloader.h
index 64ebed6f..ec422501 100644
--- a/umbrello/umbrello/pluginloader.h
+++ b/umbrello/umbrello/pluginloader.h
@@ -20,9 +20,9 @@
#define UMBRELLO_PLUGINLOADER_H
// Qt includes
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
// forward declarations
class QString;
@@ -48,7 +48,7 @@ class Plugin;
*
* On the subject of unloading, we actually have very little to do.
* The unload method on a plugin is simply a reference decrementer.
- * When it reaches 0, the object destroys itself. Being a QObject,
+ * When it reaches 0, the object destroys itself. Being a TQObject,
* it will emit the destroyed signal just before deletion, allowing
* the plugin loader to respond to the event and remove the plugin
* from its mapping.
@@ -73,13 +73,13 @@ public:
/** Just a container of plugins */
- typedef QValueList<Plugin *> PluginList;
+ typedef TQValueList<Plugin *> PluginList;
/** The containment type for mapping plugins */
- typedef QMap<QString, Plugin *> PluginMap;
+ typedef TQMap<TQString, Plugin *> PluginMap;
/** Container of plugin categories */
- typedef QMap<QString, PluginList> CategoryMap;
+ typedef TQMap<TQString, PluginList> CategoryMap;
/** Singleton accessor */
static PluginLoader *instance();
@@ -88,10 +88,10 @@ public:
* Load a plugin. Test to see if the plugin already exists. If it
* does, just add a reference to it and continue on.
*/
- Plugin *loadPlugin(const QString &name);
+ Plugin *loadPlugin(const TQString &name);
/** Find a plugin */
- Plugin *findPlugin(const QString &name);
+ Plugin *findPlugin(const TQString &name);
/**
* Unload a plugin. Never use this method. It is only used by the deref
@@ -99,7 +99,7 @@ public:
* library. In fact, there is actually no corresponding plugin to unload,
* we just unload the library.
*/
- void unloadPlugin(const QString &name);
+ void unloadPlugin(const TQString &name);
/**
* Get a reference to the plugin mapping. This method wraps everything
@@ -117,7 +117,7 @@ private slots:
* when they are finally deleted. The plugin loader uses this signal
* to remove the plugin from the plugin map.
*/
- void slotDestroyed(QObject *obj);
+ void slotDestroyed(TQObject *obj);
private:
/** Private constructor - This must be created through the instance method */
diff --git a/umbrello/umbrello/refactoring/refactoringassistant.cpp b/umbrello/umbrello/refactoring/refactoringassistant.cpp
index 0cbcf6aa..193f9545 100644
--- a/umbrello/umbrello/refactoring/refactoringassistant.cpp
+++ b/umbrello/umbrello/refactoring/refactoringassistant.cpp
@@ -22,8 +22,8 @@
#include "../dialogs/umlattributedialog.h"
#include "../object_factory.h"
-#include <qpoint.h>
-#include <qpopupmenu.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
#include <typeinfo>
#include <kstandarddirs.h>
@@ -35,7 +35,7 @@
using std::type_info;
-RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, QWidget *parent, const char *name ):
+RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, TQWidget *parent, const char *name ):
KListView( parent, name ), m_doc( doc )
{
loadPixmaps();
@@ -54,11 +54,11 @@ RefactoringAssistant::RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj, QWi
addColumn("Name ");
- m_menu = new QPopupMenu(this);
+ m_menu = new TQPopupMenu(this);
- connect(this,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(itemExecuted(QListViewItem*)));
- connect(this,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this,SLOT(showContextMenu(KListView*,QListViewItem*,const QPoint&)));
+ connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem*)),this,TQT_SLOT(itemExecuted(TQListViewItem*)));
+ connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this,TQT_SLOT(showContextMenu(KListView*,TQListViewItem*,const TQPoint&)));
resize(300,400);
@@ -82,19 +82,19 @@ void RefactoringAssistant::refactor( UMLClassifier *obj )
}
addClassifier( obj, 0, true, true, true );
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
item->setOpen(true);
for( item = item->firstChild(); item ; item = item->nextSibling() )
item->setOpen(true);
}
-UMLObject* RefactoringAssistant::findUMLObject( const QListViewItem *item )
+UMLObject* RefactoringAssistant::findUMLObject( const TQListViewItem *item )
{
- QListViewItem *i = const_cast<QListViewItem*>(item);
+ TQListViewItem *i = const_cast<TQListViewItem*>(item);
if( m_umlObjectMap.find(i) == m_umlObjectMap.end() )
{
- kWarning()<<"RefactoringAssistant::findUMLObject( QListViewItem *item )"
+ kWarning()<<"RefactoringAssistant::findUMLObject( TQListViewItem *item )"
<<"item with text "<<item->text(0)<<"not found in uml map!"<<endl;
return 0L;
}
@@ -102,7 +102,7 @@ UMLObject* RefactoringAssistant::findUMLObject( const QListViewItem *item )
}
-QListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
+TQListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
{
UMLObjectMap::iterator end(m_umlObjectMap.end());
for( UMLObjectMap::iterator it(m_umlObjectMap.begin()) ; it != end ; ++it )
@@ -115,13 +115,13 @@ QListViewItem* RefactoringAssistant::findListViewItem( const UMLObject *obj )
}
-void RefactoringAssistant::itemExecuted( QListViewItem *item )
+void RefactoringAssistant::itemExecuted( TQListViewItem *item )
{
UMLObject *o = findUMLObject( item );
if(o) editProperties( );
}
-void RefactoringAssistant::setVisibilityIcon( QListViewItem *item , const UMLObject *obj )
+void RefactoringAssistant::setVisibilityIcon( TQListViewItem *item , const UMLObject *obj )
{
switch(obj->getVisibility())
{
@@ -145,7 +145,7 @@ void RefactoringAssistant::umlObjectModified( const UMLObject *obj )
{
if( !obj )
obj = dynamic_cast<const UMLObject*>(sender());
- QListViewItem *item = findListViewItem( obj );
+ TQListViewItem *item = findListViewItem( obj );
if( !item )
return;
item->setText( 0, obj->getName() );
@@ -166,18 +166,18 @@ void RefactoringAssistant::operationAdded( UMLClassifierListItem *o )
<< ") - Parent of operation is not a classifier!" << endl;
return;
}
- QListViewItem *item = findListViewItem( c );
+ TQListViewItem *item = findListViewItem( c );
if( !item )
{
return;
}
- for( QListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
+ for( TQListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
{
if( folder->text(1) == "operations" )
{
item = new KListViewItem( folder, op->getName() );
m_umlObjectMap[item] = op;
- connect( op, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( op, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
setVisibilityIcon( item, op );
break;
}
@@ -187,12 +187,12 @@ void RefactoringAssistant::operationAdded( UMLClassifierListItem *o )
void RefactoringAssistant::operationRemoved( UMLClassifierListItem *o )
{
UMLOperation *op = static_cast<UMLOperation*>(o);
- QListViewItem *item = findListViewItem( op );
+ TQListViewItem *item = findListViewItem( op );
if( !item )
{
return;
}
- disconnect( op, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ disconnect( op, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
m_umlObjectMap.erase(item);
delete item;
}
@@ -208,18 +208,18 @@ void RefactoringAssistant::attributeAdded( UMLClassifierListItem *a )
<< ") - Parent is not a class!" << endl;
return;
}
- QListViewItem *item = findListViewItem( c );
+ TQListViewItem *item = findListViewItem( c );
if( !item )
{
return;
}
- for( QListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
+ for( TQListViewItem *folder = item->firstChild(); folder; folder = folder->nextSibling() )
{
if( folder->text(1) == "attributes" )
{
item = new KListViewItem( folder, att->getName() );
m_umlObjectMap[item] = att;
- connect( att, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( att, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
setVisibilityIcon( item, att );
break;
}
@@ -229,19 +229,19 @@ void RefactoringAssistant::attributeAdded( UMLClassifierListItem *a )
void RefactoringAssistant::attributeRemoved( UMLClassifierListItem *a )
{
UMLAttribute *att = static_cast<UMLAttribute*>(a);
- QListViewItem *item = findListViewItem( att );
+ TQListViewItem *item = findListViewItem( att );
if( !item )
{
return;
}
- disconnect( att, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ disconnect( att, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
m_umlObjectMap.erase(item);
delete item;
}
void RefactoringAssistant::editProperties( )
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if( item )
{
UMLObject *o = findUMLObject( item );
@@ -277,7 +277,7 @@ void RefactoringAssistant::editProperties( UMLObject *obj )
delete dia;
}
-void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, const QPoint &p)
+void RefactoringAssistant::showContextMenu(KListView* ,TQListViewItem *item, const TQPoint &p)
{
m_menu->clear();
UMLObject *obj = findUMLObject( item );
@@ -286,17 +286,17 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
Uml::Object_Type t = obj->getBaseType();
if (t == Uml::ot_Class)
{
- m_menu->insertItem(i18n("Add Base Class"),this,SLOT(addBaseClassifier()));
- m_menu->insertItem(i18n("Add Derived Class"),this,SLOT(addDerivedClassifier()));
- // m_menu->insertItem(i18n("Add Interface Implementation"),this,SLOT(addInterfaceImplementation()));
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
- m_menu->insertItem(i18n("Add Attribute"),this,SLOT(createAttribute()));
+ m_menu->insertItem(i18n("Add Base Class"),this,TQT_SLOT(addBaseClassifier()));
+ m_menu->insertItem(i18n("Add Derived Class"),this,TQT_SLOT(addDerivedClassifier()));
+ // m_menu->insertItem(i18n("Add Interface Implementation"),this,TQT_SLOT(addInterfaceImplementation()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Attribute"),this,TQT_SLOT(createAttribute()));
}
else if (t == Uml::ot_Interface)
{
- m_menu->insertItem(i18n("Add Base Interface"),this,SLOT(addSuperClassifier()));
- m_menu->insertItem(i18n("Add Derived Interface"),this,SLOT(addDerivedClassifier()));
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Base Interface"),this,TQT_SLOT(addSuperClassifier()));
+ m_menu->insertItem(i18n("Add Derived Interface"),this,TQT_SLOT(addDerivedClassifier()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
}
// else
// {
@@ -304,17 +304,17 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
// return;
// }
m_menu->insertSeparator();
- m_menu->insertItem(i18n("Properties"),this,SLOT(editProperties()));
+ m_menu->insertItem(i18n("Properties"),this,TQT_SLOT(editProperties()));
}
else
{//menu for other ViewItems
if( item->text(1) == "operations" )
{
- m_menu->insertItem(i18n("Add Operation"),this,SLOT(createOperation()));
+ m_menu->insertItem(i18n("Add Operation"),this,TQT_SLOT(createOperation()));
}
else if( item->text(1) == "attributes" )
{
- m_menu->insertItem(i18n("Add Attribute"),this,SLOT(createAttribute()));
+ m_menu->insertItem(i18n("Add Attribute"),this,TQT_SLOT(createAttribute()));
}
else
{
@@ -328,7 +328,7 @@ void RefactoringAssistant::showContextMenu(KListView* ,QListViewItem *item, cons
void RefactoringAssistant::addBaseClassifier()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::addBaseClassifier() "
@@ -351,7 +351,7 @@ void RefactoringAssistant::addBaseClassifier()
m_doc->createUMLAssociation( obj, super, Uml::at_Generalization );
////////////////////// Manually add the classifier to the assitant - would be nicer to do it with
///////////////////// a signal, like operations and attributes
- QListViewItem *baseFolder = item->firstChild();
+ TQListViewItem *baseFolder = item->firstChild();
while( baseFolder->text(0) != i18n("Base Classifiers") )
baseFolder = baseFolder->nextSibling();
if(!baseFolder)
@@ -369,7 +369,7 @@ void RefactoringAssistant::addBaseClassifier()
void RefactoringAssistant::addDerivedClassifier()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::addDerivedClassifier() "
@@ -393,7 +393,7 @@ void RefactoringAssistant::addDerivedClassifier()
////////////////////// Manually add the classifier to the assitant - would be nicer to do it with
///////////////////// a signal, like operations and attributes
- QListViewItem *derivedFolder = item->firstChild();
+ TQListViewItem *derivedFolder = item->firstChild();
while( derivedFolder->text(0) != i18n("Derived Classifiers") )
derivedFolder = derivedFolder->nextSibling();
if(!derivedFolder)
@@ -414,7 +414,7 @@ void RefactoringAssistant::addInterfaceImplementation()
kWarning()<<"RefactoringAssistant::addInterfaceImplementation()"
<<"not implemented... finish addSuperClassifier() first!!"<<endl;
return;
- // QListViewItem *item = selectedListViewItem( );
+ // TQListViewItem *item = selectedListViewItem( );
// UMLObject *obj = findUMLObject( item );
// if( !dynamic_cast<UMLClassifier*>(obj) )
// return;
@@ -427,7 +427,7 @@ void RefactoringAssistant::addInterfaceImplementation()
void RefactoringAssistant::createOperation()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::createOperation() "
@@ -442,7 +442,7 @@ void RefactoringAssistant::createOperation()
void RefactoringAssistant::createAttribute()
{
- QListViewItem *item = selectedItem();
+ TQListViewItem *item = selectedItem();
if(!item)
{
kWarning()<<"RefactoringAssistant::createAttribute() "
@@ -456,9 +456,9 @@ void RefactoringAssistant::createAttribute()
}
-void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewItem *parent, bool addSuper, bool addSub, bool recurse)
+void RefactoringAssistant::addClassifier( UMLClassifier *classifier, TQListViewItem *parent, bool addSuper, bool addSub, bool recurse)
{
- QListViewItem *classifierItem, *item;
+ TQListViewItem *classifierItem, *item;
if( parent )
{
classifierItem = parent;
@@ -469,17 +469,17 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
m_umlObjectMap[classifierItem] = classifier;
}
- connect( classifier, SIGNAL( modified() ), this, SLOT( umlObjectModified() ) );
+ connect( classifier, TQT_SIGNAL( modified() ), this, TQT_SLOT( umlObjectModified() ) );
UMLClassifier *klass = dynamic_cast<UMLClassifier*>(classifier);
if( klass )
{// only Classes have attributes...
- connect( classifier, SIGNAL(attributeAdded(UMLClassifierListItem*)),
- this, SLOT(attributeAdded(UMLClassifierListItem*)));
- connect( classifier, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(attributeRemoved(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(attributeAdded(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(attributeRemoved(UMLClassifierListItem*)));
- QListViewItem *attsFolder = new KListViewItem( classifierItem, i18n("Attributes"), "attributes" );
+ TQListViewItem *attsFolder = new KListViewItem( classifierItem, i18n("Attributes"), "attributes" );
attsFolder->setPixmap(0,SmallIcon("folder_green_open"));
attsFolder->setExpandable( true );
UMLAttributeList atts = klass->getAttributeList();
@@ -491,12 +491,12 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
}
// add operations
- connect( classifier, SIGNAL(operationAdded(UMLClassifierListItem*)),
- this, SLOT(operationAdded(UMLClassifierListItem*)));
- connect( classifier, SIGNAL(operationRemoved(UMLClassifierListItem*)),
- this, SLOT(operationRemoved(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(operationAdded(UMLClassifierListItem*)));
+ connect( classifier, TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(operationRemoved(UMLClassifierListItem*)));
- QListViewItem *opsFolder = new KListViewItem( classifierItem, i18n("Operations"), "operations" );
+ TQListViewItem *opsFolder = new KListViewItem( classifierItem, i18n("Operations"), "operations" );
opsFolder->setPixmap(0,SmallIcon("folder_blue_open"));
opsFolder->setExpandable( true );
UMLOperationList ops(classifier->getOpList());
@@ -508,7 +508,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
//if add parents
if(addSuper)
{
- QListViewItem *superFolder = new KListViewItem( classifierItem, i18n("Base Classifiers") );
+ TQListViewItem *superFolder = new KListViewItem( classifierItem, i18n("Base Classifiers") );
superFolder->setExpandable( true );
UMLClassifierList super = classifier->findSuperClassConcepts();
for( UMLClassifier *cl = super.first(); cl ; cl = super.next() )
@@ -527,7 +527,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
if(addSub)
{
//add derived classifiers
- QListViewItem *derivedFolder = new KListViewItem( classifierItem, i18n("Derived Classifiers") );
+ TQListViewItem *derivedFolder = new KListViewItem( classifierItem, i18n("Derived Classifiers") );
derivedFolder->setExpandable( true );
UMLClassifierList derived = classifier->findSubClassConcepts();
for( UMLClassifier *d = derived.first(); d ; d = derived.next() )
@@ -546,7 +546,7 @@ void RefactoringAssistant::addClassifier( UMLClassifier *classifier, QListViewIt
}
-bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
+bool RefactoringAssistant::acceptDrag(TQDropEvent *event) const
{
//first check if we can accept drops at all, and if the operation
// is a move within the list itself
@@ -558,7 +558,7 @@ bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
RefactoringAssistant *me = const_cast<RefactoringAssistant*>(this);
//ok, check if the move is valid
- QListViewItem *movingItem = 0, *afterme = 0, *parentItem = 0;
+ TQListViewItem *movingItem = 0, *afterme = 0, *parentItem = 0;
me->findDrop(event->pos(), parentItem, afterme);
for( movingItem = firstChild(); movingItem != 0; movingItem = movingItem->itemBelow() )
{
@@ -613,12 +613,12 @@ bool RefactoringAssistant::acceptDrag(QDropEvent *event) const
}
-void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListViewItem* afterme)
+void RefactoringAssistant::movableDropEvent (TQListViewItem* parentItem, TQListViewItem* afterme)
{
//when dropping on a class, we have to put the item in the appropriate folder!
UMLObject *movingObject;
UMLClassifier *newClassifier;
- QListViewItem *movingItem;
+ TQListViewItem *movingItem;
for( movingItem = firstChild(); movingItem != 0; movingItem = movingItem->itemBelow() )
{
@@ -650,9 +650,9 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
UMLOperation *op = static_cast<UMLOperation*>(movingObject);
if(newClassifier->checkOperationSignature(op->getName(), op->getParmList()))
{
- QString msg = QString(i18n("An operation with that signature already exists in %1.\n")).arg(newClassifier->getName())
+ TQString msg = TQString(i18n("An operation with that signature already exists in %1.\n")).arg(newClassifier->getName())
+
- QString(i18n("Choose a different name or parameter list." ));
+ TQString(i18n("Choose a different name or parameter list." ));
KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
return;
}
@@ -666,9 +666,9 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
// UMLAttribute *att = static_cast<UMLAttribute*>(movingObject);
// if(!newClassifier->checkAttributeSignature(att))
// {
- // QString msg = QString(i18n("An attribute with that signature already exists in %1.\n")).arg(newClassifier->getName())
+ // TQString msg = TQString(i18n("An attribute with that signature already exists in %1.\n")).arg(newClassifier->getName())
// +
- // QString(i18n("Choose a different name or parameter list." ));
+ // TQString(i18n("Choose a different name or parameter list." ));
// KMessageBox::error(this, msg, i18n("Operation Name Invalid"), false);
// return;
// }
@@ -682,7 +682,7 @@ void RefactoringAssistant::movableDropEvent (QListViewItem* parentItem, QListVie
void RefactoringAssistant::loadPixmaps()
{
KStandardDirs *dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs -> findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
m_pixmaps.Public.load( dataDir + "CVpublic_var.png" );
diff --git a/umbrello/umbrello/refactoring/refactoringassistant.h b/umbrello/umbrello/refactoring/refactoringassistant.h
index 5d8bd79f..306d19ed 100644
--- a/umbrello/umbrello/refactoring/refactoringassistant.h
+++ b/umbrello/umbrello/refactoring/refactoringassistant.h
@@ -16,7 +16,7 @@
#include <klistview.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <map>
@@ -32,9 +32,9 @@ class RefactoringAssistant : public KListView
{
Q_OBJECT
public:
- typedef std::map<QListViewItem*, UMLObject*> UMLObjectMap;
+ typedef std::map<TQListViewItem*, UMLObject*> UMLObjectMap;
- explicit RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj = 0, QWidget *parent = 0, const char *name = 0 );
+ explicit RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj = 0, TQWidget *parent = 0, const char *name = 0 );
virtual ~RefactoringAssistant();
void refactor( UMLClassifier *obj );
@@ -56,11 +56,11 @@ public slots:
void attributeAdded( UMLClassifierListItem *a );
void attributeRemoved( UMLClassifierListItem *a );
- void itemExecuted( QListViewItem *item );
- void showContextMenu( KListView*, QListViewItem*, const QPoint&);
+ void itemExecuted( TQListViewItem *item );
+ void showContextMenu( KListView*, TQListViewItem*, const TQPoint&);
protected:
- struct { QPixmap Public,
+ struct { TQPixmap Public,
Protected,
Private,
Implementation,
@@ -68,17 +68,17 @@ protected:
Subclass;
} m_pixmaps;
- UMLObject* findUMLObject( const QListViewItem* );
- QListViewItem* findListViewItem( const UMLObject *obj );
+ UMLObject* findUMLObject( const TQListViewItem* );
+ TQListViewItem* findListViewItem( const UMLObject *obj );
void editProperties( UMLObject *obj );
- void addClassifier( UMLClassifier *classifier, QListViewItem *parent = 0, bool addSuper = true, bool addSub = true, bool recurse = false );
+ void addClassifier( UMLClassifier *classifier, TQListViewItem *parent = 0, bool addSuper = true, bool addSub = true, bool recurse = false );
void loadPixmaps();
- virtual bool acceptDrag(QDropEvent *event) const;
- virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
- void setVisibilityIcon( QListViewItem *item , const UMLObject *obj );
+ virtual bool acceptDrag(TQDropEvent *event) const;
+ virtual void movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme);
+ void setVisibilityIcon( TQListViewItem *item , const UMLObject *obj );
UMLClassifier *m_umlObject;
UMLDoc *m_doc;
- QPopupMenu *m_menu;
+ TQPopupMenu *m_menu;
UMLObjectMap m_umlObjectMap;
diff --git a/umbrello/umbrello/seqlinewidget.cpp b/umbrello/umbrello/seqlinewidget.cpp
index a4be0216..6d52834f 100644
--- a/umbrello/umbrello/seqlinewidget.cpp
+++ b/umbrello/umbrello/seqlinewidget.cpp
@@ -23,10 +23,10 @@
// class members
int const SeqLineWidget::m_nMouseDownEpsilonX = 20;
-SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : QCanvasLine( pView -> canvas() ) {
+SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : TQCanvasLine( pView -> canvas() ) {
m_pView = pView;
m_pObject = pObject;
- setPen( QPen( m_pObject->getLineColor(), 0, Qt::DashLine ) );
+ setPen( TQPen( m_pObject->getLineColor(), 0, Qt::DashLine ) );
setZ( 0 );
setVisible( true );
m_DestructionBox.line1 = 0;
@@ -36,10 +36,10 @@ SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : QCanva
SeqLineWidget::~SeqLineWidget() {}
-int SeqLineWidget::onWidget( const QPoint & p ) {
+int SeqLineWidget::onWidget( const TQPoint & p ) {
int nOnWidget = 0;
- QPoint sp = startPoint();
- QPoint ep = endPoint();
+ TQPoint sp = startPoint();
+ TQPoint ep = endPoint();
//see if on widget ( for message creation )
if( sp.x() - m_nMouseDownEpsilonX < p.x()
&& ep.x() + m_nMouseDownEpsilonX > p.x()
@@ -57,7 +57,7 @@ void SeqLineWidget::cleanup() {
void SeqLineWidget::setStartPoint( int startX, int startY ) {
int endX = startX;
int endY = startY + m_nLengthY;
- QCanvasLine::setPoints( startX, startY, endX, endY );
+ TQCanvasLine::setPoints( startX, startY, endX, endY );
moveDestructionBox();
}
@@ -75,22 +75,22 @@ void SeqLineWidget::setupDestructionBox() {
if( !m_pObject->getShowDestruction() ) {
return;
}
- QRect rect;
+ TQRect rect;
rect.setX( m_pObject->getX() + m_pObject->getWidth() / 2 - 10 );
rect.setY( m_pObject->getY() + m_pObject->getHeight() + m_nLengthY );
rect.setWidth( 14 );
rect.setHeight( 14 );
- m_DestructionBox.line1 = new QCanvasLine( m_pView->canvas() );
+ m_DestructionBox.line1 = new TQCanvasLine( m_pView->canvas() );
m_DestructionBox.setLine1Points(rect);
m_DestructionBox.line1->setVisible( true );
- m_DestructionBox.line1->setPen( QPen(m_pObject->getLineColor(), 2) );
+ m_DestructionBox.line1->setPen( TQPen(m_pObject->getLineColor(), 2) );
m_DestructionBox.line1->setZ( 3 );
- m_DestructionBox.line2 = new QCanvasLine( m_pView -> canvas() );
+ m_DestructionBox.line2 = new TQCanvasLine( m_pView -> canvas() );
m_DestructionBox.setLine2Points(rect);
m_DestructionBox.line2->setVisible( true );
- m_DestructionBox.line2->setPen( QPen(m_pObject->getLineColor(), 2) );
+ m_DestructionBox.line2->setPen( TQPen(m_pObject->getLineColor(), 2) );
m_DestructionBox.line2->setZ( 3 );
}
@@ -98,7 +98,7 @@ void SeqLineWidget::moveDestructionBox() {
if( !m_DestructionBox.line1 ) {
return;
}
- QRect rect;
+ TQRect rect;
rect.setX( m_pObject->getX() + m_pObject->getWidth() / 2 - 7 );
rect.setY( m_pObject->getY() + m_pObject->getHeight() + m_nLengthY - 7 );
rect.setWidth( 14 );
@@ -108,7 +108,7 @@ void SeqLineWidget::moveDestructionBox() {
}
void SeqLineWidget::setEndOfLine(int yPosition) {
- QPoint sp = startPoint();
+ TQPoint sp = startPoint();
int newY = yPosition;
m_nLengthY = yPosition - m_pObject->getY() - m_pObject->getHeight();
// normally the managing Objectwidget is responsible for the call of this function
diff --git a/umbrello/umbrello/seqlinewidget.h b/umbrello/umbrello/seqlinewidget.h
index 1978fafd..71ee9d73 100644
--- a/umbrello/umbrello/seqlinewidget.h
+++ b/umbrello/umbrello/seqlinewidget.h
@@ -12,7 +12,7 @@
#ifndef SEQLINEWIDGET_H
#define SEQLINEWIDGET_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
class UMLView;
class ObjectWidget;
@@ -22,7 +22,7 @@ class ObjectWidget;
* @author Paul Hensgen
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class SeqLineWidget : public QCanvasLine {
+class SeqLineWidget : public TQCanvasLine {
public:
/**
* Constructor.
@@ -41,7 +41,7 @@ public:
* @param p The point to investigate.
* @return Non-zero if point is on this sequence line.
*/
- int onWidget(const QPoint & p);
+ int onWidget(const TQPoint & p);
/**
* Clean up anything before deletion.
@@ -109,13 +109,13 @@ protected:
/// The destruction box.
struct DestructionBox {
- QCanvasLine * line1;
- QCanvasLine * line2;
- void setLine1Points(QRect rect) {
+ TQCanvasLine * line1;
+ TQCanvasLine * line2;
+ void setLine1Points(TQRect rect) {
line1->setPoints( rect.x(), rect.y(),
rect.x() + rect.width(), rect.y() + rect.height() );
}
- void setLine2Points(QRect rect) {
+ void setLine2Points(TQRect rect) {
line2->setPoints( rect.x(), rect.y() + rect.height(),
rect.x() + rect.width(), rect.y() );
}
diff --git a/umbrello/umbrello/statewidget.cpp b/umbrello/umbrello/statewidget.cpp
index 9d104234..871ab316 100644
--- a/umbrello/umbrello/statewidget.cpp
+++ b/umbrello/umbrello/statewidget.cpp
@@ -13,7 +13,7 @@
#include "statewidget.h"
// qt includes
-#include <qevent.h>
+#include <tqevent.h>
// kde includes
#include <klocale.h>
@@ -39,7 +39,7 @@ StateWidget::StateWidget(UMLView * view, StateType stateType, Uml::IDType id)
StateWidget::~StateWidget() {}
-void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void StateWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
const int w = width();
const int h = height();
@@ -49,14 +49,14 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
if(UMLWidget::getUseFillColour())
p.setBrush(UMLWidget::getFillColour());
{
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
int textStartY = (h / 2) - (fontHeight / 2);
const int count = m_Activities.count();
if( count == 0 ) {
p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h);
p.setPen(Qt::black);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold( false );
p.setFont( font );
p.drawText(offsetX + STATE_MARGIN, offsetY + textStartY,
@@ -67,7 +67,7 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h);
textStartY = offsetY + STATE_MARGIN;
p.setPen(Qt::black);
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setBold( true );
p.setFont( font );
p.drawText(offsetX + STATE_MARGIN, textStartY, w - STATE_MARGIN * 2,
@@ -77,8 +77,8 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
int linePosY = textStartY + fontHeight;
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
textStartY += fontHeight;
p.drawLine( offsetX, linePosY, offsetX + w - 1, linePosY );
p.setPen(Qt::black);
@@ -110,10 +110,10 @@ void StateWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-QSize StateWidget::calculateSize() {
+TQSize StateWidget::calculateSize() {
int width = 10, height = 10;
if ( m_StateType == Normal ) {
- const QFontMetrics &fm = getFontMetrics(FT_BOLD);
+ const TQFontMetrics &fm = getFontMetrics(FT_BOLD);
const int fontHeight = fm.lineSpacing();
int textWidth = fm.width(getName());
const int count = m_Activities.count();
@@ -121,8 +121,8 @@ QSize StateWidget::calculateSize() {
if( count > 0 ) {
height = fontHeight * ( count + 1);
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
int w = fm.width( *it );
if( w > textWidth )
textWidth = w;
@@ -134,16 +134,16 @@ QSize StateWidget::calculateSize() {
height += STATE_MARGIN * 2;
}
- return QSize(width, height);
+ return TQSize(width, height);
}
-void StateWidget::setName(const QString &strName) {
+void StateWidget::setName(const TQString &strName) {
m_Text = strName;
updateComponentSize();
adjustAssocs( getX(), getY() );
}
-QString StateWidget::getName() const {
+TQString StateWidget::getName() const {
return m_Text;
}
@@ -158,7 +158,7 @@ void StateWidget::setStateType( StateType stateType ) {
void StateWidget::slotMenuSelection(int sel) {
bool done = false;
bool ok = false;
- QString name = getName();
+ TQString name = getName();
switch( sel ) {
case ListPopupMenu::mt_Rename:
@@ -184,13 +184,13 @@ void StateWidget::slotMenuSelection(int sel) {
UMLWidget::slotMenuSelection( sel );
}
-bool StateWidget::addActivity( const QString &activity ) {
+bool StateWidget::addActivity( const TQString &activity ) {
m_Activities.append( activity );
updateComponentSize();
return true;
}
-bool StateWidget::removeActivity( const QString &activity ) {
+bool StateWidget::removeActivity( const TQString &activity ) {
int index = - 1;
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
@@ -199,16 +199,16 @@ bool StateWidget::removeActivity( const QString &activity ) {
return true;
}
-void StateWidget::setActivities( QStringList & list ) {
+void StateWidget::setActivities( TQStringList & list ) {
m_Activities = list;
updateComponentSize();
}
-QStringList & StateWidget::getActivityList() {
+TQStringList & StateWidget::getActivityList() {
return m_Activities;
}
-bool StateWidget::renameActivity( const QString &activity, const QString &newName ) {
+bool StateWidget::renameActivity( const TQString &activity, const TQString &newName ) {
int index = - 1;
if( ( index = m_Activities.findIndex( activity ) ) == -1 )
return false;
@@ -247,18 +247,18 @@ bool StateWidget::isState(WorkToolBar::ToolBar_Buttons tbb, StateType& resultTyp
return status;
}
-void StateWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement stateElement = qDoc.createElement( "statewidget" );
+void StateWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement stateElement = qDoc.createElement( "statewidget" );
UMLWidget::saveToXMI( qDoc, stateElement );
stateElement.setAttribute( "statename", m_Text );
stateElement.setAttribute( "documentation", m_Doc );
stateElement.setAttribute( "statetype", m_StateType );
//save states activities
- QDomElement activitiesElement = qDoc.createElement( "Activities" );
+ TQDomElement activitiesElement = qDoc.createElement( "Activities" );
- QStringList::Iterator end(m_Activities.end());
- for( QStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
- QDomElement tempElement = qDoc.createElement( "Activity" );
+ TQStringList::Iterator end(m_Activities.end());
+ for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) {
+ TQDomElement tempElement = qDoc.createElement( "Activity" );
tempElement.setAttribute( "name", *it );
activitiesElement.appendChild( tempElement );
}//end for
@@ -266,22 +266,22 @@ void StateWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( stateElement );
}
-bool StateWidget::loadFromXMI( QDomElement & qElement ) {
+bool StateWidget::loadFromXMI( TQDomElement & qElement ) {
if( !UMLWidget::loadFromXMI( qElement ) )
return false;
m_Text = qElement.attribute( "statename", "" );
m_Doc = qElement.attribute( "documentation", "" );
- QString type = qElement.attribute( "statetype", "1" );
+ TQString type = qElement.attribute( "statetype", "1" );
m_StateType = (StateType)type.toInt();
//load states activities
- QDomNode node = qElement.firstChild();
- QDomElement tempElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement tempElement = node.toElement();
if( !tempElement.isNull() && tempElement.tagName() == "Activities" ) {
- QDomNode node = tempElement.firstChild();
- QDomElement activityElement = node.toElement();
+ TQDomNode node = tempElement.firstChild();
+ TQDomElement activityElement = node.toElement();
while( !activityElement.isNull() ) {
if( activityElement.tagName() == "Activity" ) {
- QString name = activityElement.attribute( "name", "" );
+ TQString name = activityElement.attribute( "name", "" );
if( !name.isEmpty() )
m_Activities.append( name );
}//end if
diff --git a/umbrello/umbrello/statewidget.h b/umbrello/umbrello/statewidget.h
index d214980b..e1611c18 100644
--- a/umbrello/umbrello/statewidget.h
+++ b/umbrello/umbrello/statewidget.h
@@ -11,8 +11,8 @@
#ifndef STATEWIDGET_H
#define STATEWIDGET_H
-#include <qpainter.h>
-#include <qstringlist.h>
+#include <tqpainter.h>
+#include <tqstringlist.h>
#include "umlwidget.h"
#include "worktoolbar.h"
@@ -64,17 +64,17 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Sets the name of the State.
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Returns the name of the State.
*/
- virtual QString getName() const;
+ virtual TQString getName() const;
/**
* Returns the type of state.
@@ -89,27 +89,27 @@ public:
/**
* Adds the given activity to the state.
*/
- bool addActivity( const QString &activity );
+ bool addActivity( const TQString &activity );
/**
* Removes the given activity from the state.
*/
- bool removeActivity( const QString &activity );
+ bool removeActivity( const TQString &activity );
/**
* Renames the given activity.
*/
- bool renameActivity( const QString &activity, const QString &newName );
+ bool renameActivity( const TQString &activity, const TQString &newName );
/**
* Sets the states activities to the ones given.
*/
- void setActivities( QStringList & list );
+ void setActivities( TQStringList & list );
/**
* Returns the list of activities.
*/
- QStringList & getActivityList();
+ TQStringList & getActivityList();
/**
* Show a properties dialog for a StateWidget.
@@ -129,18 +129,18 @@ public:
/**
* Creates the "statewidget" XMI element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads a "statewidget" XMI element.
*/
- bool loadFromXMI( QDomElement & qElement );
+ bool loadFromXMI( TQDomElement & qElement );
protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
/**
* Type of state.
@@ -150,7 +150,7 @@ protected:
/**
* List of activities for the state.
*/
- QStringList m_Activities;
+ TQStringList m_Activities;
public slots:
diff --git a/umbrello/umbrello/stereotype.cpp b/umbrello/umbrello/stereotype.cpp
index 5cd68f11..c3b912f4 100644
--- a/umbrello/umbrello/stereotype.cpp
+++ b/umbrello/umbrello/stereotype.cpp
@@ -21,7 +21,7 @@
#include "umldoc.h"
#include "uml.h"
-UMLStereotype::UMLStereotype(const QString &name, Uml::IDType id /* = Uml::id_None */)
+UMLStereotype::UMLStereotype(const TQString &name, Uml::IDType id /* = Uml::id_None */)
: UMLObject( name, id ) {
m_BaseType = Uml::ot_Stereotype;
UMLStereotype * existing = UMLApp::app()->getDocument()->findStereotype(name);
@@ -65,15 +65,15 @@ UMLObject* UMLStereotype::clone() const
}
-void UMLStereotype::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLStereotype::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
//FIXME: uml13.dtd compliance
- QDomElement stereotypeElement = UMLObject::save("UML:Stereotype", qDoc);
+ TQDomElement stereotypeElement = UMLObject::save("UML:Stereotype", qDoc);
qElement.appendChild( stereotypeElement );
}
-bool UMLStereotype::showPropertiesDialog(QWidget* parent) {
+bool UMLStereotype::showPropertiesDialog(TQWidget* parent) {
bool ok;
- QString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
+ TQString name = KInputDialog::getText(i18n("Stereotype"), i18n("Enter name:"), getName(),&ok, parent);
if (ok) {
setName(name);
}
diff --git a/umbrello/umbrello/stereotype.h b/umbrello/umbrello/stereotype.h
index a836952f..a727fed8 100644
--- a/umbrello/umbrello/stereotype.h
+++ b/umbrello/umbrello/stereotype.h
@@ -33,7 +33,7 @@ public:
* @param name The name of this UMLStereotype.
* @param id The unique id given to this UMLStereotype.
*/
- explicit UMLStereotype(const QString &name, Uml::IDType id = Uml::id_None);
+ explicit UMLStereotype(const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Sets up a stereotype.
@@ -79,13 +79,13 @@ public:
/**
* Saves to the <UML:StereoType> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Display the properties configuration dialog for the stereotype
* (just a line edit).
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
protected:
/**
diff --git a/umbrello/umbrello/template.cpp b/umbrello/umbrello/template.cpp
index 12d08fab..f02f4426 100644
--- a/umbrello/umbrello/template.cpp
+++ b/umbrello/umbrello/template.cpp
@@ -13,7 +13,7 @@
#include "template.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
// app includes
@@ -21,8 +21,8 @@
#include "umldoc.h"
#include "dialogs/umltemplatedialog.h"
-UMLTemplate::UMLTemplate(const UMLObject *parent, const QString& name,
- Uml::IDType id, const QString& type)
+UMLTemplate::UMLTemplate(const UMLObject *parent, const TQString& name,
+ Uml::IDType id, const TQString& type)
: UMLClassifierListItem( parent, name, id ) {
setTypeName( type );
m_BaseType = Uml::ot_Template;
@@ -35,7 +35,7 @@ UMLTemplate::UMLTemplate(const UMLObject *parent)
UMLTemplate::~UMLTemplate() {}
-QString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
+TQString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
if (m_pSecondary == NULL || m_pSecondary->getName() == "class") {
return getName();
} else {
@@ -43,7 +43,7 @@ QString UMLTemplate::toString(Uml::Signature_Type /*sig = st_NoSig*/) {
}
}
-QString UMLTemplate::getTypeName() {
+TQString UMLTemplate::getTypeName() {
if (m_pSecondary == NULL)
return "class";
return m_pSecondary->getName();
@@ -76,20 +76,20 @@ UMLObject* UMLTemplate::clone() const
}
-void UMLTemplate::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
+void UMLTemplate::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
//FIXME: uml13.dtd compliance
- QDomElement attributeElement = UMLObject::save("UML:TemplateParameter", qDoc);
+ TQDomElement attributeElement = UMLObject::save("UML:TemplateParameter", qDoc);
if (m_pSecondary)
attributeElement.setAttribute("type", ID2STR(m_pSecondary->getID()));
qElement.appendChild(attributeElement);
}
-bool UMLTemplate::load(QDomElement& element) {
+bool UMLTemplate::load(TQDomElement& element) {
m_SecondaryId = element.attribute("type", "");
return true;
}
-bool UMLTemplate::showPropertiesDialog(QWidget* parent) {
+bool UMLTemplate::showPropertiesDialog(TQWidget* parent) {
UMLTemplateDialog dialog(parent, this);
return dialog.exec();
}
diff --git a/umbrello/umbrello/template.h b/umbrello/umbrello/template.h
index 1109411a..6b471207 100644
--- a/umbrello/umbrello/template.h
+++ b/umbrello/umbrello/template.h
@@ -35,8 +35,8 @@ public:
* @param id The unique id given to this UMLTemplate.
* @param type The type of this UMLTemplate.
*/
- UMLTemplate(const UMLObject *parent, const QString& name,
- Uml::IDType id = Uml::id_None, const QString& type = "class");
+ UMLTemplate(const UMLObject *parent, const TQString& name,
+ Uml::IDType id = Uml::id_None, const TQString& type = "class");
/**
* Sets up a template.
@@ -72,7 +72,7 @@ public:
* @param sig Currently unused.
* @return Returns a string representation of the UMLTemplate.
*/
- QString toString(Uml::Signature_Type sig = Uml::st_NoSig);
+ TQString toString(Uml::Signature_Type sig = Uml::st_NoSig);
/**
* Overrides method from UMLClassifierListItem.
@@ -82,25 +82,25 @@ public:
*
* @return The type name of the UMLClassifierListItem.
*/
- virtual QString getTypeName();
+ virtual TQString getTypeName();
/**
* Display the properties configuration dialog for the template.
*
* @return Success status.
*/
- bool showPropertiesDialog(QWidget* parent);
+ bool showPropertiesDialog(TQWidget* parent);
/**
* Writes the <UML:TemplateParameter> XMI element.
*/
- void saveToXMI(QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI(TQDomDocument & qDoc, TQDomElement & qElement);
protected:
/**
* Loads the <UML:TemplateParameter> XMI element.
*/
- bool load(QDomElement & element);
+ bool load(TQDomElement & element);
};
diff --git a/umbrello/umbrello/textblock.cpp b/umbrello/umbrello/textblock.cpp
index e9779875..f3ea35fe 100644
--- a/umbrello/umbrello/textblock.cpp
+++ b/umbrello/umbrello/textblock.cpp
@@ -19,7 +19,7 @@
#include "textblock.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "codedocument.h"
@@ -30,8 +30,8 @@
// Constructors/Destructors
//
-TextBlock::TextBlock ( CodeDocument * parent, const QString & text )
- : QObject ( (QObject *)parent, "textBlock")
+TextBlock::TextBlock ( CodeDocument * parent, const TQString & text )
+ : TQObject ( (TQObject *)parent, "textBlock")
{
initFields(parent);
setText(text);
@@ -73,7 +73,7 @@ CodeDocument * TextBlock::getParentDocument ( ) {
* The actual text of this code block.
* @param new_var the new value of m_text
*/
-void TextBlock::setText ( const QString &new_var ) {
+void TextBlock::setText ( const TQString &new_var ) {
m_text = new_var;
}
@@ -81,7 +81,7 @@ void TextBlock::setText ( const QString &new_var ) {
* Add text to this object.
*
*/
-void TextBlock::appendText ( const QString &new_text ) {
+void TextBlock::appendText ( const TQString &new_text ) {
m_text = m_text + new_text;
}
@@ -90,7 +90,7 @@ void TextBlock::appendText ( const QString &new_text ) {
* The actual text of this code block.
* @return the value of m_text
*/
-QString TextBlock::getText ( ) const {
+TQString TextBlock::getText ( ) const {
return m_text;
}
@@ -99,7 +99,7 @@ QString TextBlock::getText ( ) const {
* may be used to find this text block in the code document
* to which it belongs.
*/
-QString TextBlock::getTag( ) const {
+TQString TextBlock::getTag( ) const {
return m_tag;
}
@@ -108,7 +108,7 @@ QString TextBlock::getTag( ) const {
* may be used to find this text block in the code document
* to which it belongs.
*/
-void TextBlock::setTag ( const QString &value ) {
+void TextBlock::setTag ( const TQString &value ) {
m_tag = value;
}
@@ -144,21 +144,21 @@ int TextBlock::getIndentationLevel ( ) {
return m_indentationLevel;
}
-QString TextBlock::getNewLineEndingChars ( ) {
+TQString TextBlock::getNewLineEndingChars ( ) {
CodeGenerationPolicy * policy = UMLApp::app()->getCommonPolicy();
return policy->getNewLineEndingChars();
}
-QString TextBlock::getIndentation() {
+TQString TextBlock::getIndentation() {
CodeGenerationPolicy * policy = UMLApp::app()->getCommonPolicy();
return policy->getIndentation();
}
-QString TextBlock::getIndentationString ( int level ) {
+TQString TextBlock::getIndentationString ( int level ) {
if (!level)
level = m_indentationLevel;
- QString indentAmount = getIndentation();
- QString indentation = "";
+ TQString indentAmount = getIndentation();
+ TQString indentation = "";
for(int i=0; i<level; i++)
indentation.append(indentAmount);
return indentation;
@@ -177,20 +177,20 @@ QString TextBlock::getIndentationString ( int level ) {
int TextBlock::firstEditableLine() { return 0; }
int TextBlock::lastEditableLine() { return 0; }
-QString TextBlock::getNewEditorLine ( int amount ) {
+TQString TextBlock::getNewEditorLine ( int amount ) {
return getIndentationString(amount);
}
// will remove indenation from this text block.
-QString TextBlock::unformatText ( const QString & text, const QString & indent )
+TQString TextBlock::unformatText ( const TQString & text, const TQString & indent )
{
- QString output = text;
- QString myIndent = indent;
+ TQString output = text;
+ TQString myIndent = indent;
if(myIndent.isEmpty())
myIndent = getIndentationString();
if(!output.isEmpty())
- output.remove(QRegExp('^'+myIndent));
+ output.remove(TQRegExp('^'+myIndent));
return output;
}
@@ -200,22 +200,22 @@ void TextBlock::release () {
//this->deleteLater();
}
-QString TextBlock::formatMultiLineText ( const QString &work, const QString &linePrefix,
- const QString& breakStr, bool addBreak, bool lastLineHasBreak ) {
- QString output = "";
- QString text = work;
- QString endLine = getNewLineEndingChars();
- int matches = text.contains(QRegExp(breakStr));
+TQString TextBlock::formatMultiLineText ( const TQString &work, const TQString &linePrefix,
+ const TQString& breakStr, bool addBreak, bool lastLineHasBreak ) {
+ TQString output = "";
+ TQString text = work;
+ TQString endLine = getNewLineEndingChars();
+ int matches = text.contains(TQRegExp(breakStr));
if(matches)
{
// check that last part of string matches, if not, then
// we have to tack on extra match
- if(!text.contains(QRegExp(breakStr+"\\$")))
+ if(!text.contains(TQRegExp(breakStr+"\\$")))
matches++;
for(int i=0; i < matches; i++)
{
- QString line = text.section(QRegExp(breakStr),i,i);
+ TQString line = text.section(TQRegExp(breakStr),i,i);
output += linePrefix + line;
if((i != matches-1) || lastLineHasBreak)
output += endLine; // add break to line
@@ -229,10 +229,10 @@ QString TextBlock::formatMultiLineText ( const QString &work, const QString &lin
return output;
}
-void TextBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement)
+void TextBlock::setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
if (&doc != 0 ) {
@@ -240,7 +240,7 @@ void TextBlock::setAttributesOnNode ( QDomDocument & doc, QDomElement & blockEle
// only write these if different from defaults
if(getIndentationLevel())
- blockElement.setAttribute("indentLevel",QString::number(getIndentationLevel()));
+ blockElement.setAttribute("indentLevel",TQString::number(getIndentationLevel()));
if(!m_text.isEmpty())
blockElement.setAttribute("text",encodeText(m_text,endLine));
if(!getWriteOutText())
@@ -263,9 +263,9 @@ void TextBlock::setAttributesFromObject(TextBlock * obj)
}
-void TextBlock::setAttributesFromNode (QDomElement & root ) {
+void TextBlock::setAttributesFromNode (TQDomElement & root ) {
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setIndentationLevel(root.attribute("indentLevel","0").toInt());
setTag(root.attribute("tag",""));
@@ -278,31 +278,31 @@ void TextBlock::setAttributesFromNode (QDomElement & root ) {
// encode text for XML storage
// we simply convert all types of newLines to the "\n" or &#010;
// entity.
-QString TextBlock::encodeText(const QString& text, const QString &endLine) {
- QString encoded = text;
- encoded.replace(QRegExp(endLine),"&#010;");
+TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) {
+ TQString encoded = text;
+ encoded.replace(TQRegExp(endLine),"&#010;");
return encoded;
}
// encode text for XML storage
// we simply convert all types of newLines to the "\n" or &#010;
// entity.
-QString TextBlock::decodeText(const QString& text, const QString &endLine) {
- QString decoded = text;
- decoded.replace(QRegExp("&#010;"),endLine);
+TQString TextBlock::decodeText(const TQString& text, const TQString &endLine) {
+ TQString decoded = text;
+ decoded.replace(TQRegExp("&#010;"),endLine);
return decoded;
}
/**
* @return QString
*/
-QString TextBlock::toString ( )
+TQString TextBlock::toString ( )
{
// simple output method
if(m_writeOutText && !m_text.isEmpty())
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
return formatMultiLineText(m_text, getIndentationString(), endLine);
} else
return "";
diff --git a/umbrello/umbrello/textblock.h b/umbrello/umbrello/textblock.h
index 16dcd910..8a3ac9fd 100644
--- a/umbrello/umbrello/textblock.h
+++ b/umbrello/umbrello/textblock.h
@@ -19,8 +19,8 @@
#ifndef TEXTBLOCK_H
#define TEXTBLOCK_H
-#include <qdom.h>
-#include <qobject.h>
+#include <tqdom.h>
+#include <tqobject.h>
class CodeDocument;
@@ -29,7 +29,7 @@ class CodeDocument;
* The fundemental unit of text within an output file containing code.
*/
-class TextBlock : virtual public QObject {
+class TextBlock : virtual public TQObject {
friend class CodeGenObjectWithTextBlocks;
friend class ClassifierCodeDocument;
Q_OBJECT
@@ -41,7 +41,7 @@ public:
/**
* Constructors
*/
- explicit TextBlock ( CodeDocument * parent, const QString & text = "");
+ explicit TextBlock ( CodeDocument * parent, const TQString & text = "");
// destructor
~TextBlock ( );
@@ -57,34 +57,34 @@ public:
* The actual text of this code block.
* @param new_var the new value of m_text
*/
- void setText ( const QString &new_var );
+ void setText ( const TQString &new_var );
/**
* Add text to this object.
*
*/
- void appendText ( const QString &new_text );
+ void appendText ( const TQString &new_text );
/**
* Get the value of m_text
* The actual text of this code block.
* @return the value of m_text
*/
- QString getText ( ) const;
+ TQString getText ( ) const;
/**
* Get the tag of this text block. This tag
* may be used to find this text block in the code document
* to which it belongs.
*/
- QString getTag( ) const;
+ TQString getTag( ) const;
/**
* Set the tag of this text block. This tag
* may be used to find this text block in the code document
* to which it belongs.
*/
- void setTag( const QString &value );
+ void setTag( const TQString &value );
/**
* Get the value of m_parentDoc
@@ -120,53 +120,53 @@ public:
/** Get the actual amount of indentation for a given level of indentation.
*/
- QString getIndentationString ( int level = 0);
+ TQString getIndentationString ( int level = 0);
/** Get how much a single "level" of indentation will actually indent.
*/
- QString getIndentation();
+ TQString getIndentation();
- QString getNewLineEndingChars ( );
+ TQString getNewLineEndingChars ( );
/** Format a long text string to be more readable.
*/
// should be static
- QString formatMultiLineText ( const QString &text, const QString &linePrefix,
- const QString& breakStr,
+ TQString formatMultiLineText ( const TQString &text, const TQString &linePrefix,
+ const TQString& breakStr,
bool alwaysAddBreak = true, bool lastLineHasBreak = true);
/** UnFormat a long text string. Typically, this means removing
* the indentaion (linePrefix) and/or newline chars from each line.
* If an indentation isnt specified, then the current indentation is used.
*/
- virtual QString unformatText ( const QString & text, const QString & indent = "");
+ virtual TQString unformatText ( const TQString & text, const TQString & indent = "");
/**
* @return QString
*/
- virtual QString toString ( );
+ virtual TQString toString ( );
/** encode text for XML storage
* we simply convert all types of newLines to the "\n" or &#010;
* entity.
*/
- static QString encodeText(const QString& text , const QString &endChars);
+ static TQString encodeText(const TQString& text , const TQString &endChars);
/** decode text from XML storage
* We simply convert all newLine entity &#010; to chosen line ending.
*/
- static QString decodeText(const QString& text, const QString &endChars);
+ static TQString decodeText(const TQString& text, const TQString &endChars);
/**
* Save the XMI representation of this object
*/
- virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0;
+ virtual void saveToXMI ( TQDomDocument & doc, TQDomElement & root ) = 0;
/**
* load params from the appropriate XMI element node.
*/
- virtual void loadFromXMI ( QDomElement & root ) = 0;
+ virtual void loadFromXMI ( TQDomElement & root ) = 0;
/** Determine if its OK to delete this textblock from the document.
* Used by the text editor to know if deletion could cause a crash of
@@ -184,7 +184,7 @@ public:
* If the indentation amount is '0' the current indentationString will
* be used.
*/
- virtual QString getNewEditorLine( int indentAmount = 0 );
+ virtual TQString getNewEditorLine( int indentAmount = 0 );
/** Ush. These are terrifically bad and must one day go away.
* Both methods indicate the range of lines in this textblock
@@ -213,20 +213,20 @@ protected:
/** set attributes of the node that represents this class
* in the XMI document.
*/
- virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
+ virtual void setAttributesOnNode ( TQDomDocument & doc, TQDomElement & blockElement);
/** set the class attributes of this object from
* the passed element node.
*/
- virtual void setAttributesFromNode ( QDomElement & element);
+ virtual void setAttributesFromNode ( TQDomElement & element);
bool m_canDelete;
private:
// The actual text of this code block.
- QString m_text;
- QString m_tag;
+ TQString m_text;
+ TQString m_tag;
// Whether or not to include the text of this TextBlock into a file.
bool m_writeOutText;
diff --git a/umbrello/umbrello/textblocklist.h b/umbrello/umbrello/textblocklist.h
index 48048b8b..bb1b7416 100644
--- a/umbrello/umbrello/textblocklist.h
+++ b/umbrello/umbrello/textblocklist.h
@@ -12,12 +12,12 @@
#ifndef _TEXTBLOCKLIST_H
#define _TEXTBLOCKLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class TextBlock;
-typedef QPtrList<TextBlock> TextBlockList;
-typedef QPtrListIterator<TextBlock> TextBlockListIt;
+typedef TQPtrList<TextBlock> TextBlockList;
+typedef TQPtrListIterator<TextBlock> TextBlockListIt;
#endif
diff --git a/umbrello/umbrello/toolbarstate.cpp b/umbrello/umbrello/toolbarstate.cpp
index 339214a8..bf0ae9f0 100644
--- a/umbrello/umbrello/toolbarstate.cpp
+++ b/umbrello/umbrello/toolbarstate.cpp
@@ -13,7 +13,7 @@
#include "toolbarstate.h"
// qt includes
-#include <qwmatrix.h> // need for inverseWorldMatrix.map
+#include <tqwmatrix.h> // need for inverseWorldMatrix.map
// app includes
#include "associationwidget.h"
@@ -32,21 +32,21 @@ void ToolBarState::init() {
m_currentWidget = 0;
m_currentAssociation = 0;
- connect(m_pUMLView, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- this, SLOT(slotAssociationRemoved(AssociationWidget*)));
- connect(m_pUMLView, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- this, SLOT(slotWidgetRemoved(UMLWidget*)));
+ connect(m_pUMLView, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ this, TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ connect(m_pUMLView, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ this, TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
}
void ToolBarState::cleanBeforeChange() {
- disconnect(m_pUMLView, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- this, SLOT(slotAssociationRemoved(AssociationWidget*)));
- disconnect(m_pUMLView, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- this, SLOT(slotWidgetRemoved(UMLWidget*)));
+ disconnect(m_pUMLView, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ this, TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ disconnect(m_pUMLView, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ this, TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
}
-void ToolBarState::mousePress(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonPress);
+void ToolBarState::mousePress(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonPress);
m_pUMLView->viewport()->setMouseTracking(true);
@@ -71,8 +71,8 @@ void ToolBarState::mousePress(QMouseEvent* ome) {
}
}
-void ToolBarState::mouseRelease(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonRelease);
+void ToolBarState::mouseRelease(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonRelease);
// Set the position of the mouse
// TODO, should only be available in this state?
@@ -95,8 +95,8 @@ void ToolBarState::mouseRelease(QMouseEvent* ome) {
changeTool();
}
-void ToolBarState::mouseDoubleClick(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseButtonDblClick);
+void ToolBarState::mouseDoubleClick(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseButtonDblClick);
UMLWidget* currentWidget = m_pUMLView->getWidgetAt(m_pMouseEvent->pos());
AssociationWidget* currentAssociation = getAssociationAt(m_pMouseEvent->pos());
@@ -113,8 +113,8 @@ void ToolBarState::mouseDoubleClick(QMouseEvent* ome) {
}
}
-void ToolBarState::mouseMove(QMouseEvent* ome) {
- setMouseEvent(ome, QEvent::MouseMove);
+void ToolBarState::mouseMove(TQMouseEvent* ome) {
+ setMouseEvent(ome, TQEvent::MouseMove);
if (getCurrentWidget()) {
mouseMoveWidget();
@@ -153,7 +153,7 @@ void ToolBarState::slotWidgetRemoved(UMLWidget* widget) {
}
}
-ToolBarState::ToolBarState(UMLView *umlView) : QObject(umlView), m_pUMLView(umlView) {
+ToolBarState::ToolBarState(UMLView *umlView) : TQObject(umlView), m_pUMLView(umlView) {
m_pMouseEvent = NULL;
init();
}
@@ -226,14 +226,14 @@ void ToolBarState::changeTool() {
}
}
-void ToolBarState::setMouseEvent(QMouseEvent* ome, const QEvent::Type &type) {
+void ToolBarState::setMouseEvent(TQMouseEvent* ome, const TQEvent::Type &type) {
if (m_pMouseEvent) delete m_pMouseEvent;
- m_pMouseEvent = new QMouseEvent(type, m_pUMLView->inverseWorldMatrix().map(ome->pos()),
+ m_pMouseEvent = new TQMouseEvent(type, m_pUMLView->inverseWorldMatrix().map(ome->pos()),
ome->button(),ome->state());
}
-MessageWidget* ToolBarState::getMessageAt(const QPoint& pos) {
+MessageWidget* ToolBarState::getMessageAt(const TQPoint& pos) {
MessageWidget* message = 0;
for (MessageWidgetListIt it(m_pUMLView->getMessageList());
(message = it.current()) != 0; ++it) {
@@ -245,7 +245,7 @@ MessageWidget* ToolBarState::getMessageAt(const QPoint& pos) {
return message;
}
-AssociationWidget* ToolBarState::getAssociationAt(const QPoint& pos) {
+AssociationWidget* ToolBarState::getAssociationAt(const TQPoint& pos) {
AssociationWidget* association = 0;
for (AssociationWidgetListIt it(m_pUMLView->getAssociationList());
(association = it.current()) != 0; ++it) {
diff --git a/umbrello/umbrello/toolbarstate.h b/umbrello/umbrello/toolbarstate.h
index e005c021..4027ce6b 100644
--- a/umbrello/umbrello/toolbarstate.h
+++ b/umbrello/umbrello/toolbarstate.h
@@ -12,8 +12,8 @@
#ifndef TOOLBARSTATE_H
#define TOOLBARSTATE_H
-#include <qevent.h>
-#include <qobject.h>
+#include <tqevent.h>
+#include <tqobject.h>
class QEvent;
class QMouseEvent;
@@ -68,7 +68,7 @@ class UMLWidget;
* @todo Handle, for example, left press, right press, left release, right
* release and other similar strange combinations?
*/
-class ToolBarState: public QObject {
+class ToolBarState: public TQObject {
Q_OBJECT
public:
@@ -102,7 +102,7 @@ public:
* @param ome The received event.
* @see setCurrentElement()
*/
- virtual void mousePress(QMouseEvent *ome);
+ virtual void mousePress(TQMouseEvent *ome);
/**
* Handler for mouse release events.
@@ -113,7 +113,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseRelease(QMouseEvent* ome);
+ virtual void mouseRelease(TQMouseEvent* ome);
/**
* Handler for mouse double click events.
@@ -123,7 +123,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseDoubleClick(QMouseEvent* ome);
+ virtual void mouseDoubleClick(TQMouseEvent* ome);
/**
* Handler for mouse double click events.
@@ -138,7 +138,7 @@ public:
*
* @param ome The received event.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -162,7 +162,7 @@ protected:
/**
* Creates a new ToolBarState.
- * UMLView is set as parent of this QObject, and name is left empty.
+ * UMLView is set as parent of this TQObject, and name is left empty.
* Protected to avoid classes other than derived to create objects of this
* class.
*
@@ -313,7 +313,7 @@ protected:
* @param ome The mouse event to transform.
* @param type The type of the event.
*/
- void setMouseEvent(QMouseEvent* ome, const QEvent::Type &type);
+ void setMouseEvent(TQMouseEvent* ome, const TQEvent::Type &type);
/**
* Returns the AssociationWidget at the specified position, or null if there is none.
@@ -323,7 +323,7 @@ protected:
* @return The AssociationWidget at the specified position, or null if there is none.
* @todo Better handling for associations at the same point
*/
- AssociationWidget* getAssociationAt(const QPoint& pos);
+ AssociationWidget* getAssociationAt(const TQPoint& pos);
/**
* Returns the MessageWidget at the specified position, or null if there is none.
@@ -334,7 +334,7 @@ protected:
* @return The MessageWidget at the specified position, or null if there is none.
* @todo Better handling for messages at the same point
*/
- MessageWidget* getMessageAt(const QPoint& pos);
+ MessageWidget* getMessageAt(const TQPoint& pos);
/**
* The UMLView.
@@ -346,7 +346,7 @@ protected:
* This event is the equivalent of the received event after transforming it
* using the inverse world matrix in the UMLView.
*/
- QMouseEvent* m_pMouseEvent;
+ TQMouseEvent* m_pMouseEvent;
private:
diff --git a/umbrello/umbrello/toolbarstatearrow.cpp b/umbrello/umbrello/toolbarstatearrow.cpp
index d8205350..ad24d753 100644
--- a/umbrello/umbrello/toolbarstatearrow.cpp
+++ b/umbrello/umbrello/toolbarstatearrow.cpp
@@ -54,10 +54,10 @@ void ToolBarStateArrow::mousePressEmpty() {
m_startPosition = m_pMouseEvent->pos();
for (int i = 0; i < 4; i++) {
- QCanvasLine* line = new QCanvasLine(m_pUMLView->canvas());
+ TQCanvasLine* line = new TQCanvasLine(m_pUMLView->canvas());
line->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(),
m_pMouseEvent->x(), m_pMouseEvent->y());
- line->setPen(QPen(QColor("grey"), 0, Qt::DotLine));
+ line->setPen(TQPen(TQColor("grey"), 0, Qt::DotLine));
line->setVisible(true);
line->setZ(100);
m_selectionRect.append(line);
@@ -99,7 +99,7 @@ void ToolBarStateArrow::mouseMoveWidget() {
void ToolBarStateArrow::mouseMoveEmpty() {
if (m_selectionRect.count() == 4) {
- QCanvasLine* line = m_selectionRect.at(0);
+ TQCanvasLine* line = m_selectionRect.at(0);
line->setPoints(m_startPosition.x(), m_startPosition.y(),
m_pMouseEvent->x(), m_startPosition.y());
diff --git a/umbrello/umbrello/toolbarstatearrow.h b/umbrello/umbrello/toolbarstatearrow.h
index a2fab59f..ca57492f 100644
--- a/umbrello/umbrello/toolbarstatearrow.h
+++ b/umbrello/umbrello/toolbarstatearrow.h
@@ -146,12 +146,12 @@ protected:
/**
* The selection rectangle that contains the four lines of its borders.
*/
- QPtrList<QCanvasLine> m_selectionRect;
+ TQPtrList<TQCanvasLine> m_selectionRect;
/**
* The start position of the selection rectangle.
*/
- QPoint m_startPosition;
+ TQPoint m_startPosition;
};
diff --git a/umbrello/umbrello/toolbarstateassociation.cpp b/umbrello/umbrello/toolbarstateassociation.cpp
index d36647dd..64d2fbfe 100644
--- a/umbrello/umbrello/toolbarstateassociation.cpp
+++ b/umbrello/umbrello/toolbarstateassociation.cpp
@@ -54,11 +54,11 @@ void ToolBarStateAssociation::cleanBeforeChange() {
cleanAssociation();
}
-void ToolBarStateAssociation::mouseMove(QMouseEvent* ome) {
+void ToolBarStateAssociation::mouseMove(TQMouseEvent* ome) {
ToolBarStatePool::mouseMove(ome);
if (m_associationLine) {
- QPoint sp = m_associationLine->startPoint();
+ TQPoint sp = m_associationLine->startPoint();
m_associationLine->setPoints(sp.x(), sp.y(), m_pMouseEvent->x(), m_pMouseEvent->y());
}
}
@@ -120,7 +120,7 @@ void ToolBarStateAssociation::setFirstWidget() {
return;
}
//set up position
- QPoint pos;
+ TQPoint pos;
pos.setX(widget->getX() + (widget->getWidth() / 2));
pos.setY(widget->getY() + (widget->getHeight() / 2));
//TODO why is this needed?
@@ -128,9 +128,9 @@ void ToolBarStateAssociation::setFirstWidget() {
m_firstWidget = widget;
- m_associationLine = new QCanvasLine(m_pUMLView->canvas());
+ m_associationLine = new TQCanvasLine(m_pUMLView->canvas());
m_associationLine->setPoints(pos.x(), pos.y(), pos.x(), pos.y());
- m_associationLine->setPen(QPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
+ m_associationLine->setPen(TQPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
m_associationLine->setVisible(true);
diff --git a/umbrello/umbrello/toolbarstateassociation.h b/umbrello/umbrello/toolbarstateassociation.h
index 1d6c5174..a983806e 100644
--- a/umbrello/umbrello/toolbarstateassociation.h
+++ b/umbrello/umbrello/toolbarstateassociation.h
@@ -68,7 +68,7 @@ public:
* It executes the base method and then updates the position of the
* association line, if any.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -161,7 +161,7 @@ private:
* The association line shown while the first widget is selected and the
* second one wasn't selected yet.
*/
- QCanvasLine* m_associationLine;
+ TQCanvasLine* m_associationLine;
};
diff --git a/umbrello/umbrello/toolbarstatemessages.cpp b/umbrello/umbrello/toolbarstatemessages.cpp
index 36ffb005..cd0fac78 100644
--- a/umbrello/umbrello/toolbarstatemessages.cpp
+++ b/umbrello/umbrello/toolbarstatemessages.cpp
@@ -44,11 +44,11 @@ void ToolBarStateMessages::cleanBeforeChange() {
cleanMessage();
}
-void ToolBarStateMessages::mouseMove(QMouseEvent* ome) {
+void ToolBarStateMessages::mouseMove(TQMouseEvent* ome) {
ToolBarStatePool::mouseMove(ome);
if (m_messageLine) {
- QPoint sp = m_messageLine->startPoint();
+ TQPoint sp = m_messageLine->startPoint();
m_messageLine->setPoints(sp.x(), sp.y(), m_pMouseEvent->x(), m_pMouseEvent->y());
}
}
@@ -114,9 +114,9 @@ void ToolBarStateMessages::mouseReleaseEmpty() {
void ToolBarStateMessages::setFirstWidget(ObjectWidget* firstObject) {
m_firstObject = firstObject;
- m_messageLine = new QCanvasLine(m_pUMLView->canvas());
+ m_messageLine = new TQCanvasLine(m_pUMLView->canvas());
m_messageLine->setPoints(m_pMouseEvent->x(), m_pMouseEvent->y(), m_pMouseEvent->x(), m_pMouseEvent->y());
- m_messageLine->setPen(QPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
+ m_messageLine->setPen(TQPen(m_pUMLView->getLineColor(), m_pUMLView->getLineWidth(), Qt::DashLine));
m_messageLine->setVisible(true);
diff --git a/umbrello/umbrello/toolbarstatemessages.h b/umbrello/umbrello/toolbarstatemessages.h
index f6b2cb79..c4cccc6c 100644
--- a/umbrello/umbrello/toolbarstatemessages.h
+++ b/umbrello/umbrello/toolbarstatemessages.h
@@ -13,7 +13,7 @@
#define TOOLBARSTATEMESSAGES_H
#include "toolbarstatepool.h"
-#include <qpoint.h>
+#include <tqpoint.h>
class QCanvasLine;
class ObjectWidget;
@@ -79,7 +79,7 @@ public:
* It executes the base method and then updates the position of the
* message line, if any.
*/
- virtual void mouseMove(QMouseEvent* ome);
+ virtual void mouseMove(TQMouseEvent* ome);
public slots:
@@ -174,7 +174,7 @@ protected:
* The message line shown while the first widget is selected and the
* second one wasn't selected yet.
*/
- QCanvasLine* m_messageLine;
+ TQCanvasLine* m_messageLine;
/**
* If there is a current widget, it is true if the press event happened on
diff --git a/umbrello/umbrello/uml.cpp b/umbrello/umbrello/uml.cpp
index 11a5b32a..e6a87cfd 100644
--- a/umbrello/umbrello/uml.cpp
+++ b/umbrello/umbrello/uml.cpp
@@ -13,13 +13,13 @@
#include "uml.h"
// qt includes
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
-#include <qwidgetstack.h>
-#include <qslider.h>
-#include <qregexp.h>
-#include <qtoolbutton.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
+#include <tqwidgetstack.h>
+#include <tqslider.h>
+#include <tqregexp.h>
+#include <tqtoolbutton.h>
// kde includes
#include <kaction.h>
@@ -78,7 +78,7 @@
#include "docgenerators/docbookgenerator.h"
#include "docgenerators/xhtmlgenerator.h"
-UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
+UMLApp::UMLApp(TQWidget* , const char* name):KDockMainWindow(0, name) {
s_instance = this;
m_pDocWindow = 0;
m_config = kapp->config();
@@ -114,28 +114,28 @@ UMLApp::UMLApp(QWidget* , const char* name):KDockMainWindow(0, name) {
editRedo->setEnabled(false);
//get a reference to the Code->Active Language and to the Diagram->Zoom menu
- QPopupMenu* menu = findMenu( menuBar(), QString("code") );
- m_langSelect = findMenu( menu, QString("active_lang_menu") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("code") );
+ m_langSelect = findMenu( menu, TQString("active_lang_menu") );
//in case langSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if someone takes the entry away from the ui.rc file
if (m_langSelect == NULL) {
- m_langSelect = new QPopupMenu(this);
+ m_langSelect = new TQPopupMenu(this);
}
- menu = findMenu( menuBar(), QString("views") );
- m_zoomSelect = findMenu( menu, QString("zoom_menu") );
+ menu = findMenu( menuBar(), TQString("views") );
+ m_zoomSelect = findMenu( menu, TQString("zoom_menu") );
//in case zoomSelect hasn't been initialized we create the Popup menu.
//it will be hidden, but at least we wont crash if some one takes the entry away from the ui.rc file
if (m_zoomSelect == NULL) {
- m_zoomSelect = new QPopupMenu(this);
+ m_zoomSelect = new TQPopupMenu(this);
}
//connect zoomSelect menu
m_zoomSelect->setCheckable(true);
- connect(m_zoomSelect,SIGNAL(aboutToShow()),this,SLOT(setupZoomMenu()));
- connect(m_zoomSelect,SIGNAL(activated(int)),this,SLOT(setZoom(int)));
+ connect(m_zoomSelect,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(setupZoomMenu()));
+ connect(m_zoomSelect,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setZoom(int)));
m_refactoringAssist = 0L;
@@ -160,43 +160,43 @@ UMLApp* UMLApp::app()
}
void UMLApp::initActions() {
- fileNew = KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection());
- fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
- fileOpenRecent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
- fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- fileSaveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- fileClose = KStdAction::close(this, SLOT(slotFileClose()), actionCollection());
- filePrint = KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
- fileQuit = KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
- editUndo = KStdAction::undo(this, SLOT(slotEditUndo()), actionCollection());
- editRedo = KStdAction::redo(this, SLOT(slotEditRedo()), actionCollection());
- editCut = KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
- editCopy = KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
- editPaste = KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
+ fileNew = KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection());
+ fileOpen = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
+ fileOpenRecent = KStdAction::openRecent(this, TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection());
+ fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
+ fileSaveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection());
+ fileClose = KStdAction::close(this, TQT_SLOT(slotFileClose()), actionCollection());
+ filePrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
+ fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
+ editUndo = KStdAction::undo(this, TQT_SLOT(slotEditUndo()), actionCollection());
+ editRedo = KStdAction::redo(this, TQT_SLOT(slotEditRedo()), actionCollection());
+ editCut = KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
+ editCopy = KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
+ editPaste = KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- selectAll = KStdAction::selectAll(this, SLOT( slotSelectAll() ), actionCollection());
+ selectAll = KStdAction::selectAll(this, TQT_SLOT( slotSelectAll() ), actionCollection());
fileExportDocbook = new KAction(i18n("&Export model to DocBook"), 0,
- this, SLOT( slotFileExportDocbook() ),
+ this, TQT_SLOT( slotFileExportDocbook() ),
actionCollection(), "file_export_docbook");
fileExportXhtml = new KAction(i18n("&Export model to XHTML"), 0,
- this, SLOT( slotFileExportXhtml() ),
+ this, TQT_SLOT( slotFileExportXhtml() ),
actionCollection(), "file_export_xhtml");
- classWizard = new KAction(i18n("&New Class Wizard..."),0,this,SLOT(slotClassWizard()),
+ classWizard = new KAction(i18n("&New Class Wizard..."),0,this,TQT_SLOT(slotClassWizard()),
actionCollection(),"class_wizard");
new KAction(i18n("&Add Default Datatypes for Active Language"), 0, this,
- SLOT(slotAddDefaultDatatypes()), actionCollection(), "create_default_datatypes");
+ TQT_SLOT(slotAddDefaultDatatypes()), actionCollection(), "create_default_datatypes");
- preferences = KStdAction::preferences(this, SLOT( slotPrefs() ), actionCollection());
+ preferences = KStdAction::preferences(this, TQT_SLOT( slotPrefs() ), actionCollection());
- genWizard = new KAction(i18n("&Code Generation Wizard..."),0,this,SLOT(generationWizard()),
+ genWizard = new KAction(i18n("&Code Generation Wizard..."),0,this,TQT_SLOT(generationWizard()),
actionCollection(),"generation_wizard");
- genAll = new KAction(i18n("&Generate All Code"),0,this,SLOT(generateAllCode()),
+ genAll = new KAction(i18n("&Generate All Code"),0,this,TQT_SLOT(generateAllCode()),
actionCollection(),"generate_all");
importClasses = new KAction(i18n("&Import Classes..."), SmallIconSet("source_cpp"), 0,
- this,SLOT(slotImportClasses()), actionCollection(),"import_class");
+ this,TQT_SLOT(slotImportClasses()), actionCollection(),"import_class");
fileNew->setToolTip(i18n("Creates a new document"));
fileOpen->setToolTip(i18n("Opens an existing document"));
@@ -216,62 +216,62 @@ void UMLApp::initActions() {
deleteSelectedWidget = new KAction( i18n("Delete &Selected"),
SmallIconSet("editdelete"),
KShortcut(Qt::Key_Delete), this,
- SLOT( slotDeleteSelectedWidget() ), actionCollection(),
+ TQT_SLOT( slotDeleteSelectedWidget() ), actionCollection(),
"delete_selected" );
// The different views
newDiagram = new KActionMenu(0, SmallIconSet("filenew"), actionCollection(), "new_view");
classDiagram = new KAction( i18n( "&Class Diagram..." ), SmallIconSet("umbrello_diagram_class"), 0,
- this, SLOT( slotClassDiagram() ), actionCollection(), "new_class_diagram" );
+ this, TQT_SLOT( slotClassDiagram() ), actionCollection(), "new_class_diagram" );
#if defined (HAVE_DOT)
- autolayout = new KAction(i18n("&Autolayout..."),0,0,this,SLOT(slotAutolayout()),
+ autolayout = new KAction(i18n("&Autolayout..."),0,0,this,TQT_SLOT(slotAutolayout()),
actionCollection(),"autolayout");
#endif
sequenceDiagram= new KAction( i18n( "&Sequence Diagram..." ), SmallIconSet("umbrello_diagram_sequence"), 0,
- this, SLOT( slotSequenceDiagram() ), actionCollection(), "new_sequence_diagram" );
+ this, TQT_SLOT( slotSequenceDiagram() ), actionCollection(), "new_sequence_diagram" );
collaborationDiagram = new KAction( i18n( "C&ollaboration Diagram..." ), SmallIconSet("umbrello_diagram_collaboration"), 0,
- this, SLOT( slotCollaborationDiagram() ), actionCollection(), "new_collaboration_diagram" );
+ this, TQT_SLOT( slotCollaborationDiagram() ), actionCollection(), "new_collaboration_diagram" );
useCaseDiagram= new KAction( i18n( "&Use Case Diagram..." ), SmallIconSet("umbrello_diagram_usecase"), 0,
- this, SLOT( slotUseCaseDiagram() ), actionCollection(), "new_use_case_diagram" );
+ this, TQT_SLOT( slotUseCaseDiagram() ), actionCollection(), "new_use_case_diagram" );
stateDiagram= new KAction( i18n( "S&tate Diagram..." ), SmallIconSet("umbrello_diagram_state"), 0,
- this, SLOT( slotStateDiagram() ), actionCollection(), "new_state_diagram" );
+ this, TQT_SLOT( slotStateDiagram() ), actionCollection(), "new_state_diagram" );
activityDiagram= new KAction( i18n( "&Activity Diagram..." ), SmallIconSet("umbrello_diagram_activity"), 0,
- this, SLOT( slotActivityDiagram() ), actionCollection(), "new_activity_diagram" );
+ this, TQT_SLOT( slotActivityDiagram() ), actionCollection(), "new_activity_diagram" );
componentDiagram = new KAction( i18n("Co&mponent Diagram..."), SmallIconSet("umbrello_diagram_component"), 0,
- this, SLOT( slotComponentDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotComponentDiagram() ), actionCollection(),
"new_component_diagram" );
deploymentDiagram = new KAction( i18n("&Deployment Diagram..."), SmallIconSet("umbrello_diagram_deployment"), 0,
- this, SLOT( slotDeploymentDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotDeploymentDiagram() ), actionCollection(),
"new_deployment_diagram" );
entityRelationshipDiagram = new KAction( i18n("&Entity Relationship Diagram..."), SmallIconSet("umbrello_diagram_entityrelationship"), 0,
- this, SLOT( slotEntityRelationshipDiagram() ), actionCollection(),
+ this, TQT_SLOT( slotEntityRelationshipDiagram() ), actionCollection(),
"new_entityrelationship_diagram" );
viewClearDiagram = new KAction(i18n("&Clear Diagram"), SmallIconSet("editclear"), 0,
- this, SLOT( slotCurrentViewClearDiagram() ), actionCollection(), "view_clear_diagram");
+ this, TQT_SLOT( slotCurrentViewClearDiagram() ), actionCollection(), "view_clear_diagram");
viewSnapToGrid = new KToggleAction(i18n("&Snap to Grid"), 0,
- this, SLOT( slotCurrentViewToggleSnapToGrid() ), actionCollection(), "view_snap_to_grid");
+ this, TQT_SLOT( slotCurrentViewToggleSnapToGrid() ), actionCollection(), "view_snap_to_grid");
viewShowGrid = new KToggleAction(i18n("S&how Grid"), 0,
- this, SLOT( slotCurrentViewToggleShowGrid() ), actionCollection(), "view_show_grid");
+ this, TQT_SLOT( slotCurrentViewToggleShowGrid() ), actionCollection(), "view_show_grid");
#if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3)
viewShowGrid->setCheckedState(i18n("&Hide Grid"));
#endif
deleteDiagram = new KAction(i18n("&Delete"), SmallIconSet("editdelete"), 0,
- this, SLOT( slotDeleteDiagram() ), actionCollection(), "view_delete");
+ this, TQT_SLOT( slotDeleteDiagram() ), actionCollection(), "view_delete");
viewExportImage = new KAction(i18n("&Export as Picture..."), SmallIconSet("image"), 0,
- this, SLOT( slotCurrentViewExportImage() ), actionCollection(), "view_export_image");
+ this, TQT_SLOT( slotCurrentViewExportImage() ), actionCollection(), "view_export_image");
viewExportImageAll = new KAction(i18n("Export &All Diagrams as Pictures..."), SmallIconSet("image"), 0,
- this, SLOT( slotAllViewsExportImage() ), actionCollection(), "view_export_image_all");
+ this, TQT_SLOT( slotAllViewsExportImage() ), actionCollection(), "view_export_image_all");
viewProperties = new KAction(i18n("&Properties"), SmallIconSet("info"), 0,
- this, SLOT( slotCurrentViewProperties() ), actionCollection(), "view_properties");
+ this, TQT_SLOT( slotCurrentViewProperties() ), actionCollection(), "view_properties");
viewSnapToGrid->setChecked(false);
viewShowGrid->setChecked(false);
@@ -284,35 +284,35 @@ void UMLApp::initActions() {
viewProperties->setEnabled(false);
zoomAction = new KPlayerPopupSliderAction(i18n("&Zoom Slider"), "viewmag", Key_F9,
- this, SLOT(slotZoomSliderMoved(int)),
+ this, TQT_SLOT(slotZoomSliderMoved(int)),
actionCollection(), "popup_zoom");
zoom100Action = new KAction(i18n( "Z&oom to 100%" ), "viewmag1", 0,
- this, SLOT( slotZoom100() ), actionCollection(),
+ this, TQT_SLOT( slotZoom100() ), actionCollection(),
"zoom100");
- KStdAction::tipOfDay( this, SLOT( tipOfTheDay() ), actionCollection() );
+ KStdAction::tipOfDay( this, TQT_SLOT( tipOfTheDay() ), actionCollection() );
- QString moveTabLeftString = i18n("&Move Tab Left");
- QString moveTabRightString = i18n("&Move Tab Right");
- moveTabLeft = new KAction(QApplication::reverseLayout() ? moveTabRightString : moveTabLeftString,
- QApplication::reverseLayout() ? "forward" : "back",
- QApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left,
- this, SLOT(slotMoveTabLeft()), actionCollection(),
+ TQString moveTabLeftString = i18n("&Move Tab Left");
+ TQString moveTabRightString = i18n("&Move Tab Right");
+ moveTabLeft = new KAction(TQApplication::reverseLayout() ? moveTabRightString : moveTabLeftString,
+ TQApplication::reverseLayout() ? "forward" : "back",
+ TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left,
+ this, TQT_SLOT(slotMoveTabLeft()), actionCollection(),
"move_tab_left");
- moveTabRight = new KAction(QApplication::reverseLayout() ? moveTabLeftString : moveTabRightString,
- QApplication::reverseLayout() ? "back" : "forward",
- QApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right,
- this, SLOT(slotMoveTabRight()), actionCollection(),
+ moveTabRight = new KAction(TQApplication::reverseLayout() ? moveTabLeftString : moveTabRightString,
+ TQApplication::reverseLayout() ? "back" : "forward",
+ TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right,
+ this, TQT_SLOT(slotMoveTabRight()), actionCollection(),
"move_tab_right");
- QString selectTabLeftString = i18n("Select Diagram on Left");
- QString selectTabRightString = i18n("Select Diagram on Right");
- changeTabLeft = new KAction(QApplication::reverseLayout() ? selectTabRightString : selectTabLeftString,
- QApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Right : Qt::SHIFT+Qt::Key_Left,
- this, SLOT(slotChangeTabLeft()), actionCollection(), "previous_tab");
- changeTabRight = new KAction(QApplication::reverseLayout() ? selectTabLeftString : selectTabRightString,
- QApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Left : Qt::SHIFT+Qt::Key_Right,
- this, SLOT(slotChangeTabRight()), actionCollection(), "next_tab");
+ TQString selectTabLeftString = i18n("Select Diagram on Left");
+ TQString selectTabRightString = i18n("Select Diagram on Right");
+ changeTabLeft = new KAction(TQApplication::reverseLayout() ? selectTabRightString : selectTabLeftString,
+ TQApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Right : Qt::SHIFT+Qt::Key_Left,
+ this, TQT_SLOT(slotChangeTabLeft()), actionCollection(), "previous_tab");
+ changeTabRight = new KAction(TQApplication::reverseLayout() ? selectTabLeftString : selectTabRightString,
+ TQApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Left : Qt::SHIFT+Qt::Key_Right,
+ this, TQT_SLOT(slotChangeTabRight()), actionCollection(), "next_tab");
initStatusBar(); //call this here because the statusBar is shown/hidden by setupGUI()
@@ -323,7 +323,7 @@ void UMLApp::initActions() {
#else
createGUI();
#endif
- QPopupMenu* menu = findMenu( menuBar(), QString("settings") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("settings") );
menu->insertItem(i18n("&Windows"), dockHideShowMenu(), -1, 0);
}
@@ -367,7 +367,7 @@ void UMLApp::setupZoomMenu() {
break;
default:
m_zoomSelect->insertSeparator();
- m_zoomSelect->insertItem(QString::number(zoom)+" %",zoom);
+ m_zoomSelect->insertItem(TQString::number(zoom)+" %",zoom);
}
m_zoomSelect->setItemChecked(zoom, true);
}
@@ -376,7 +376,7 @@ void UMLApp::initStatusBar() {
m_statusLabel = new KStatusBarLabel( i18n("Ready."), 0, statusBar() );
m_statusLabel->setFixedHeight( m_statusLabel->sizeHint().height() );
- m_statusLabel->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
+ m_statusLabel->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain );
m_statusLabel->setMargin( 0 );
m_statusLabel->setLineWidth(0);
@@ -384,7 +384,7 @@ void UMLApp::initStatusBar() {
m_statusLabel->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
- connect(m_doc, SIGNAL( sigWriteToStatusBar(const QString &) ), this, SLOT( slotStatusMsg(const QString &) ));
+ connect(m_doc, TQT_SIGNAL( sigWriteToStatusBar(const TQString &) ), this, TQT_SLOT( slotStatusMsg(const TQString &) ));
}
void UMLApp::initView() {
@@ -417,27 +417,27 @@ void UMLApp::initView() {
m_newSessionButton->setAutoRaise(true);
m_diagramMenu = new KPopupMenu(m_newSessionButton);
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Class), i18n("Class Diagram..."), this, SLOT(slotClassDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Sequence), i18n("Sequence Diagram..."), this, SLOT(slotSequenceDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Collaboration), i18n("Collaboration Diagram..."), this, SLOT(slotCollaborationDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_UseCase), i18n("Use Case Diagram..."), this, SLOT(slotUseCaseDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_State), i18n("State Diagram..."), this, SLOT(slotStateDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Activity), i18n("Activity Diagram..."), this, SLOT(slotActivityDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Component), i18n("Component Diagram..."), this, SLOT(slotComponentDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Deployment), i18n("Deployment Diagram..."), this, SLOT(slotDeploymentDiagram()) );
- m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_EntityRelationship), i18n("Entity Relationship Diagram..."), this, SLOT(slotEntityRelationshipDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Class), i18n("Class Diagram..."), this, TQT_SLOT(slotClassDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Sequence), i18n("Sequence Diagram..."), this, TQT_SLOT(slotSequenceDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Collaboration), i18n("Collaboration Diagram..."), this, TQT_SLOT(slotCollaborationDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_UseCase), i18n("Use Case Diagram..."), this, TQT_SLOT(slotUseCaseDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_State), i18n("State Diagram..."), this, TQT_SLOT(slotStateDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Activity), i18n("Activity Diagram..."), this, TQT_SLOT(slotActivityDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Component), i18n("Component Diagram..."), this, TQT_SLOT(slotComponentDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_Deployment), i18n("Deployment Diagram..."), this, TQT_SLOT(slotDeploymentDiagram()) );
+ m_diagramMenu->insertItem(Widget_Utils::iconSet(Uml::dt_EntityRelationship), i18n("Entity Relationship Diagram..."), this, TQT_SLOT(slotEntityRelationshipDiagram()) );
m_newSessionButton->setPopup(m_diagramMenu);
//FIXME why doesn't this work?
//m_newSessionButton->setPopup(newDiagram->popupMenu());
//m_closeDiagramButton = new KToolBarButton("tab_remove", 0, m_tabWidget);
- m_closeDiagramButton = new QToolButton(m_tabWidget);
+ m_closeDiagramButton = new TQToolButton(m_tabWidget);
m_closeDiagramButton->setIconSet( SmallIcon("tab_remove") );
m_closeDiagramButton->adjustSize();
- connect(m_closeDiagramButton, SIGNAL(clicked()), SLOT(slotDeleteDiagram()));
- connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(slotTabChanged(QWidget*)));
- connect(m_tabWidget, SIGNAL(contextMenu(QWidget*,const QPoint&)), m_doc, SLOT(slotDiagramPopupMenu(QWidget*,const QPoint&)));
+ connect(m_closeDiagramButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDeleteDiagram()));
+ connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(slotTabChanged(TQWidget*)));
+ connect(m_tabWidget, TQT_SIGNAL(contextMenu(TQWidget*,const TQPoint&)), m_doc, TQT_SLOT(slotDiagramPopupMenu(TQWidget*,const TQPoint&)));
m_tabWidget->setCornerWidget( m_newSessionButton, TopLeft );
m_tabWidget->setCornerWidget( m_closeDiagramButton, TopRight );
m_newSessionButton->installEventFilter(this);
@@ -447,7 +447,7 @@ void UMLApp::initView() {
else
{
m_tabWidget = NULL;
- m_viewStack = new QWidgetStack(m_mainDock, "viewstack");
+ m_viewStack = new TQWidgetStack(m_mainDock, "viewstack");
m_mainDock->setWidget(m_viewStack);
}
m_mainDock->setDockSite(KDockWidget::DockCorner);
@@ -583,7 +583,7 @@ void UMLApp::readOptions() {
fileOpenRecent->loadEntries(m_config,"Recent Files");
m_config->setGroup("General Options");
setImageMimeType(m_config->readEntry("imageMimeType","image/png"));
- QSize tmpQSize(630,460);
+ TQSize tmpQSize(630,460);
resize( m_config->readSizeEntry("Geometry", & tmpQSize) );
}
@@ -595,8 +595,8 @@ void UMLApp::saveProperties(KConfig *_config) {
KURL url=m_doc->URL();
_config->writePathEntry("filename", url.url());
_config->writeEntry("modified", m_doc->isModified());
- QString tempname = kapp->tempSaveName(url.url());
- QString tempurl= KURL::encode_string(tempname);
+ TQString tempname = kapp->tempSaveName(url.url());
+ TQString tempurl= KURL::encode_string(tempname);
KURL _url(tempurl);
m_doc->saveDocument(_url);
@@ -604,12 +604,12 @@ void UMLApp::saveProperties(KConfig *_config) {
}
void UMLApp::readProperties(KConfig* _config) {
- QString filename = _config->readPathEntry("filename");
+ TQString filename = _config->readPathEntry("filename");
KURL url(filename);
bool modified = _config->readBoolEntry("modified", false);
if(modified) {
bool canRecover;
- QString tempname = kapp->checkRecoverFile(filename, canRecover);
+ TQString tempname = kapp->checkRecoverFile(filename, canRecover);
KURL _url(tempname);
@@ -618,7 +618,7 @@ void UMLApp::readProperties(KConfig* _config) {
m_doc->setModified();
enablePrint(true);
setCaption(_url.fileName(),true);
- QFile::remove
+ TQFile::remove
(tempname);
} else {
enablePrint(false);
@@ -727,16 +727,16 @@ bool UMLApp::slotFileSaveAs()
slotStatusMsg(i18n("Saving file with a new filename..."));
bool cont = true;
KURL url;
- QString ext;
+ TQString ext;
while(cont) {
url=KFileDialog::getSaveURL(":save-umbrello-file", i18n("*.xmi|XMI File\n*.xmi.tgz|Gzip Compressed XMI File\n*.xmi.tar.bz2|Bzip2 Compressed XMI File\n*|All Files"), this, i18n("Save As"));
if(url.isEmpty())
cont = false;
else {
- QDir d = url.path(-1);
+ TQDir d = url.path(-1);
- if(QFile::exists(d.path())) {
+ if(TQFile::exists(d.path())) {
int want_save = KMessageBox::warningContinueCancel(this, i18n("The file %1 exists.\nDo you wish to overwrite it?").arg(url.path()), i18n("Warning"), i18n("Overwrite"));
if(want_save == KMessageBox::Continue)
cont = false;
@@ -775,7 +775,7 @@ void UMLApp::slotFilePrint()
printer.setFullPage(true);
DiagramPrintPage * selectPage = new DiagramPrintPage(0, m_doc);
printer.addDialogPage(selectPage);
- QString msg;
+ TQString msg;
if (printer.setup(this, i18n("Print %1").arg(m_doc->URL().prettyURL()))) {
m_doc -> print(&printer);
@@ -806,7 +806,7 @@ void UMLApp::slotFileExportXhtml()
}
m_xhtmlGenerator = new XhtmlGenerator();
m_xhtmlGenerator->generateXhtmlForProject();
- connect(m_xhtmlGenerator,SIGNAL(finished()),this,SLOT(slotXhtmlDocGenerationFinished()));
+ connect(m_xhtmlGenerator,TQT_SIGNAL(finished()),this,TQT_SLOT(slotXhtmlDocGenerationFinished()));
}
void UMLApp::slotEditUndo() {
@@ -842,7 +842,7 @@ void UMLApp::slotEditCopy() {
void UMLApp::slotEditPaste() {
slotStatusMsg(i18n("Inserting clipboard contents..."));
- QMimeSource* data = QApplication::clipboard()->data();
+ TQMimeSource* data = TQApplication::clipboard()->data();
UMLClipboard clipboard;
setCursor(KCursor::waitCursor());
if(!clipboard.paste(data)) {
@@ -889,7 +889,7 @@ void UMLApp::slotViewStatusBar() {
// #endif
-void UMLApp::slotStatusMsg(const QString &text) {
+void UMLApp::slotStatusMsg(const TQString &text) {
///////////////////////////////////////////////////////////////////
// change status message permanently
statusBar()->clear();
@@ -977,24 +977,24 @@ void UMLApp::enableRedo(bool enable) {
/** initialize the QT's global clipboard support for the application */
void UMLApp::initClip() {
- QClipboard* clip = QApplication::clipboard();
- connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipDataChanged()));
+ QClipboard* clip = TQApplication::clipboard();
+ connect(clip, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipDataChanged()));
// Don't poll the X11 clipboard every second. This is a little expensive and resulted
// in very annoying umbrello slowdowns / hangs. Qt will notify us about clipboard
// changes anyway (see dataChanged() signal above), albeit only when a Qt application
// changes the clipboard. Work is in progress to make this work with other toolkits
// as well. (pfeiffer)
- // m_clipTimer = new QTimer(this, "timer");
+ // m_clipTimer = new TQTimer(this, "timer");
// m_clipTimer->start(1000, false);
- // connect(m_clipTimer, SIGNAL(timeout()), this, SLOT(slotClipDataChanged()));
+ // connect(m_clipTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClipDataChanged()));
- m_copyTimer = new QTimer(this, "copytimer");
+ m_copyTimer = new TQTimer(this, "copytimer");
m_copyTimer->start(500, false);
- connect(m_copyTimer, SIGNAL(timeout()), this, SLOT(slotCopyChanged()));
+ connect(m_copyTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCopyChanged()));
}
-bool UMLApp::canDecode(const QMimeSource* mimeSource) {
+bool UMLApp::canDecode(const TQMimeSource* mimeSource) {
const char* f;
for (int i=0; (f=mimeSource->format(i)); i++) {
if ( !qstrnicmp(f,"application/x-uml-clip", 22) ) {
@@ -1007,7 +1007,7 @@ bool UMLApp::canDecode(const QMimeSource* mimeSource) {
}
void UMLApp::slotClipDataChanged() {
- QMimeSource * data = QApplication::clipboard()->data();
+ TQMimeSource * data = TQApplication::clipboard()->data();
//Pass the MimeSource to the Doc
editPaste->setEnabled( data && canDecode(data) );
@@ -1030,9 +1030,9 @@ void UMLApp::slotPrefs() {
optionState.generalState.tip = m_config->readBoolEntry( "RunOnStart", true );
m_dlg = new SettingsDlg(this, &optionState);
- connect(m_dlg, SIGNAL( applyClicked() ), this, SLOT( slotApplyPrefs() ) );
+ connect(m_dlg, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApplyPrefs() ) );
- if ( m_dlg->exec() == QDialog::Accepted && m_dlg->getChangesApplied() ) {
+ if ( m_dlg->exec() == TQDialog::Accepted && m_dlg->getChangesApplied() ) {
slotApplyPrefs();
}
@@ -1048,7 +1048,7 @@ void UMLApp::slotApplyPrefs() {
m_config -> writeEntry( "RunOnStart", optionState.generalState.tip );
m_doc -> settingsChanged( optionState );
- const QString plStr = m_dlg->getCodeGenerationLanguage();
+ const TQString plStr = m_dlg->getCodeGenerationLanguage();
Uml::Programming_Language pl = Model_Utils::stringToProgLang(plStr);
setGenerator(pl);
}
@@ -1072,12 +1072,12 @@ bool UMLApp::getCutCopyState() {
bool UMLApp::editCutCopy( bool bFromView ) {
UMLClipboard clipboard;
- QMimeSource * clipdata = 0;
+ TQMimeSource * clipdata = 0;
if ((clipdata = clipboard.copy(bFromView)) != 0) {
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
clip->setData(clipdata);//the global clipboard takes ownership of the clipdata memory
- connect(clip, SIGNAL(dataChanged()), this, SLOT(slotClipDataChanged()));
+ connect(clip, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipDataChanged()));
return true;
}
return false;
@@ -1121,13 +1121,13 @@ void UMLApp::readOptionState() {
m_config -> setGroup( "UI Options" );
optionState.uiState.useFillColor = m_config -> readBoolEntry( "useFillColor", true );
- QColor defaultYellow = QColor( 255, 255, 192 );
- QColor red ( Qt::red );
+ TQColor defaultYellow = TQColor( 255, 255, 192 );
+ TQColor red ( Qt::red );
optionState.uiState.fillColor = m_config -> readColorEntry( "fillColor", &defaultYellow );
optionState.uiState.lineColor = m_config -> readColorEntry( "lineColor", &red );
optionState.uiState.lineWidth = m_config -> readNumEntry( "lineWidth", 0 );
- QFont font = ((QWidget *) this)->font() ;
+ TQFont font = ((TQWidget *) this)->font() ;
optionState.uiState.font = m_config -> readFontEntry("font", &font );
m_config -> setGroup( "Class Options" );
@@ -1144,10 +1144,10 @@ void UMLApp::readOptionState() {
m_config -> setGroup( "Code Viewer Options" );
- QColor defaultWhite = QColor( "white" );
- QColor defaultBlack = QColor( "black" );
- QColor defaultPink = QColor( "pink" );
- QColor defaultGrey = QColor( "grey" );
+ TQColor defaultWhite = TQColor( "white" );
+ TQColor defaultBlack = TQColor( "black" );
+ TQColor defaultPink = TQColor( "pink" );
+ TQColor defaultGrey = TQColor( "grey" );
optionState.codeViewerState.height = m_config -> readNumEntry( "height", 40 );
optionState.codeViewerState.width = m_config -> readNumEntry( "width", 80 );
@@ -1273,7 +1273,7 @@ void UMLApp::setActiveLanguage(int menuId) {
}
}
-void UMLApp::setActiveLanguage( const QString &activeLanguage ) {
+void UMLApp::setActiveLanguage( const TQString &activeLanguage ) {
for(unsigned int j=0; j < m_langSelect->count(); j++) {
int id = m_langSelect->idAt(j);
@@ -1302,7 +1302,7 @@ bool UMLApp::activeLanguageIsCaseSensitive() {
m_activeLanguage != Uml::pl_SQL);
}
-QString UMLApp::activeLanguageScopeSeparator() {
+TQString UMLApp::activeLanguageScopeSeparator() {
Uml::Programming_Language pl = getActiveLanguage();
if (pl == Uml::pl_Ada ||
pl == Uml::pl_CSharp ||
@@ -1355,13 +1355,13 @@ void UMLApp::setDiagramMenuItemsState(bool bState) {
}
void UMLApp::slotUpdateViews() {
- QPopupMenu* menu = findMenu( menuBar(), QString("views") );
+ TQPopupMenu* menu = findMenu( menuBar(), TQString("views") );
if (!menu) {
kWarning() << "view menu not found" << endl;
return;
}
- menu = findMenu( menu, QString("show_view") );
+ menu = findMenu( menu, TQString("show_view") );
if (!menu) {
kWarning() << "show menu not found" << endl;
return;
@@ -1371,7 +1371,7 @@ void UMLApp::slotUpdateViews() {
UMLViewList views = getDocument()->getViewIterator();
for(UMLView *view = views.first(); view; view = views.next()) {
- menu->insertItem( view->getName(), view, SLOT( slotShowView() ) );
+ menu->insertItem( view->getName(), view, TQT_SLOT( slotShowView() ) );
view->fileLoaded();
}
}
@@ -1381,7 +1381,7 @@ void UMLApp::slotImportClasses() {
// File selection is separated from invocation of ClassImport::import()
// because the user might decide to choose a language different from
// the active language (by using the "All Files" option).
- QString preselectedExtension;
+ TQString preselectedExtension;
const Uml::Programming_Language pl = m_codegen->getLanguage();
if (pl == Uml::pl_IDL) {
preselectedExtension = i18n("*.idl|IDL Files (*.idl)");
@@ -1397,9 +1397,9 @@ void UMLApp::slotImportClasses() {
preselectedExtension = i18n("*.h *.hh *.hpp *.hxx *.H|Header Files (*.h *.hh *.hpp *.hxx *.H)");
}
preselectedExtension.append("\n*|" + i18n("All Files"));
- QStringList fileList = KFileDialog::getOpenFileNames(":import-classes", preselectedExtension,
+ TQStringList fileList = KFileDialog::getOpenFileNames(":import-classes", preselectedExtension,
this, i18n("Select Code to Import") );
- const QString& firstFile = fileList.first();
+ const TQString& firstFile = fileList.first();
ClassImport *classImporter = ClassImport::createImporterByFileExt(firstFile);
classImporter->importFiles(fileList);
delete classImporter;
@@ -1423,10 +1423,10 @@ void UMLApp::slotAddDefaultDatatypes() {
void UMLApp::slotCurrentViewChanged() {
UMLView *view = getCurrentView();
if (view) {
- connect(view, SIGNAL( sigShowGridToggled(bool) ),
- this, SLOT( slotShowGridToggled(bool) ) );
- connect(view, SIGNAL( sigSnapToGridToggled(bool) ),
- this, SLOT( slotSnapToGridToggled(bool) ) );
+ connect(view, TQT_SIGNAL( sigShowGridToggled(bool) ),
+ this, TQT_SLOT( slotShowGridToggled(bool) ) );
+ connect(view, TQT_SIGNAL( sigSnapToGridToggled(bool) ),
+ this, TQT_SLOT( slotSnapToGridToggled(bool) ) );
}
}
void UMLApp::slotSnapToGridToggled(bool gridOn) {
@@ -1455,7 +1455,7 @@ void UMLApp::slotDeleteDiagram() {
Uml::Programming_Language UMLApp::getDefaultLanguage() {
m_config->setGroup("Code Generation");
- QString activeLanguage = m_config->readEntry("activeLanguage", "C++");
+ TQString activeLanguage = m_config->readEntry("activeLanguage", "C++");
return Model_Utils::stringToProgLang(activeLanguage);
}
@@ -1475,8 +1475,8 @@ void UMLApp::updateLangSelectMenu(Uml::Programming_Language activeLanguage) {
m_langSelect->clear();
m_langSelect->setCheckable(true);
for (int i = 0; i < Uml::pl_Reserved; i++) {
- QString language = Model_Utils::progLangToString((Uml::Programming_Language) i);
- int id = m_langSelect->insertItem(language,this,SLOT(setActiveLanguage(int)));
+ TQString language = Model_Utils::progLangToString((Uml::Programming_Language) i);
+ int id = m_langSelect->insertItem(language,this,TQT_SLOT(setActiveLanguage(int)));
const bool isActiveLanguage = (activeLanguage == i);
m_langSelect->setItemChecked(id, isActiveLanguage);
}
@@ -1484,10 +1484,10 @@ void UMLApp::updateLangSelectMenu(Uml::Programming_Language activeLanguage) {
void UMLApp::tipOfTheDay()
{
- KTipDialog::showTip(this ,QString::null, true);
+ KTipDialog::showTip(this ,TQString::null, true);
}
-void UMLApp::keyPressEvent(QKeyEvent *e) {
+void UMLApp::keyPressEvent(TQKeyEvent *e) {
switch(e->key()) {
case Qt::Key_Shift:
//toolsbar->setOldTool();
@@ -1500,7 +1500,7 @@ void UMLApp::keyPressEvent(QKeyEvent *e) {
}
-void UMLApp::customEvent(QCustomEvent* e) {
+void UMLApp::customEvent(TQCustomEvent* e) {
if (e->type() == CmdLineExportAllViewsEvent::getType()) {
CmdLineExportAllViewsEvent* exportAllViewsEvent = static_cast<CmdLineExportAllViewsEvent*>(e);
exportAllViewsEvent->exportAllViews();
@@ -1508,7 +1508,7 @@ void UMLApp::customEvent(QCustomEvent* e) {
}
//TODO Move this to UMLWidgetController?
-void UMLApp::handleCursorKeyReleaseEvent(QKeyEvent* e) {
+void UMLApp::handleCursorKeyReleaseEvent(TQKeyEvent* e) {
// in case we have selected something in the diagram, move it by one pixel
// to the direction pointed by the cursor key
if (m_view == NULL || !m_view->getSelectCount() || e->state() != Qt::AltButton) {
@@ -1544,7 +1544,7 @@ void UMLApp::handleCursorKeyReleaseEvent(QKeyEvent* e) {
e->accept();
}
-void UMLApp::keyReleaseEvent(QKeyEvent *e) {
+void UMLApp::keyReleaseEvent(TQKeyEvent *e) {
switch(e->key()) {
case Qt::Key_Backspace:
if (!m_pDocWindow->isTyping())
@@ -1579,7 +1579,7 @@ void UMLApp::newDocument() {
slotUpdateViews();
}
-QWidget* UMLApp::getMainViewWidget() {
+TQWidget* UMLApp::getMainViewWidget() {
Settings::OptionState& optionState = Settings::getOptionState();
if (optionState.generalState.tabdiagrams)
return m_tabWidget;
@@ -1609,16 +1609,16 @@ UMLView* UMLApp::getCurrentView() {
return m_view;
}
-QPopupMenu* UMLApp::findMenu(QMenuData* menu, const QString &name) {
+TQPopupMenu* UMLApp::findMenu(TQMenuData* menu, const TQString &name) {
if (menu) {
int menuCount = menu->count();
for (int i=0; i<menuCount; i++) {
int idAt = menu->idAt(i);
- QPopupMenu* popupMenu = menu->findItem(idAt)->popup();
+ TQPopupMenu* popupMenu = menu->findItem(idAt)->popup();
if (popupMenu) {
- QString menuName = popupMenu->name();
+ TQString menuName = popupMenu->name();
if( menuName == name) {
return popupMenu;
}
@@ -1628,7 +1628,7 @@ QPopupMenu* UMLApp::findMenu(QMenuData* menu, const QString &name) {
return 0;
}
-void UMLApp::slotTabChanged(QWidget* view) {
+void UMLApp::slotTabChanged(TQWidget* view) {
UMLView* umlview = ( UMLView* )view;
m_doc->changeCurrentView( umlview->getID() );
}
@@ -1682,7 +1682,7 @@ void UMLApp::slotMoveTabRight() {
void UMLApp::slotAutolayout(){
#ifdef HAVE_DOT
/*
- QDialog* d = new AutolayoutDlg(getCurrentView());
+ TQDialog* d = new AutolayoutDlg(getCurrentView());
d->show();
*/
#endif
@@ -1698,7 +1698,7 @@ KTabWidget* UMLApp::tabWidget() {
return m_tabWidget;
}
-QString UMLApp::getStatusBarMsg() {
+TQString UMLApp::getStatusBarMsg() {
return m_statusLabel->text();
}
diff --git a/umbrello/umbrello/uml.h b/umbrello/umbrello/uml.h
index ee669d88..621389c0 100644
--- a/umbrello/umbrello/uml.h
+++ b/umbrello/umbrello/uml.h
@@ -18,8 +18,8 @@
#include "umlnamespace.h"
-#include <qmap.h>
-#include <qdict.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <kdockwidget.h>
#include <kdeversion.h>
@@ -81,7 +81,7 @@ public:
/**
* Constructor. Calls all init functions to create the application.
*/
- UMLApp(QWidget* parent=0, const char* name=0);
+ UMLApp(TQWidget* parent=0, const char* name=0);
/**
* Standard deconstructor.
@@ -249,7 +249,7 @@ public:
* Returns the widget used as the parent for UMLViews.
* @return The main view widget.
*/
- QWidget* getMainViewWidget();
+ TQWidget* getMainViewWidget();
/**
* Puts this view to the top of the viewStack, i.e. makes it
@@ -273,7 +273,7 @@ public:
*
* @param mimeType The MIME type to set as the default.
*/
- void setImageMimeType(QString const & mimeType){m_imageMimeType=mimeType;};
+ void setImageMimeType(TQString const & mimeType){m_imageMimeType=mimeType;};
/**
* Gets the default mime type for all diagrams that are exported as
@@ -281,7 +281,7 @@ public:
*
* @return The default MIME type for images.
*/
- QString const & getImageMimeType()const{return m_imageMimeType;};
+ TQString const & getImageMimeType()const{return m_imageMimeType;};
/**
* Carries out the cut/copy command with different action performed
@@ -304,7 +304,7 @@ public:
*
* @return The text in the status bar.
*/
- QString getStatusBarMsg();
+ TQString getStatusBarMsg();
/**
* Returns the default code generation policy.
@@ -322,20 +322,20 @@ public:
CodeGenPolicyExt *getPolicyExt();
protected:
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void keyReleaseEvent(QKeyEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void keyReleaseEvent(TQKeyEvent* e);
/**
* Event handler to receive custom events.
* It handles events such as exporting all views from command line (in
* that case, it executes the exportAllViews method in the event).
*/
- virtual void customEvent(QCustomEvent* e);
+ virtual void customEvent(TQCustomEvent* e);
/**
* Helper method for handling cursor key release events (refactoring).
*/
- void handleCursorKeyReleaseEvent(QKeyEvent* e);
+ void handleCursorKeyReleaseEvent(TQKeyEvent* e);
/**
* Save general Options like all bar positions and status
@@ -541,7 +541,7 @@ public slots:
* permanently, used to indicate current actions.
* @param text The text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
/**
* Create this view.
@@ -631,7 +631,7 @@ public slots:
*
* @param activeLanguage The name of the language to set
*/
- void setActiveLanguage( const QString &activeLanguage );
+ void setActiveLanguage( const TQString &activeLanguage );
/**
* Get the language for import and code generation.
@@ -646,7 +646,7 @@ public slots:
/**
* Return the target language depedent scope separator.
*/
- QString activeLanguageScopeSeparator();
+ TQString activeLanguageScopeSeparator();
/**
* Return the default code generation language as configured by KConfig.
@@ -770,15 +770,15 @@ public slots:
/**
* Searches for a menu with the given name
*
- * @param menu The QPopupMenu or QMenuBar to search through.
+ * @param menu The TQPopupMenu or TQMenuBar to search through.
* @param name The name of the menu to search for (name, not text)
*/
- QPopupMenu* findMenu(QMenuData* menu, const QString &name);
+ TQPopupMenu* findMenu(TQMenuData* menu, const TQString &name);
/**
* called when the tab has changed
*/
- void slotTabChanged(QWidget* view);
+ void slotTabChanged(TQWidget* view);
/**
* make the tab on the left of the current one the active one
@@ -814,12 +814,12 @@ private:
/**
* For selecting the active language.
*/
- QPopupMenu *m_langSelect;
+ TQPopupMenu *m_langSelect;
/**
* Popup menu for zoom selection.
*/
- QPopupMenu *m_zoomSelect;
+ TQPopupMenu *m_zoomSelect;
/**
* Active language.
@@ -840,7 +840,7 @@ private:
/**
* Returns whether we can decode the given mimesource
*/
- static bool canDecode(const QMimeSource* mimeSource);
+ static bool canDecode(const TQMimeSource* mimeSource);
/**
* Reads from the config file the options state.
@@ -967,12 +967,12 @@ private:
KAction* moveTabRight;
KToolBarButton* m_newSessionButton;
KPopupMenu* m_diagramMenu;
- QToolButton* m_closeDiagramButton;
+ TQToolButton* m_closeDiagramButton;
KToggleAction* viewToolBar;
KToggleAction* viewStatusBar;
WorkToolBar* toolsbar;
- QTimer* m_clipTimer;
- QTimer* m_copyTimer;
+ TQTimer* m_clipTimer;
+ TQTimer* m_copyTimer;
AlignToolBar* m_alignToolBar;
KStatusBarLabel* m_statusLabel;
@@ -986,7 +986,7 @@ private:
* Shows, and is parent of, all the UMLViews (diagrams)
* if tabbed diagrams are not enabled.
*/
- QWidgetStack* m_viewStack;
+ TQWidgetStack* m_viewStack;
/**
* Shows, and is parent of, all the UMLViews (diagrams)
@@ -997,7 +997,7 @@ private:
/**
* Default mime type to use for image export.
*/
- QString m_imageMimeType;
+ TQString m_imageMimeType;
/**
* the global UML settings dialog
diff --git a/umbrello/umbrello/umlassociationlist.h b/umbrello/umbrello/umlassociationlist.h
index 55810c7d..ab250a90 100644
--- a/umbrello/umbrello/umlassociationlist.h
+++ b/umbrello/umbrello/umlassociationlist.h
@@ -12,12 +12,12 @@
#ifndef UMLASSOCIATIONLIST_H
#define UMLASSOCIATIONLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLAssociation;
-typedef QPtrList<UMLAssociation> UMLAssociationList;
-typedef QPtrListIterator<UMLAssociation> UMLAssociationListIt;
+typedef TQPtrList<UMLAssociation> UMLAssociationList;
+typedef TQPtrListIterator<UMLAssociation> UMLAssociationListIt;
#endif
diff --git a/umbrello/umbrello/umlattributelist.h b/umbrello/umbrello/umlattributelist.h
index 6dd25db2..67ca21ad 100644
--- a/umbrello/umbrello/umlattributelist.h
+++ b/umbrello/umbrello/umlattributelist.h
@@ -12,18 +12,18 @@
#ifndef UMLATTRIBUTELIST_H
#define UMLATTRIBUTELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "attribute.h"
-//typedef QPtrList<UMLAttribute> UMLAttributeList;
-typedef QPtrListIterator<UMLAttribute> UMLAttributeListIt;
+//typedef TQPtrList<UMLAttribute> UMLAttributeList;
+typedef TQPtrListIterator<UMLAttribute> UMLAttributeListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLAttribute>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLAttribute>
* base class.
*/
-class UMLAttributeList : public QPtrList<UMLAttribute>
+class UMLAttributeList : public TQPtrList<UMLAttribute>
{
public:
diff --git a/umbrello/umbrello/umlcanvasobject.cpp b/umbrello/umbrello/umlcanvasobject.cpp
index 4b002228..800336e3 100644
--- a/umbrello/umbrello/umlcanvasobject.cpp
+++ b/umbrello/umbrello/umlcanvasobject.cpp
@@ -27,7 +27,7 @@
#include "stereotype.h"
#include "clipboard/idchangelog.h"
-UMLCanvasObject::UMLCanvasObject(const QString & name, Uml::IDType id)
+UMLCanvasObject::UMLCanvasObject(const TQString & name, Uml::IDType id)
: UMLObject(name, id)
{
init();
@@ -138,9 +138,9 @@ void UMLCanvasObject::removeAllChildObjects() {
m_List.setAutoDelete(false);
}
-QString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
- const QString &prefix /* = QString() */ ) {
- QString currentName = prefix;
+TQString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
+ const TQString &prefix /* = TQString() */ ) {
+ TQString currentName = prefix;
if (currentName.isEmpty()) {
switch (type) {
case Uml::ot_Association:
@@ -167,14 +167,14 @@ QString UMLCanvasObject::uniqChildName( const Uml::Object_Type type,
}
}
- QString name = currentName;
+ TQString name = currentName;
for (int number = 1; findChildObject(name); ++number) {
- name = currentName + '_' + QString::number(number);
+ name = currentName + '_' + TQString::number(number);
}
return name;
}
-UMLObject * UMLCanvasObject::findChildObject(const QString &n, Uml::Object_Type t) {
+UMLObject * UMLCanvasObject::findChildObject(const TQString &n, Uml::Object_Type t) {
const bool caseSensitive = UMLApp::app()->activeLanguageIsCaseSensitive();
UMLObject *obj;
for (UMLObjectListIt oit(m_List); (obj = oit.current()) != NULL; ++oit) {
diff --git a/umbrello/umbrello/umlcanvasobject.h b/umbrello/umbrello/umlcanvasobject.h
index 626b9fe9..8f7ccb8e 100644
--- a/umbrello/umbrello/umlcanvasobject.h
+++ b/umbrello/umbrello/umlcanvasobject.h
@@ -42,7 +42,7 @@ public:
* @param name The name of the Concept.
* @param id The unique id of the Concept.
*/
- explicit UMLCanvasObject(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLCanvasObject(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor.
@@ -168,7 +168,7 @@ public:
* any object type will match.
* @return Pointer to the object found; NULL if none found.
*/
- virtual UMLObject *findChildObject(const QString &n, Uml::Object_Type t = Uml::ot_UMLObject);
+ virtual UMLObject *findChildObject(const TQString &n, Uml::Object_Type t = Uml::ot_UMLObject);
/**
* Find an association.
@@ -190,8 +190,8 @@ public:
* internally based on the object type.
* @return Unique name string for the Object_Type given.
*/
- virtual QString uniqChildName(const Uml::Object_Type type,
- const QString &prefix = QString());
+ virtual TQString uniqChildName(const Uml::Object_Type type,
+ const TQString &prefix = TQString());
virtual void removeAllChildObjects();
diff --git a/umbrello/umbrello/umlclassifierlist.h b/umbrello/umbrello/umlclassifierlist.h
index 45bd2b62..97d2a880 100644
--- a/umbrello/umbrello/umlclassifierlist.h
+++ b/umbrello/umbrello/umlclassifierlist.h
@@ -12,12 +12,12 @@
#ifndef UMLCLASSIFIERLIST_H
#define UMLCLASSIFIERLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLClassifier;
-typedef QPtrList<UMLClassifier> UMLClassifierList;
-typedef QPtrListIterator<UMLClassifier> UMLClassifierListIt;
+typedef TQPtrList<UMLClassifier> UMLClassifierList;
+typedef TQPtrListIterator<UMLClassifier> UMLClassifierListIt;
#endif
diff --git a/umbrello/umbrello/umlclassifierlistitemlist.h b/umbrello/umbrello/umlclassifierlistitemlist.h
index 675e8d5c..950fb722 100644
--- a/umbrello/umbrello/umlclassifierlistitemlist.h
+++ b/umbrello/umbrello/umlclassifierlistitemlist.h
@@ -12,19 +12,19 @@
#ifndef UMLCLASSIFIERLISTITEMLIST_H
#define UMLCLASSIFIERLISTITEMLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLClassifierListItem;
-//typedef QPtrList<UMLClassifierListItem> UMLClassifierListItemList;
-typedef QPtrListIterator<UMLClassifierListItem> UMLClassifierListItemListIt;
+//typedef TQPtrList<UMLClassifierListItem> UMLClassifierListItemList;
+typedef TQPtrListIterator<UMLClassifierListItem> UMLClassifierListItemListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLClassifierListItem>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLClassifierListItem>
* base class.
*/
-class UMLClassifierListItemList : public QPtrList<UMLClassifierListItem>
+class UMLClassifierListItemList : public TQPtrList<UMLClassifierListItem>
{
public:
diff --git a/umbrello/umbrello/umldoc.cpp b/umbrello/umbrello/umldoc.cpp
index 9783cfbd..4862193a 100644
--- a/umbrello/umbrello/umldoc.cpp
+++ b/umbrello/umbrello/umldoc.cpp
@@ -13,13 +13,13 @@
#include "umldoc.h"
// qt includes
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qbuffer.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqbuffer.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
// kde includes
#include <kapplication.h>
@@ -95,14 +95,14 @@ UMLDoc::UMLDoc() {
void UMLDoc::init() {
// Initialize predefined folders.
- const QString nativeRootName[Uml::N_MODELTYPES] = {
+ const TQString nativeRootName[Uml::N_MODELTYPES] = {
"Logical View",
"Use Case View",
"Component View",
"Deployment View",
"Entity Relationship Model"
};
- const QString localizedRootName[Uml::N_MODELTYPES] = {
+ const TQString localizedRootName[Uml::N_MODELTYPES] = {
i18n("Logical View"),
i18n("Use Case View"),
i18n("Component View"),
@@ -120,10 +120,10 @@ void UMLDoc::init() {
// Connect signals.
UMLApp * pApp = UMLApp::app();
- connect(this, SIGNAL(sigDiagramCreated(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL(sigDiagramRemoved(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL(sigDiagramRenamed(Uml::IDType)), pApp, SLOT(slotUpdateViews()));
- connect(this, SIGNAL( sigCurrentViewChanged() ), pApp, SLOT( slotCurrentViewChanged() ) );
+ connect(this, TQT_SIGNAL(sigDiagramCreated(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL(sigDiagramRemoved(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL(sigDiagramRenamed(Uml::IDType)), pApp, TQT_SLOT(slotUpdateViews()));
+ connect(this, TQT_SIGNAL( sigCurrentViewChanged() ), pApp, TQT_SLOT( slotCurrentViewChanged() ) );
}
UMLDoc::~UMLDoc() {
@@ -145,7 +145,7 @@ void UMLDoc::addView(UMLView *view) {
UMLApp * pApp = UMLApp::app();
if ( pApp->getListView() )
- connect(this, SIGNAL(sigObjectRemoved(UMLObject *)), view, SLOT(slotObjectRemoved(UMLObject *)));
+ connect(this, TQT_SIGNAL(sigObjectRemoved(UMLObject *)), view, TQT_SLOT(slotObjectRemoved(UMLObject *)));
pApp->setCurrentView(view);
if ( ! m_bLoading ) {
@@ -176,7 +176,7 @@ void UMLDoc::removeView(UMLView *view , bool enforceCurrentView ) {
return;
}
if ( UMLApp::app()->getListView() ) {
- disconnect(this,SIGNAL(sigObjectRemoved(UMLObject *)), view,SLOT(slotObjectRemoved(UMLObject *)));
+ disconnect(this,TQT_SIGNAL(sigObjectRemoved(UMLObject *)), view,TQT_SLOT(slotObjectRemoved(UMLObject *)));
}
view->hide();
//remove all widgets before deleting view
@@ -341,16 +341,16 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
}
m_doc_url = url;
- QDir d = url.path(1);
+ TQDir d = url.path(1);
closeDocument();
// IMPORTANT: set m_bLoading to true
// _AFTER_ the call of UMLDoc::closeDocument()
// as it sets m_bLoading to false afer it was temporarily
// changed to true to block recording of changes in redo-buffer
m_bLoading = true;
- QString tmpfile;
+ TQString tmpfile;
KIO::NetAccess::download( url, tmpfile, UMLApp::app() );
- QFile file( tmpfile );
+ TQFile file( tmpfile );
if ( !file.exists() ) {
KMessageBox::error(0, i18n("The file %1 does not exist.").arg(d.path()), i18n("Load Error"));
m_doc_url.setFileName(i18n("Untitled"));
@@ -363,12 +363,12 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
bool status = false;
// check if the xmi file is a compressed archive like tar.bzip2 or tar.gz
- QString filetype = m_doc_url.fileName(true);
- QString mimetype = "";
- if (filetype.find(QRegExp("\\.tgz$")) != -1)
+ TQString filetype = m_doc_url.fileName(true);
+ TQString mimetype = "";
+ if (filetype.find(TQRegExp("\\.tgz$")) != -1)
{
mimetype = "application/x-gzip";
- } else if (filetype.find(QRegExp("\\.tar.bz2$")) != -1) {
+ } else if (filetype.find(TQRegExp("\\.tar.bz2$")) != -1) {
mimetype = "application/x-bzip2";
}
@@ -386,11 +386,11 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
// get the root directory and all entries in
const KArchiveDirectory * rootDir = archive.directory();
- QStringList entries = rootDir->entries();
- QString entryMimeType;
+ TQStringList entries = rootDir->entries();
+ TQString entryMimeType;
bool foundXMI = false;
- QStringList::Iterator it;
- QStringList::Iterator end(entries.end());
+ TQStringList::Iterator it;
+ TQStringList::Iterator end(entries.end());
// now go through all entries till we find an xmi file
for (it = entries.begin(); it != end; ++it)
@@ -442,7 +442,7 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
fileEntry->copyTo(tmp_dir.name());
// now open the extracted file for reading
- QFile xmi_file(tmp_dir.name() + *it);
+ TQFile xmi_file(tmp_dir.name() + *it);
if( !xmi_file.open( IO_ReadOnly ) )
{
KMessageBox::error(0, i18n("There was a problem loading the extracted file: %1").arg(d.path()), i18n("Load Error"));
@@ -505,15 +505,15 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) {
bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) {
m_doc_url = url;
- QDir d = m_doc_url.path(1);
- QFile file;
+ TQDir d = m_doc_url.path(1);
+ TQFile file;
bool uploaded = true;
// first, we have to find out which format to use
- QString strFileName = url.path(-1);
- QFileInfo fileInfo(strFileName);
- QString fileExt = fileInfo.extension();
- QString fileFormat = "xmi";
+ TQString strFileName = url.path(-1);
+ TQFileInfo fileInfo(strFileName);
+ TQString fileExt = fileInfo.extension();
+ TQString fileFormat = "xmi";
if (fileExt == "xmi" || fileExt == "bak.xmi")
{
fileFormat = "xmi";
@@ -569,12 +569,12 @@ bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) {
file.close(); // ...and close it
// now add this file to the archive, but without the extension
- QString tmpQString = url.fileName();
+ TQString tmpQString = url.fileName();
if (fileFormat == "tgz")
{
- tmpQString.replace(QRegExp("\\.tgz$"), "");
+ tmpQString.replace(TQRegExp("\\.tgz$"), "");
} else {
- tmpQString.replace(QRegExp("\\.tar\\.bz2$"), "");
+ tmpQString.replace(TQRegExp("\\.tar\\.bz2$"), "");
}
archive->addLocalFile(tmp_xmi_file.name(), tmpQString);
archive->close();
@@ -649,7 +649,7 @@ void UMLDoc::setupSignals() {
WorkToolBar *tb = UMLApp::app() -> getWorkToolBar();
- connect(this, SIGNAL(sigDiagramChanged(Uml::Diagram_Type)), tb, SLOT(slotCheckToolBar(Uml::Diagram_Type)));
+ connect(this, TQT_SIGNAL(sigDiagramChanged(Uml::Diagram_Type)), tb, TQT_SLOT(slotCheckToolBar(Uml::Diagram_Type)));
//new signals below
return;
@@ -665,7 +665,7 @@ UMLView * UMLDoc::findView(Uml::IDType id) {
return v;
}
-UMLView * UMLDoc::findView(Uml::Diagram_Type type, const QString &name,
+UMLView * UMLDoc::findView(Uml::Diagram_Type type, const TQString &name,
bool searchAllScopes /* =false */) {
Uml::Model_Type mt = Model_Utils::convert_DT_MT(type);
return m_root[mt]->findView(type, name, searchAllScopes);
@@ -692,7 +692,7 @@ UMLStereotype * UMLDoc::findStereotypeById(Uml::IDType id) {
return NULL;
}
-UMLObject* UMLDoc::findUMLObject(const QString &name,
+UMLObject* UMLDoc::findUMLObject(const TQString &name,
Uml::Object_Type type /* = ot_UMLObject */,
UMLObject *currentObj /* = NULL */) {
UMLObject *o = m_datatypeRoot->findObject(name);
@@ -710,7 +710,7 @@ UMLObject* UMLDoc::findUMLObject(const QString &name,
return NULL;
}
-UMLClassifier* UMLDoc::findUMLClassifier(const QString &name) {
+UMLClassifier* UMLDoc::findUMLClassifier(const TQString &name) {
//this is used only by code generator so we don't need to look at Datatypes
UMLObject * obj = findUMLObject(name);
return dynamic_cast<UMLClassifier*>(obj);
@@ -749,7 +749,7 @@ void UMLDoc::removeStereotype(const UMLStereotype *s) {
m_stereoList.remove(s);
}
-void UMLDoc::writeToStatusBar(const QString &text) {
+void UMLDoc::writeToStatusBar(const TQString &text) {
emit sigWriteToStatusBar(text);
}
@@ -765,7 +765,7 @@ void UMLDoc::slotRemoveUMLObject(UMLObject* object) {
pkg->removeObject(object);
}
-bool UMLDoc::isUnique(const QString &name)
+bool UMLDoc::isUnique(const TQString &name)
{
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem *currentItem = (UMLListViewItem*)listView->currentItem();
@@ -801,7 +801,7 @@ bool UMLDoc::isUnique(const QString &name)
return true;
}
-bool UMLDoc::isUnique(const QString &name, UMLPackage *package)
+bool UMLDoc::isUnique(const TQString &name, UMLPackage *package)
{
// if a package, then only do check in that
if (package)
@@ -820,7 +820,7 @@ bool UMLDoc::isUnique(const QString &name, UMLPackage *package)
return true;
}
-UMLStereotype* UMLDoc::findStereotype(const QString &name) {
+UMLStereotype* UMLDoc::findStereotype(const TQString &name) {
UMLStereotype *s;
for (UMLStereotypeListIt it(m_stereoList); (s = it.current()) != NULL; ++it) {
if (s->getName() == name)
@@ -829,7 +829,7 @@ UMLStereotype* UMLDoc::findStereotype(const QString &name) {
return NULL;
}
-UMLStereotype* UMLDoc::findOrCreateStereotype(const QString &name) {
+UMLStereotype* UMLDoc::findOrCreateStereotype(const TQString &name) {
UMLStereotype *s = findStereotype(name);
if (s != NULL) {
return s;
@@ -928,8 +928,8 @@ void UMLDoc::addAssociation(UMLAssociation *Assoc)
setModified(true);
}
-QString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
- QString dname;
+TQString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
+ TQString dname;
if(type == dt_UseCase)
dname = i18n("use case diagram");
else if(type == dt_Class)
@@ -951,9 +951,9 @@ QString UMLDoc::uniqViewName(const Uml::Diagram_Type type) {
else {
kWarning() << "uniqViewName() called with unknown diagram type" << endl;
}
- QString name = dname;
+ TQString name = dname;
for (int number = 0; findView(type, name, true); ++number,
- name = dname + '_' + QString::number(number))
+ name = dname + '_' + TQString::number(number))
;
return name;
}
@@ -968,12 +968,12 @@ void UMLDoc::setLoading(bool state /* = true */) {
UMLView* UMLDoc::createDiagram(UMLFolder *folder, Uml::Diagram_Type type, bool askForName /*= true */) {
bool ok = true;
- QString name,
+ TQString name,
dname = uniqViewName(type);
while(true) {
if (askForName) {
- name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), dname, &ok, (QWidget*)UMLApp::app());
+ name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), dname, &ok, (TQWidget*)UMLApp::app());
} else {
name = dname;
}
@@ -1007,9 +1007,9 @@ void UMLDoc::renameDiagram(Uml::IDType id) {
UMLView *temp = findView(id);
Diagram_Type type = temp->getType();
- QString oldName= temp->getName();
+ TQString oldName= temp->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
@@ -1028,9 +1028,9 @@ void UMLDoc::renameDiagram(Uml::IDType id) {
void UMLDoc::renameUMLObject(UMLObject *o) {
bool ok = false;
- QString oldName= o->getName();
+ TQString oldName= o->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
if(name.length() == 0)
@@ -1054,9 +1054,9 @@ void UMLDoc::renameChildUMLObject(UMLObject *o) {
return;
}
- QString oldName= o->getName();
+ TQString oldName= o->getName();
while(true) {
- QString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (QWidget*)UMLApp::app());
+ TQString name = KInputDialog::getText(i18n("Name"), i18n("Enter name:"), oldName, &ok, (TQWidget*)UMLApp::app());
if(!ok)
break;
if(name.length() == 0)
@@ -1192,11 +1192,11 @@ void UMLDoc::signalUMLObjectCreated(UMLObject * o) {
*/
}
-void UMLDoc::setName(const QString& name) {
+void UMLDoc::setName(const TQString& name) {
m_Name = name;
}
-QString UMLDoc::getName() const {
+TQString UMLDoc::getName() const {
return m_Name;
}
@@ -1204,23 +1204,23 @@ Uml::IDType UMLDoc::getModelID() const {
return m_modelID;
}
-void UMLDoc::saveToXMI(QIODevice& file) {
- QDomDocument doc;
+void UMLDoc::saveToXMI(TQIODevice& file) {
+ TQDomDocument doc;
- QDomProcessingInstruction xmlHeading =
+ TQDomProcessingInstruction xmlHeading =
doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"");
doc.appendChild(xmlHeading);
- QDomElement root = doc.createElement( "XMI" );
+ TQDomElement root = doc.createElement( "XMI" );
root.setAttribute( "xmi.version", "1.2" );
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::currentDateTime();
root.setAttribute( "timestamp", now.toString(Qt::ISODate));
root.setAttribute( "verified", "false");
root.setAttribute( "xmlns:UML", "http://schema.omg.org/spec/UML/1.3");
doc.appendChild( root );
- QDomElement header = doc.createElement( "XMI.header" );
- QDomElement meta = doc.createElement( "XMI.metamodel" );
+ TQDomElement header = doc.createElement( "XMI.header" );
+ TQDomElement meta = doc.createElement( "XMI.metamodel" );
meta.setAttribute( "xmi.name", "UML" );
meta.setAttribute( "xmi.version", "1.3" );
meta.setAttribute( "href", "UML.xml" );
@@ -1230,10 +1230,10 @@ void UMLDoc::saveToXMI(QIODevice& file) {
* bugs.kde.org/56184 comment by M. Alanen 2004-12-19:
* " XMI.model requires xmi.version. (or leave the whole XMI.model out,
* it's not required) "
- QDomElement model = doc.createElement( "XMI.model" );
- QFile* qfile = dynamic_cast<QFile*>(&file);
+ TQDomElement model = doc.createElement( "XMI.model" );
+ TQFile* qfile = dynamic_cast<TQFile*>(&file);
if (qfile) {
- QString modelName = qfile->name();
+ TQString modelName = qfile->name();
modelName = modelName.section('/', -1 );
modelName = modelName.section('.', 0, 0);
model.setAttribute( "xmi.name", modelName );
@@ -1241,28 +1241,28 @@ void UMLDoc::saveToXMI(QIODevice& file) {
}
*/
- QDomElement documentation = doc.createElement( "XMI.documentation" );
+ TQDomElement documentation = doc.createElement( "XMI.documentation" );
// If we consider it useful we might add user and contact details
- // QDomElement owner = doc.createElement( "XMI.owner" );
+ // TQDomElement owner = doc.createElement( "XMI.owner" );
// owner.appendChild( doc.createTextNode( "Jens Kruger" ) ); // Add a User
// documentation.appendChild( owner );
- // QDomElement contact = doc.createElement( "XMI.contact" );
+ // TQDomElement contact = doc.createElement( "XMI.contact" );
// contact.appendChild( doc.createTextNode( "je.krueger@web.de" ) ); // add a contact
// documentation.appendChild( contact );
- QDomElement exporter = doc.createElement( "XMI.exporter" );
+ TQDomElement exporter = doc.createElement( "XMI.exporter" );
exporter.appendChild( doc.createTextNode( "umbrello uml modeller http://uml.sf.net" ) );
documentation.appendChild( exporter );
- QDomElement exporterVersion = doc.createElement( "XMI.exporterVersion" );
+ TQDomElement exporterVersion = doc.createElement( "XMI.exporterVersion" );
exporterVersion.appendChild( doc.createTextNode( XMI_FILE_VERSION ) );
documentation.appendChild( exporterVersion );
// all files are now saved with correct Unicode encoding, we add this
// information to the header, so that the file will be loaded correctly
- QDomElement exporterEncoding = doc.createElement( "XMI.exporterEncoding" );
+ TQDomElement exporterEncoding = doc.createElement( "XMI.exporterEncoding" );
exporterEncoding.appendChild( doc.createTextNode( "UnicodeUTF8" ) );
documentation.appendChild( exporterEncoding );
@@ -1275,11 +1275,11 @@ void UMLDoc::saveToXMI(QIODevice& file) {
header.appendChild( meta );
root.appendChild( header );
- QDomElement content = doc.createElement( "XMI.content" );
+ TQDomElement content = doc.createElement( "XMI.content" );
- QDomElement contentNS = doc.createElement( "UML:Namespace.contents" );
+ TQDomElement contentNS = doc.createElement( "UML:Namespace.contents" );
- QDomElement objectsElement = doc.createElement( "UML:Model" );
+ TQDomElement objectsElement = doc.createElement( "UML:Model" );
objectsElement.setAttribute( "xmi.id", ID2STR(m_modelID) );
objectsElement.setAttribute( "name", m_Name );
objectsElement.setAttribute( "isSpecification", "false" );
@@ -1287,16 +1287,16 @@ void UMLDoc::saveToXMI(QIODevice& file) {
objectsElement.setAttribute( "isRoot", "false" );
objectsElement.setAttribute( "isLeaf", "false" );
- QDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
+ TQDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
// Save stereotypes and toplevel datatypes first so that upon loading
// they are known first.
// There is a bug causing duplication of the same stereotype in m_stereoList.
// As a workaround, we use a string list to memorize which stereotype has been saved.
- QStringList stereoNames;
- QValueList<Uml::IDType> stereoIDs;
+ TQStringList stereoNames;
+ TQValueList<Uml::IDType> stereoIDs;
for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
- QString stName = s->getName();
+ TQString stName = s->getName();
Uml::IDType stID = s->getID();
if (!stereoNames.contains(stName) && !stereoIDs.contains(stID)) {
s->saveToXMI(doc, ownedNS);
@@ -1318,10 +1318,10 @@ void UMLDoc::saveToXMI(QIODevice& file) {
root.appendChild( content );
// Save the XMI extensions: docsettings, diagrams, listview, and codegeneration.
- QDomElement extensions = doc.createElement( "XMI.extensions" );
+ TQDomElement extensions = doc.createElement( "XMI.extensions" );
extensions.setAttribute( "xmi.extender", "umbrello" );
- QDomElement docElement = doc.createElement( "docsettings" );
+ TQDomElement docElement = doc.createElement( "docsettings" );
Uml::IDType viewID = Uml::id_None;
UMLView *currentView = UMLApp::app()->getCurrentView();
if (currentView)
@@ -1337,26 +1337,26 @@ void UMLDoc::saveToXMI(QIODevice& file) {
// save code generator
CodeGenerator *codegen = UMLApp::app()->getGenerator();
if (codegen) {
- QDomElement codeGenElement = doc.createElement( "codegeneration" );
+ TQDomElement codeGenElement = doc.createElement( "codegeneration" );
codegen->saveToXMI( doc, codeGenElement );
extensions.appendChild( codeGenElement );
}
root.appendChild( extensions );
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << doc.toString();
}
-short UMLDoc::getEncoding(QIODevice & file)
+short UMLDoc::getEncoding(TQIODevice & file)
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString data = stream.read();
- QString error;
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString data = stream.read();
+ TQString error;
int line;
- QDomDocument doc;
+ TQDomDocument doc;
if( !doc.setContent( data, false, &error, &line ) )
{
kWarning()<<"Can't set content: "<<error<<" Line: "<<line<<endl;
@@ -1365,12 +1365,12 @@ short UMLDoc::getEncoding(QIODevice & file)
// we start at the beginning and go to the point in the header where we can
// find out if the file was saved using Unicode
- QDomNode node = doc.firstChild();
+ TQDomNode node = doc.firstChild();
while (node.isComment() || node.isProcessingInstruction())
{
node = node.nextSibling();
}
- QDomElement root = node.toElement();
+ TQDomElement root = node.toElement();
if( root.isNull() )
{
return ENC_UNKNOWN;
@@ -1385,15 +1385,15 @@ short UMLDoc::getEncoding(QIODevice & file)
if ( node.isNull() )
return ENC_UNKNOWN;
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
// check header
if( element.isNull() || element.tagName() != "XMI.header" )
return ENC_UNKNOWN;
- QDomNode headerNode = node.firstChild();
+ TQDomNode headerNode = node.firstChild();
while ( !headerNode.isNull() )
{
- QDomElement headerElement = headerNode.toElement();
+ TQDomElement headerElement = headerNode.toElement();
// the information if Unicode was used is now stored in the
// XMI.documentation section of the header
if (headerElement.isNull() ||
@@ -1401,10 +1401,10 @@ short UMLDoc::getEncoding(QIODevice & file)
headerNode = headerNode.nextSibling();
continue;
}
- QDomNode docuNode = headerNode.firstChild();
+ TQDomNode docuNode = headerNode.firstChild();
while ( !docuNode.isNull() )
{
- QDomElement docuElement = docuNode.toElement();
+ TQDomElement docuElement = docuNode.toElement();
// a tag XMI.exporterEncoding was added since version 1.2 to
// mark a file as saved with Unicode
if (! docuElement.isNull() &&
@@ -1412,7 +1412,7 @@ short UMLDoc::getEncoding(QIODevice & file)
{
// at the moment this if isn't really necessary, but maybe
// later we will have other encoding standards
- if (docuElement.text() == QString("UnicodeUTF8"))
+ if (docuElement.text() == TQString("UnicodeUTF8"))
{
return ENC_UNICODE; // stop here
}
@@ -1424,7 +1424,7 @@ short UMLDoc::getEncoding(QIODevice & file)
return ENC_OLD_ENC;
}
-bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
+bool UMLDoc::loadFromXMI( TQIODevice & file, short encode )
{
// old Umbrello versions (version < 1.2) didn't save the XMI in Unicode
// this wasn't correct, because non Latin1 chars where lost
@@ -1436,30 +1436,30 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
return false;
file.reset();
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
if (encode == ENC_UNICODE)
{
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
}
- QString data = stream.read();
+ TQString data = stream.read();
kapp->processEvents(); // give UI events a chance
- QString error;
+ TQString error;
int line;
- QDomDocument doc;
+ TQDomDocument doc;
if( !doc.setContent( data, false, &error, &line ) ) {
kWarning()<<"Can't set content:"<<error<<" Line:"<<line<<endl;
return false;
}
kapp->processEvents(); // give UI events a chance
- QDomNode node = doc.firstChild();
+ TQDomNode node = doc.firstChild();
//Before Umbrello 1.1-rc1 we didn't add a <?xml heading
//so we allow the option of this being missing
while (node.isComment() || node.isProcessingInstruction()) {
node = node.nextSibling();
}
- QDomElement root = node.toElement();
+ TQDomElement root = node.toElement();
if( root.isNull() ) {
return false;
}
@@ -1472,22 +1472,22 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
for (node = node.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if (element.isNull()) {
kDebug() << "loadFromXMI: skip empty elem" << endl;
continue;
}
bool recognized = false;
- QString outerTag = element.tagName();
+ TQString outerTag = element.tagName();
//check header
if (outerTag == "XMI.header") {
- QDomNode headerNode = node.firstChild();
+ TQDomNode headerNode = node.firstChild();
if ( !validateXMIHeader(headerNode) ) {
return false;
}
recognized = true;
} else if (outerTag == "XMI.extensions") {
- QDomNode extensionsNode = node.firstChild();
+ TQDomNode extensionsNode = node.firstChild();
while (! extensionsNode.isNull()) {
loadExtensionsFromXMI(extensionsNode);
extensionsNode = extensionsNode.nextSibling();
@@ -1502,12 +1502,12 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
}
bool seen_UMLObjects = false;
//process content
- for (QDomNode child = node.firstChild(); !child.isNull();
+ for (TQDomNode child = node.firstChild(); !child.isNull();
child = child.nextSibling()) {
if (child.isComment())
continue;
element = child.toElement();
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "umlobjects" // for bkwd compat.
|| tagEq(tag, "Subsystem")
|| tagEq(tag, "Model") ) {
@@ -1524,7 +1524,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
tagEq(tag, "Interface")) {
// These tests are only for foreign XMI files that
// are missing the <Model> tag (e.g. NSUML)
- QDomElement parentElem = node.toElement();
+ TQDomElement parentElem = node.toElement();
if( !loadUMLObjectsFromXMI( parentElem ) ) {
kWarning() << "failed load on model objects" << endl;
return false;
@@ -1542,7 +1542,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
if (tag != "documentation") {
continue;
}
- QString modelElement = element.attribute("modelElement", "");
+ TQString modelElement = element.attribute("modelElement", "");
if (modelElement.isEmpty()) {
kDebug() << "skipping TaggedValue(documentation) because "
<< "modelElement.isEmpty()" << endl;
@@ -1554,7 +1554,7 @@ bool UMLDoc::loadFromXMI( QIODevice & file, short encode )
<< " for modelElement " << modelElement << endl;
continue;
}
- QString value = element.attribute("value", "");
+ TQString value = element.attribute("value", "");
if (! value.isEmpty())
o->setDoc(value);
} else {
@@ -1609,8 +1609,8 @@ void UMLDoc::resolveTypes() {
kapp->processEvents(); // give UI events a chance
}
-bool UMLDoc::validateXMIHeader(QDomNode& headerNode) {
- QDomElement headerElement = headerNode.toElement();
+bool UMLDoc::validateXMIHeader(TQDomNode& headerNode) {
+ TQDomElement headerElement = headerNode.toElement();
while ( !headerNode.isNull() ) {
/* //Seems older Umbrello files used a different metamodel, so don't validate it for now
if( !headerElement.isNull() && headerElement.tagName() == "XMI.metamodel" ) {
@@ -1626,7 +1626,7 @@ bool UMLDoc::validateXMIHeader(QDomNode& headerNode) {
return true;
}
-bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
+bool UMLDoc::loadUMLObjectsFromXMI(TQDomElement& element) {
/* FIXME need a way to make status bar actually reflect
how much of the file has been loaded rather than just
counting to 10 (an arbitrary number)
@@ -1637,15 +1637,15 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
*/
emit sigWriteToStatusBar( i18n("Loading UML elements...") );
- for (QDomNode node = element.firstChild(); !node.isNull();
+ for (TQDomNode node = element.firstChild(); !node.isNull();
node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString type = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString type = tempElement.tagName();
if (tagEq(type, "Model")) {
bool foundUmbrelloRootFolder = false;
- QString name = tempElement.attribute("name");
+ TQString name = tempElement.attribute("name");
for (int i = 0; i < Uml::N_MODELTYPES; i++) {
if (name == m_root[i]->getName()) {
m_pCurrentRoot = m_root[i];
@@ -1674,7 +1674,7 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
if (Model_Utils::isCommonXMIAttribute(type))
continue;
if (! tempElement.hasAttribute("xmi.id")) {
- QString idref = tempElement.attribute("xmi.idref", "");
+ TQString idref = tempElement.attribute("xmi.idref", "");
if (! idref.isEmpty()) {
kDebug() << "resolution of xmi.idref " << idref
<< " is not yet implemented" << endl;
@@ -1684,7 +1684,7 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomElement& element) {
}
continue;
}
- QString stID = tempElement.attribute("stereotype", "");
+ TQString stID = tempElement.attribute("stereotype", "");
UMLObject *pObject = Object_Factory::makeObjectFromXMI(type, stID);
if( !pObject ) {
kWarning() << "Unknown type of umlobject to create: " << type << endl;
@@ -1750,14 +1750,14 @@ void UMLDoc::setMainViewID(Uml::IDType viewID) {
m_nViewID = viewID;
}
-void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
- QDomElement element = node.toElement();
- QString tag = element.tagName();
+void UMLDoc::loadExtensionsFromXMI(TQDomNode& node) {
+ TQDomElement element = node.toElement();
+ TQString tag = element.tagName();
if (tag == "docsettings") {
- QString viewID = element.attribute( "viewid", "-1" );
+ TQString viewID = element.attribute( "viewid", "-1" );
m_Doc = element.attribute( "documentation", "" );
- QString uniqueid = element.attribute( "uniqueid", "0" );
+ TQString uniqueid = element.attribute( "uniqueid", "0" );
m_nViewID = STR2ID(viewID);
UniqueID::set(STR2ID(uniqueid));
@@ -1766,7 +1766,7 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
} else if (tag == "diagrams" || tag == "UISModelElement") {
// For backward compatibility only:
// Since version 1.5.5 diagrams are saved as part of the UMLFolder.
- QDomNode diagramNode = node.firstChild();
+ TQDomNode diagramNode = node.firstChild();
if (tag == "UISModelElement") { // Unisys.IntegratePlus.2
element = diagramNode.toElement();
tag = element.tagName();
@@ -1789,11 +1789,11 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
}
} else if (tag == "codegeneration") {
- QDomNode cgnode = node.firstChild();
- QDomElement cgelement = cgnode.toElement();
+ TQDomNode cgnode = node.firstChild();
+ TQDomElement cgelement = cgnode.toElement();
while( !cgelement.isNull() ) {
- QString nodeName = cgelement.tagName();
- QString lang = cgelement.attribute("language","UNKNOWN");
+ TQString nodeName = cgelement.tagName();
+ TQString lang = cgelement.attribute("language","UNKNOWN");
Uml::Programming_Language pl = Model_Utils::stringToProgLang(lang);
CodeGenerator *g = UMLApp::app()->setGenerator(pl);
g->loadFromXMI(cgelement);
@@ -1807,19 +1807,19 @@ void UMLDoc::loadExtensionsFromXMI(QDomNode& node) {
// For backward compatibility only:
// Since version 1.5.5 diagrams are saved as part of the UMLFolder.
-bool UMLDoc::loadDiagramsFromXMI( QDomNode & node ) {
+bool UMLDoc::loadDiagramsFromXMI( TQDomNode & node ) {
emit sigWriteToStatusBar( i18n("Loading diagrams...") );
emit sigResetStatusbarProgress();
emit sigSetStatusbarProgress( 0 );
emit sigSetStatusbarProgressSteps( 10 ); //FIX ME
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if( element.isNull() )
return true;//return ok as it means there is no umlobjects
const Settings::OptionState state = Settings::getOptionState();
UMLView * pView = 0;
int count = 0;
while( !element.isNull() ) {
- QString tag = element.tagName();
+ TQString tag = element.tagName();
if (tag == "diagram" || tag == "UISDiagram") {
pView = new UMLView(NULL);
// IMPORTANT: Set OptionState of new UMLView _BEFORE_
@@ -1910,13 +1910,13 @@ UMLAssociationList UMLDoc::getAssociations() {
void UMLDoc::print(KPrinter * pPrinter) {
UMLView * printView = 0;
- int count = QString(pPrinter -> option("kde-uml-count")).toInt();
- QPainter painter(pPrinter);
+ int count = TQString(pPrinter -> option("kde-uml-count")).toInt();
+ TQPainter painter(pPrinter);
for(int i = 0;i < count;i++) {
if(i>0)
pPrinter -> newPage();
- QString diagram = i18n("kde-uml-Diagram") + QString("%1").arg(i);
- QString sID = pPrinter -> option(diagram);
+ TQString diagram = i18n("kde-uml-Diagram") + TQString("%1").arg(i);
+ TQString sID = pPrinter -> option(diagram);
Uml::IDType id = STR2ID(sID);
printView = findView(id);
@@ -2044,10 +2044,10 @@ bool UMLDoc::addUMLView(UMLView * pView ) {
return false;
int i = 0;
- QString viewName = (QString)pView->getName();
- QString name = viewName;
+ TQString viewName = (TQString)pView->getName();
+ TQString name = viewName;
while( findView(pView->getType(), name) != NULL) {
- name = viewName + '_' + QString::number(++i);
+ name = viewName + '_' + TQString::number(++i);
}
if(i) //If name was modified
pView->setName(name);
@@ -2081,14 +2081,14 @@ void UMLDoc::settingsChanged(Settings::OptionState optionState) {
void UMLDoc::initSaveTimer() {
if( m_pAutoSaveTimer ) {
m_pAutoSaveTimer -> stop();
- disconnect( m_pAutoSaveTimer, SIGNAL( timeout() ), this, SLOT( slotAutoSave() ) );
+ disconnect( m_pAutoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoSave() ) );
delete m_pAutoSaveTimer;
m_pAutoSaveTimer = 0;
}
Settings::OptionState optionState = Settings::getOptionState();
if( optionState.generalState.autosave ) {
- m_pAutoSaveTimer = new QTimer(this, "_AUTOSAVETIMER_" );
- connect( m_pAutoSaveTimer, SIGNAL( timeout() ), this, SLOT( slotAutoSave() ) );
+ m_pAutoSaveTimer = new TQTimer(this, "_AUTOSAVETIMER_" );
+ connect( m_pAutoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoSave() ) );
m_pAutoSaveTimer->start( optionState.generalState.autosavetime * 60000, false );
}
return;
@@ -2101,7 +2101,7 @@ void UMLDoc::slotAutoSave() {
}
KURL tempURL = m_doc_url;
if( tempURL.fileName() == i18n("Untitled") ) {
- tempURL.setPath( QDir::homeDirPath() + i18n("/autosave%1").arg(".xmi") );
+ tempURL.setPath( TQDir::homeDirPath() + i18n("/autosave%1").arg(".xmi") );
saveDocument( tempURL );
m_doc_url.setFileName( i18n("Untitled") );
m_modified = true;
@@ -2109,9 +2109,9 @@ void UMLDoc::slotAutoSave() {
} else {
// 2004-05-17 Achim Spangler
KURL orgDocUrl = m_doc_url;
- QString orgFileName = m_doc_url.fileName();
+ TQString orgFileName = m_doc_url.fileName();
// don't overwrite manually saved file with autosave content
- QString fileName = tempURL.fileName();
+ TQString fileName = tempURL.fileName();
Settings::OptionState optionState = Settings::getOptionState();
fileName.replace( ".xmi", optionState.generalState.autosavesuffix );
tempURL.setFileName( fileName );
@@ -2144,9 +2144,9 @@ void UMLDoc::signalDiagramRenamed(UMLView* pView ) {
void UMLDoc::addToUndoStack() {
Settings::OptionState optionState = Settings::getOptionState();
if (!m_bLoading && optionState.generalState.undo) {
- QBuffer* buffer = new QBuffer();
+ TQBuffer* buffer = new TQBuffer();
buffer->open(IO_WriteOnly);
- QDataStream* undoData = new QDataStream();
+ TQDataStream* undoData = new TQDataStream();
undoData->setDevice(buffer);
saveToXMI(*buffer);
buffer->close();
@@ -2193,8 +2193,8 @@ void UMLDoc::loadUndoData() {
m_bLoading = true;
closeDocument();
redoStack.prepend( undoStack.take(0) );
- QDataStream* undoData = undoStack.getFirst();
- QBuffer* buffer = static_cast<QBuffer*>( undoData->device() );
+ TQDataStream* undoData = undoStack.getFirst();
+ TQBuffer* buffer = static_cast<TQBuffer*>( undoData->device() );
buffer->open(IO_ReadOnly);
loadFromXMI(*buffer);
buffer->close();
@@ -2231,9 +2231,9 @@ void UMLDoc::loadRedoData() {
m_bLoading = true;
closeDocument();
undoStack.prepend( redoStack.getFirst() );
- QDataStream* redoData = redoStack.getFirst();
+ TQDataStream* redoData = redoStack.getFirst();
redoStack.removeFirst();
- QBuffer* buffer = static_cast<QBuffer*>( redoData->device() );
+ TQBuffer* buffer = static_cast<TQBuffer*>( redoData->device() );
buffer->open(IO_ReadOnly);
loadFromXMI(*buffer);
buffer->close();
@@ -2266,13 +2266,13 @@ void UMLDoc::addDefaultDatatypes() {
<< endl;
return;
}
- QStringList entries = cg->defaultDatatypes();
- QStringList::Iterator end(entries.end());
- for (QStringList::Iterator it = entries.begin(); it != end; ++it)
+ TQStringList entries = cg->defaultDatatypes();
+ TQStringList::Iterator end(entries.end());
+ for (TQStringList::Iterator it = entries.begin(); it != end; ++it)
createDatatype(*it);
}
-void UMLDoc::createDatatype(const QString &name) {
+void UMLDoc::createDatatype(const TQString &name) {
UMLObjectList datatypes = m_datatypeRoot->containedObjects();
UMLObject* umlobject = Model_Utils::findUMLObject(datatypes, name,
ot_Datatype, m_datatypeRoot);
@@ -2282,7 +2282,7 @@ void UMLDoc::createDatatype(const QString &name) {
UMLApp::app()->getListView()->closeDatatypesFolder();
}
-void UMLDoc::slotDiagramPopupMenu(QWidget* umlview, const QPoint& point) {
+void UMLDoc::slotDiagramPopupMenu(TQWidget* umlview, const TQPoint& point) {
UMLView* view = (UMLView*) umlview;
if(m_pTabPopupMenu != 0) {
m_pTabPopupMenu->hide();
@@ -2338,7 +2338,7 @@ void UMLDoc::slotDiagramPopupMenu(QWidget* umlview, const QPoint& point) {
m_pTabPopupMenu = new ListPopupMenu(UMLApp::app()->getMainViewWidget(), type);
m_pTabPopupMenu->popup(point);
- connect(m_pTabPopupMenu, SIGNAL(activated(int)), view, SLOT(slotMenuSelection(int)));
+ connect(m_pTabPopupMenu, TQT_SIGNAL(activated(int)), view, TQT_SLOT(slotMenuSelection(int)));
}
void UMLDoc::addDefaultStereotypes() {
diff --git a/umbrello/umbrello/umldoc.h b/umbrello/umbrello/umldoc.h
index 2e936a3f..15dad895 100644
--- a/umbrello/umbrello/umldoc.h
+++ b/umbrello/umbrello/umldoc.h
@@ -20,10 +20,10 @@
#include <typeinfo>
// qt includes
-#include <qdatastream.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrstack.h>
+#include <tqdatastream.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrstack.h>
// kde includes
#include <kurl.h>
@@ -74,7 +74,7 @@ class UMLFolder;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLDoc : public QObject {
+class UMLDoc : public TQObject {
Q_OBJECT
public:
/**
@@ -200,7 +200,7 @@ public:
* @param name The name to check.
* @return True if name is unique.
*/
- bool isUnique(const QString &name);
+ bool isUnique(const TQString &name);
/**
* Returns true if the given name is unique within its scope of given package.
@@ -209,12 +209,12 @@ public:
* @package The UMLPackage in which we have to determine the unique-ness
* @return True if name is unique.
*/
- bool isUnique(const QString &name, UMLPackage *package);
+ bool isUnique(const TQString &name, UMLPackage *package);
/**
* Finds or creates a stereotype for the parent object.
*/
- UMLStereotype* findOrCreateStereotype(const QString &name);
+ UMLStereotype* findOrCreateStereotype(const TQString &name);
/**
* Creates an association between two UMLObjects.
@@ -338,7 +338,7 @@ public:
* object are searched before the global scope.
* @return Pointer to the UMLObject found, or NULL if not found.
*/
- UMLObject* findUMLObject(const QString &name,
+ UMLObject* findUMLObject(const TQString &name,
Uml::Object_Type type = Uml::ot_UMLObject,
UMLObject *currentObj = NULL);
@@ -351,14 +351,14 @@ public:
* @param idStr The AuxId for the @ref UMLObject to find.
* @return Pointer to the UMLObject found, or NULL if not found.
*/
- UMLObject* findObjectByAuxId(const QString &idStr);
+ UMLObject* findObjectByAuxId(const TQString &idStr);
/**
* Used to find a @ref UMLClassifier by its name.
*
* @param name The name of the @ref UMLObject to find.
*/
- UMLClassifier * findUMLClassifier (const QString &name);
+ UMLClassifier * findUMLClassifier (const TQString &name);
/**
* Finds a UMLStereotype by its name.
@@ -366,7 +366,7 @@ public:
* @param name The name of the UMLStereotype to find.
* @return Pointer to the UMLStereotype found, or NULL if not found.
*/
- UMLStereotype * findStereotype(const QString &name);
+ UMLStereotype * findStereotype(const TQString &name);
/**
* Finds a view (diagram) by the ID given to method.
@@ -384,18 +384,18 @@ public:
* @param searchAllScopes Search in all subfolders (default: false.)
* @return Pointer to the view found, or NULL if not found.
*/
- UMLView * findView(Uml::Diagram_Type type, const QString &name,
+ UMLView * findView(Uml::Diagram_Type type, const TQString &name,
bool searchAllScopes = false);
/**
* Set the name of this model.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* Return the name of this model.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Return the m_modelID (currently this a fixed value:
@@ -410,7 +410,7 @@ public:
*
* @param file The file to be saved to.
*/
- virtual void saveToXMI(QIODevice& file);
+ virtual void saveToXMI(TQIODevice& file);
/**
* Checks the given XMI file if it was saved with correct Unicode
@@ -418,7 +418,7 @@ public:
*
* @param file The file to be checked.
*/
- short getEncoding(QIODevice & file);
+ short getEncoding(TQIODevice & file);
/**
* Load a given XMI model from a file. If the encoding of the file
@@ -428,7 +428,7 @@ public:
* @param file The file to be loaded.
* @param encode The encoding used.
*/
- virtual bool loadFromXMI(QIODevice& file, short encode = ENC_UNKNOWN);
+ virtual bool loadFromXMI(TQIODevice& file, short encode = ENC_UNKNOWN);
/**
* Ensures the XMI file is a valid UML file.
@@ -436,28 +436,28 @@ public:
*
* @param headerNode The <XMI.header> node
*/
- bool validateXMIHeader(QDomNode& headerNode);
+ bool validateXMIHeader(TQDomNode& headerNode);
/**
* Loads all UML objects from XMI into the current UMLDoc.
*
* @return True if operation successful.
*/
- bool loadUMLObjectsFromXMI( QDomElement & element );
+ bool loadUMLObjectsFromXMI( TQDomElement & element );
/**
* Loads umbrello specific extensions from XMI to the UMLDoc.
* The extension tags are: "docsettings", "diagrams", "listview",
* and "codegeneration".
*/
- void loadExtensionsFromXMI(QDomNode & node);
+ void loadExtensionsFromXMI(TQDomNode & node);
/**
* Loads all diagrams from XMI into the current UMLDoc.
*
* @return True if operation successful.
*/
- bool loadDiagramsFromXMI( QDomNode & node );
+ bool loadDiagramsFromXMI( TQDomNode & node );
/**
* Signal a view/diagram has been renamed.
@@ -640,7 +640,7 @@ public:
*
* @return The documentation text of this UMLDoc.
*/
- QString getDocumentation() const {
+ TQString getDocumentation() const {
return m_Doc;
}
@@ -649,7 +649,7 @@ public:
*
* @param doc The documentation to set for this UMLDoc.
*/
- void setDocumentation(const QString &doc) {
+ void setDocumentation(const TQString &doc) {
m_Doc = doc;
}
@@ -705,7 +705,7 @@ public:
* if the default name is taken e.g. class diagram, class
* diagram_1 etc
*/
- QString uniqViewName(const Uml::Diagram_Type type);
+ TQString uniqViewName(const Uml::Diagram_Type type);
/**
* Returns true when loading a document file.
@@ -726,7 +726,7 @@ public:
* Add a datatype if it doesn't already exist.
* Used by code generators and attribute dialog.
*/
- void createDatatype(const QString &name);
+ void createDatatype(const TQString &name);
/**
* Find a UMLStereotype by its unique ID.
@@ -759,7 +759,7 @@ public:
/**
* Write text to the status bar.
*/
- void writeToStatusBar(const QString &text);
+ void writeToStatusBar(const TQString &text);
/**
* Type resolution pass.
@@ -791,7 +791,7 @@ private:
*/
UMLStereotypeList m_stereoList;
- QString m_Name; ///< name of this model as stored in the <UML:Model> tag
+ TQString m_Name; ///< name of this model as stored in the <UML:Model> tag
Uml::IDType m_modelID; ///< xmi.id of this model in the <UML:Model>
int m_count; ///< auxiliary counter for the progress bar
bool m_modified;
@@ -810,12 +810,12 @@ private:
/**
* Documentation for the project.
*/
- QString m_Doc;
+ TQString m_Doc;
/**
* Used for autosave
*/
- QTimer * m_pAutoSaveTimer;
+ TQTimer * m_pAutoSaveTimer;
/**
* Stores the version of old UML files.
@@ -824,17 +824,17 @@ private:
/**
* The stack of images of the document added to each time
- * something is changed. A QPtrList is used rather than a
- * QPtrStack to be able to remove the ones off the bottom once
+ * something is changed. A TQPtrList is used rather than a
+ * TQPtrStack to be able to remove the ones off the bottom once
* the stack gets too big.
*/
- QPtrList<QDataStream> undoStack;
+ TQPtrList<TQDataStream> undoStack;
/**
* The stack of images of the document added to each time
* undo is called.
*/
- QPtrList<QDataStream> redoStack;
+ TQPtrList<TQDataStream> redoStack;
/**
* Auxiliary to <docsettings> processing
@@ -872,7 +872,7 @@ public slots:
* Make a popup menu for the tabs
* signalled from tabWidget's contextMenu()
*/
- void slotDiagramPopupMenu(QWidget* umlview, const QPoint& point);
+ void slotDiagramPopupMenu(TQWidget* umlview, const TQPoint& point);
signals:
void sigDiagramCreated(Uml::IDType id);
@@ -906,7 +906,7 @@ signals:
/**
* Write text to the status bar.
*/
- void sigWriteToStatusBar(const QString &text);
+ void sigWriteToStatusBar(const TQString &text);
/**
* The diagram being displayed has changed.
diff --git a/umbrello/umbrello/umlentityattributelist.h b/umbrello/umbrello/umlentityattributelist.h
index 35c0a150..774922ca 100644
--- a/umbrello/umbrello/umlentityattributelist.h
+++ b/umbrello/umbrello/umlentityattributelist.h
@@ -12,19 +12,19 @@
#ifndef UMLENTITYATTRIBUTELIST_H
#define UMLENTITYATTRIBUTELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLEntityAttribute;
-//typedef QPtrList<UMLEntityAttribute> UMLEntityAttributeList;
-typedef QPtrListIterator<UMLEntityAttribute> UMLEntityAttributeListIt;
+//typedef TQPtrList<UMLEntityAttribute> UMLEntityAttributeList;
+typedef TQPtrListIterator<UMLEntityAttribute> UMLEntityAttributeListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLEntityAttribute>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLEntityAttribute>
* base class.
*/
-class UMLEntityAttributeList : public QPtrList<UMLEntityAttribute>
+class UMLEntityAttributeList : public TQPtrList<UMLEntityAttribute>
{
public:
diff --git a/umbrello/umbrello/umlenumliterallist.h b/umbrello/umbrello/umlenumliterallist.h
index 60e03199..3850b262 100644
--- a/umbrello/umbrello/umlenumliterallist.h
+++ b/umbrello/umbrello/umlenumliterallist.h
@@ -12,12 +12,12 @@
#ifndef UMLENUMLITERALLIST_H
#define UMLENUMLITERALLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLEnumLiteral;
-typedef QPtrList<UMLEnumLiteral> UMLEnumLiteralList;
-typedef QPtrListIterator<UMLEnumLiteral> UMLEnumLiteralListIt;
+typedef TQPtrList<UMLEnumLiteral> UMLEnumLiteralList;
+typedef TQPtrListIterator<UMLEnumLiteral> UMLEnumLiteralListIt;
#endif
diff --git a/umbrello/umbrello/umllistview.cpp b/umbrello/umbrello/umllistview.cpp
index d12fed58..29e270ce 100644
--- a/umbrello/umbrello/umllistview.cpp
+++ b/umbrello/umbrello/umllistview.cpp
@@ -13,12 +13,12 @@
#include "umllistview.h"
// qt/kde includes
-#include <qregexp.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qevent.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqregexp.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqevent.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -66,17 +66,17 @@
class LVToolTip : public QToolTip
{
public:
- LVToolTip (QWidget* parent) : QToolTip (parent) {}
+ LVToolTip (TQWidget* parent) : TQToolTip (parent) {}
virtual ~LVToolTip () {}
protected:
/**
- * Reimplemented from QToolTip for internal reasons.
+ * Reimplemented from TQToolTip for internal reasons.
* At classifiers, only the method names are shown in the list view -
* we use a tooltip for the full signature display.
* Once KListView's tooltip overriding mechanism works, we can kick
* this class out.
*/
- virtual void maybeTip (const QPoint& pos) {
+ virtual void maybeTip (const TQPoint& pos) {
UMLListView *lv = UMLApp::app()->getListView();
UMLListViewItem * item = (UMLListViewItem*)lv->itemAt(pos);
if (item == NULL)
@@ -85,15 +85,15 @@ protected:
if (obj == NULL || obj->getBaseType() != Uml::ot_Operation)
return;
UMLOperation *op = static_cast<UMLOperation*>(obj);
- QString text = op->toString(Uml::st_ShowSig);
- QRect rect = lv->itemRect(item);
+ TQString text = op->toString(Uml::st_ShowSig);
+ TQRect rect = lv->itemRect(item);
tip(rect, text);
}
};
#endif
-UMLListView::UMLListView(QWidget *parent, const char *name)
+UMLListView::UMLListView(TQWidget *parent, const char *name)
: KListView(parent,name), m_pMenu(0), m_doc(UMLApp::app()->getDocument())
{
loadPixmaps();
@@ -105,7 +105,7 @@ UMLListView::UMLListView(QWidget *parent, const char *name)
setItemsMovable(true);
setItemsRenameable( true );
setSelectionModeExt(FileManager);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
setDragEnabled(true);
setColumnWidthMode( 0, Manual );
setDefaultRenameAction( Accept );
@@ -131,41 +131,41 @@ UMLListView::UMLListView(QWidget *parent, const char *name)
m_lv[i] = NULL;
m_datatypeFolder = NULL;
//setup slots/signals
- connect(this, SIGNAL(dropped(QDropEvent *, QListViewItem *, QListViewItem *)),
- this, SLOT(slotDropped(QDropEvent *, QListViewItem *, QListViewItem *)));
- connect( this, SIGNAL( collapsed( QListViewItem * ) ),
- this, SLOT( slotCollapsed( QListViewItem * ) ) );
- connect( this, SIGNAL( expanded( QListViewItem * ) ), this, SLOT( slotExpanded( QListViewItem * ) ) );
- connect( UMLApp::app(), SIGNAL( sigCutSuccessful() ), this, SLOT( slotCutSuccessful() ) );
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *, TQListViewItem *)),
+ this, TQT_SLOT(slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *)));
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotCollapsed( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ), this, TQT_SLOT( slotExpanded( TQListViewItem * ) ) );
+ connect( UMLApp::app(), TQT_SIGNAL( sigCutSuccessful() ), this, TQT_SLOT( slotCutSuccessful() ) );
}
UMLListView::~UMLListView() {}
-bool UMLListView::eventFilter(QObject *o, QEvent *e) {
- if (e->type() != QEvent::MouseButtonPress || !o->isA("QHeader"))
- return QListView::eventFilter(o, e);
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
+bool UMLListView::eventFilter(TQObject *o, TQEvent *e) {
+ if (e->type() != TQEvent::MouseButtonPress || !o->isA("TQHeader"))
+ return TQListView::eventFilter(o, e);
+ TQMouseEvent *me = static_cast<TQMouseEvent*>(e);
if (me->button() == Qt::RightButton) {
if (m_pMenu) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
delete m_pMenu;
}
m_pMenu = new ListPopupMenu(this, Uml::lvt_Model);
m_pMenu->popup(me->globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
return true;
}
- return QListView::eventFilter(o, e);
+ return TQListView::eventFilter(o, e);
}
-void UMLListView::contentsMousePressEvent(QMouseEvent *me) {
+void UMLListView::contentsMousePressEvent(TQMouseEvent *me) {
UMLView *currentView = UMLApp::app()->getCurrentView();
if (currentView)
currentView->clearSelected();
if( me -> state() != Qt::ShiftButton )
clearSelection();
- QPoint pt = this->QScrollView::contentsToViewport( me->pos() );
+ TQPoint pt = this->TQScrollView::contentsToViewport( me->pos() );
UMLListViewItem * item = (UMLListViewItem*)itemAt(pt);
const Qt::ButtonState button = me->button();
@@ -184,25 +184,25 @@ void UMLListView::contentsMousePressEvent(QMouseEvent *me) {
if (button == Qt::RightButton) {
if(m_pMenu != 0) {
m_pMenu->hide();
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
delete m_pMenu;
m_pMenu = 0;
}
const Uml::ListView_Type type = item->getType();
m_pMenu = new ListPopupMenu(this, type);
m_pMenu->popup(me->globalPos());
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(popupMenuSel(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupMenuSel(int)));
}//end if right button
this->KListView::contentsMousePressEvent(me);
}
-void UMLListView::contentsMouseReleaseEvent(QMouseEvent *me) {
+void UMLListView::contentsMouseReleaseEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton) {
this->KListView::contentsMouseReleaseEvent(me);
return;
}
- const QPoint pt = this->QScrollView::contentsToViewport( me->pos() );
+ const TQPoint pt = this->TQScrollView::contentsToViewport( me->pos() );
UMLListViewItem *item = dynamic_cast<UMLListViewItem*>(itemAt(pt));
if (item == NULL || !Model_Utils::typeIsDiagram(item->getType())) {
this->KListView::contentsMouseReleaseEvent(me);
@@ -215,7 +215,7 @@ void UMLListView::contentsMouseReleaseEvent(QMouseEvent *me) {
this->KListView::contentsMouseReleaseEvent(me);
}
-void UMLListView::keyPressEvent(QKeyEvent *ke) {
+void UMLListView::keyPressEvent(TQKeyEvent *ke) {
UMLView *view = UMLApp::app()->getCurrentView();
if (view && view->getSelectCount()) {
// Widgets have been selected in the diagram area,
@@ -232,7 +232,7 @@ void UMLListView::keyPressEvent(QKeyEvent *ke) {
deleteItem(dynamic_cast<UMLListViewItem*>(item));
}
} else {
- QListView::keyPressEvent(ke); // let parent handle it
+ TQListView::keyPressEvent(ke); // let parent handle it
}
}
}
@@ -247,7 +247,7 @@ void UMLListView::popupMenuSel(int sel) {
Uml::ListView_Type lvt = temp -> getType();
Uml::Object_Type umlType = Uml::ot_UMLObject;
ListPopupMenu::Menu_Type menuType = (ListPopupMenu::Menu_Type)sel;
- QString name;
+ TQString name;
switch (menuType) {
case ListPopupMenu::mt_Class:
@@ -343,21 +343,21 @@ void UMLListView::popupMenuSel(int sel) {
return;
}
// configure & show the file dialog
- const QString rootDir(m_doc->URL().directory());
+ const TQString rootDir(m_doc->URL().directory());
KFileDialog fileDialog(rootDir, "*.xml", this, ":externalize-folder", true);
fileDialog.setCaption(i18n("Externalize Folder"));
fileDialog.setOperationMode(KFileDialog::Other);
// set a sensible default filename
- QString defaultFilename = current->getText().lower();
- defaultFilename.replace(QRegExp("\\W+"), "_");
+ TQString defaultFilename = current->getText().lower();
+ defaultFilename.replace(TQRegExp("\\W+"), "_");
defaultFilename.append(".xml"); // default extension
fileDialog.setSelection(defaultFilename);
fileDialog.exec();
KURL selURL = fileDialog.selectedURL();
if (selURL.isEmpty())
return;
- QString path = selURL.path();
- QString fileName = path;
+ TQString path = selURL.path();
+ TQString fileName = path;
if (fileName.startsWith(rootDir)) {
fileName.remove(rootDir);
} else {
@@ -368,7 +368,7 @@ void UMLListView::popupMenuSel(int sel) {
<< rootDir << endl;
return;
}
- QFile file(path);
+ TQFile file(path);
// Warn if file exists.
if (file.exists()) {
// This should be done using a KMessageBox but we currently
@@ -387,8 +387,8 @@ void UMLListView::popupMenuSel(int sel) {
}
modelFolder->setFolderFile(fileName);
// Recompute text of the folder
- QString folderText = current->getText();
- folderText.remove( QRegExp("\\s*\\(.*$") );
+ TQString folderText = current->getText();
+ folderText.remove( TQRegExp("\\s*\\(.*$") );
folderText.append( " (" + fileName + ')' );
current->setText(folderText);
break;
@@ -402,10 +402,10 @@ void UMLListView::popupMenuSel(int sel) {
kError() << "UMLListView::popupMenuSel: modelFolder is NULL" << endl;
return;
}
- modelFolder->setFolderFile(QString::null);
+ modelFolder->setFolderFile(TQString::null);
// Recompute text of the folder
- QString folderText = current->getText();
- folderText.remove( QRegExp("\\s*\\(.*$") );
+ TQString folderText = current->getText();
+ folderText.remove( TQRegExp("\\s*\\(.*$") );
current->setText(folderText);
break;
}
@@ -413,7 +413,7 @@ void UMLListView::popupMenuSel(int sel) {
case ListPopupMenu::mt_Model:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Model Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Model Name"),
i18n("Enter the new name of the model:"),
m_doc->getName(), &ok, UMLApp::app() );
if (ok) {
@@ -660,10 +660,10 @@ void UMLListView::slotObjectCreated(UMLObject* object) {
connectNewObjectsSlots(object);
const Uml::ListView_Type lvt = Model_Utils::convert_OT_LVT(object);
- QString name = object->getName();
+ TQString name = object->getName();
if (type == Uml::ot_Folder) {
UMLFolder *f = static_cast<UMLFolder*>(object);
- QString folderFile = f->getFolderFile();
+ TQString folderFile = f->getFolderFile();
if (!folderFile.isEmpty())
name.append(" (" + folderFile + ')');
}
@@ -692,40 +692,40 @@ void UMLListView::connectNewObjectsSlots(UMLObject* object) {
case Uml::ot_Interface:
{
UMLClassifier *c = static_cast<UMLClassifier*>(object);
- connect(c, SIGNAL(attributeAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(attributeRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(c, SIGNAL(operationAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(operationRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(c, SIGNAL(templateAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(c, SIGNAL(templateRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(c, TQT_SIGNAL(attributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(attributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(operationAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(operationRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(templateAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(c, TQT_SIGNAL(templateRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
}
break;
case Uml::ot_Enum:
{
UMLEnum *e = static_cast<UMLEnum*>(object);
- connect(e, SIGNAL(enumLiteralAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(e, SIGNAL(enumLiteralRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(e, TQT_SIGNAL(enumLiteralAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(e, TQT_SIGNAL(enumLiteralRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
}
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_Entity:
{
UMLEntity *ent = static_cast<UMLEntity*>(object);
- connect(ent, SIGNAL(entityAttributeAdded(UMLClassifierListItem*)),
- this, SLOT(childObjectAdded(UMLClassifierListItem*)));
- connect(ent, SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
- this, SLOT(childObjectRemoved(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeAdded(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectAdded(UMLClassifierListItem*)));
+ connect(ent, TQT_SIGNAL(entityAttributeRemoved(UMLClassifierListItem*)),
+ this, TQT_SLOT(childObjectRemoved(UMLClassifierListItem*)));
}
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_Datatype:
case Uml::ot_Attribute:
@@ -740,7 +740,7 @@ void UMLListView::connectNewObjectsSlots(UMLObject* object) {
case Uml::ot_Artifact:
case Uml::ot_Node:
case Uml::ot_Folder:
- connect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ connect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
break;
case Uml::ot_UMLObject:
case Uml::ot_Association:
@@ -771,7 +771,7 @@ void UMLListView::childObjectAdded(UMLClassifierListItem* obj) {
void UMLListView::childObjectAdded(UMLClassifierListItem* child, UMLClassifier* parent) {
if (m_bCreatingChildObject)
return;
- const QString text = child->toString(Uml::st_SigNoVis);
+ const TQString text = child->toString(Uml::st_SigNoVis);
UMLListViewItem *childItem = NULL;
UMLListViewItem *parentItem = findUMLObject(parent);
if (parentItem == NULL) {
@@ -826,18 +826,18 @@ void UMLListView::setDocument(UMLDoc *d) {
}
m_doc = d;
- connect(m_doc, SIGNAL(sigDiagramCreated(Uml::IDType)), this, SLOT(slotDiagramCreated(Uml::IDType)));
- connect(m_doc, SIGNAL(sigDiagramRemoved(Uml::IDType)), this, SLOT(slotDiagramRemoved(Uml::IDType)));
- connect(m_doc, SIGNAL(sigDiagramRenamed(Uml::IDType)), this, SLOT(slotDiagramRenamed(Uml::IDType)));
- connect(m_doc, SIGNAL(sigObjectCreated(UMLObject *)), this, SLOT(slotObjectCreated(UMLObject *)));
- connect(m_doc, SIGNAL(sigObjectRemoved(UMLObject *)), this, SLOT(slotObjectRemoved(UMLObject *)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramCreated(Uml::IDType)), this, TQT_SLOT(slotDiagramCreated(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramRemoved(Uml::IDType)), this, TQT_SLOT(slotDiagramRemoved(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigDiagramRenamed(Uml::IDType)), this, TQT_SLOT(slotDiagramRenamed(Uml::IDType)));
+ connect(m_doc, TQT_SIGNAL(sigObjectCreated(UMLObject *)), this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ connect(m_doc, TQT_SIGNAL(sigObjectRemoved(UMLObject *)), this, TQT_SLOT(slotObjectRemoved(UMLObject *)));
}
void UMLListView::slotObjectRemoved(UMLObject* object) {
if (m_doc->loading()) { //needed for class wizard
return;
}
- disconnect(object,SIGNAL(modified()),this,SLOT(slotObjectChanged()));
+ disconnect(object,TQT_SIGNAL(modified()),this,TQT_SLOT(slotObjectChanged()));
UMLListViewItem* item = findItem(object->getID());
delete item;
UMLApp::app()->getDocWindow()->updateDocumentation(true);
@@ -849,7 +849,7 @@ void UMLListView::slotDiagramRemoved(Uml::IDType id) {
UMLApp::app()->getDocWindow()->updateDocumentation(true);
}
-QDragObject* UMLListView::dragObject() {
+TQDragObject* UMLListView::dragObject() {
UMLListViewItemList selecteditems;
getSelectedItems(selecteditems);
selecteditems.setAutoDelete( false );
@@ -872,7 +872,7 @@ QDragObject* UMLListView::dragObject() {
}
void UMLListView::startDrag() {
- QDragObject *o = dragObject();
+ TQDragObject *o = dragObject();
if (o)
o->dragCopy();
}
@@ -987,7 +987,7 @@ UMLListViewItem* UMLListView::recursiveSearchForView(UMLListViewItem* listViewIt
UMLListViewItem* UMLListView::findItem(Uml::IDType id) {
UMLListViewItem *temp;
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
for( ; (temp = (UMLListViewItem*)it.current()); ++it ) {
UMLListViewItem * item = temp->findItem(id);
if (item)
@@ -1039,7 +1039,7 @@ void UMLListView::setView(UMLView * v) {
setSelected(temp, true);
}
-void UMLListView::contentsMouseDoubleClickEvent(QMouseEvent * me) {
+void UMLListView::contentsMouseDoubleClickEvent(TQMouseEvent * me) {
UMLListViewItem * item = static_cast<UMLListViewItem *>( currentItem() );
if( !item || me -> button() != Qt::LeftButton )
return;
@@ -1079,8 +1079,8 @@ void UMLListView::contentsMouseDoubleClickEvent(QMouseEvent * me) {
}
-bool UMLListView::acceptDrag(QDropEvent* event) const {
- QPoint mousePoint = ((UMLListView*)this)->contentsToViewport( event->pos() );
+bool UMLListView::acceptDrag(TQDropEvent* event) const {
+ TQPoint mousePoint = ((UMLListView*)this)->contentsToViewport( event->pos() );
UMLListViewItem* item = (UMLListViewItem*)itemAt(mousePoint);
if(!item) {
@@ -1088,7 +1088,7 @@ bool UMLListView::acceptDrag(QDropEvent* event) const {
<< endl;
return false;
}
- ((QListView*)this)->setCurrentItem( (QListViewItem*)item );
+ ((TQListView*)this)->setCurrentItem( (TQListViewItem*)item );
UMLDrag::LvTypeAndID_List list;
if (! UMLDrag::getClip3TypeAndID(event, list)) {
@@ -1429,7 +1429,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
// We can't use the existing 'att' directly
// because its parent is fixed to the old classifier
// and we have no way of changing that:
- // QObject does not permit changing the parent().
+ // TQObject does not permit changing the parent().
if (att == NULL) {
kError() << "moveObject internal error: srcObj "
<< srcObj->getName() << " is not a UMLAttribute" << endl;
@@ -1437,7 +1437,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
kError() << "moveObject: oldParentClassifier->takeItem(att "
<< att->getName() << ") returns NULL" << endl;
} else {
- const QString& nm = att->getName();
+ const TQString& nm = att->getName();
UMLAttribute *newAtt = newParentClassifier->createAttribute(nm,
att->getType(),
att->getVisibility(),
@@ -1456,7 +1456,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
// We can't use the existing 'op' directly
// because its parent is fixed to the old classifier
// and we have no way of changing that:
- // QObject does not permit changing the parent().
+ // TQObject does not permit changing the parent().
if (op && oldParentClassifier->takeItem(op) != -1) {
bool isExistingOp;
Model_Utils::NameAndType_List ntDummyList;
@@ -1502,7 +1502,7 @@ UMLListViewItem * UMLListView::moveObject(Uml::IDType srcId, Uml::ListView_Type
return newItem;
}
-void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QListViewItem* item) {
+void UMLListView::slotDropped(TQDropEvent* de, TQListViewItem* /* parent */, TQListViewItem* item) {
item = (UMLListViewItem *)currentItem();
if(!item) {
kDebug() << "UMLListView::slotDropped: item is NULL - doing nothing" << endl;
@@ -1524,7 +1524,7 @@ void UMLListView::slotDropped(QDropEvent* de, QListViewItem* /* parent */, QList
int UMLListView::getSelectedItems(UMLListViewItemList &ItemList) {
ItemList.setAutoDelete( false );
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
if ( it.current()->isSelected() ) {
@@ -1539,7 +1539,7 @@ int UMLListView::getSelectedItems(UMLListViewItemList &ItemList) {
int UMLListView::getSelectedItemsRoot(UMLListViewItemList &ItemList) {
ItemList.setAutoDelete( false );
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
@@ -1702,7 +1702,7 @@ UMLListViewItem* UMLListView::determineParentItem(Uml::ListView_Type lvt) const
}
int UMLListView::getSelectedCount() {
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
int count = 0;
// iterate through all items of the list view
for ( ; it.current(); ++it ) {
@@ -1714,15 +1714,15 @@ int UMLListView::getSelectedCount() {
return count;
}
-void UMLListView::focusOutEvent ( QFocusEvent * fe) {
- QFocusEvent::Reason reason = fe->reason();
- if (reason != QFocusEvent::Popup) {
+void UMLListView::focusOutEvent ( TQFocusEvent * fe) {
+ TQFocusEvent::Reason reason = fe->reason();
+ if (reason != TQFocusEvent::Popup) {
clearSelection();
triggerUpdate();
}
//repaint();
- QListView::focusOutEvent(fe);
+ TQListView::focusOutEvent(fe);
}
Uml::ListView_Type UMLListView::rootViewType(UMLListViewItem *item) {
@@ -1744,7 +1744,7 @@ Uml::ListView_Type UMLListView::rootViewType(UMLListViewItem *item) {
return Uml::lvt_Unknown;
}
-QPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
+TQPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
if (type < Uml::it_Home || type >= Uml::N_ICONTYPES) {
kWarning() << "getPixmap() called on unknown icon " << type << endl;
// you'll know you have a problem if this shows up in the list
@@ -1755,7 +1755,7 @@ QPixmap & UMLListView::getPixmap(Uml::Icon_Type type) {
void UMLListView::loadPixmaps() {
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
+ TQString dataDir = dirs -> findResourceDir("data", "umbrello/pics/object.png");
dataDir += "/umbrello/pics/";
#define makeBarIcon(iconType, barIcon) m_Pixmaps[iconType] = BarIcon(barIcon)
@@ -1823,13 +1823,13 @@ bool UMLListView::isExpandable(Uml::ListView_Type lvt) {
return false;
}
-void UMLListView::slotExpanded( QListViewItem * item ) {
+void UMLListView::slotExpanded( TQListViewItem * item ) {
UMLListViewItem * myItem= static_cast<UMLListViewItem*>(item);
if (isExpandable(myItem->getType()))
myItem->updateFolder();
}
-void UMLListView::slotCollapsed( QListViewItem * item ) {
+void UMLListView::slotCollapsed( TQListViewItem * item ) {
UMLListViewItem * myItem = static_cast<UMLListViewItem*>(item);
if (isExpandable(myItem->getType()))
myItem->updateFolder();
@@ -1853,7 +1853,7 @@ void UMLListView::addNewItem(UMLListViewItem *parentItem, Uml::ListView_Type typ
Uml::Icon_Type icon = Model_Utils::convert_LVT_IT(type);
- QString name;
+ TQString name;
if (Model_Utils::typeIsDiagram(type)) {
Uml::Diagram_Type dt = Model_Utils::convert_LVT_DT(type);
name = getUniqueDiagramName(dt);
@@ -1884,12 +1884,12 @@ void UMLListView::addNewItem(UMLListViewItem *parentItem, Uml::ListView_Type typ
newItem->setIcon( icon );
newItem->setOpen( true );
newItem->setCreating( true );
- newItem->startRename( 0 ); // calls QListView::ensureItemVisible()
+ newItem->startRename( 0 ); // calls TQListView::ensureItemVisible()
// When the user accepts the rename operation, UMLListViewItem::okRename()
- // is called (automatically by QListViewItem.)
+ // is called (automatically by TQListViewItem.)
}
-bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
+bool UMLListView::itemRenamed( TQListViewItem * item , int /*col*/ ) {
//if true the item was cancel before this message
if( m_bIgnoreCancelRename ) {
return true;
@@ -1897,11 +1897,11 @@ bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
m_bIgnoreCancelRename = true;
UMLListViewItem * renamedItem = static_cast< UMLListViewItem *>( item ) ;
Uml::ListView_Type type = renamedItem -> getType();
- QString newText = renamedItem -> text( 0 );
+ TQString newText = renamedItem -> text( 0 );
renamedItem -> setCreating( false );
// If the type is empty then delete it.
- if (newText.isEmpty() || newText.contains(QRegExp("^\\s+$"))) {
+ if (newText.isEmpty() || newText.contains(TQRegExp("^\\s+$"))) {
KMessageBox::error(
kapp -> mainWidget(),
i18n( "The name you entered was invalid.\nCreation process has been canceled." ),
@@ -2010,7 +2010,7 @@ bool UMLListView::itemRenamed( QListViewItem * item , int /*col*/ ) {
}
UMLObject *UMLListView::createUMLObject( UMLListViewItem * item, Uml::Object_Type type ) {
- QString name = item -> text( 0 );
+ TQString name = item -> text( 0 );
UMLObject * object = NULL;
switch( type ) {
case Uml::ot_UseCase:
@@ -2093,7 +2093,7 @@ UMLObject *UMLListView::createUMLObject( UMLListViewItem * item, Uml::Object_Typ
bool UMLListView::createChildUMLObject( UMLListViewItem * item, Uml::Object_Type type ) {
m_bCreatingChildObject = true;
- QString text = item->text( 0 );
+ TQString text = item->text( 0 );
UMLObject* parent = static_cast<UMLListViewItem *>( item->parent() )->getUMLObject();
if( !parent ) {
kError() << "UMLListView::createChildUMLObject: parent UMLObject is NULL" << endl;
@@ -2193,7 +2193,7 @@ bool UMLListView::createChildUMLObject( UMLListViewItem * item, Uml::Object_Type
}
void UMLListView::createDiagram( UMLListViewItem * item, Uml::Diagram_Type type ) {
- QString name = item -> text( 0 );
+ TQString name = item -> text( 0 );
UMLView * view = m_doc -> findView( type, name );
if( view ) {
delete item;
@@ -2219,11 +2219,11 @@ void UMLListView::createDiagram( UMLListViewItem * item, Uml::Diagram_Type type
m_doc -> changeCurrentView( view -> getID() );
}
-QString UMLListView::getUniqueDiagramName(Uml::Diagram_Type type) {
+TQString UMLListView::getUniqueDiagramName(Uml::Diagram_Type type) {
return m_doc->uniqViewName(type);
}
-bool UMLListView::isUnique( UMLListViewItem * item, const QString &name ) {
+bool UMLListView::isUnique( UMLListViewItem * item, const TQString &name ) {
UMLListViewItem * parentItem = static_cast<UMLListViewItem *>( item -> parent() );
Uml::ListView_Type type = item -> getType();
switch( type ) {
@@ -2314,32 +2314,32 @@ bool UMLListView::isUnique( UMLListViewItem * item, const QString &name ) {
return false;
}
-void UMLListView::cancelRename( QListViewItem * item ) {
+void UMLListView::cancelRename( TQListViewItem * item ) {
if( !m_bIgnoreCancelRename ) {
delete item;
m_bIgnoreCancelRename = true;
}
}
-void UMLListView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement listElement = qDoc.createElement( "listview" );
+void UMLListView::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement listElement = qDoc.createElement( "listview" );
m_rv->saveToXMI(qDoc, listElement);
qElement.appendChild( listElement );
}
-bool UMLListView::loadFromXMI( QDomElement & element ) {
+bool UMLListView::loadFromXMI( TQDomElement & element ) {
/*
deleteChildrenOf( m_ucv );
deleteChildrenOf( m_lv );
deleteChildrenOf( m_cmpv );
deleteChildrenOf( m_dplv );
*/
- QDomNode node = element.firstChild();
- QDomElement domElement = node.toElement();
+ TQDomNode node = element.firstChild();
+ TQDomElement domElement = node.toElement();
m_doc->writeToStatusBar( i18n("Loading listview...") );
while( !domElement.isNull() ) {
if( domElement.tagName() == "listitem" ) {
- QString type = domElement.attribute( "type", "-1" );
+ TQString type = domElement.attribute( "type", "-1" );
if( type == "-1" )
return false;
Uml::ListView_Type lvType = (Uml::ListView_Type)type.toInt();
@@ -2356,20 +2356,20 @@ bool UMLListView::loadFromXMI( QDomElement & element ) {
return true;
}
-bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element ) {
- QDomNode node = element.firstChild();
- QDomElement domElement = node.toElement();
- const QString pfx("UMLListView::loadChildrenFromXMI: ");
+bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, TQDomElement & element ) {
+ TQDomNode node = element.firstChild();
+ TQDomElement domElement = node.toElement();
+ const TQString pfx("UMLListView::loadChildrenFromXMI: ");
while( !domElement.isNull() ) {
node = domElement.nextSibling();
if( domElement.tagName() != "listitem" ) {
domElement = node.toElement();
continue;
}
- QString id = domElement.attribute( "id", "-1" );
- QString type = domElement.attribute( "type", "-1" );
- QString label = domElement.attribute( "label", "" );
- QString open = domElement.attribute( "open", "1" );
+ TQString id = domElement.attribute( "id", "-1" );
+ TQString type = domElement.attribute( "type", "-1" );
+ TQString label = domElement.attribute( "label", "" );
+ TQString open = domElement.attribute( "open", "1" );
if( type == "-1" )
return false;
Uml::ListView_Type lvType = (Uml::ListView_Type)type.toInt();
@@ -2580,14 +2580,14 @@ bool UMLListView::loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & e
}
/** Open all items in the list view*/
-void UMLListView::expandAll(QListViewItem *item) {
+void UMLListView::expandAll(TQListViewItem *item) {
if(!item) item = firstChild();
for (item = item->firstChild(); item; item = item->nextSibling()) {
item->setOpen(true);
}
}
/** Close all items in the list view*/
-void UMLListView::collapseAll(QListViewItem *item) {
+void UMLListView::collapseAll(TQListViewItem *item) {
if(!item) item = firstChild();
for( item = item->firstChild(); item; item = item->nextSibling())
item->setOpen(false);
@@ -2635,7 +2635,7 @@ UMLListViewItem *UMLListView::rootView(Uml::ListView_Type type) {
return theView;
}
-void UMLListView::deleteChildrenOf(QListViewItem* parent) {
+void UMLListView::deleteChildrenOf(TQListViewItem* parent) {
if ( !parent ) {
return;
}
diff --git a/umbrello/umbrello/umllistview.h b/umbrello/umbrello/umllistview.h
index 5656a537..17a0c632 100644
--- a/umbrello/umbrello/umllistview.h
+++ b/umbrello/umbrello/umllistview.h
@@ -12,8 +12,8 @@
#ifndef UMLLISTVIEW_H
#define UMLLISTVIEW_H
-#include <qdom.h>
-#include <qpixmap.h>
+#include <tqdom.h>
+#include <tqpixmap.h>
#include <klistview.h>
#include "umlnamespace.h"
#include "umllistviewitemlist.h"
@@ -51,7 +51,7 @@ public:
* @param parent The parent to this.
* @param name The internal name for this class.
*/
- UMLListView(QWidget *parent,const char *name);
+ UMLListView(TQWidget *parent,const char *name);
/**
* Standard deconstructor.
@@ -158,7 +158,7 @@ public:
/**
* Returns the correct pixmap for the given type.
*/
- QPixmap & getPixmap( Uml::Icon_Type type );
+ TQPixmap & getPixmap( Uml::Icon_Type type );
/**
* Returns the document pointer. Called by the UMLListViewItem class.
@@ -226,17 +226,17 @@ public:
/**
* Returns a unique name for a diagram.
*/
- QString getUniqueDiagramName( Uml::Diagram_Type type );
+ TQString getUniqueDiagramName( Uml::Diagram_Type type );
/**
* Returns if the given name is unique for the given items type.
*/
- bool isUnique( UMLListViewItem * item, const QString &name );
+ bool isUnique( UMLListViewItem * item, const TQString &name );
/**
* Cancel rename event has occurred for the given item.
*/
- void cancelRename( QListViewItem * item );
+ void cancelRename( TQListViewItem * item );
/**
* Set the variable m_bStartedCut
@@ -268,7 +268,7 @@ public:
/**
* Called for informing the list view that an item was renamed.
*/
- bool itemRenamed(QListViewItem* item , int col);
+ bool itemRenamed(TQListViewItem* item , int col);
void closeDatatypesFolder();
@@ -290,18 +290,18 @@ public:
*/
Uml::ListView_Type rootViewType(UMLListViewItem *item);
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement);
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement);
- bool loadFromXMI( QDomElement & element );
+ bool loadFromXMI( TQDomElement & element );
- bool loadChildrenFromXMI( UMLListViewItem * parent, QDomElement & element );
+ bool loadChildrenFromXMI( UMLListViewItem * parent, TQDomElement & element );
protected:
UMLListViewItem* m_rv; // root view (home)
UMLListViewItem* m_lv[Uml::N_MODELTYPES]; // predefined list view roots
UMLListViewItem* m_datatypeFolder;
ListPopupMenu * m_pMenu;
- QString oldText, message;
+ TQString oldText, message;
UMLDoc *m_doc;
bool m_bStartedCut, m_bStartedCopy, m_bIgnoreCancelRename;
@@ -310,17 +310,17 @@ protected:
*/
bool m_bCreatingChildObject;
- QPixmap m_Pixmaps[Uml::N_ICONTYPES];
+ TQPixmap m_Pixmaps[Uml::N_ICONTYPES];
- bool eventFilter(QObject *o, QEvent *e);
- void contentsMouseReleaseEvent(QMouseEvent * me);
- void contentsMousePressEvent(QMouseEvent *me);
- void contentsMouseDoubleClickEvent(QMouseEvent * me);
- void focusOutEvent ( QFocusEvent * fe);
- QDragObject* dragObject();
+ bool eventFilter(TQObject *o, TQEvent *e);
+ void contentsMouseReleaseEvent(TQMouseEvent * me);
+ void contentsMousePressEvent(TQMouseEvent *me);
+ void contentsMouseDoubleClickEvent(TQMouseEvent * me);
+ void focusOutEvent ( TQFocusEvent * fe);
+ TQDragObject* dragObject();
void startDrag();
- bool acceptDrag (QDropEvent* event) const;
- void keyPressEvent(QKeyEvent *);
+ bool acceptDrag (TQDropEvent* event) const;
+ void keyPressEvent(TQKeyEvent *);
/**
* This methods looks for a object in a folder an its subfolders recursive.
@@ -344,7 +344,7 @@ protected:
/**
* Deletes all child-items of @p parent.
*/
- void deleteChildrenOf( QListViewItem *parent );
+ void deleteChildrenOf( TQListViewItem *parent );
/**
* Delete a listview item.
@@ -432,27 +432,27 @@ public slots:
/**
* Something has been dragged and dropped onto the list view
*/
- void slotDropped(QDropEvent* de, QListViewItem* parent, QListViewItem* item);
+ void slotDropped(TQDropEvent* de, TQListViewItem* parent, TQListViewItem* item);
/**
* calls updateFolder() on the item to update the icon to open
*/
- void slotExpanded(QListViewItem* item);
+ void slotExpanded(TQListViewItem* item);
/**
* calls updateFolder() on the item to update the icon to closed
*/
- void slotCollapsed(QListViewItem* item);
+ void slotCollapsed(TQListViewItem* item);
/**
* Open all items in the list view
*/
- void expandAll(QListViewItem *item);
+ void expandAll(TQListViewItem *item);
/**
* Close all items in the list view
*/
- void collapseAll(QListViewItem *item);
+ void collapseAll(TQListViewItem *item);
/**
* Connects to the signal that @ref UMLApp emits when a
diff --git a/umbrello/umbrello/umllistviewitem.cpp b/umbrello/umbrello/umllistviewitem.cpp
index c24ac853..89bb581c 100644
--- a/umbrello/umbrello/umllistviewitem.cpp
+++ b/umbrello/umbrello/umllistviewitem.cpp
@@ -16,8 +16,8 @@
#include <cstdlib>
// qt/kde includes
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -39,9 +39,9 @@
UMLListView* UMLListViewItem::s_pListView = 0;
-UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
+UMLListViewItem::UMLListViewItem( UMLListView * parent, const TQString &name,
Uml::ListView_Type t, UMLObject* o)
- : QListViewItem(parent, name) {
+ : TQListViewItem(parent, name) {
init(parent);
m_Type = t;
m_pObject = o;
@@ -53,19 +53,19 @@ UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
}
UMLListViewItem::UMLListViewItem(UMLListView * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init(parent);
if (parent == NULL)
kDebug() << "UMLListViewItem constructor called with a NULL listview parent" << endl;
}
UMLListViewItem::UMLListViewItem(UMLListViewItem * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init();
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,UMLObject*o)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,UMLObject*o)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_pObject = o;
@@ -83,8 +83,8 @@ UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name,
setText( name );
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,Uml::IDType id)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,Uml::IDType id)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_nId = id;
@@ -176,13 +176,13 @@ void UMLListViewItem::setID(Uml::IDType id) {
}
bool UMLListViewItem::isOwnParent(Uml::IDType listViewItemID) {
- QListViewItem *lvi = (QListViewItem*)s_pListView->findItem(listViewItemID);
+ TQListViewItem *lvi = (TQListViewItem*)s_pListView->findItem(listViewItemID);
if (lvi == NULL) {
kError() << "UMLListViewItem::isOwnParent: ListView->findItem("
<< ID2STR(listViewItemID) << ") returns NULL" << endl;
return true;
}
- for (QListViewItem *self = (QListViewItem*)this; self; self = self->parent()) {
+ for (TQListViewItem *self = (TQListViewItem*)this; self; self = self->parent()) {
if (lvi == self)
return true;
}
@@ -195,7 +195,7 @@ void UMLListViewItem::updateObject() {
Uml::Visibility scope = m_pObject->getVisibility();
Uml::Object_Type ot = m_pObject->getBaseType();
- QString modelObjText = m_pObject->getName();
+ TQString modelObjText = m_pObject->getName();
if (Model_Utils::isClassifierListitem(ot)) {
UMLClassifierListItem *pNarrowed = static_cast<UMLClassifierListItem*>(m_pObject);
modelObjText = pNarrowed->toString(Uml::st_SigNoVis);
@@ -258,16 +258,16 @@ void UMLListViewItem::updateFolder() {
}
void UMLListViewItem::setOpen( bool open ) {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
updateFolder();
}
-void UMLListViewItem::setText(const QString &newText) {
+void UMLListViewItem::setText(const TQString &newText) {
m_Label = newText;
- QListViewItem::setText(0, newText);
+ TQListViewItem::setText(0, newText);
}
-QString UMLListViewItem::getText() const {
+TQString UMLListViewItem::getText() const {
return m_Label;
}
@@ -276,11 +276,11 @@ void UMLListViewItem::setIcon(Uml::Icon_Type iconType) {
}
void UMLListViewItem::okRename( int col ) {
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
UMLDoc* doc = s_pListView->getDocument();
if (m_bCreating) {
m_bCreating = false;
- QString savedLabel = m_Label;
+ TQString savedLabel = m_Label;
m_Label = text(col);
if ( s_pListView->itemRenamed( this, col ) ) {
s_pListView->ensureItemVisible(this);
@@ -290,7 +290,7 @@ void UMLListViewItem::okRename( int col ) {
}
return;
}
- QString newText = text( col );
+ TQString newText = text( col );
if ( newText == m_Label ) {
return;
}
@@ -371,7 +371,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -405,7 +405,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -433,7 +433,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -467,7 +467,7 @@ void UMLListViewItem::okRename( int col ) {
KMessageBox::error( kapp->mainWidget() ,
i18n("Renaming an item of listview type %1 is not yet implemented.").arg(m_Type),
i18n("Function Not Implemented") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
doc->setModified(true);
@@ -477,11 +477,11 @@ void UMLListViewItem::cancelRenameWithMsg() {
KMessageBox::error( kapp->mainWidget() ,
i18n("The name you entered was invalid.\nRenaming process has been canceled."),
i18n("Name Not Valid") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
}
void UMLListViewItem::cancelRename(int col) {
- QListViewItem::cancelRename(col);
+ TQListViewItem::cancelRename(col);
if (m_bCreating) {
s_pListView->cancelRename(this);
}
@@ -489,7 +489,7 @@ void UMLListViewItem::cancelRename(int col) {
// Sort the listview items by type and position within the corresponding list
// of UMLObjects. If the item does not have an UMLObject then place it last.
-int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) const
+int UMLListViewItem::compare(TQListViewItem *other, int col, bool ascending) const
{
UMLListViewItem *ulvi = static_cast<UMLListViewItem*>(other);
Uml::ListView_Type ourType = getType();
@@ -503,7 +503,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
const bool subItem = Model_Utils::typeIsClassifierList(ourType);
const int alphaOrder = key(col, ascending).compare(other->key(col, ascending));
int retval = 0;
- QString dbgPfx = "compare(type=" + QString::number((int)ourType)
+ TQString dbgPfx = "compare(type=" + TQString::number((int)ourType)
+ ", self=" + getText() + ", other=" + ulvi->getText()
+ "): return ";
UMLObject *otherObj = ulvi->getUMLObject();
@@ -577,7 +577,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
}
UMLListViewItem* UMLListViewItem::deepCopy(UMLListViewItem *newParent) {
- QString nm = getText();
+ TQString nm = getText();
Uml::ListView_Type t = getType();
UMLObject *o = getUMLObject();
UMLListViewItem* newItem;
@@ -627,10 +627,10 @@ UMLListViewItem * UMLListViewItem::findItem(Uml::IDType id) {
return NULL;
}
-void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement itemElement = qDoc.createElement( "listitem" );
+void UMLListViewItem::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement itemElement = qDoc.createElement( "listitem" );
Uml::IDType id = getID();
- QString idStr = ID2STR(id);
+ TQString idStr = ID2STR(id);
//kDebug() << "UMLListViewItem::saveToXMI: id = " << idStr
// << ", type = " << m_Type << endl;
if (id != Uml::id_None)
@@ -660,7 +660,7 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
}
}
itemElement.setAttribute("open", isOpen());
- QDomElement folderRoot;
+ TQDomElement folderRoot;
UMLListViewItem *childItem = static_cast<UMLListViewItem*>( firstChild() );
while (childItem) {
childItem->saveToXMI(qDoc, itemElement);
@@ -669,11 +669,11 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( itemElement );
}
-bool UMLListViewItem::loadFromXMI(QDomElement& qElement) {
- QString id = qElement.attribute( "id", "-1" );
- QString type = qElement.attribute( "type", "-1" );
- QString label = qElement.attribute( "label", "" );
- QString open = qElement.attribute( "open", "1" );
+bool UMLListViewItem::loadFromXMI(TQDomElement& qElement) {
+ TQString id = qElement.attribute( "id", "-1" );
+ TQString type = qElement.attribute( "type", "-1" );
+ TQString label = qElement.attribute( "label", "" );
+ TQString open = qElement.attribute( "open", "1" );
if (!label.isEmpty())
setText( label );
else if (id == "-1") {
diff --git a/umbrello/umbrello/umllistviewitem.h b/umbrello/umbrello/umllistviewitem.h
index 99cedf4e..1064befc 100644
--- a/umbrello/umbrello/umllistviewitem.h
+++ b/umbrello/umbrello/umllistviewitem.h
@@ -13,9 +13,9 @@
#ifndef UMLLISTVIEWITEM_H
#define UMLLISTVIEWITEM_H
-#include <qlistview.h>
-#include <qmap.h>
-#include <qdom.h>
+#include <tqlistview.h>
+#include <tqmap.h>
+#include <tqdom.h>
#include "umlnamespace.h"
// forward declarations
@@ -33,7 +33,7 @@ class UMLClassifierListItem;
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLListViewItem : public QListViewItem {
+class UMLListViewItem : public TQListViewItem {
public:
/**
* Sets up an instance.
@@ -43,7 +43,7 @@ public:
* @param t The type of this instance.
* @param o The object it represents.
*/
- UMLListViewItem(UMLListView * parent, const QString &name, Uml::ListView_Type t, UMLObject*o=0);
+ UMLListViewItem(UMLListView * parent, const TQString &name, Uml::ListView_Type t, UMLObject*o=0);
/**
* Sets up an instance for subsequent loadFromXMI().
@@ -67,7 +67,7 @@ public:
* @param t The type of this instance.
* @param o The object it represents.
*/
- UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t, UMLObject*o=0);
+ UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t, UMLObject*o=0);
/**
* Sets up an instance.
@@ -77,7 +77,7 @@ public:
* @param t The type of this instance.
* @param id The id of this instance.
*/
- UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t, Uml::IDType id);
+ UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t, Uml::IDType id);
/**
* Standard deconstructor.
@@ -150,12 +150,12 @@ public:
/**
* Changes the current text and updates the tooltip.
*/
- void setText( const QString &text );
+ void setText( const TQString &text );
/**
* Returns the current text.
*/
- QString getText() const;
+ TQString getText() const;
/**
* Sets if the item is in the middle of being created.
@@ -187,7 +187,7 @@ public:
/**
* Overrides the default sorting to sort by item type.
*/
- virtual int compare(QListViewItem *other, int col, bool ascending) const;
+ virtual int compare(TQListViewItem *other, int col, bool ascending) const;
/**
* Returns the number of children of the UMLListViewItem
@@ -232,12 +232,12 @@ public:
/**
* saves the listview item to a "listitem" tag
*/
- void saveToXMI( QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI( TQDomDocument& qDoc, TQDomElement& qElement);
/**
* Loads a "listitem" tag, this is only used by the clipboard currently
*/
- bool loadFromXMI(QDomElement& qElement);
+ bool loadFromXMI(TQDomElement& qElement);
protected:
/**
@@ -272,13 +272,13 @@ protected:
* firstChild()/nextSibling() because the latter incur enforceItemVisible()
* and thus expensive sorting.
*/
- typedef QMap<UMLClassifierListItem*, UMLListViewItem*> ChildObjectMap;
+ typedef TQMap<UMLClassifierListItem*, UMLListViewItem*> ChildObjectMap;
Uml::ListView_Type m_Type;
Uml::IDType m_nId;
int m_nChildren;
UMLObject * m_pObject;
- QString m_Label;
+ TQString m_Label;
ChildObjectMap m_comap;
};
diff --git a/umbrello/umbrello/umllistviewitemlist.h b/umbrello/umbrello/umllistviewitemlist.h
index 49663163..42194044 100644
--- a/umbrello/umbrello/umllistviewitemlist.h
+++ b/umbrello/umbrello/umllistviewitemlist.h
@@ -19,11 +19,11 @@
#ifndef UMLLISTVIEWITEMLIST_H
#define UMLLISTVIEWITEMLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLListViewItem;
-typedef QPtrList<UMLListViewItem> UMLListViewItemList;
-typedef QPtrListIterator<UMLListViewItem> UMLListViewItemListIt;
+typedef TQPtrList<UMLListViewItem> UMLListViewItemList;
+typedef TQPtrListIterator<UMLListViewItem> UMLListViewItemListIt;
#endif
diff --git a/umbrello/umbrello/umlnamespace.cpp b/umbrello/umbrello/umlnamespace.cpp
index f2d81eeb..45c40de6 100644
--- a/umbrello/umbrello/umlnamespace.cpp
+++ b/umbrello/umbrello/umlnamespace.cpp
@@ -10,20 +10,20 @@
***************************************************************************/
#include "umlnamespace.h"
-#include "qregexp.h"
+#include "tqregexp.h"
namespace Uml {
-bool tagEq (const QString& inTag, const QString& inPattern) {
- QString tag = inTag;
- QString pattern = inPattern;
- tag.remove( QRegExp("^\\w+:") ); // remove leading "UML:" or other
+bool tagEq (const TQString& inTag, const TQString& inPattern) {
+ TQString tag = inTag;
+ TQString pattern = inPattern;
+ tag.remove( TQRegExp("^\\w+:") ); // remove leading "UML:" or other
int patSections = pattern.contains( '.' ) + 1;
- QString tagEnd = tag.section( '.', -patSections );
+ TQString tagEnd = tag.section( '.', -patSections );
return (tagEnd.lower() == pattern.lower());
}
-QString Visibility::toString(Value value, bool mnemonic) {
+TQString Visibility::toString(Value value, bool mnemonic) {
switch (value) {
case Protected:
return (mnemonic ? "#" : "protected");
@@ -41,7 +41,7 @@ QString Visibility::toString(Value value, bool mnemonic) {
}
}
-Visibility Visibility::fromString(const QString& vis) {
+Visibility Visibility::fromString(const TQString& vis) {
if (vis == "public" || vis == "+")
return Visibility(Public);
else if (vis == "protected" || vis == "#")
@@ -64,7 +64,7 @@ Visibility::Visibility(): _v(Public) {
Visibility::Visibility(Value v): _v(v) {
}
-QString Visibility::toString(bool mnemonic) const {
+TQString Visibility::toString(bool mnemonic) const {
return toString(_v, mnemonic);
}
diff --git a/umbrello/umbrello/umlnamespace.h b/umbrello/umbrello/umlnamespace.h
index 0c0ea2fd..7f466a99 100644
--- a/umbrello/umbrello/umlnamespace.h
+++ b/umbrello/umbrello/umlnamespace.h
@@ -13,7 +13,7 @@
#define UMLNAMESPACE_H
#include <string>
-#include <qstring.h>
+#include <tqstring.h>
/**
@@ -67,16 +67,16 @@ class Visibility {
};
Visibility();
Visibility(Value v);
- static QString toString(Value value, bool mnemonic);
- static Visibility fromString(const QString& vis);
+ static TQString toString(Value value, bool mnemonic);
+ static Visibility fromString(const TQString& vis);
/**
- * Convert Visibility value into QString representation.
+ * Convert Visibility value into TQString representation.
*
* @param mnemonic If true then return a single character:
* "+" for public, "-" for private,
* "#" for protected or "~" for implementation
*/
- QString toString(bool mnemonic = false) const;
+ TQString toString(bool mnemonic = false) const;
operator Value () const;
private:
Value _v;
@@ -336,7 +336,7 @@ const IDType id_None = "-1";
const IDType id_Reserved = "0";
# define STR2ID(id) id.ascii()
-# define ID2STR(id) QString(id.c_str())
+# define ID2STR(id) TQString(id.c_str())
// KDE4 compatibility
# define kDebug kdDebug
@@ -346,7 +346,7 @@ const IDType id_Reserved = "0";
/**
* Function for comparing tags in XMI files.
*/
-bool tagEq (const QString& tag, const QString& pattern);
+bool tagEq (const TQString& tag, const TQString& pattern);
} // end namespace Uml
diff --git a/umbrello/umbrello/umlobject.cpp b/umbrello/umbrello/umlobject.cpp
index e28ed7da..85de579f 100644
--- a/umbrello/umbrello/umlobject.cpp
+++ b/umbrello/umbrello/umlobject.cpp
@@ -12,7 +12,7 @@
// own header
#include "umlobject.h"
// qt/kde includes
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kapplication.h>
// app includes
@@ -30,8 +30,8 @@
#include "docwindow.h"
#include "dialogs/classpropdlg.h"
-UMLObject::UMLObject(const UMLObject * parent, const QString &name, Uml::IDType id)
- : QObject(const_cast<UMLObject*>(parent), "UMLObject" ) {
+UMLObject::UMLObject(const UMLObject * parent, const TQString &name, Uml::IDType id)
+ : TQObject(const_cast<UMLObject*>(parent), "UMLObject" ) {
init();
if (id == Uml::id_None)
m_nId = UniqueID::gen();
@@ -40,8 +40,8 @@ UMLObject::UMLObject(const UMLObject * parent, const QString &name, Uml::IDType
m_Name = name;
}
-UMLObject::UMLObject(const QString &name, Uml::IDType id)
- : QObject(UMLApp::app()->getDocument()) {
+UMLObject::UMLObject(const TQString &name, Uml::IDType id)
+ : TQObject(UMLApp::app()->getDocument()) {
init();
if (id == Uml::id_None)
m_nId = UniqueID::gen();
@@ -51,7 +51,7 @@ UMLObject::UMLObject(const QString &name, Uml::IDType id)
}
UMLObject::UMLObject(const UMLObject * parent)
- : QObject(const_cast<UMLObject*>(parent)) {
+ : TQObject(const_cast<UMLObject*>(parent)) {
init();
}
@@ -76,7 +76,7 @@ void UMLObject::init() {
bool UMLObject::showProperties(int page, bool assoc) {
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation(false);
- ClassPropDlg* dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this, page, assoc);
+ ClassPropDlg* dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this, page, assoc);
bool modified = false;
if (dlg->exec()) {
docwindow->showDocumentation(this, true);
@@ -97,18 +97,18 @@ void UMLObject::setID(Uml::IDType NewID) {
emitModified();
}
-void UMLObject::setName(const QString &strName) {
+void UMLObject::setName(const TQString &strName) {
m_Name = strName;
emitModified();
}
-QString UMLObject::getName() const {
+TQString UMLObject::getName() const {
return m_Name;
}
-QString UMLObject::getFullyQualifiedName(const QString& separator,
+TQString UMLObject::getFullyQualifiedName(const TQString& separator,
bool includeRoot /* = false */) const {
- QString fqn;
+ TQString fqn;
if (m_pUMLPackage) {
bool skipPackage = false;
if (!includeRoot) {
@@ -118,7 +118,7 @@ QString UMLObject::getFullyQualifiedName(const QString& separator,
skipPackage = true;
}
if (!skipPackage) {
- QString tempSeparator = separator;
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
fqn = m_pUMLPackage->getFullyQualifiedName(tempSeparator, includeRoot);
@@ -200,7 +200,7 @@ void UMLObject::copyInto(UMLObject *rhs) const
// Create a new ID.
rhs->m_nId = UniqueID::gen();
- // Hope that the parent from QObject is okay.
+ // Hope that the parent from TQObject is okay.
if (rhs->parent() != parent())
kDebug() << "copyInto has a wrong parent" << endl;
}
@@ -238,7 +238,7 @@ void UMLObject::emitModified()
emit modified();
}
-void UMLObject::setDoc(const QString &d) {
+void UMLObject::setDoc(const TQString &d) {
m_Doc = d;
//emit modified(); No, this is done centrally at DocWindow::updateDocumentation()
}
@@ -255,7 +255,7 @@ Uml::IDType UMLObject::getID() const {
return m_nId;
}
-QString UMLObject::getDoc() const {
+TQString UMLObject::getDoc() const {
return m_Doc;
}
@@ -287,7 +287,7 @@ void UMLObject::setUMLStereotype(UMLStereotype *stereo) {
emitModified();
}
-void UMLObject::setStereotype(const QString &_name) {
+void UMLObject::setStereotype(const TQString &_name) {
if (_name.isEmpty()) {
setUMLStereotype(NULL);
return;
@@ -297,7 +297,7 @@ void UMLObject::setStereotype(const QString &_name) {
setUMLStereotype(s);
}
-void UMLObject::setPackage(const QString &_name) {
+void UMLObject::setPackage(const TQString &_name) {
UMLObject *pkgObj = NULL;
if (!_name.isEmpty()) {
UMLDoc* umldoc = UMLApp::app()->getDocument();
@@ -329,23 +329,23 @@ const UMLStereotype * UMLObject::getUMLStereotype() {
return m_pStereotype;
}
-QString UMLObject::getStereotype(bool includeAdornments /* = false */) const {
+TQString UMLObject::getStereotype(bool includeAdornments /* = false */) const {
if (m_pStereotype == NULL)
return "";
- QString name = m_pStereotype->getName();
+ TQString name = m_pStereotype->getName();
if (includeAdornments)
- name = QString::fromUtf8("«") + name + QString::fromUtf8("»");
+ name = TQString::fromUtf8("«") + name + TQString::fromUtf8("»");
return name;
}
-QString UMLObject::getPackage(const QString& separator, bool includeRoot) {
- QString tempSeparator = separator;
+TQString UMLObject::getPackage(const TQString& separator, bool includeRoot) {
+ TQString tempSeparator = separator;
if (tempSeparator.isEmpty())
tempSeparator = UMLApp::app()->activeLanguageScopeSeparator();
- QString fqn = getFullyQualifiedName(tempSeparator, includeRoot);
+ TQString fqn = getFullyQualifiedName(tempSeparator, includeRoot);
if (!fqn.contains(tempSeparator))
return "";
- QString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length());
+ TQString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length());
return scope;
}
@@ -365,19 +365,19 @@ UMLPackage* UMLObject::getUMLPackage() {
return m_pUMLPackage;
}
-QString UMLObject::getSecondaryId() const {
+TQString UMLObject::getSecondaryId() const {
return m_SecondaryId;
}
-void UMLObject::setSecondaryId(const QString& id) {
+void UMLObject::setSecondaryId(const TQString& id) {
m_SecondaryId = id;
}
-QString UMLObject::getSecondaryFallback() const {
+TQString UMLObject::getSecondaryFallback() const {
return m_SecondaryFallback;
}
-void UMLObject::setSecondaryFallback(const QString& id) {
+void UMLObject::setSecondaryFallback(const TQString& id) {
m_SecondaryFallback = id;
}
@@ -490,12 +490,12 @@ bool UMLObject::resolveRef() {
return true;
}
-QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
+TQDomElement UMLObject::save( const TQString &tag, TQDomDocument & qDoc ) {
/*
Call as the first action of saveToXMI() in child class:
- This creates the QDomElement with which to work.
+ This creates the TQDomElement with which to work.
*/
- QDomElement qElement = qDoc.createElement(tag);
+ TQDomElement qElement = qDoc.createElement(tag);
qElement.setAttribute( "isSpecification", "false" );
if (m_BaseType != Uml::ot_Association &&
m_BaseType != Uml::ot_Role &&
@@ -525,7 +525,7 @@ QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
if (m_pUMLPackage) //FIXME: uml13.dtd compliance
qElement.setAttribute( "package", m_pUMLPackage->getID() );
#endif
- QString visibility = m_Vis.toString(false);
+ TQString visibility = m_Vis.toString(false);
qElement.setAttribute( "visibility", visibility);
if (m_pStereotype != NULL)
qElement.setAttribute( "stereotype", ID2STR(m_pStereotype->getID()) );
@@ -537,25 +537,25 @@ QDomElement UMLObject::save( const QString &tag, QDomDocument & qDoc ) {
return qElement;
}
-bool UMLObject::load( QDomElement& ) {
+bool UMLObject::load( TQDomElement& ) {
// This body is not usually executed because child classes
// overwrite the load method.
return true;
}
-bool UMLObject::loadStereotype(QDomElement & element) {
- QString tag = element.tagName();
+bool UMLObject::loadStereotype(TQDomElement & element) {
+ TQString tag = element.tagName();
if (!Uml::tagEq(tag, "stereotype"))
return false;
- QString stereo = element.attribute("xmi.value", "");
+ TQString stereo = element.attribute("xmi.value", "");
if (stereo.isEmpty() && element.hasChildNodes()) {
/* like so:
<UML:ModelElement.stereotype>
<UML:Stereotype xmi.idref = '07CD'/>
</UML:ModelElement.stereotype>
*/
- QDomNode stereoNode = element.firstChild();
- QDomElement stereoElem = stereoNode.toElement();
+ TQDomNode stereoNode = element.firstChild();
+ TQDomElement stereoElem = stereoNode.toElement();
tag = stereoElem.tagName();
if (Uml::tagEq(tag, "Stereotype")) {
stereo = stereoElem.attribute("xmi.idref", "");
@@ -573,7 +573,7 @@ bool UMLObject::loadStereotype(QDomElement & element) {
return true;
}
-bool UMLObject::loadFromXMI( QDomElement & element) {
+bool UMLObject::loadFromXMI( TQDomElement & element) {
UMLDoc* umldoc = UMLApp::app()->getDocument();
if (umldoc == NULL) {
kError() << "UMLObject::loadFromXMI: umldoc is NULL" << endl;
@@ -582,7 +582,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
// Read the name first so that if we encounter a problem, the error
// message can say the name.
m_Name = element.attribute( "name", "" );
- QString id = element.attribute( "xmi.id", "" );
+ TQString id = element.attribute( "xmi.id", "" );
if (id.isEmpty() || id == "-1") {
if (m_BaseType == Uml::ot_Role) {
// Before version 1.4, Umbrello did not save the xmi.id
@@ -616,7 +616,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
m_Vis = Uml::Visibility::Public;
if (element.hasAttribute("scope")) { // for bkwd compat.
- QString scope = element.attribute( "scope", "" );
+ TQString scope = element.attribute( "scope", "" );
if (scope == "instance_level") // nsuml compat.
m_bStatic = false;
else if (scope == "classifier_level") // nsuml compat.
@@ -630,7 +630,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
<< "): illegal scope" << endl; // soft error
}
} else {
- QString visibility = element.attribute( "visibility", "public" );
+ TQString visibility = element.attribute( "visibility", "public" );
if (visibility == "private"
|| visibility == "private_vis") // for compatibility with other programs
m_Vis = Uml::Visibility::Private;
@@ -641,7 +641,7 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
m_Vis = Uml::Visibility::Implementation;
}
- QString stereo = element.attribute( "stereotype", "" );
+ TQString stereo = element.attribute( "stereotype", "" );
if (!stereo.isEmpty()) {
Uml::IDType stereoID = STR2ID(stereo);
m_pStereotype = umldoc->findStereotypeById(stereoID);
@@ -656,36 +656,36 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
}
if( element.hasAttribute("abstract") ) { // for bkwd compat.
- QString abstract = element.attribute( "abstract", "0" );
+ TQString abstract = element.attribute( "abstract", "0" );
m_bAbstract = (bool)abstract.toInt();
} else {
- QString isAbstract = element.attribute( "isAbstract", "false" );
+ TQString isAbstract = element.attribute( "isAbstract", "false" );
m_bAbstract = (isAbstract == "true");
}
if( element.hasAttribute("static") ) { // for bkwd compat.
- QString staticScope = element.attribute( "static", "0" );
+ TQString staticScope = element.attribute( "static", "0" );
m_bStatic = (bool)staticScope.toInt();
} else {
- QString ownerScope = element.attribute( "ownerScope", "instance" );
+ TQString ownerScope = element.attribute( "ownerScope", "instance" );
m_bStatic = (ownerScope == "classifier");
}
// If the node has child nodes, check whether attributes can be
// extracted from them.
if (element.hasChildNodes()) {
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
if (node.isComment())
node = node.nextSibling();
- QDomElement elem = node.toElement();
+ TQDomElement elem = node.toElement();
while( !elem.isNull() ) {
- QString tag = elem.tagName();
+ TQString tag = elem.tagName();
if (Uml::tagEq(tag, "name")) {
m_Name = elem.attribute("xmi.value", "");
if (m_Name.isEmpty())
m_Name = elem.text();
} else if (Uml::tagEq(tag, "visibility")) {
- QString vis = elem.attribute("xmi.value", "");
+ TQString vis = elem.attribute("xmi.value", "");
if (vis.isEmpty())
vis = elem.text();
if (vis == "private" || vis == "private_vis")
@@ -695,12 +695,12 @@ bool UMLObject::loadFromXMI( QDomElement & element) {
else if (vis == "implementation")
m_Vis = Uml::Visibility::Implementation;
} else if (Uml::tagEq(tag, "isAbstract")) {
- QString isAbstract = elem.attribute("xmi.value", "");
+ TQString isAbstract = elem.attribute("xmi.value", "");
if (isAbstract.isEmpty())
isAbstract = elem.text();
m_bAbstract = (isAbstract == "true");
} else if (Uml::tagEq(tag, "ownerScope")) {
- QString ownerScope = elem.attribute("xmi.value", "");
+ TQString ownerScope = elem.attribute("xmi.value", "");
if (ownerScope.isEmpty())
ownerScope = elem.text();
m_bStatic = (ownerScope == "classifier");
diff --git a/umbrello/umbrello/umlobject.h b/umbrello/umbrello/umlobject.h
index d912bafc..56475807 100644
--- a/umbrello/umbrello/umlobject.h
+++ b/umbrello/umbrello/umlobject.h
@@ -13,9 +13,9 @@
#define UMLOBJECT_H
//qt includes
-#include <qobject.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include "umlnamespace.h"
#include "umlpackagelist.h"
@@ -33,7 +33,7 @@ class UMLObject;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLObject : public QObject {
+class UMLObject : public TQObject {
Q_OBJECT
public:
@@ -45,7 +45,7 @@ public:
* @param id The ID of the object (optional.) If omitted
* then a new ID will be assigned internally.
*/
- UMLObject(const UMLObject * parent, const QString &name, Uml::IDType id = Uml::id_None);
+ UMLObject(const UMLObject * parent, const TQString &name, Uml::IDType id = Uml::id_None);
/**
* Creates a UMLObject.
@@ -60,7 +60,7 @@ public:
* @param name The name of the object.
* @param id The unique ID of the object.
*/
- explicit UMLObject(const QString &name = "" , Uml::IDType id = Uml::id_None);
+ explicit UMLObject(const TQString &name = "" , Uml::IDType id = Uml::id_None);
/**
* Overloaded '==' operator
@@ -110,14 +110,14 @@ public:
*
* @param d The documentation for the object.
*/
- void setDoc(const QString &d);
+ void setDoc(const TQString &d);
/**
* Returns the documentation for the object.
*
* @return Returns the documentation for the object.
*/
- QString getDoc() const;
+ TQString getDoc() const;
/**
* Returns the visibility of the object.
@@ -139,7 +139,7 @@ public:
*
* @param _name Sets the classes stereotype name.
*/
- void setStereotype(const QString &_name);
+ void setStereotype(const TQString &_name);
/**
* Sets the class' UMLStereotype. Adjusts the reference counts
@@ -158,7 +158,7 @@ public:
*
* @param _name The classes Package name.
*/
- void setPackage(const QString &_name);
+ void setPackage(const TQString &_name);
/**
* Sets the UMLPackage in which this class is located.
@@ -182,7 +182,7 @@ public:
* "«" and "»".
* @return Returns the classes stereotype name.
*/
- QString getStereotype(bool includeAdornments = false) const;
+ TQString getStereotype(bool includeAdornments = false) const;
/**
* Return the package(s) in which this UMLObject is contained
@@ -196,7 +196,7 @@ public:
* Default: false.
* @return The UMLObject's enclosing package(s) as a text.
*/
- QString getPackage(const QString& separator = QString::null,
+ TQString getPackage(const TQString& separator = TQString::null,
bool includeRoot = false);
/**
@@ -224,12 +224,12 @@ public:
/**
* Returns a copy of m_Name
*/
- QString getName() const;
+ TQString getName() const;
/**
* Set the UMLObject's name
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Returns the fully qualified name, i.e. all package prefixes and then m_Name.
@@ -242,7 +242,7 @@ public:
* See UMLDoc::getRootFolder(). Default: false.
* @return The fully qualified name of this UMLObject.
*/
- virtual QString getFullyQualifiedName(const QString& separator = QString::null,
+ virtual TQString getFullyQualifiedName(const TQString& separator = TQString::null,
bool includeRoot = false) const;
/**
@@ -287,10 +287,10 @@ public:
/**
* This method saves the XMI attributes of each specific model class.
* It needs to be implemented by each child class.
- * For creating the QDomElement and saving the common XMI parts,
+ * For creating the TQDomElement and saving the common XMI parts,
* it can use the save() method.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) = 0;
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) = 0;
/**
* This method loads the generic parts of the XMI common to most model
@@ -298,17 +298,17 @@ public:
* Instead, it invokes the load() method which implements the loading
* of the specifics of each child class.
*
- * @param element The QDomElement from which to load.
+ * @param element The TQDomElement from which to load.
*/
- virtual bool loadFromXMI( QDomElement & element );
+ virtual bool loadFromXMI( TQDomElement & element );
/**
- * Analyzes the given QDomElement for a reference to a stereotype.
+ * Analyzes the given TQDomElement for a reference to a stereotype.
*
- * @param element QDomElement to analyze.
+ * @param element TQDomElement to analyze.
* @return True if a stereotype reference was found, else false.
*/
- bool loadStereotype(QDomElement & element);
+ bool loadStereotype(TQDomElement & element);
/**
* Returns true if this UMLObject has classifier scope,
@@ -339,34 +339,34 @@ public:
/**
* Return secondary ID. Required by resolveRef().
*/
- QString getSecondaryId() const;
+ TQString getSecondaryId() const;
/**
* Set the secondary ID.
* Currently only required by petalTree2Uml(); all other setting of the
* m_SecondaryID is internal to the UMLObject class hierarchy.
*/
- void setSecondaryId(const QString& id);
+ void setSecondaryId(const TQString& id);
/**
* Return secondary ID fallback.
* Required by resolveRef() for imported model files.
*/
- QString getSecondaryFallback() const;
+ TQString getSecondaryFallback() const;
/**
* Set the secondary ID fallback.
* Currently only used by petalTree2Uml().
*/
- void setSecondaryFallback(const QString& id);
+ void setSecondaryFallback(const TQString& id);
/**
* Auxiliary to saveToXMI.
- * Create a QDomElement with the given tag, and save the XMI attributes
+ * Create a TQDomElement with the given tag, and save the XMI attributes
* that are common to all child classes to the newly created element.
* This method does not need to be overridden by child classes.
*/
- QDomElement save( const QString &tag, QDomDocument & qDoc );
+ TQDomElement save( const TQString &tag, TQDomDocument & qDoc );
public slots:
/**
@@ -402,7 +402,7 @@ protected:
* It is responsible for loading the specific XMI structure
* of the child class.
*/
- virtual bool load( QDomElement& element );
+ virtual bool load( TQDomElement& element );
/**
* The object's id.
@@ -412,7 +412,7 @@ protected:
/**
* The object's documentation.
*/
- QString m_Doc;
+ TQString m_Doc;
/**
* The package the object belongs to if applicable.
@@ -427,7 +427,7 @@ protected:
/**
* The objects name.
*/
- QString m_Name;
+ TQString m_Name;
/**
* The objects type.
@@ -473,7 +473,7 @@ protected:
* loading. The secondary ID is resolved to the m_pSecondary
* in the course of resolveRef() at the end of loading.
*/
- QString m_SecondaryId;
+ TQString m_SecondaryId;
/**
* Last-chance backup for when m_SecondaryId is not found.
@@ -483,7 +483,7 @@ protected:
* In case the quidu is not found, the human readable name is
* used which we store in m_SecondaryFallback.
*/
- QString m_SecondaryFallback;
+ TQString m_SecondaryFallback;
};
/**
diff --git a/umbrello/umbrello/umlobjectlist.h b/umbrello/umbrello/umlobjectlist.h
index d9d11c83..f9d633c2 100644
--- a/umbrello/umbrello/umlobjectlist.h
+++ b/umbrello/umbrello/umlobjectlist.h
@@ -19,20 +19,20 @@
#ifndef UMLOBJECTLIST_H
#define UMLOBJECTLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declarations
class UMLObject;
-//typedef QPtrList<UMLObject> UMLObjectList;
-typedef QPtrListIterator<UMLObject> UMLObjectListIt;
+//typedef TQPtrList<UMLObject> UMLObjectList;
+typedef TQPtrListIterator<UMLObject> UMLObjectListIt;
/**
- * This sub-class adds copyInto and clone to the QPtrList<UMLObject>
+ * This sub-class adds copyInto and clone to the TQPtrList<UMLObject>
* base class.
*/
-class UMLObjectList : public QPtrList<UMLObject>
+class UMLObjectList : public TQPtrList<UMLObject>
{
public:
diff --git a/umbrello/umbrello/umloperationlist.h b/umbrello/umbrello/umloperationlist.h
index dfb9007e..250c3708 100644
--- a/umbrello/umbrello/umloperationlist.h
+++ b/umbrello/umbrello/umloperationlist.h
@@ -12,12 +12,12 @@
#ifndef UMLOPERATIONLIST_H
#define UMLOPERATIONLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLOperation;
-typedef QPtrList<UMLOperation> UMLOperationList;
-typedef QPtrListIterator<UMLOperation> UMLOperationListIt;
+typedef TQPtrList<UMLOperation> UMLOperationList;
+typedef TQPtrListIterator<UMLOperation> UMLOperationListIt;
#endif
diff --git a/umbrello/umbrello/umlpackagelist.h b/umbrello/umbrello/umlpackagelist.h
index d74e8c33..6e952d03 100644
--- a/umbrello/umbrello/umlpackagelist.h
+++ b/umbrello/umbrello/umlpackagelist.h
@@ -12,11 +12,11 @@
#ifndef UMLPACKAGELIST_H
#define UMLPACKAGELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLPackage;
-typedef QPtrList<UMLPackage> UMLPackageList;
-typedef QPtrListIterator<UMLPackage> UMLPackageListIt;
+typedef TQPtrList<UMLPackage> UMLPackageList;
+typedef TQPtrListIterator<UMLPackage> UMLPackageListIt;
#endif
diff --git a/umbrello/umbrello/umlrole.cpp b/umbrello/umbrello/umlrole.cpp
index 9b4449fc..ca33dffb 100644
--- a/umbrello/umbrello/umlrole.cpp
+++ b/umbrello/umbrello/umlrole.cpp
@@ -14,7 +14,7 @@
// qt/kde includes
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
// local includes
#include "association.h"
@@ -54,7 +54,7 @@ Uml::Changeability_Type UMLRole::getChangeability() const {
return m_Changeability;
}
-QString UMLRole::getMultiplicity() const {
+TQString UMLRole::getMultiplicity() const {
return m_Multi;
}
@@ -79,7 +79,7 @@ void UMLRole::setChangeability (Uml::Changeability_Type value) {
UMLObject::emitModified();
}
-void UMLRole::setMultiplicity ( const QString &multi ) {
+void UMLRole::setMultiplicity ( const TQString &multi ) {
m_Multi = multi;
UMLObject::emitModified();
}
@@ -98,11 +98,11 @@ void UMLRole::init(UMLAssociation * parent, UMLObject * parentObj, Uml::Role_Typ
m_Changeability = Uml::chg_Changeable;
// connect this up to parent
- connect(this,SIGNAL(modified()),parent,SIGNAL(modified()));
+ connect(this,TQT_SIGNAL(modified()),parent,TQT_SIGNAL(modified()));
}
-void UMLRole::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement roleElement = UMLObject::save("UML:AssociationEnd", qDoc);
+void UMLRole::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement roleElement = UMLObject::save("UML:AssociationEnd", qDoc);
if (m_pSecondary)
roleElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
else
@@ -156,9 +156,9 @@ void UMLRole::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( roleElement );
}
-bool UMLRole::load( QDomElement & element ) {
+bool UMLRole::load( TQDomElement & element ) {
UMLDoc * doc = UMLApp::app()->getDocument();
- QString type = element.attribute("type", "");
+ TQString type = element.attribute("type", "");
if (!type.isEmpty()) {
if (!m_SecondaryId.isEmpty())
kWarning() << "UMLRole::load: overwriting old m_SecondaryId \""
@@ -167,11 +167,11 @@ bool UMLRole::load( QDomElement & element ) {
m_SecondaryId = type;
}
// Inspect child nodes - for multiplicity (and type if not set above.)
- for (QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ for (TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement tempElement = node.toElement();
- QString tag = tempElement.tagName();
+ TQDomElement tempElement = node.toElement();
+ TQString tag = tempElement.tagName();
if (Uml::tagEq(tag, "name")) {
m_Name = tempElement.text();
} else if (Uml::tagEq(tag, "AssociationEnd.multiplicity")) {
@@ -182,7 +182,7 @@ bool UMLRole::load( QDomElement & element ) {
* - direct value in subordinate <MultiplicityRange.lower> and
* <MultiplicityRange.upper> tags
*/
- QDomNode n = tempElement.firstChild();
+ TQDomNode n = tempElement.firstChild();
if (node.isNull() || tempElement.isNull() || n.isNull() ||
n.toElement().isNull()) {
m_Multi = tempElement.text().stripWhiteSpace();
@@ -208,7 +208,7 @@ bool UMLRole::load( QDomElement & element ) {
m_Multi = tempElement.text().stripWhiteSpace();
continue;
}
- QString multiUpper;
+ TQString multiUpper;
if (tempElement.hasAttribute("lower")) {
m_Multi = tempElement.attribute("lower", "");
multiUpper = tempElement.attribute("upper", "");
@@ -242,8 +242,8 @@ bool UMLRole::load( QDomElement & element ) {
if (m_SecondaryId.isEmpty())
m_SecondaryId = tempElement.attribute("xmi.idref", "");
if (m_SecondaryId.isEmpty()) {
- QDomNode inner = tempElement.firstChild();
- QDomElement innerElem = inner.toElement();
+ TQDomNode inner = tempElement.firstChild();
+ TQDomElement innerElem = inner.toElement();
m_SecondaryId = innerElem.attribute("xmi.id", "");
if (m_SecondaryId.isEmpty())
m_SecondaryId = innerElem.attribute("xmi.idref", "");
@@ -280,7 +280,7 @@ bool UMLRole::load( QDomElement & element ) {
// when (m_role == Uml::A) but some XMI writers (e.g. StarUML) place
// the aggregation attribute at role B.
// The role end with the aggregation unequal to "none" wins.
- QString aggregation = element.attribute("aggregation", "none");
+ TQString aggregation = element.attribute("aggregation", "none");
if (aggregation == "composite")
m_pAssoc->setAssocType(Uml::at_Composition);
else if (aggregation == "shared" // UML1.3
@@ -323,7 +323,7 @@ bool UMLRole::load( QDomElement & element ) {
// Changeability defaults to Changeable if it cant set it here..
m_Changeability = Uml::chg_Changeable;
- QString changeability = element.attribute("changeability", "");
+ TQString changeability = element.attribute("changeability", "");
if (changeability.isEmpty())
element.attribute("changeable", ""); // for backward compatibility
if (changeability == "frozen")
diff --git a/umbrello/umbrello/umlrole.h b/umbrello/umbrello/umlrole.h
index 63fe42b2..48e18049 100644
--- a/umbrello/umbrello/umlrole.h
+++ b/umbrello/umbrello/umlrole.h
@@ -63,7 +63,7 @@ public:
*
* @return The multiplicity assigned to the role.
*/
- QString getMultiplicity() const;
+ TQString getMultiplicity() const;
/**
* Sets the UMLObject playing the role in the association.
@@ -84,7 +84,7 @@ public:
*
* @param multi The multiplicity of role.
*/
- void setMultiplicity ( const QString &multi );
+ void setMultiplicity ( const TQString &multi );
UMLAssociation * getParentAssociation ();
@@ -105,14 +105,14 @@ public:
/**
* Creates the <UML:AssociationEnd> XMI element.
*/
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);
protected:
/**
* Loads the <UML:AssociationEnd> XMI element.
* Auxiliary to UMLObject::loadFromXMI.
*/
- bool load(QDomElement& element);
+ bool load(TQDomElement& element);
private:
@@ -121,7 +121,7 @@ private:
UMLAssociation * m_pAssoc;
Uml::Role_Type m_role;
- QString m_Multi;
+ TQString m_Multi;
Uml::Changeability_Type m_Changeability;
};
diff --git a/umbrello/umbrello/umlstereotypelist.h b/umbrello/umbrello/umlstereotypelist.h
index acf2edd7..efaf9188 100644
--- a/umbrello/umbrello/umlstereotypelist.h
+++ b/umbrello/umbrello/umlstereotypelist.h
@@ -12,12 +12,12 @@
#ifndef UMLSTEREOTYPELIST_H
#define UMLSTEREOTYPELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLStereotype;
-typedef QPtrList<UMLStereotype> UMLStereotypeList;
-typedef QPtrListIterator<UMLStereotype> UMLStereotypeListIt;
+typedef TQPtrList<UMLStereotype> UMLStereotypeList;
+typedef TQPtrListIterator<UMLStereotype> UMLStereotypeListIt;
#endif
diff --git a/umbrello/umbrello/umltemplatelist.h b/umbrello/umbrello/umltemplatelist.h
index aa7415a4..908a665d 100644
--- a/umbrello/umbrello/umltemplatelist.h
+++ b/umbrello/umbrello/umltemplatelist.h
@@ -12,12 +12,12 @@
#ifndef UMLTEMPLATELIST_H
#define UMLTEMPLATELIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
// forward declaration
class UMLTemplate;
-typedef QPtrList<UMLTemplate> UMLTemplateList;
-typedef QPtrListIterator<UMLTemplate> UMLTemplateListIt;
+typedef TQPtrList<UMLTemplate> UMLTemplateList;
+typedef TQPtrListIterator<UMLTemplate> UMLTemplateListIt;
#endif
diff --git a/umbrello/umbrello/umlview.cpp b/umbrello/umbrello/umlview.cpp
index 0b6a7935..35ee3a77 100644
--- a/umbrello/umbrello/umlview.cpp
+++ b/umbrello/umbrello/umlview.cpp
@@ -17,21 +17,21 @@
#include <math.h>
// include files for Qt
-#include <qpixmap.h>
-#include <qpicture.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobjectlist.h>
-#include <qobjectdict.h>
-#include <qdragobject.h>
-#include <qpaintdevicemetrics.h>
-#include <qfileinfo.h>
-#include <qptrlist.h>
-#include <qcolor.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqpicture.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobjectlist.h>
+#include <tqobjectdict.h>
+#include <tqdragobject.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
+#include <tqcolor.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
//kde include files
#include <ktempfile.h>
@@ -107,7 +107,7 @@ using namespace Uml;
// constructor
-UMLView::UMLView(UMLFolder *parentFolder) : QCanvasView(UMLApp::app()->getMainViewWidget()) {
+UMLView::UMLView(UMLFolder *parentFolder) : TQCanvasView(UMLApp::app()->getMainViewWidget()) {
init();
m_pDoc = UMLApp::app()->getDocument();
m_pFolder = parentFolder;
@@ -141,7 +141,7 @@ void UMLView::init() {
m_bPopupShowing = false;
m_bStartedCut = false;
//clear pointers
- m_PastePoint = QPoint(0, 0);
+ m_PastePoint = TQPoint(0, 0);
m_pIDChangesLog = 0;
m_pMenu = 0;
@@ -166,9 +166,9 @@ void UMLView::init() {
viewport() -> setMouseTracking(false);
//setup signals
- connect( this, SIGNAL(sigRemovePopupMenu()), this, SLOT(slotRemovePopupMenu() ) );
- connect( UMLApp::app(), SIGNAL( sigCutSuccessful() ),
- this, SLOT( slotCutSuccessful() ) );
+ connect( this, TQT_SIGNAL(sigRemovePopupMenu()), this, TQT_SLOT(slotRemovePopupMenu() ) );
+ connect( UMLApp::app(), TQT_SIGNAL( sigCutSuccessful() ),
+ this, TQT_SLOT( slotCutSuccessful() ) );
// Create the ToolBarState factory. This class is not a singleton, because it
// needs a pointer to this object.
@@ -185,7 +185,7 @@ UMLView::~UMLView() {
m_pIDChangesLog = 0;
}
- // before we can delete the QCanvas, all widgets must be explicitly
+ // before we can delete the TQCanvas, all widgets must be explicitly
// removed
// otherwise the implicit remove of the contained widgets will cause
// events which would demand a valid connected QCanvas
@@ -198,17 +198,17 @@ UMLView::~UMLView() {
delete m_pToolBarStateFactory;
m_pToolBarStateFactory = NULL;
- // Qt Doc for QCanvasView::~QCanvasView () states:
+ // Qt Doc for TQCanvasView::~TQCanvasView () states:
// "Destroys the canvas view. The associated canvas is not deleted."
// we should do it now
delete canvas();
}
-QString UMLView::getName() const {
+TQString UMLView::getName() const {
return m_Name;
}
-void UMLView::setName(const QString &name) {
+void UMLView::setName(const TQString &name) {
m_Name = name;
}
@@ -216,12 +216,12 @@ int UMLView::generateCollaborationId() {
return ++m_nCollaborationId;
}
-void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
+void UMLView::print(KPrinter *pPrinter, TQPainter & pPainter) {
int height, width;
//get the size of the page
pPrinter->setFullPage( true );
- QPaintDeviceMetrics metrics(pPrinter);
- QFontMetrics fm = pPainter.fontMetrics(); // use the painter font metrics, not the screen fm!
+ TQPaintDeviceMetrics metrics(pPrinter);
+ TQFontMetrics fm = pPainter.fontMetrics(); // use the painter font metrics, not the screen fm!
int fontHeight = fm.lineSpacing();
uint left, right, top, bottom;
// fetch printer margins individual for all four page sides, as at least top and bottom are not the same
@@ -253,7 +253,7 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
height = metrics.height() - top - bottom;
//get the smallest rect holding the diagram
- QRect rect = getDiagramRect();
+ TQRect rect = getDiagramRect();
//now draw to printer
#if 0
@@ -287,15 +287,15 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
// make sure the part of the diagram is painted at the correct
// place in the printout
pPainter.translate(-offsetX,-offsetY);
- getDiagram(QRect(offsetX, offsetY,widthX, heightY),
+ getDiagram(TQRect(offsetX, offsetY,widthX, heightY),
pPainter);
// undo the translation so the coordinates for the painter
// correspond to the page again
pPainter.translate(offsetX,offsetY);
//draw foot note
- QString string = i18n("Diagram: %2 Page %1").arg(page + 1).arg(getName());
- QColor textColor(50, 50, 50);
+ TQString string = i18n("Diagram: %2 Page %1").arg(page + 1).arg(getName());
+ TQColor textColor(50, 50, 50);
pPainter.setPen(textColor);
pPainter.drawLine(0, height + 2, width, height + 2);
pPainter.drawText(0, height + 4, width, fontHeight, Qt::AlignLeft, string);
@@ -346,16 +346,16 @@ void UMLView::print(KPrinter *pPrinter, QPainter & pPainter) {
pPainter.setWindow( rect.x(), rect.y(), windowWidth, windowHeight );
// set viewport - the physical mapping
- // --> Qt's QPainter will map all drawed elements from diagram area ( window )
+ // --> Qt's TQPainter will map all drawed elements from diagram area ( window )
// to printer area ( viewport )
pPainter.setViewport( left, top, width, height );
// get Diagram
- getDiagram(QRect(rect.x(), rect.y(), windowWidth, diagramHeight), pPainter);
+ getDiagram(TQRect(rect.x(), rect.y(), windowWidth, diagramHeight), pPainter);
//draw foot note
- QString string = i18n("Diagram: %2 Page %1").arg( 1).arg(getName());
- QColor textColor(50, 50, 50);
+ TQString string = i18n("Diagram: %2 Page %1").arg( 1).arg(getName());
+ TQColor textColor(50, 50, 50);
pPainter.setPen(textColor);
pPainter.drawLine(rect.x(), footTop , windowWidth, footTop);
pPainter.drawText(rect.x(), footTop + 3, windowWidth, fontHeight, Qt::AlignLeft, string);
@@ -381,7 +381,7 @@ void UMLView::setupNewWidget(UMLWidget *w) {
m_pDoc->setModified();
}
-void UMLView::contentsMouseReleaseEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseReleaseEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseRelease(ome);
}
@@ -393,7 +393,7 @@ void UMLView::slotToolBarChanged(int c) {
m_bPaste = false;
}
-void UMLView::showEvent(QShowEvent* /*se*/) {
+void UMLView::showEvent(TQShowEvent* /*se*/) {
# ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
//kWarning() << "Show Event for " << getName() << endl;
@@ -406,28 +406,28 @@ void UMLView::showEvent(QShowEvent* /*se*/) {
UMLApp* theApp = UMLApp::app();
WorkToolBar* tb = theApp->getWorkToolBar();
- connect(tb,SIGNAL(sigButtonChanged(int)), this, SLOT(slotToolBarChanged(int)));
- connect(this,SIGNAL(sigResetToolBar()), tb, SLOT(slotResetToolBar()));
- connect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject *)),
- this, SLOT(slotObjectCreated(UMLObject *)));
- connect(this, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotAssociationRemoved(AssociationWidget*)));
- connect(this, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotWidgetRemoved(UMLWidget*)));
+ connect(tb,TQT_SIGNAL(sigButtonChanged(int)), this, TQT_SLOT(slotToolBarChanged(int)));
+ connect(this,TQT_SIGNAL(sigResetToolBar()), tb, TQT_SLOT(slotResetToolBar()));
+ connect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject *)),
+ this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ connect(this, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ connect(this, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
resetToolbar();
}
-void UMLView::hideEvent(QHideEvent* /*he*/) {
+void UMLView::hideEvent(TQHideEvent* /*he*/) {
UMLApp* theApp = UMLApp::app();
WorkToolBar* tb = theApp->getWorkToolBar();
- disconnect(tb,SIGNAL(sigButtonChanged(int)), this, SLOT(slotToolBarChanged(int)));
- disconnect(this,SIGNAL(sigResetToolBar()), tb, SLOT(slotResetToolBar()));
- disconnect(m_pDoc, SIGNAL(sigObjectCreated(UMLObject *)), this, SLOT(slotObjectCreated(UMLObject *)));
- disconnect(this, SIGNAL(sigAssociationRemoved(AssociationWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotAssociationRemoved(AssociationWidget*)));
- disconnect(this, SIGNAL(sigWidgetRemoved(UMLWidget*)),
- UMLApp::app()->getDocWindow(), SLOT(slotWidgetRemoved(UMLWidget*)));
+ disconnect(tb,TQT_SIGNAL(sigButtonChanged(int)), this, TQT_SLOT(slotToolBarChanged(int)));
+ disconnect(this,TQT_SIGNAL(sigResetToolBar()), tb, TQT_SLOT(slotResetToolBar()));
+ disconnect(m_pDoc, TQT_SIGNAL(sigObjectCreated(UMLObject *)), this, TQT_SLOT(slotObjectCreated(UMLObject *)));
+ disconnect(this, TQT_SIGNAL(sigAssociationRemoved(AssociationWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotAssociationRemoved(AssociationWidget*)));
+ disconnect(this, TQT_SIGNAL(sigWidgetRemoved(UMLWidget*)),
+ UMLApp::app()->getDocWindow(), TQT_SLOT(slotWidgetRemoved(UMLWidget*)));
# ifdef MANUAL_CONTROL_DOUBLE_BUFFERING
//kWarning() << "Hide Event for " << getName() << endl;
@@ -508,7 +508,7 @@ void UMLView::slotObjectRemoved(UMLObject * o) {
}
}
-void UMLView::contentsDragEnterEvent(QDragEnterEvent *e) {
+void UMLView::contentsDragEnterEvent(TQDragEnterEvent *e) {
UMLDrag::LvTypeAndID_List tidList;
if(!UMLDrag::getClip3TypeAndID(e, tidList)) {
return;
@@ -604,7 +604,7 @@ void UMLView::contentsDragEnterEvent(QDragEnterEvent *e) {
e->accept(bAccept);
}
-void UMLView::contentsDropEvent(QDropEvent *e) {
+void UMLView::contentsDropEvent(TQDropEvent *e) {
UMLDrag::LvTypeAndID_List tidList;
if( !UMLDrag::getClip3TypeAndID(e, tidList) ) {
return;
@@ -645,7 +645,7 @@ void UMLView::contentsDropEvent(QDropEvent *e) {
m_pDoc -> setModified(true);
}
-ObjectWidget * UMLView::onWidgetLine( const QPoint &point ) {
+ObjectWidget * UMLView::onWidgetLine( const TQPoint &point ) {
UMLWidget *obj;
for (UMLWidgetListIt it(m_WidgetList); (obj = it.current()) != NULL; ++it) {
ObjectWidget *ow = dynamic_cast<ObjectWidget*>(obj);
@@ -663,7 +663,7 @@ ObjectWidget * UMLView::onWidgetLine( const QPoint &point ) {
return 0;
}
-UMLWidget *UMLView::getWidgetAt(const QPoint& p) {
+UMLWidget *UMLView::getWidgetAt(const TQPoint& p) {
int relativeSize = 10000; // start with an arbitrary large number
UMLWidget *obj, *retObj = NULL;
UMLWidgetListIt it(m_WidgetList);
@@ -719,7 +719,7 @@ bool UMLView::widgetOnDiagram(Uml::IDType id) {
return false;
}
-void UMLView::contentsMouseMoveEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseMoveEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseMove(ome);
}
@@ -765,7 +765,7 @@ AssociationWidget * UMLView::findAssocWidget( Uml::IDType id ) {
}
AssociationWidget * UMLView::findAssocWidget(UMLWidget *pWidgetA,
- UMLWidget *pWidgetB, const QString& roleNameB) {
+ UMLWidget *pWidgetB, const TQString& roleNameB) {
AssociationWidget *assoc;
AssociationWidgetListIt it(m_AssociationList);
while ((assoc = it.current()) != 0) {
@@ -815,9 +815,9 @@ void UMLView::removeWidget(UMLWidget * o) {
o -> cleanup();
m_SelectedList.remove(o);
- disconnect( this, SIGNAL( sigRemovePopupMenu() ), o, SLOT( slotRemovePopupMenu() ) );
- disconnect( this, SIGNAL( sigClearAllSelected() ), o, SLOT( slotClearAllSelected() ) );
- disconnect( this, SIGNAL(sigColorChanged(Uml::IDType)), o, SLOT(slotColorChanged(Uml::IDType)));
+ disconnect( this, TQT_SIGNAL( sigRemovePopupMenu() ), o, TQT_SLOT( slotRemovePopupMenu() ) );
+ disconnect( this, TQT_SIGNAL( sigClearAllSelected() ), o, TQT_SLOT( slotClearAllSelected() ) );
+ disconnect( this, TQT_SIGNAL(sigColorChanged(Uml::IDType)), o, TQT_SLOT(slotColorChanged(Uml::IDType)));
if (t == wt_Message)
m_MessageList.remove(static_cast<MessageWidget*>(o));
else
@@ -834,21 +834,21 @@ void UMLView::setUseFillColor(bool ufc) {
m_Options.uiState.useFillColor = ufc;
}
-QColor UMLView::getFillColor() const {
+TQColor UMLView::getFillColor() const {
return m_Options.uiState.fillColor;
}
-void UMLView::setFillColor(const QColor &color) {
+void UMLView::setFillColor(const TQColor &color) {
m_Options.uiState.fillColor = color;
emit sigColorChanged( getID() );
canvas()->setAllChanged();
}
-QColor UMLView::getLineColor() const {
+TQColor UMLView::getLineColor() const {
return m_Options.uiState.lineColor;
}
-void UMLView::setLineColor(const QColor &color) {
+void UMLView::setLineColor(const TQColor &color) {
m_Options.uiState.lineColor = color;
emit sigColorChanged( getID() );
canvas() -> setAllChanged();
@@ -864,11 +864,11 @@ void UMLView::setLineWidth(uint width) {
canvas() -> setAllChanged();
}
-void UMLView::contentsMouseDoubleClickEvent(QMouseEvent* ome) {
+void UMLView::contentsMouseDoubleClickEvent(TQMouseEvent* ome) {
m_pToolBarState->mouseDoubleClick(ome);
}
-QRect UMLView::getDiagramRect() {
+TQRect UMLView::getDiagramRect() {
int startx, starty, endx, endy;
startx = starty = INT_MAX;
endx = endy = 0;
@@ -907,7 +907,7 @@ QRect UMLView::getDiagramRect() {
* UMLWidgets */
AssociationWidgetListIt assoc_it (m_AssociationList);
AssociationWidget * assoc_obj;
- QRect rect;
+ TQRect rect;
while ((assoc_obj = assoc_it.current()) != 0)
{
@@ -933,10 +933,10 @@ QRect UMLView::getDiagramRect() {
endy += 20;
*/
- return QRect(startx, starty, endx - startx, endy - starty);
+ return TQRect(startx, starty, endx - startx, endy - starty);
}
-void UMLView::setSelected(UMLWidget * w, QMouseEvent * /*me*/) {
+void UMLView::setSelected(UMLWidget * w, TQMouseEvent * /*me*/) {
//only add if wasn't in list
if(!m_SelectedList.remove(w))
m_SelectedList.append(w);
@@ -970,14 +970,14 @@ void UMLView::selectionUseFillColor(bool useFC) {
temp -> setUseFillColour(useFC);
}
-void UMLView::selectionSetFont( const QFont &font )
+void UMLView::selectionSetFont( const TQFont &font )
{
UMLWidget * temp = 0;
for(temp=(UMLWidget *)m_SelectedList.first();temp;temp=(UMLWidget *)m_SelectedList.next())
temp -> setFont( font );
}
-void UMLView::selectionSetLineColor( const QColor &color )
+void UMLView::selectionSetLineColor( const TQColor &color )
{
UMLWidget * temp = 0;
for (temp = m_SelectedList.first(); temp; temp = m_SelectedList.next()) {
@@ -1005,7 +1005,7 @@ void UMLView::selectionSetLineWidth( uint width )
}
}
-void UMLView::selectionSetFillColor( const QColor &color )
+void UMLView::selectionSetFillColor( const TQColor &color )
{
UMLWidget * temp = 0;
for(temp=(UMLWidget *) m_SelectedList.first();
@@ -1141,7 +1141,7 @@ bool UMLView::isSavedInSeparateFile() {
// when tabbed diagrams are enabled.
return false;
}
- const QString msgPrefix("UMLView::isSavedInSeparateFile(" + getName() + "): ");
+ const TQString msgPrefix("UMLView::isSavedInSeparateFile(" + getName() + "): ");
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem *lvItem = listView->findItem(m_nID);
if (lvItem == NULL) {
@@ -1164,11 +1164,11 @@ bool UMLView::isSavedInSeparateFile() {
<< "parent model object is not a UMLFolder (?)" << endl;
return false;
}
- QString folderFile = modelFolder->getFolderFile();
+ TQString folderFile = modelFolder->getFolderFile();
return !folderFile.isEmpty();
}
-void UMLView::contentsMousePressEvent(QMouseEvent* ome) {
+void UMLView::contentsMousePressEvent(TQMouseEvent* ome) {
m_pToolBarState->mousePress(ome);
//TODO should be managed by widgets when are selected. Right now also has some
//problems, such as clicking on a widget, and clicking to move that widget shows
@@ -1208,7 +1208,7 @@ void UMLView::selectWidgetsOfAssoc (AssociationWidget * a) {
void UMLView::selectWidgets(int px, int py, int qx, int qy) {
clearSelected();
- QRect rect;
+ TQRect rect;
if(px <= qx) {
rect.setLeft(px);
rect.setRight(qx);
@@ -1230,7 +1230,7 @@ void UMLView::selectWidgets(int px, int py, int qx, int qy) {
int y = temp -> getY();
int w = temp -> getWidth();
int h = temp -> getHeight();
- QRect rect2(x, y, w, h);
+ TQRect rect2(x, y, w, h);
++it;
//see if any part of widget is in the rectangle
if( !rect.intersects(rect2) )
@@ -1274,14 +1274,14 @@ void UMLView::selectWidgets(int px, int py, int qx, int qy) {
}//end while
}
-void UMLView::getDiagram(const QRect &rect, QPixmap & diagram) {
- QPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
- QPainter painter(&pixmap);
+void UMLView::getDiagram(const TQRect &rect, TQPixmap & diagram) {
+ TQPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
+ TQPainter painter(&pixmap);
getDiagram(canvas()->rect(),painter);
- bitBlt(&diagram, QPoint(0, 0), &pixmap, rect);
+ bitBlt(&diagram, TQPoint(0, 0), &pixmap, rect);
}
-void UMLView::getDiagram(const QRect &area, QPainter & painter) {
+void UMLView::getDiagram(const TQRect &area, TQPainter & painter) {
//TODO unselecting and selecting later doesn't work now as the selection is
//cleared in UMLViewImageExporter. Check if the anything else than the
//following is needed and, if it works, remove the clearSelected in
@@ -1472,7 +1472,7 @@ bool UMLView::addWidget( UMLWidget * pWidget , bool isPasteOperation ) {
bool xIsOutOfRange = (wX <= 0 || wX >= FloatingTextWidget::restrictPositionMax);
bool yIsOutOfRange = (wY <= 0 || wY >= FloatingTextWidget::restrictPositionMax);
if (xIsOutOfRange || yIsOutOfRange) {
- QString name = pWidget->getName();
+ TQString name = pWidget->getName();
if (name.isEmpty()) {
FloatingTextWidget *ft = dynamic_cast<FloatingTextWidget*>(pWidget);
if (ft)
@@ -1826,8 +1826,8 @@ void UMLView::getWidgetAssocs(UMLObject* Obj, AssociationWidgetList & Associatio
}//end while
}
-void UMLView::closeEvent ( QCloseEvent * e ) {
- QWidget::closeEvent(e);
+void UMLView::closeEvent ( TQCloseEvent * e ) {
+ TQWidget::closeEvent(e);
}
void UMLView::removeAllAssociations() {
@@ -2245,10 +2245,10 @@ void UMLView::findMaxBoundingRectangle(const FloatingTextWidget* ft, int& px, in
qy = y1;
}
-void UMLView::copyAsImage(QPixmap*& pix) {
+void UMLView::copyAsImage(TQPixmap*& pix) {
//get the smallest rect holding the diagram
- QRect rect = getDiagramRect();
- QPixmap diagram( rect.width(), rect.height() );
+ TQRect rect = getDiagramRect();
+ TQPixmap diagram( rect.width(), rect.height() );
//only draw what is selected
m_bDrawSelectedOnly = true;
@@ -2303,7 +2303,7 @@ void UMLView::copyAsImage(QPixmap*& pix) {
findMaxBoundingRectangle(changeB, px, py, qx, qy);
}//end while
- QRect imageRect; //area with respect to getDiagramRect()
+ TQRect imageRect; //area with respect to getDiagramRect()
//i.e. all widgets on the canvas. Was previously with
//respect to whole canvas
@@ -2312,8 +2312,8 @@ void UMLView::copyAsImage(QPixmap*& pix) {
imageRect.setRight( qx - rect.left() );
imageRect.setBottom( qy - rect.top() );
- pix = new QPixmap(imageRect.width(), imageRect.height());
- bitBlt(pix, QPoint(0, 0), &diagram, imageRect);
+ pix = new TQPixmap(imageRect.width(), imageRect.height());
+ bitBlt(pix, TQPoint(0, 0), &diagram, imageRect);
m_bDrawSelectedOnly = false;
}
@@ -2364,14 +2364,14 @@ void UMLView::setMenu() {
}//end switch
if( menu != ListPopupMenu::mt_Undefined ) {
m_pMenu = new ListPopupMenu(this, menu, this);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
m_pMenu->popup( mapToGlobal( contentsToViewport(worldMatrix().map(m_Pos)) ) );
}
}
void UMLView::slotRemovePopupMenu() {
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
@@ -2506,7 +2506,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_State:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter State Name"),
+ TQString name = KInputDialog::getText( i18n("Enter State Name"),
i18n("Enter the name of the new state:"),
i18n("new state"), &ok, UMLApp::app() );
if ( ok ) {
@@ -2542,7 +2542,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Activity:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Activity Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Activity Name"),
i18n("Enter the name of the new activity:"),
i18n("new activity"), &ok, UMLApp::app() );
if ( ok ) {
@@ -2575,7 +2575,7 @@ void UMLView::slotMenuSelection(int sel) {
case ListPopupMenu::mt_Rename:
{
bool ok = false;
- QString name = KInputDialog::getText( i18n("Enter Diagram Name"),
+ TQString name = KInputDialog::getText( i18n("Enter Diagram Name"),
i18n("Enter the new name of the diagram:"),
getName(), &ok, UMLApp::app() );
if (ok) {
@@ -2601,8 +2601,8 @@ void UMLView::slotShowView() {
m_pDoc -> changeCurrentView( getID() );
}
-QPoint UMLView::getPastePoint() {
- QPoint point = m_PastePoint;
+TQPoint UMLView::getPastePoint() {
+ TQPoint point = m_PastePoint;
point.setX( point.x() - m_Pos.x() );
point.setY( point.y() - m_Pos.y() );
return point;
@@ -2643,11 +2643,11 @@ bool UMLView::showPropDialog() {
}
-QFont UMLView::getFont() const {
+TQFont UMLView::getFont() const {
return m_Options.uiState.font;
}
-void UMLView::setFont(QFont font, bool changeAllWidgets /* = false */) {
+void UMLView::setFont(TQFont font, bool changeAllWidgets /* = false */) {
m_Options.uiState.font = font;
if (!changeAllWidgets)
return;
@@ -2788,7 +2788,7 @@ void UMLView::setZoom(int zoom) {
zoom = 500;
}
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale(zoom/100.0,zoom/100.0);
setWorldMatrix(wm);
@@ -2801,13 +2801,13 @@ int UMLView::currentZoom() {
}
void UMLView::zoomIn() {
- QWMatrix wm = worldMatrix();
+ TQWMatrix wm = worldMatrix();
wm.scale(1.5,1.5); // adjust zooming step here
setZoom( (int)(wm.m11()*100.0) );
}
void UMLView::zoomOut() {
- QWMatrix wm = worldMatrix();
+ TQWMatrix wm = worldMatrix();
wm.scale(2.0/3.0, 2.0/3.0); //adjust zooming step here
setZoom( (int)(wm.m11()*100.0) );
}
@@ -2824,7 +2824,7 @@ void UMLView::setCanvasSize(int width, int height) {
}
void UMLView::resizeCanvasToItems() {
- QRect canvasSize = getDiagramRect();
+ TQRect canvasSize = getDiagramRect();
int canvasWidth = canvasSize.right() + 5;
int canvasHeight = canvasSize.bottom() + 5;
@@ -2846,7 +2846,7 @@ void UMLView::resizeCanvasToItems() {
}
void UMLView::show() {
- QWidget::show();
+ TQWidget::show();
resizeCanvasToItems();
}
@@ -2865,11 +2865,11 @@ void UMLView::updateComponentSizes() {
* the widgets are drawn.
* This is necessary because the widget size might depend on the
* font metrics and the font metrics might change for different
- * QPainter, i.e. font metrics for Display font and Printer font are
+ * TQPainter, i.e. font metrics for Display font and Printer font are
* usually different.
- * Call this when you change the QPainter.
+ * Call this when you change the TQPainter.
*/
-void UMLView::forceUpdateWidgetFontMetrics(QPainter * painter) {
+void UMLView::forceUpdateWidgetFontMetrics(TQPainter * painter) {
UMLWidgetListIt it( m_WidgetList );
UMLWidget *obj;
@@ -2879,8 +2879,8 @@ void UMLView::forceUpdateWidgetFontMetrics(QPainter * painter) {
}
}
-void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement viewElement = qDoc.createElement( "diagram" );
+void UMLView::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement viewElement = qDoc.createElement( "diagram" );
viewElement.setAttribute( "xmi.id", ID2STR(m_nID) );
viewElement.setAttribute( "name", getName() );
viewElement.setAttribute( "type", m_Type );
@@ -2912,7 +2912,7 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
//now save all the widgets
UMLWidget * widget = 0;
UMLWidgetListIt w_it( m_WidgetList );
- QDomElement widgetElement = qDoc.createElement( "widgets" );
+ TQDomElement widgetElement = qDoc.createElement( "widgets" );
while( ( widget = w_it.current() ) ) {
++w_it;
// Having an exception is bad I know, but gotta work with
@@ -2927,14 +2927,14 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
viewElement.appendChild( widgetElement );
//now save the message widgets
MessageWidgetListIt m_it( m_MessageList );
- QDomElement messageElement = qDoc.createElement( "messages" );
+ TQDomElement messageElement = qDoc.createElement( "messages" );
while( ( widget = m_it.current() ) ) {
++m_it;
widget -> saveToXMI( qDoc, messageElement );
}
viewElement.appendChild( messageElement );
//now save the associations
- QDomElement assocElement = qDoc.createElement( "associations" );
+ TQDomElement assocElement = qDoc.createElement( "associations" );
if ( m_AssociationList.count() ) {
// We guard against ( m_AssociationList.count() == 0 ) because
// this code could be reached as follows:
@@ -2960,28 +2960,28 @@ void UMLView::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.appendChild( viewElement );
}
-bool UMLView::loadFromXMI( QDomElement & qElement ) {
- QString id = qElement.attribute( "xmi.id", "-1" );
+bool UMLView::loadFromXMI( TQDomElement & qElement ) {
+ TQString id = qElement.attribute( "xmi.id", "-1" );
m_nID = STR2ID(id);
if( m_nID == Uml::id_None )
return false;
setName( qElement.attribute( "name", "" ) );
- QString type = qElement.attribute( "type", "0" );
+ TQString type = qElement.attribute( "type", "0" );
m_Documentation = qElement.attribute( "documentation", "" );
- QString localid = qElement.attribute( "localid", "0" );
+ TQString localid = qElement.attribute( "localid", "0" );
//optionstate uistate
- QString font = qElement.attribute( "font", "" );
+ TQString font = qElement.attribute( "font", "" );
if (!font.isEmpty()) {
m_Options.uiState.font.fromString( font );
m_Options.uiState.font.setUnderline(false);
}
- QString fillcolor = qElement.attribute( "fillcolor", "" );
- QString linecolor = qElement.attribute( "linecolor", "" );
- QString linewidth = qElement.attribute( "linewidth", "" );
- QString usefillcolor = qElement.attribute( "usefillcolor", "0" );
+ TQString fillcolor = qElement.attribute( "fillcolor", "" );
+ TQString linecolor = qElement.attribute( "linecolor", "" );
+ TQString linewidth = qElement.attribute( "linewidth", "" );
+ TQString usefillcolor = qElement.attribute( "usefillcolor", "0" );
m_Options.uiState.useFillColor = (bool)usefillcolor.toInt();
//optionstate classstate
- QString temp = qElement.attribute( "showattsig", "0" );
+ TQString temp = qElement.attribute( "showattsig", "0" );
m_Options.classState.showAttSig = (bool)temp.toInt();
temp = qElement.attribute( "showatts", "0" );
m_Options.classState.showAtts = (bool)temp.toInt();
@@ -2996,28 +2996,28 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
temp = qElement.attribute( "showstereotype", "0" );
m_Options.classState.showStereoType = (bool)temp.toInt();
//misc
- QString showgrid = qElement.attribute( "showgrid", "0" );
+ TQString showgrid = qElement.attribute( "showgrid", "0" );
m_bShowSnapGrid = (bool)showgrid.toInt();
- QString snapgrid = qElement.attribute( "snapgrid", "0" );
+ TQString snapgrid = qElement.attribute( "snapgrid", "0" );
m_bUseSnapToGrid = (bool)snapgrid.toInt();
- QString snapcsgrid = qElement.attribute( "snapcsgrid", "0" );
+ TQString snapcsgrid = qElement.attribute( "snapcsgrid", "0" );
m_bUseSnapComponentSizeToGrid = (bool)snapcsgrid.toInt();
- QString snapx = qElement.attribute( "snapx", "10" );
+ TQString snapx = qElement.attribute( "snapx", "10" );
m_nSnapX = snapx.toInt();
- QString snapy = qElement.attribute( "snapy", "10" );
+ TQString snapy = qElement.attribute( "snapy", "10" );
m_nSnapY = snapy.toInt();
- QString zoom = qElement.attribute( "zoom", "100" );
+ TQString zoom = qElement.attribute( "zoom", "100" );
m_nZoom = zoom.toInt();
- QString height = qElement.attribute( "canvasheight", QString("%1").arg(UMLView::defaultCanvasSize) );
+ TQString height = qElement.attribute( "canvasheight", TQString("%1").arg(UMLView::defaultCanvasSize) );
m_nCanvasHeight = height.toInt();
- QString width = qElement.attribute( "canvaswidth", QString("%1").arg(UMLView::defaultCanvasSize) );
+ TQString width = qElement.attribute( "canvaswidth", TQString("%1").arg(UMLView::defaultCanvasSize) );
m_nCanvasWidth = width.toInt();
int nType = type.toInt();
@@ -3060,17 +3060,17 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
m_Type = (Uml::Diagram_Type)nType;
}
if( !fillcolor.isEmpty() )
- m_Options.uiState.fillColor = QColor( fillcolor );
+ m_Options.uiState.fillColor = TQColor( fillcolor );
if( !linecolor.isEmpty() )
- m_Options.uiState.lineColor = QColor( linecolor );
+ m_Options.uiState.lineColor = TQColor( linecolor );
if( !linewidth.isEmpty() )
m_Options.uiState.lineWidth = linewidth.toInt();
m_nLocalID = STR2ID(localid);
- QDomNode node = qElement.firstChild();
+ TQDomNode node = qElement.firstChild();
bool widgetsLoaded = false, messagesLoaded = false, associationsLoaded = false;
while (!node.isNull()) {
- QDomElement element = node.toElement();
+ TQDomElement element = node.toElement();
if (!element.isNull()) {
if (element.tagName() == "widgets")
widgetsLoaded = loadWidgetsFromXMI( element );
@@ -3097,10 +3097,10 @@ bool UMLView::loadFromXMI( QDomElement & qElement ) {
return true;
}
-bool UMLView::loadWidgetsFromXMI( QDomElement & qElement ) {
+bool UMLView::loadWidgetsFromXMI( TQDomElement & qElement ) {
UMLWidget* widget = 0;
- QDomNode node = qElement.firstChild();
- QDomElement widgetElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement widgetElement = node.toElement();
while( !widgetElement.isNull() ) {
widget = loadWidgetFromXMI(widgetElement);
if (widget) {
@@ -3118,15 +3118,15 @@ bool UMLView::loadWidgetsFromXMI( QDomElement & qElement ) {
return true;
}
-UMLWidget* UMLView::loadWidgetFromXMI(QDomElement& widgetElement) {
+UMLWidget* UMLView::loadWidgetFromXMI(TQDomElement& widgetElement) {
if ( !m_pDoc ) {
kWarning() << "UMLView::loadWidgetFromXMI(): m_pDoc is NULL" << endl;
return 0L;
}
- QString tag = widgetElement.tagName();
- QString idstr = widgetElement.attribute( "xmi.id", "-1" );
+ TQString tag = widgetElement.tagName();
+ TQString idstr = widgetElement.attribute( "xmi.id", "-1" );
UMLWidget* widget = Widget_Factory::makeWidgetFromXMI(tag, idstr, this);
if (widget == NULL)
return NULL;
@@ -3138,12 +3138,12 @@ UMLWidget* UMLView::loadWidgetFromXMI(QDomElement& widgetElement) {
return widget;
}
-bool UMLView::loadMessagesFromXMI( QDomElement & qElement ) {
+bool UMLView::loadMessagesFromXMI( TQDomElement & qElement ) {
MessageWidget * message = 0;
- QDomNode node = qElement.firstChild();
- QDomElement messageElement = node.toElement();
+ TQDomNode node = qElement.firstChild();
+ TQDomElement messageElement = node.toElement();
while( !messageElement.isNull() ) {
- QString tag = messageElement.tagName();
+ TQString tag = messageElement.tagName();
if (tag == "messagewidget" ||
tag == "UML:MessageWidget" ) { // for bkwd compatibility
message = new MessageWidget(this, sequence_message_asynchronous,
@@ -3166,12 +3166,12 @@ bool UMLView::loadMessagesFromXMI( QDomElement & qElement ) {
return true;
}
-bool UMLView::loadAssociationsFromXMI( QDomElement & qElement ) {
- QDomNode node = qElement.firstChild();
- QDomElement assocElement = node.toElement();
+bool UMLView::loadAssociationsFromXMI( TQDomElement & qElement ) {
+ TQDomNode node = qElement.firstChild();
+ TQDomElement assocElement = node.toElement();
int countr = 0;
while( !assocElement.isNull() ) {
- QString tag = assocElement.tagName();
+ TQString tag = assocElement.tagName();
if (tag == "assocwidget" ||
tag == "UML:AssocWidget") { // for bkwd compatibility
countr++;
@@ -3210,27 +3210,27 @@ void UMLView::addObject(UMLObject *object)
m_bCreateObject = false;
}
-bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
- for (QDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
- QDomElement elem = node.toElement();
- QString tag = elem.tagName();
+bool UMLView::loadUisDiagramPresentation(TQDomElement & qElement) {
+ for (TQDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ TQDomElement elem = node.toElement();
+ TQString tag = elem.tagName();
if (! Uml::tagEq(tag, "Presentation")) {
kError() << "ignoring unknown UisDiagramPresentation tag "
<< tag << endl;
continue;
}
- QDomNode n = elem.firstChild();
- QDomElement e = n.toElement();
- QString idStr;
+ TQDomNode n = elem.firstChild();
+ TQDomElement e = n.toElement();
+ TQString idStr;
int x = 0, y = 0, w = 0, h = 0;
while (!e.isNull()) {
tag = e.tagName();
kDebug() << "Presentation: tag = " << tag << endl;
if (Uml::tagEq(tag, "Presentation.geometry")) {
- QDomNode gnode = e.firstChild();
- QDomElement gelem = gnode.toElement();
- QString csv = gelem.text();
- QStringList dim = QStringList::split(",", csv);
+ TQDomNode gnode = e.firstChild();
+ TQDomElement gelem = gnode.toElement();
+ TQString csv = gelem.text();
+ TQStringList dim = TQStringList::split(",", csv);
x = dim[0].toInt();
y = dim[1].toInt();
w = dim[2].toInt();
@@ -3238,8 +3238,8 @@ bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
} else if (Uml::tagEq(tag, "Presentation.style")) {
// TBD
} else if (Uml::tagEq(tag, "Presentation.model")) {
- QDomNode mnode = e.firstChild();
- QDomElement melem = mnode.toElement();
+ TQDomNode mnode = e.firstChild();
+ TQDomElement melem = mnode.toElement();
idStr = melem.attribute("xmi.idref", "");
} else {
kDebug() << "UMLView::uisLoadFromXMI: ignoring tag "
@@ -3312,23 +3312,23 @@ bool UMLView::loadUisDiagramPresentation(QDomElement & qElement) {
return true;
}
-bool UMLView::loadUISDiagram(QDomElement & qElement) {
- QString idStr = qElement.attribute( "xmi.id", "" );
+bool UMLView::loadUISDiagram(TQDomElement & qElement) {
+ TQString idStr = qElement.attribute( "xmi.id", "" );
if (idStr.isEmpty())
return false;
m_nID = STR2ID(idStr);
UMLListViewItem *ulvi = NULL;
- for (QDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ for (TQDomNode node = qElement.firstChild(); !node.isNull(); node = node.nextSibling()) {
if (node.isComment())
continue;
- QDomElement elem = node.toElement();
- QString tag = elem.tagName();
+ TQDomElement elem = node.toElement();
+ TQString tag = elem.tagName();
if (tag == "uisDiagramName") {
setName( elem.text() );
if (ulvi)
ulvi->setText( getName() );
} else if (tag == "uisDiagramStyle") {
- QString diagramStyle = elem.text();
+ TQString diagramStyle = elem.text();
if (diagramStyle != "ClassDiagram") {
kError() << "UMLView::uisLoadFromXMI: diagram style " << diagramStyle
<< " is not yet implemented" << endl;
diff --git a/umbrello/umbrello/umlview.h b/umbrello/umbrello/umlview.h
index 99a39198..0a74331f 100644
--- a/umbrello/umbrello/umlview.h
+++ b/umbrello/umbrello/umlview.h
@@ -18,8 +18,8 @@
// system includes
#include <kurl.h>
-#include <qdom.h>
-#include <qcanvas.h>
+#include <tqdom.h>
+#include <tqcanvas.h>
//local includes
#include "umlobjectlist.h"
@@ -49,15 +49,15 @@ class ToolBarStateFactory;
/**
* UMLView instances represent diagrams.
- * The UMLApp instance manages a QWidgetStack of UMLView instances.
+ * The UMLApp instance manages a TQWidgetStack of UMLView instances.
* The visible diagram is at the top of stack.
- * The UMLView class inherits from QCanvasView and it owns the
- * objects displayed on its related QCanvas (see m_WidgetList.)
+ * The UMLView class inherits from TQCanvasView and it owns the
+ * objects displayed on its related TQCanvas (see m_WidgetList.)
*
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLView : public QCanvasView {
+class UMLView : public TQCanvasView {
Q_OBJECT
public:
friend class UMLViewImageExporterModel;
@@ -91,26 +91,26 @@ public:
/**
* Return the documentation of the diagram.
*/
- QString getDoc() const {
+ TQString getDoc() const {
return m_Documentation;
}
/**
* Set the documentation of the diagram.
*/
- void setDoc( const QString &doc ) {
+ void setDoc( const TQString &doc ) {
m_Documentation = doc;
}
/**
* Return the name of the diagram.
*/
- QString getName() const;
+ TQString getName() const;
/**
* Set the name of the diagram.
*/
- void setName(const QString &name);
+ void setName(const TQString &name);
/**
* Returns the type of the diagram.
@@ -129,26 +129,26 @@ public:
/**
* Returns the fill color to use.
*/
- QColor getFillColor() const;
+ TQColor getFillColor() const;
/**
* Set the background color.
*
* @param color The color to use.
*/
- void setFillColor( const QColor &color );
+ void setFillColor( const TQColor &color );
/**
* Returns the line color to use.
*/
- QColor getLineColor() const;
+ TQColor getLineColor() const;
/**
* Sets the line color.
*
* @param color The color to use.
*/
- void setLineColor( const QColor &color );
+ void setLineColor( const TQColor &color );
/**
* Returns the line width to use.
@@ -287,12 +287,12 @@ public:
/**
* Returns the font to use
*/
- QFont getFont() const;
+ TQFont getFont() const;
/**
* Sets the font for the view and optionally all the widgets on the view.
*/
- void setFont(QFont font, bool changeAllWidgets = false);
+ void setFont(TQFont font, bool changeAllWidgets = false);
/**
* Returns whether to show operation signatures.
@@ -350,17 +350,17 @@ public:
/**
* contains the implementation for printing functionality
*/
- void print(KPrinter *pPrinter, QPainter & pPainter);
+ void print(KPrinter *pPrinter, TQPainter & pPainter);
/**
* Overrides the standard operation.
*/
- void hideEvent(QHideEvent *he);
+ void hideEvent(TQHideEvent *he);
/**
* Overrides the standard operation.
*/
- void showEvent(QShowEvent *se);
+ void showEvent(TQShowEvent *se);
/**
* Sees if a message is relevant to the given widget. If it does delete it.
@@ -411,7 +411,7 @@ public:
* @return Returns the widget found, returns 0 if no widget found.
*/
AssociationWidget * findAssocWidget(UMLWidget *pWidgetA,
- UMLWidget *pWidgetB, const QString& roleNameB);
+ UMLWidget *pWidgetB, const TQString& roleNameB);
/**
* Remove a widget from view.
@@ -426,7 +426,7 @@ public:
* @param w The widget to set to selected.
* @param me The mouse event containing the information about the selection.
*/
- void setSelected(UMLWidget * w, QMouseEvent * me);
+ void setSelected(UMLWidget * w, TQMouseEvent * me);
/**
* Clear the selected widgets list.
@@ -461,12 +461,12 @@ public:
/**
* Set the font for all the currently selected items.
*/
- void selectionSetFont( const QFont &font );
+ void selectionSetFont( const TQFont &font );
/**
* Set the line color for all the currently selected items.
*/
- void selectionSetLineColor( const QColor &color );
+ void selectionSetLineColor( const TQColor &color );
/**
* Set the line width for all the currently selected items.
@@ -476,7 +476,7 @@ public:
/**
* Set the fill color for all the currently selected items.
*/
- void selectionSetFillColor( const QColor &color );
+ void selectionSetFillColor( const TQColor &color );
/**
* Toggles the show setting sel of all selected items.
@@ -518,7 +518,7 @@ public:
/**
* Get the pos variable. Used internally to keep track of the cursor.
*/
- QPoint & getPos() {
+ TQPoint & getPos() {
return m_Pos;
}
@@ -527,7 +527,7 @@ public:
*
* @param _pos The position to set to.
*/
- void setPos(const QPoint &_pos) {
+ void setPos(const TQPoint &_pos) {
m_Pos = _pos;
}
@@ -654,17 +654,17 @@ public:
* @param rect the area of the diagram to copy
* @param diagram the class to store PNG picture of the paste operation.
*/
- void getDiagram(const QRect &rect, QPixmap & diagram);
+ void getDiagram(const TQRect &rect, TQPixmap & diagram);
/**
* Paint diagram to the paint device
*/
- void getDiagram(const QRect &area, QPainter & painter);
+ void getDiagram(const TQRect &area, TQPainter & painter);
/**
* Returns the PNG picture of the paste operation.
*/
- void copyAsImage(QPixmap*& pix);
+ void copyAsImage(TQPixmap*& pix);
/**
* Returns the imageExporter used to export the view.
@@ -697,7 +697,7 @@ public:
* Only call this straight after the event, the value won't stay valid.
* Should only be called by Assoc widgets at the moment. no one else needs it.
*/
- QPoint getPastePoint();
+ TQPoint getPastePoint();
/**
* Reset the paste point.
@@ -828,22 +828,22 @@ public:
/**
* Creates the "diagram" tag and fills it with the contents of the diagram.
*/
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
/**
* Loads the "diagram" tag.
*/
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
/**
* Loads the "UISDiagram" tag of Unisys.IntegratePlus.2 generated files.
*/
- bool loadUISDiagram(QDomElement & qElement);
+ bool loadUISDiagram(TQDomElement & qElement);
/**
* Loads a "widget" element from XMI, used by loadFromXMI() and the clipboard.
*/
- UMLWidget* loadWidgetFromXMI(QDomElement& widgetElement);
+ UMLWidget* loadWidgetFromXMI(TQDomElement& widgetElement);
/**
* Add an object to the application, and update the view.
@@ -862,7 +862,7 @@ public:
* @return The widget thats line was clicked on.
* Returns 0 if no line was clicked on.
*/
- ObjectWidget * onWidgetLine( const QPoint &point );
+ ObjectWidget * onWidgetLine( const TQPoint &point );
/**
* Return pointer to the first selected widget (for multi-selection)
@@ -878,7 +878,7 @@ public:
* Returns NULL if the point is not inside any widget.
* Does not use or modify the m_pOnWidget member.
*/
- UMLWidget *getWidgetAt(const QPoint& p);
+ UMLWidget *getWidgetAt(const TQPoint& p);
/**
* Initialize and announce a newly created widget.
@@ -916,13 +916,13 @@ protected:
// Methods and members related to loading/saving
- bool loadWidgetsFromXMI( QDomElement & qElement );
+ bool loadWidgetsFromXMI( TQDomElement & qElement );
- bool loadMessagesFromXMI( QDomElement & qElement );
+ bool loadMessagesFromXMI( TQDomElement & qElement );
- bool loadAssociationsFromXMI( QDomElement & qElement );
+ bool loadAssociationsFromXMI( TQDomElement & qElement );
- bool loadUisDiagramPresentation(QDomElement & qElement);
+ bool loadUisDiagramPresentation(TQDomElement & qElement);
/**
* Contains the unique ID to allocate to a widget that needs an
@@ -943,12 +943,12 @@ protected:
/**
* The name of the diagram.
*/
- QString m_Name;
+ TQString m_Name;
/**
* The documentation of the diagram.
*/
- QString m_Documentation;
+ TQString m_Documentation;
/**
* Options used by view
@@ -1017,17 +1017,17 @@ protected:
/**
* Override standard method.
*/
- void closeEvent ( QCloseEvent * e );
+ void closeEvent ( TQCloseEvent * e );
/**
* Override standard method.
*/
- void contentsDragEnterEvent(QDragEnterEvent* mouseEvent);
+ void contentsDragEnterEvent(TQDragEnterEvent* mouseEvent);
/**
* Override standard method.
*/
- void contentsDropEvent(QDropEvent* mouseEvent);
+ void contentsDropEvent(TQDropEvent* mouseEvent);
/**
@@ -1035,7 +1035,7 @@ protected:
*
* @return Returns the smallest area to print.
*/
- QRect getDiagramRect();
+ TQRect getDiagramRect();
/**
@@ -1047,25 +1047,25 @@ protected:
* Overrides the standard operation.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseReleaseEvent(QMouseEvent* mouseEvent);
+ void contentsMouseReleaseEvent(TQMouseEvent* mouseEvent);
/**
* Overrides the standard operation.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseMoveEvent(QMouseEvent* mouseEvent);
+ void contentsMouseMoveEvent(TQMouseEvent* mouseEvent);
/**
* Override standard method.
* Calls the same method in the current tool bar state.
*/
- void contentsMouseDoubleClickEvent(QMouseEvent* mouseEvent);
+ void contentsMouseDoubleClickEvent(TQMouseEvent* mouseEvent);
/**
* Override standard method.
* Calls the same method in the current tool bar state.
*/
- void contentsMousePressEvent(QMouseEvent* mouseEvent);
+ void contentsMousePressEvent(TQMouseEvent* mouseEvent);
/**
@@ -1106,14 +1106,14 @@ protected:
void findMaxBoundingRectangle(const FloatingTextWidget* ft,
int& px, int& py, int& qx, int& qy);
- void forceUpdateWidgetFontMetrics(QPainter *painter);
+ void forceUpdateWidgetFontMetrics(TQPainter *painter);
/**
* Used for creating unique name of collaboration messages.
*/
int m_nCollaborationId;
- QPoint m_Pos;
+ TQPoint m_Pos;
bool m_bCreateObject, m_bDrawSelectedOnly, m_bPaste;
ListPopupMenu * m_pMenu;
UMLWidgetList m_SelectedList;
@@ -1159,7 +1159,7 @@ private:
/**
* The offset at which to paste the clipboard.
*/
- QPoint m_PastePoint;
+ TQPoint m_PastePoint;
/**
* Pointer to the UMLDoc
@@ -1226,7 +1226,7 @@ public slots:
void slotShowView();
/**
- * Overrides standard method from QWidget to resize canvas when
+ * Overrides standard method from TQWidget to resize canvas when
* it's shown.
*/
void show();
diff --git a/umbrello/umbrello/umlviewcanvas.cpp b/umbrello/umbrello/umlviewcanvas.cpp
index 15de4169..134bdf47 100644
--- a/umbrello/umbrello/umlviewcanvas.cpp
+++ b/umbrello/umbrello/umlviewcanvas.cpp
@@ -13,20 +13,20 @@
#include "umlviewcanvas.h"
// qt/kde includes
-#include <qpainter.h>
+#include <tqpainter.h>
// app includes
#include "umlview.h"
-UMLViewCanvas::UMLViewCanvas( UMLView * pView ) : QCanvas( pView ) {
+UMLViewCanvas::UMLViewCanvas( UMLView * pView ) : TQCanvas( pView ) {
m_pView = pView;
}
UMLViewCanvas::~UMLViewCanvas() {}
-void UMLViewCanvas::drawBackground( QPainter & painter, const QRect & clip ) {
- QCanvas::drawBackground( painter, clip );
+void UMLViewCanvas::drawBackground( TQPainter & painter, const TQRect & clip ) {
+ TQCanvas::drawBackground( painter, clip );
if( m_pView -> getShowSnapGrid() ) {
painter.setPen( Qt::gray );
int gridX = m_pView -> getSnapX();
diff --git a/umbrello/umbrello/umlviewcanvas.h b/umbrello/umbrello/umlviewcanvas.h
index 78d7d4dd..6fb39e4e 100644
--- a/umbrello/umbrello/umlviewcanvas.h
+++ b/umbrello/umbrello/umlviewcanvas.h
@@ -12,7 +12,7 @@
#ifndef UMLVIEWCANVAS_H
#define UMLVIEWCANVAS_H
-#include <qcanvas.h>
+#include <tqcanvas.h>
/**
*@author Paul Hensgen
@@ -20,7 +20,7 @@
*/
class UMLView;
-class UMLViewCanvas : public QCanvas {
+class UMLViewCanvas : public TQCanvas {
public:
/**
* Constructor
@@ -37,7 +37,7 @@ protected:
/**
* Overrides default method.
*/
- virtual void drawBackground( QPainter & painter, const QRect & clip );
+ virtual void drawBackground( TQPainter & painter, const TQRect & clip );
/**
* The view the canvas is associated with.
diff --git a/umbrello/umbrello/umlviewimageexporter.cpp b/umbrello/umbrello/umlviewimageexporter.cpp
index 251d0ffb..4c474751 100644
--- a/umbrello/umbrello/umlviewimageexporter.cpp
+++ b/umbrello/umbrello/umlviewimageexporter.cpp
@@ -13,8 +13,8 @@
#include "umlviewimageexporter.h"
// include files for Qt
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
//kde include files
#include <klocale.h>
@@ -44,7 +44,7 @@ void UMLViewImageExporter::exportView() {
// export the view
app->getDocument()->writeToStatusBar(i18n("Exporting view..."));
- QString error = UMLViewImageExporterModel().exportView(m_view,
+ TQString error = UMLViewImageExporterModel().exportView(m_view,
UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType), m_imageURL);
if (!error.isNull()) {
KMessageBox::error(app, i18n("An error happened when exporting the image:\n") + error);
@@ -80,7 +80,7 @@ bool UMLViewImageExporter::getParametersFromUser() {
UMLApp *app = UMLApp::app();
// configure & show the file dialog
- KFileDialog fileDialog(QString::null, QString::null, m_view,
+ KFileDialog fileDialog(TQString::null, TQString::null, m_view,
":export-image", true);
prepareFileDialog(fileDialog);
fileDialog.exec();
@@ -95,9 +95,9 @@ bool UMLViewImageExporter::getParametersFromUser() {
m_imageURL = fileDialog.selectedURL();
// check if the extension is the extension of the mime type
- QFileInfo info(m_imageURL.filename());
- QString ext = info.extension(false);
- QString extDef = UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType);
+ TQFileInfo info(m_imageURL.filename());
+ TQString ext = info.extension(false);
+ TQString extDef = UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType);
if(ext != extDef) {
m_imageURL.setFileName(m_imageURL.fileName() + '.' + extDef);
}
@@ -107,7 +107,7 @@ bool UMLViewImageExporter::getParametersFromUser() {
void UMLViewImageExporter::prepareFileDialog(KFileDialog &fileDialog) {
// get all supported mime types
- QStringList mimeTypes = UMLViewImageExporterModel::supportedMimeTypes();
+ TQStringList mimeTypes = UMLViewImageExporterModel::supportedMimeTypes();
fileDialog.setCaption(i18n("Save As"));
fileDialog.setOperationMode(KFileDialog::Saving);
diff --git a/umbrello/umbrello/umlviewimageexporter.h b/umbrello/umbrello/umlviewimageexporter.h
index 2400213b..5ea1def1 100644
--- a/umbrello/umbrello/umlviewimageexporter.h
+++ b/umbrello/umbrello/umlviewimageexporter.h
@@ -12,7 +12,7 @@
#ifndef UMLVIEWIMAGEEXPORTER_H
#define UMLVIEWIMAGEEXPORTER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
class UMLView;
@@ -67,7 +67,7 @@ public:
*
* @return The mime type used to save the image.
*/
- QString getImageMimeType() const {
+ TQString getImageMimeType() const {
return m_imageMimeType;
}
@@ -86,7 +86,7 @@ private:
/**
* The mime type used to save the image.
*/
- QString m_imageMimeType;
+ TQString m_imageMimeType;
/**
* Shows a save file dialog to the user to get the parameters used
diff --git a/umbrello/umbrello/umlviewimageexporterall.cpp b/umbrello/umbrello/umlviewimageexporterall.cpp
index fceb6aa3..9f80dad1 100644
--- a/umbrello/umbrello/umlviewimageexporterall.cpp
+++ b/umbrello/umbrello/umlviewimageexporterall.cpp
@@ -13,9 +13,9 @@
#include "umlviewimageexporterall.h"
// include files for Qt
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
// kde include files
#include <klocale.h>
@@ -48,7 +48,7 @@ void UMLViewImageExporterAll::exportAllViews() {
m_dialog->m_kURL->setURL(umlDoc->URL().directory());
}
- if (m_dialog->exec() == QDialog::Rejected) {
+ if (m_dialog->exec() == TQDialog::Rejected) {
return;
}
@@ -56,15 +56,15 @@ void UMLViewImageExporterAll::exportAllViews() {
// export all views
umlDoc->writeToStatusBar(i18n("Exporting all views..."));
- QStringList errors = UMLViewImageExporterModel().exportAllViews(
+ TQStringList errors = UMLViewImageExporterModel().exportAllViews(
UMLViewImageExporterModel::mimeTypeToImageType(m_dialog->m_imageType->currentFilter()),
KURL(m_dialog->m_kURL->url()), m_dialog->m_useFolders->isChecked());
if (!errors.empty()) {
#if KDE_IS_VERSION(3,4,0)
KMessageBox::errorList(app, i18n("Some errors happened when exporting the images:"), errors);
#else
- QString errorsCaption;
- for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
+ TQString errorsCaption;
+ for (TQStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
errorsCaption += "\n" + *it;
}
KMessageBox::error(app, i18n("Some errors happened when exporting the images:") + errorsCaption);
diff --git a/umbrello/umbrello/umlviewimageexportermodel.cpp b/umbrello/umbrello/umlviewimageexportermodel.cpp
index e829a3f7..7f34c104 100644
--- a/umbrello/umbrello/umlviewimageexportermodel.cpp
+++ b/umbrello/umbrello/umlviewimageexportermodel.cpp
@@ -16,14 +16,14 @@
#include <math.h>
// include files for Qt
-#include <qstringlist.h>
-#include <qrect.h>
-#include <qimage.h>
-#include <qpicture.h>
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
+#include <tqimage.h>
+#include <tqpicture.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
+#include <tqdir.h>
+#include <tqregexp.h>
// kde include files
#include <kdebug.h>
@@ -39,30 +39,30 @@
#include "umllistview.h"
#include "umllistviewitem.h"
-static QStringList supportedImageTypesList;
-static QStringList supportedMimeTypesList;
+static TQStringList supportedImageTypesList;
+static TQStringList supportedMimeTypesList;
-QStringList UMLViewImageExporterModel::supportedImageTypes() {
+TQStringList UMLViewImageExporterModel::supportedImageTypes() {
if (!supportedImageTypesList.size()) {
// specific supported formats
supportedImageTypesList << "eps";
supportedImageTypesList << "svg";
// QT supported formats
- QStrList qImageFormats = QImage::outputFormats();
+ TQStrList qImageFormats = TQImage::outputFormats();
for (const char* format = qImageFormats.first(); format; format = qImageFormats.next()) {
- supportedImageTypesList << QString(format).lower();
+ supportedImageTypesList << TQString(format).lower();
}
}
return supportedImageTypesList;
}
-QStringList UMLViewImageExporterModel::supportedMimeTypes() {
+TQStringList UMLViewImageExporterModel::supportedMimeTypes() {
if (!supportedMimeTypesList.size()) {
- QStringList imageTypes = UMLViewImageExporterModel::supportedImageTypes();
- for(QStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it ) {
- QString mimeType = imageTypeToMimeType(*it);
+ TQStringList imageTypes = UMLViewImageExporterModel::supportedImageTypes();
+ for(TQStringList::Iterator it = imageTypes.begin(); it != imageTypes.end(); ++it ) {
+ TQString mimeType = imageTypeToMimeType(*it);
if (!mimeType.isNull())
supportedMimeTypesList.append(mimeType);
}
@@ -71,47 +71,47 @@ QStringList UMLViewImageExporterModel::supportedMimeTypes() {
return supportedMimeTypesList;
}
-QString UMLViewImageExporterModel::imageTypeToMimeType(const QString& imageType) {
- const QString imgType = imageType.lower();
- if (QString("bmp") == imgType) return "image/x-bmp";
- if (QString("jpeg") == imgType) return "image/jpeg";
- if (QString("pbm") == imgType) return "image/x-portable-bitmap";
- if (QString("pgm") == imgType) return "image/x-portable-greymap";
- if (QString("png") == imgType) return "image/png";
- if (QString("ppm") == imgType) return "image/x-portable-pixmap";
- if (QString("xbm") == imgType) return "image/x-xbm";
- if (QString("xpm") == imgType) return "image/x-xpm";
- if (QString("eps") == imgType) return "image/x-eps";
- if (QString("svg") == imgType) return "image/svg+xml";
- return QString::null;
+TQString UMLViewImageExporterModel::imageTypeToMimeType(const TQString& imageType) {
+ const TQString imgType = imageType.lower();
+ if (TQString("bmp") == imgType) return "image/x-bmp";
+ if (TQString("jpeg") == imgType) return "image/jpeg";
+ if (TQString("pbm") == imgType) return "image/x-portable-bitmap";
+ if (TQString("pgm") == imgType) return "image/x-portable-greymap";
+ if (TQString("png") == imgType) return "image/png";
+ if (TQString("ppm") == imgType) return "image/x-portable-pixmap";
+ if (TQString("xbm") == imgType) return "image/x-xbm";
+ if (TQString("xpm") == imgType) return "image/x-xpm";
+ if (TQString("eps") == imgType) return "image/x-eps";
+ if (TQString("svg") == imgType) return "image/svg+xml";
+ return TQString::null;
}
-QString UMLViewImageExporterModel::mimeTypeToImageType(const QString& mimeType) {
- if (QString("image/x-bmp") == mimeType) return "bmp";
- if (QString("image/jpeg") == mimeType) return "jpeg";
- if (QString("image/x-portable-bitmap") == mimeType) return "pbm";
- if (QString("image/x-portable-greymap") == mimeType) return "pgm";
- if (QString("image/png") == mimeType) return "png";
- if (QString("image/x-portable-pixmap") == mimeType) return "ppm";
- if (QString("image/x-xbm") == mimeType) return "xbm";
- if (QString("image/x-xpm") == mimeType) return "xpm";
- if (QString("image/x-eps") == mimeType) return "eps";
- if (QString("image/svg+xml") == mimeType) return "svg";
- return QString::null;
+TQString UMLViewImageExporterModel::mimeTypeToImageType(const TQString& mimeType) {
+ if (TQString("image/x-bmp") == mimeType) return "bmp";
+ if (TQString("image/jpeg") == mimeType) return "jpeg";
+ if (TQString("image/x-portable-bitmap") == mimeType) return "pbm";
+ if (TQString("image/x-portable-greymap") == mimeType) return "pgm";
+ if (TQString("image/png") == mimeType) return "png";
+ if (TQString("image/x-portable-pixmap") == mimeType) return "ppm";
+ if (TQString("image/x-xbm") == mimeType) return "xbm";
+ if (TQString("image/x-xpm") == mimeType) return "xpm";
+ if (TQString("image/x-eps") == mimeType) return "eps";
+ if (TQString("image/svg+xml") == mimeType) return "svg";
+ return TQString::null;
}
-QStringList UMLViewImageExporterModel::exportAllViews(const QString &imageType, const KURL &directory, bool useFolders) const {
+TQStringList UMLViewImageExporterModel::exportAllViews(const TQString &imageType, const KURL &directory, bool useFolders) const {
UMLApp *app = UMLApp::app();
// contains all the error messages returned by exportView calls
- QStringList errors;
+ TQStringList errors;
UMLViewList views = app->getDocument()->getViewIterator();
for(UMLView *view = views.first(); view; view = views.next()) {
KURL url = directory;
url.addPath(getDiagramFileName(view, imageType, useFolders));
- QString returnString = exportView(view, imageType, url);
+ TQString returnString = exportView(view, imageType, url);
if (!returnString.isNull()) {
errors.append(view->getName() + ": " + returnString);
}
@@ -120,7 +120,7 @@ QStringList UMLViewImageExporterModel::exportAllViews(const QString &imageType,
return errors;
}
-QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imageType, const KURL &url) const {
+TQString UMLViewImageExporterModel::exportView(UMLView* view, const TQString &imageType, const KURL &url) const {
// create the needed directories
if (!prepareDirectory(url)) {
return i18n("Can not create directory: %1").arg(url.directory());
@@ -129,7 +129,7 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
// The fileName will be used when exporting the image. If the url isn't local,
// the fileName is the name of a temporal local file to export the image to, and then
// upload it to its destiny
- QString fileName;
+ TQString fileName;
// tmpFile needs to be unlinked before exiting the method!!!
KTempFile tmpFile;
if (url.isLocalFile()) {
@@ -139,7 +139,7 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
}
// check that the diagram isn't empty
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
if (rect.isEmpty()) {
tmpFile.unlink();
return i18n("Can not save an empty diagram");
@@ -160,11 +160,11 @@ QString UMLViewImageExporterModel::exportView(UMLView* view, const QString &imag
} //!isLocalFile
tmpFile.unlink();
- return QString::null;
+ return TQString::null;
}
-QString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders /* = false */) const {
- QString name = view->getName() + '.' + imageType.lower();
+TQString UMLViewImageExporterModel::getDiagramFileName(UMLView *view, const TQString &imageType, bool useFolders /* = false */) const {
+ TQString name = view->getName() + '.' + imageType.lower();
if (!useFolders) {
return name;
@@ -194,8 +194,8 @@ bool UMLViewImageExporterModel::prepareDirectory(const KURL &url) const {
directory.setPath("");
// creates the directory and any needed parent directories
- QStringList dirs = QStringList::split(QDir::separator(), url.directory());
- for (QStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
+ TQStringList dirs = TQStringList::split(TQDir::separator(), url.directory());
+ for (TQStringList::ConstIterator it = dirs.begin() ; it != dirs.end(); ++it ) {
directory.addPath(*it);
if (!KIO::NetAccess::exists(directory, true, UMLApp::app())) {
@@ -209,11 +209,11 @@ bool UMLViewImageExporterModel::prepareDirectory(const KURL &url) const {
return true;
}
-bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const QString &imageType, const QString &fileName) const {
+bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const TQString &imageType, const TQString &fileName) const {
// remove 'blue squares' from exported picture.
view->clearSelected();
- QString imageMimeType = UMLViewImageExporterModel::imageTypeToMimeType(imageType);
+ TQString imageMimeType = UMLViewImageExporterModel::imageTypeToMimeType(imageType);
if (imageMimeType == "image/x-eps") {
if (!exportViewToEps(view, fileName, true)) {
return false;
@@ -231,7 +231,7 @@ bool UMLViewImageExporterModel::exportViewTo(UMLView* view, const QString &image
return true;
}
-bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fileName, bool isEPS) const {
+bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const TQString &fileName, bool isEPS) const {
bool exportSuccessful = true;
// print the image to a normal postscript file,
@@ -241,27 +241,27 @@ bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fi
// because we want to work with postscript
// user-coordinates, set to the resolution
// of the printer (which should be 72dpi here)
- QPrinter *printer;
+ TQPrinter *printer;
if (isEPS == false) {
- printer = new QPrinter(QPrinter::PrinterResolution);
+ printer = new TQPrinter(TQPrinter::PrinterResolution);
} else {
- printer = new QPrinter(QPrinter::ScreenResolution);
+ printer = new TQPrinter(TQPrinter::ScreenResolution);
}
printer->setOutputToFile(true);
printer->setOutputFileName(fileName);
- printer->setColorMode(QPrinter::Color);
+ printer->setColorMode(TQPrinter::Color);
// do not call printer.setup(); because we want no user
// interaction here
- QPainter *painter = new QPainter(printer);
+ TQPainter *painter = new TQPainter(printer);
// make sure the widget sizes will be according to the
// actually used printer font, important for getDiagramRect()
// and the actual painting
view->forceUpdateWidgetFontMetrics(painter);
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
painter->translate(-rect.x(),-rect.y());
view->getDiagram(rect,*painter);
@@ -282,19 +282,19 @@ bool UMLViewImageExporterModel::exportViewToEps(UMLView* view, const QString &fi
return exportSuccessful;
}
-bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rect) const {
+bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& rect) const {
// now open the file and make a correct eps out of it
- QFile epsfile(fileName);
+ TQFile epsfile(fileName);
if (! epsfile.open(IO_ReadOnly)) {
return false;
}
// read
- QTextStream ts(&epsfile);
- QString fileContent = ts.read();
+ TQTextStream ts(&epsfile);
+ TQString fileContent = ts.read();
epsfile.close();
// read information
- QRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)");
+ TQRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)\\s*(-?[\\d\\.:]+)");
const int pos = rx.search(fileContent);
if (pos < 0) {
kError() << "UMLViewImageExporterModel::fixEPS(" << fileName
@@ -320,7 +320,7 @@ bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rec
// modify content
fileContent.replace(pos,rx.cap(0).length(),
- QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
+ TQString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
ts << fileContent;
epsfile.close();
@@ -328,14 +328,14 @@ bool UMLViewImageExporterModel::fixEPS(const QString &fileName, const QRect& rec
return true;
}
-bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fileName) const {
+bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const TQString &fileName) const {
bool exportSuccesful;
- QPicture* diagram = new QPicture();
+ TQPicture* diagram = new TQPicture();
// do not call printer.setup(); because we want no user
// interaction here
- QPainter* painter = new QPainter();
+ TQPainter* painter = new TQPainter();
painter->begin( diagram );
// make sure the widget sizes will be according to the
@@ -343,11 +343,11 @@ bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fi
// and the actual painting
view->forceUpdateWidgetFontMetrics(painter);
- QRect rect = view->getDiagramRect();
+ TQRect rect = view->getDiagramRect();
painter->translate(-rect.x(),-rect.y());
view->getDiagram(rect,*painter);
painter->end();
- exportSuccesful = diagram->save(fileName, QString("SVG").ascii());
+ exportSuccesful = diagram->save(fileName, TQString("SVG").ascii());
// delete painter and printer before we try to open and fix the file
delete painter;
@@ -358,9 +358,9 @@ bool UMLViewImageExporterModel::exportViewToSvg(UMLView* view, const QString &fi
return exportSuccesful;
}
-bool UMLViewImageExporterModel::exportViewToPixmap(UMLView* view, const QString &imageType, const QString &fileName) const {
- QRect rect = view->getDiagramRect();
- QPixmap diagram(rect.width(), rect.height());
+bool UMLViewImageExporterModel::exportViewToPixmap(UMLView* view, const TQString &imageType, const TQString &fileName) const {
+ TQRect rect = view->getDiagramRect();
+ TQPixmap diagram(rect.width(), rect.height());
view->getDiagram(rect, diagram);
return diagram.save(fileName, imageType.upper().ascii());
}
diff --git a/umbrello/umbrello/umlviewimageexportermodel.h b/umbrello/umbrello/umlviewimageexportermodel.h
index d69796ac..1517d2d0 100644
--- a/umbrello/umbrello/umlviewimageexportermodel.h
+++ b/umbrello/umbrello/umlviewimageexportermodel.h
@@ -12,8 +12,8 @@
#ifndef UMLVIEWIMAGEEXPORTERMODEL_H
#define UMLVIEWIMAGEEXPORTERMODEL_H
-#include <qstringlist.h>
-#include <qrect.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
// forward declarations
class UMLView;
@@ -36,40 +36,40 @@ class UMLViewImageExporterModel {
public:
/**
- * Returns a QStringList containing all the supported image types to use when exporting.
+ * Returns a TQStringList containing all the supported image types to use when exporting.
* All the types will be lower case.
*
- * @return A QStringList containing all the supported image types to use when exporting.
+ * @return A TQStringList containing all the supported image types to use when exporting.
*/
- static QStringList supportedImageTypes();
+ static TQStringList supportedImageTypes();
/**
- * Returns a QStringList containing all the supported mime types to use when exporting.
+ * Returns a TQStringList containing all the supported mime types to use when exporting.
* All the types will be lower case.
*
- * @return A QStringList containing all the supported mime types to use when exporting.
+ * @return A TQStringList containing all the supported mime types to use when exporting.
*/
- static QStringList supportedMimeTypes();
+ static TQStringList supportedMimeTypes();
/**
* Returns the mime type for an image type.
* The supported image types are those that the diagrams can be exported to.
*
* @param imageType The type of the image.
- * @return A QString with the equivalent mime type, or QString::null if
+ * @return A TQString with the equivalent mime type, or TQString::null if
* it's unknown.
*/
- static QString imageTypeToMimeType(const QString& imageType);
+ static TQString imageTypeToMimeType(const TQString& imageType);
/**
* Returns the image type for a mime type.
* The supported image types are those that the diagrams can be exported to.
*
* @param mimeType The mime type.
- * @return A lowercase QString with the equivalent image type, or QString::null
+ * @return A lowercase TQString with the equivalent image type, or TQString::null
* if it's unknown.
*/
- static QString mimeTypeToImageType(const QString& mimeType);
+ static TQString mimeTypeToImageType(const TQString& mimeType);
/**
* Constructor for UMLViewImageExporterModel.
@@ -102,10 +102,10 @@ public:
* @param directory The url of the directory where the images will be saved.
* @param useFolders If the tree structure of the views in the document must be created
* in the target directory.
- * @return A QStringList with all the error messages that occurred during export.
+ * @return A TQStringList with all the error messages that occurred during export.
* If the list is empty, all the views were exported successfully.
*/
- QStringList exportAllViews(const QString &imageType, const KURL &directory, bool useFolders) const;
+ TQStringList exportAllViews(const TQString &imageType, const KURL &directory, bool useFolders) const;
/**
* Exports the view to the url using the 'imageType' for the image.
@@ -120,9 +120,9 @@ public:
* @param imageType The type of the image the view will be exported to.
* @param url The url where the image will be saved.
* @return The message error if some problem occurred when exporting, or
- * QString::null if all went fine.
+ * TQString::null if all went fine.
*/
- QString exportView(UMLView* view, const QString &imageType, const KURL &url) const;
+ TQString exportView(UMLView* view, const TQString &imageType, const KURL &url) const;
private:
@@ -142,7 +142,7 @@ private:
* in the file name.
* @return The name of the file where the view will be exported to.
*/
- QString getDiagramFileName(UMLView *view, const QString &imageType, bool useFolders = false) const;
+ TQString getDiagramFileName(UMLView *view, const TQString &imageType, bool useFolders = false) const;
/**
* Creates, if it doesn't exist, the directory to save the file.
@@ -163,7 +163,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewTo(UMLView* view, const QString &imageType, const QString &fileName) const;
+ bool exportViewTo(UMLView* view, const TQString &imageType, const TQString &fileName) const;
/**
* Exports the view to the file 'fileName' as EPS.
@@ -175,7 +175,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToEps(UMLView* view, const QString &fileName, bool isEPS) const;
+ bool exportViewToEps(UMLView* view, const TQString &fileName, bool isEPS) const;
/**
* Fix the file 'fileName' to be a valid EPS containing the
@@ -185,7 +185,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool fixEPS(const QString &fileName, const QRect& rect) const;
+ bool fixEPS(const TQString &fileName, const TQRect& rect) const;
/**
* Exports the view to the file 'fileName' as SVG.
@@ -195,11 +195,11 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToSvg(UMLView* view, const QString &fileName) const;
+ bool exportViewToSvg(UMLView* view, const TQString &fileName) const;
/**
* Exports the view to the file 'fileName' as a pixmap of the specified type.
- * The valid types are those supported by QPixmap save method.
+ * The valid types are those supported by TQPixmap save method.
*
* @param view The view to export.
* @param imageType The type of the image the view will be exported to.
@@ -207,7 +207,7 @@ private:
* @return True if the operation was successful,
* false if a problem occurred while exporting.
*/
- bool exportViewToPixmap(UMLView* view, const QString &imageType, const QString &fileName) const;
+ bool exportViewToPixmap(UMLView* view, const TQString &imageType, const TQString &fileName) const;
};
diff --git a/umbrello/umbrello/umlviewlist.h b/umbrello/umbrello/umlviewlist.h
index 90d5e199..12090c9a 100644
--- a/umbrello/umbrello/umlviewlist.h
+++ b/umbrello/umbrello/umlviewlist.h
@@ -23,7 +23,7 @@
class UMLView;
-typedef QPtrList<UMLView> UMLViewList;
-typedef QPtrListIterator<UMLView> UMLViewListIt;
+typedef TQPtrList<UMLView> UMLViewList;
+typedef TQPtrListIterator<UMLView> UMLViewListIt;
#endif
diff --git a/umbrello/umbrello/umlwidget.cpp b/umbrello/umbrello/umlwidget.cpp
index 3e947cd1..29dc2a86 100644
--- a/umbrello/umbrello/umlwidget.cpp
+++ b/umbrello/umbrello/umlwidget.cpp
@@ -12,8 +12,8 @@
// own header file
#include "umlwidget.h"
// system includes
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <kcolordialog.h>
#include <kfontdialog.h>
@@ -42,7 +42,7 @@ using namespace Uml;
UMLWidget::UMLWidget( UMLView * view, UMLObject * o, UMLWidgetController *widgetController /* = 0*/ )
- : WidgetBase(view), QCanvasRectangle( view->canvas() ),
+ : WidgetBase(view), TQCanvasRectangle( view->canvas() ),
m_pMenu(0)
{
if (widgetController) {
@@ -53,13 +53,13 @@ UMLWidget::UMLWidget( UMLView * view, UMLObject * o, UMLWidgetController *widget
init();
m_pObject = o;
if(m_pObject) {
- connect( m_pObject, SIGNAL(modified()), this, SLOT(updateWidget()) );
+ connect( m_pObject, TQT_SIGNAL(modified()), this, TQT_SLOT(updateWidget()) );
m_nId = m_pObject->getID();
}
}
UMLWidget::UMLWidget(UMLView * view, Uml::IDType id /* = Uml::id_None */, UMLWidgetController *widgetController /* = 0*/)
- : WidgetBase(view), QCanvasRectangle( view->canvas() ),
+ : WidgetBase(view), TQCanvasRectangle( view->canvas() ),
m_pMenu(0)
{
if (widgetController) {
@@ -92,7 +92,7 @@ UMLWidget& UMLWidget::operator=(const UMLWidget& other) {
setY( other.getY() );
m_Assocs = other.m_Assocs;
m_Font = other.m_Font;
- QCanvasRectangle::setSize( other.width(), other.height() );
+ TQCanvasRectangle::setSize( other.width(), other.height() );
m_bUsesDiagramFillColour = other.m_bUsesDiagramFillColour;
m_bUsesDiagramLineColour = other.m_bUsesDiagramLineColour;
m_bUsesDiagramLineWidth = other.m_bUsesDiagramLineWidth;
@@ -167,11 +167,11 @@ bool UMLWidget::operator==(const UMLWidget& other) {
*/
}
-void UMLWidget::mouseMoveEvent(QMouseEvent* me) {
+void UMLWidget::mouseMoveEvent(TQMouseEvent* me) {
m_widgetController->mouseMoveEvent(me);
}
-void UMLWidget::mousePressEvent(QMouseEvent *me) {
+void UMLWidget::mousePressEvent(TQMouseEvent *me) {
m_widgetController->mousePressEvent(me);
}
@@ -186,19 +186,19 @@ void UMLWidget::updateWidget()
update();
}
-QSize UMLWidget::calculateSize() {
- return QSize(20, 20);
+TQSize UMLWidget::calculateSize() {
+ return TQSize(20, 20);
}
void UMLWidget::constrain(int& width, int& height) {
- const QSize minSize = calculateSize();
+ const TQSize minSize = calculateSize();
if (width < minSize.width())
width = minSize.width();
if (height < minSize.height())
height = minSize.height();
}
-void UMLWidget::mouseReleaseEvent(QMouseEvent *me) {
+void UMLWidget::mouseReleaseEvent(TQMouseEvent *me) {
m_widgetController->mouseReleaseEvent(me);
}
@@ -234,21 +234,21 @@ void UMLWidget::init() {
m_pMenu = 0;
m_pDoc = UMLApp::app()->getDocument();
m_nPosX = 0;
- connect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- connect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
+ connect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ connect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
- connect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- connect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
- // connect( m_pView, SIGNAL(sigColorChanged(int)), this, SLOT(slotColorChanged(int)));
+ // connect( m_pView, TQT_SIGNAL(sigColorChanged(int)), this, TQT_SLOT(slotColorChanged(int)));
m_pObject = NULL;
setZ(m_origZ = 2); // default for most widgets
}
void UMLWidget::slotMenuSelection(int sel) {
- QFont font;
- QColor newColour;
+ TQFont font;
+ TQColor newColour;
const Uml::Widget_Type wt = m_Type;
UMLWidget* widget = 0; // use for select the first object properties (fill, line color)
@@ -420,7 +420,7 @@ void UMLWidget::slotLineWidthChanged(Uml::IDType viewID) {
update();
}
-void UMLWidget::mouseDoubleClickEvent( QMouseEvent * me ) {
+void UMLWidget::mouseDoubleClickEvent( TQMouseEvent * me ) {
m_widgetController->mouseDoubleClickEvent(me);
}
@@ -430,7 +430,7 @@ void UMLWidget::setUseFillColour(bool fc) {
update();
}
-void UMLWidget::setLineColor(const QColor &colour) {
+void UMLWidget::setLineColor(const TQColor &colour) {
WidgetBase::setLineColor(colour);
update();
}
@@ -440,17 +440,17 @@ void UMLWidget::setLineWidth(uint width) {
update();
}
-void UMLWidget::setFillColour(const QColor &colour) {
+void UMLWidget::setFillColour(const TQColor &colour) {
m_FillColour = colour;
m_bUsesDiagramFillColour = false;
update();
}
-void UMLWidget::drawSelected(QPainter * p, int offsetX, int offsetY) {
+void UMLWidget::drawSelected(TQPainter * p, int offsetX, int offsetY) {
int w = width();
int h = height();
int s = 4;
- QBrush brush(Qt::blue);
+ TQBrush brush(Qt::blue);
p -> fillRect(offsetX, offsetY, s, s, brush);
p -> fillRect(offsetX, offsetY + h - s, s, s, brush);
p -> fillRect(offsetX + w - s, offsetY, s, s, brush);
@@ -483,7 +483,7 @@ bool UMLWidget::activate(IDChangeLog* /*ChangeLog = 0 */) {
updateComponentSize();
if (m_pView->getPaste()) {
FloatingTextWidget * ft = 0;
- QPoint point = m_pView -> getPastePoint();
+ TQPoint point = m_pView -> getPastePoint();
int x = point.x() + getX();
int y = point.y() + getY();
x = x < 0?0:x;
@@ -598,7 +598,7 @@ void UMLWidget::showProperties() {
// back it the widget
DocWindow *docwindow = UMLApp::app()->getDocWindow();
docwindow->updateDocumentation( false );
- ClassPropDlg *dlg = new ClassPropDlg((QWidget*)UMLApp::app(), this);
+ ClassPropDlg *dlg = new ClassPropDlg((TQWidget*)UMLApp::app(), this);
if (dlg->exec()) {
docwindow->showDocumentation( getUMLObject() , true );
@@ -607,7 +607,7 @@ void UMLWidget::showProperties() {
dlg->close(true); //wipe from memory
}
-void UMLWidget::startPopupMenu( const QPoint &At) {
+void UMLWidget::startPopupMenu( const TQPoint &At) {
slotRemovePopupMenu();
//if in a multi- selection to a specific m_pMenu for that
@@ -637,18 +637,18 @@ void UMLWidget::startPopupMenu( const QPoint &At) {
m_pMenu->popup(At);
- connect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ connect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
}
void UMLWidget::slotRemovePopupMenu() {
if(m_pMenu) {
- disconnect(m_pMenu, SIGNAL(activated(int)), this, SLOT(slotMenuSelection(int)));
+ disconnect(m_pMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuSelection(int)));
delete m_pMenu;
m_pMenu = 0;
}
}
-int UMLWidget::onWidget(const QPoint & p) {
+int UMLWidget::onWidget(const TQPoint & p) {
const int w = width();
const int h = height();
const int left = getX();
@@ -669,11 +669,11 @@ void UMLWidget::moveBy(int dx, int dy) {
adjustAssocs(newX, newY);
}
-void UMLWidget::setPen(QPainter & p) {
- p.setPen( QPen(m_LineColour, m_LineWidth) );
+void UMLWidget::setPen(TQPainter & p) {
+ p.setPen( TQPen(m_LineColour, m_LineWidth) );
}
-void UMLWidget::drawShape(QPainter &p ) {
+void UMLWidget::drawShape(TQPainter &p ) {
draw( p, getX(), getY() );
}
@@ -699,7 +699,7 @@ void UMLWidget::setSelected(bool _select) {
}
m_bSelected = _select;
- const QPoint pos(getX(), getY());
+ const TQPoint pos(getX(), getY());
UMLWidget *bkgnd = m_pView->getWidgetAt(pos);
if (bkgnd && bkgnd != this && _select) {
kDebug() << "UMLWidget::setSelected: setting Z to "
@@ -723,37 +723,37 @@ void UMLWidget::slotClearAllSelected()
void UMLWidget::setView(UMLView * v) {
//remove signals from old view - was probably 0 anyway
- disconnect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- disconnect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
- disconnect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- disconnect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ disconnect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ disconnect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
+ disconnect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ disconnect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
m_pView = v;
- connect( m_pView, SIGNAL( sigRemovePopupMenu() ), this, SLOT( slotRemovePopupMenu() ) );
- connect( m_pView, SIGNAL( sigClearAllSelected() ), this, SLOT( slotClearAllSelected() ) );
- connect( m_pView, SIGNAL(sigColorChanged(Uml::IDType)), this, SLOT(slotColorChanged(Uml::IDType)));
- connect( m_pView, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL( sigRemovePopupMenu() ), this, TQT_SLOT( slotRemovePopupMenu() ) );
+ connect( m_pView, TQT_SIGNAL( sigClearAllSelected() ), this, TQT_SLOT( slotClearAllSelected() ) );
+ connect( m_pView, TQT_SIGNAL(sigColorChanged(Uml::IDType)), this, TQT_SLOT(slotColorChanged(Uml::IDType)));
+ connect( m_pView, TQT_SIGNAL(sigLineWidthChanged(Uml::IDType)), this, TQT_SLOT(slotLineWidthChanged(Uml::IDType)));
}
void UMLWidget::setX( int x ) {
if (!m_bIgnoreSnapToGrid) {
x = m_pView->snappedX(x);
}
- QCanvasItem::setX( (double)x );
+ TQCanvasItem::setX( (double)x );
}
void UMLWidget::setY( int y ) {
if (!m_bIgnoreSnapToGrid){
y = m_pView->snappedX(y);
}
- QCanvasItem::setY( (double)y );
+ TQCanvasItem::setY( (double)y );
}
void UMLWidget::setZ(int z) {
m_origZ = getZ();
- QCanvasItem::setZ(z);
+ TQCanvasItem::setZ(z);
}
-void UMLWidget::setName(const QString &strName) {
+void UMLWidget::setName(const TQString &strName) {
if (m_pObject)
m_pObject->setName(strName);
else
@@ -762,7 +762,7 @@ void UMLWidget::setName(const QString &strName) {
adjustAssocs( getX(), getY() );
}
-QString UMLWidget::getName() const {
+TQString UMLWidget::getName() const {
if (m_pObject)
return m_pObject->getName();
return m_Text;
@@ -817,13 +817,13 @@ void UMLWidget::setSize(int width,int height) {
height = (numY + 1) * m_pView->getSnapY();
}
- QCanvasRectangle::setSize(width,height);
+ TQCanvasRectangle::setSize(width,height);
}
void UMLWidget::updateComponentSize() {
if (m_pDoc->loading())
return;
- const QSize minSize = calculateSize();
+ const TQSize minSize = calculateSize();
const int w = minSize.width();
const int h = minSize.height();
setSize(w, h);
@@ -832,10 +832,10 @@ void UMLWidget::updateComponentSize() {
void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType) {
setupFontType(m_Font, fontType);
- setFontMetrics(fontType, QFontMetrics(m_Font));
+ setFontMetrics(fontType, TQFontMetrics(m_Font));
}
-void UMLWidget::setupFontType(QFont &font, UMLWidget::FontType fontType) {
+void UMLWidget::setupFontType(TQFont &font, UMLWidget::FontType fontType) {
switch(fontType){
case FT_NORMAL:
font.setBold(false);
@@ -881,30 +881,30 @@ void UMLWidget::setupFontType(QFont &font, UMLWidget::FontType fontType) {
}
}
-void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType, QPainter &painter) {
+void UMLWidget::setDefaultFontMetrics(UMLWidget::FontType fontType, TQPainter &painter) {
setupFontType(m_Font, fontType);
painter.setFont(m_Font);
setFontMetrics(fontType, painter.fontMetrics());
}
//FIXME this is probably the source of problems with widgets not being wide enough
-QFontMetrics &UMLWidget::getFontMetrics(UMLWidget::FontType fontType) {
+TQFontMetrics &UMLWidget::getFontMetrics(UMLWidget::FontType fontType) {
if (m_pFontMetrics[fontType] == 0) {
setDefaultFontMetrics(fontType);
}
return *m_pFontMetrics[fontType];
}
-void UMLWidget::setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm) {
+void UMLWidget::setFontMetrics(UMLWidget::FontType fontType, TQFontMetrics fm) {
delete m_pFontMetrics[fontType];
- m_pFontMetrics[fontType] = new QFontMetrics(fm);
+ m_pFontMetrics[fontType] = new TQFontMetrics(fm);
}
-QFont UMLWidget::getFont() const {
+TQFont UMLWidget::getFont() const {
return m_Font;
}
-void UMLWidget::setFont( QFont font ) {
+void UMLWidget::setFont( TQFont font ) {
m_Font = font;
forceUpdateFontMetrics(0);
if (m_pDoc->loading())
@@ -912,7 +912,7 @@ void UMLWidget::setFont( QFont font ) {
update();
}
-void UMLWidget::forceUpdateFontMetrics(QPainter *painter) {
+void UMLWidget::forceUpdateFontMetrics(TQPainter *painter) {
if (painter == 0) {
for (int i = 0; i < (int)UMLWidget::FT_INVALID; ++i) {
if (m_pFontMetrics[(UMLWidget::FontType)i]!=0)
@@ -938,10 +938,10 @@ bool UMLWidget::getShowStereotype() const {
return m_bShowStereotype;
}
-void UMLWidget::moveEvent(QMoveEvent* /*me*/) {
+void UMLWidget::moveEvent(TQMoveEvent* /*me*/) {
}
-void UMLWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
+void UMLWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
/*
Call after required actions in child class.
Type must be set in the child class.
@@ -969,31 +969,31 @@ void UMLWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
qElement.setAttribute("showstereotype", m_bShowStereotype);
}
-bool UMLWidget::loadFromXMI( QDomElement & qElement ) {
+bool UMLWidget::loadFromXMI( TQDomElement & qElement ) {
WidgetBase::loadFromXMI(qElement);
- QString id = qElement.attribute( "xmi.id", "-1" );
- QString font = qElement.attribute( "font", "" );
- QString usefillcolor = qElement.attribute( "usefillcolor", "1" );
- QString x = qElement.attribute( "x", "0" );
- QString y = qElement.attribute( "y", "0" );
- QString h = qElement.attribute( "height", "0" );
- QString w = qElement.attribute( "width", "0" );
+ TQString id = qElement.attribute( "xmi.id", "-1" );
+ TQString font = qElement.attribute( "font", "" );
+ TQString usefillcolor = qElement.attribute( "usefillcolor", "1" );
+ TQString x = qElement.attribute( "x", "0" );
+ TQString y = qElement.attribute( "y", "0" );
+ TQString h = qElement.attribute( "height", "0" );
+ TQString w = qElement.attribute( "width", "0" );
/*
For the next three *color attributes, there was a mixup of american and english spelling for "color".
So first we need to keep backward compatibility and try to retrieve the *colour attribute.
Next we overwrite this value if we find a *color, otherwise the former *colour is kept.
*/
- QString fillColour = qElement.attribute( "fillcolour", "none" );
+ TQString fillColour = qElement.attribute( "fillcolour", "none" );
fillColour = qElement.attribute( "fillcolor", fillColour );
- QString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
+ TQString usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolour", "1" );
usesDiagramFillColour = qElement.attribute( "usesdiagramfillcolor", usesDiagramFillColour );
- QString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
+ TQString usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolour", "1" );
usesDiagramUseFillColour = qElement.attribute( "usesdiagramusefillcolor", usesDiagramUseFillColour );
m_nId = STR2ID(id);
if( !font.isEmpty() ) {
- //QFont newFont;
+ //TQFont newFont;
m_Font.fromString(font);
//setFont(newFont);
} else {
@@ -1008,12 +1008,12 @@ bool UMLWidget::loadFromXMI( QDomElement & qElement ) {
setX( x.toInt() );
setY( y.toInt() );
if (fillColour != "none") {
- m_FillColour = QColor(fillColour);
+ m_FillColour = TQColor(fillColour);
}
- QString isinstance = qElement.attribute("isinstance", "0");
+ TQString isinstance = qElement.attribute("isinstance", "0");
m_bIsInstance = (bool)isinstance.toInt();
m_instanceName = qElement.attribute("instancename", "");
- QString showstereo = qElement.attribute("showstereotype", "0");
+ TQString showstereo = qElement.attribute("showstereotype", "0");
m_bShowStereotype = (bool)showstereo.toInt();
return true;
}
diff --git a/umbrello/umbrello/umlwidget.h b/umbrello/umbrello/umlwidget.h
index 7ed472a9..0b96d5b2 100644
--- a/umbrello/umbrello/umlwidget.h
+++ b/umbrello/umbrello/umlwidget.h
@@ -12,9 +12,9 @@
#ifndef UMLWIDGET_H
#define UMLWIDGET_H
-#include <qcanvas.h>
-#include <qdatetime.h>
-#include <qfont.h>
+#include <tqcanvas.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
#include "umlnamespace.h"
#include "widgetbase.h"
@@ -40,7 +40,7 @@ class QFontMetrics;
* @author Paul Hensgen <phensgen@techie.com>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class UMLWidget : public WidgetBase, public QCanvasRectangle {
+class UMLWidget : public WidgetBase, public TQCanvasRectangle {
Q_OBJECT
public:
friend class UMLWidgetController;
@@ -88,17 +88,17 @@ public:
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseReleaseEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
/**
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseDoubleClickEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseDoubleClickEvent(QMouseEvent *me);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *me);
/**
* Set the status of using fill color.
@@ -117,7 +117,7 @@ public:
/**
* Overrides the method from WidgetBase.
*/
- void setLineColor(const QColor &colour);
+ void setLineColor(const TQColor &colour);
/**
* Overrides the method from WidgetBase.
@@ -129,12 +129,12 @@ public:
*
* @param colour the new fill colour
*/
- void setFillColour(const QColor &colour);
+ void setFillColour(const TQColor &colour);
/**
- * Read property of QColor m_FillColour.
+ * Read property of TQColor m_FillColour.
*/
- QColor getFillColour() const {
+ TQColor getFillColour() const {
return m_FillColour;
}
@@ -142,9 +142,9 @@ public:
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mouseMoveEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Returns whether this is a line of text.
@@ -200,7 +200,7 @@ public:
* @return 0 if the given point is not in the boundaries of the widget;
* (width()+height())/2 if the point is within the boundaries.
*/
- virtual int onWidget(const QPoint & p);
+ virtual int onWidget(const TQPoint & p);
/**
* Draws the UMLWidget on the given paint device
@@ -210,24 +210,24 @@ public:
* @param offsetY y position to start the drawing.
*
*/
- virtual void draw(QPainter & p, int offsetX, int offsetY) = 0;
+ virtual void draw(TQPainter & p, int offsetX, int offsetY) = 0;
/**
* Set the pen.
*/
- void setPen(QPainter & p);
+ void setPen(TQPainter & p);
/**
* Sets the font the widget is to use.
*
* @param font Font to be set.
*/
- virtual void setFont( QFont font );
+ virtual void setFont( TQFont font );
/**
* Returns the font the widget is to use.
*/
- virtual QFont getFont() const;
+ virtual TQFont getFont() const;
/**
* Returns whether we triggered the update of position movement.
@@ -268,35 +268,35 @@ public:
* Gets the x-coordinate.
*/
int getX() const {
- return (int)QCanvasItem::x();
+ return (int)TQCanvasItem::x();
}
/**
* Gets the y-coordinate.
*/
int getY() const {
- return (int)QCanvasItem::y();
+ return (int)TQCanvasItem::y();
}
/**
* Gets the z-coordinate.
*/
int getZ() const {
- return (int)QCanvasItem::z();
+ return (int)TQCanvasItem::z();
}
/**
* Returns the height of widget.
*/
int getHeight() const {
- return QCanvasRectangle::height();
+ return TQCanvasRectangle::height();
}
/**
* Returns the width of the widget.
*/
int getWidth() const {
- return QCanvasRectangle::width();
+ return TQCanvasRectangle::width();
}
/**
@@ -386,14 +386,14 @@ public:
/**
* Write property of m_instanceName
*/
- void setInstanceName(const QString &instanceName) {
+ void setInstanceName(const TQString &instanceName) {
m_instanceName = instanceName;
}
/**
* Read property of m_instanceName
*/
- QString getInstanceName() const {
+ TQString getInstanceName() const {
return m_instanceName;
}
@@ -429,7 +429,7 @@ public:
*
* @param strName The name to be set.
*/
- virtual void setName(const QString &strName);
+ virtual void setName(const TQString &strName);
/**
* Gets the name from the corresponding UMLObject.
@@ -437,14 +437,14 @@ public:
*
* @return The currently set name.
*/
- virtual QString getName() const;
+ virtual TQString getName() const;
/**
* Starts the popup menu.
*
* @param At The Point where the diagram is to be coming up.
*/
- void startPopupMenu( const QPoint &At );
+ void startPopupMenu( const TQPoint &At );
/**
* Adjusts associations with the given co-ordinates
@@ -492,26 +492,26 @@ public:
* This behaviour is acceptable, because diagrams will always be showed on Display
* first before a special painter like a printer device is used.
*/
- void forceUpdateFontMetrics(QPainter *painter);
+ void forceUpdateFontMetrics(TQPainter *painter);
/**
* Calls the method with the same name in UMLWidgetController.
* @see UMLWidgetController#mousePressEvent
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mousePressEvent(QMouseEvent *me);
+ virtual void mousePressEvent(TQMouseEvent *me);
/**
* Overrides the standard operation.
*
* @param me The move event.
*/
- virtual void moveEvent(QMoveEvent *me);
+ virtual void moveEvent(TQMoveEvent *me);
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
/**
* Returns the UMLWdigetController for this widget.
@@ -537,22 +537,22 @@ protected:
* @param offsetX The x-coordinate for drawing.
* @param offsetY The y-coordinate for drawing.
*/
- virtual void drawSelected(QPainter * p, int offsetX, int offsetY);
+ virtual void drawSelected(TQPainter * p, int offsetX, int offsetY);
/**
* Overrides default method.
*
* @param p Device on which the shape has to be drawn.
*/
- virtual void drawShape(QPainter &p );
+ virtual void drawShape(TQPainter &p );
/**
* Compute the minimum possible width and height.
* The default implementation returns width=20, height=20.
*
- * @return QSize(mininum_width, minimum_height)
+ * @return TQSize(mininum_width, minimum_height)
*/
- virtual QSize calculateSize();
+ virtual TQSize calculateSize();
typedef enum {
FT_NORMAL = 0,
@@ -570,13 +570,13 @@ protected:
* font metric.
*/
virtual void setDefaultFontMetrics(UMLWidget::FontType fontType);
- virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, QPainter &painter);
+ virtual void setDefaultFontMetrics(UMLWidget::FontType fontType, TQPainter &painter);
/** Returns the font metric used by this object for Text which uses bold/italic fonts*/
- QFontMetrics &getFontMetrics(UMLWidget::FontType fontType);
+ TQFontMetrics &getFontMetrics(UMLWidget::FontType fontType);
/** set the font metric to use */
- void setFontMetrics(UMLWidget::FontType fontType, QFontMetrics fm);
- void setupFontType(QFont &font, UMLWidget::FontType fontType);
+ void setFontMetrics(UMLWidget::FontType fontType, TQFontMetrics fm);
+ void setupFontType(TQFont &font, UMLWidget::FontType fontType);
/**
* Initializes key attributes of the class.
@@ -600,7 +600,7 @@ protected:
/**
* Color of the background of the widget
*/
- QColor m_FillColour;
+ TQColor m_FillColour;
/**
* A list of AssociationWidgets between the UMLWidget and other UMLWidgets in the diagram
@@ -612,12 +612,12 @@ protected:
* underlying UMLObject; if it does not, then getName() returns the local
* m_Text (notably the case for FloatingTextWidget.)
*/
- QString m_Text;
+ TQString m_Text;
/**
* The font the widget will use.
*/
- QFont m_Font;
+ TQFont m_Font;
/**
* Holds whether this widget is a component instance (i.e. on a deployment diagram)
@@ -627,7 +627,7 @@ protected:
/**
* The instance name (used if on a deployment diagram)
*/
- QString m_instanceName;
+ TQString m_instanceName;
/**
* Should the stereotype be displayed
@@ -642,7 +642,7 @@ protected:
ListPopupMenu *m_pMenu;
UMLDoc *m_pDoc; ///< shortcut for UMLApp::app()->getDocument()
bool m_bResizable;
- QFontMetrics *m_pFontMetrics[FT_INVALID];
+ TQFontMetrics *m_pFontMetrics[FT_INVALID];
/**
* It is true if the Activate Function has been called for this
diff --git a/umbrello/umbrello/umlwidgetcontroller.cpp b/umbrello/umbrello/umlwidgetcontroller.cpp
index 29ca98a1..9764e74f 100644
--- a/umbrello/umbrello/umlwidgetcontroller.cpp
+++ b/umbrello/umbrello/umlwidgetcontroller.cpp
@@ -13,8 +13,8 @@
#include "umlwidgetcontroller.h"
// qt includes
-#include <qevent.h>
-#include <qpoint.h>
+#include <tqevent.h>
+#include <tqpoint.h>
// kde includes
#include <kcursor.h>
@@ -53,7 +53,7 @@ UMLWidgetController::UMLWidgetController(UMLWidget *widget) {
UMLWidgetController::~UMLWidgetController() {
}
-void UMLWidgetController::mousePressEvent(QMouseEvent *me) {
+void UMLWidgetController::mousePressEvent(TQMouseEvent *me) {
// If there is a button pressed already ignore other press events
if (m_leftButtonDown || m_middleButtonDown || m_rightButtonDown) {
return;
@@ -115,7 +115,7 @@ void UMLWidgetController::mousePressEvent(QMouseEvent *me) {
}
}
-void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
+void UMLWidgetController::mouseMoveEvent(TQMouseEvent* me) {
if (!m_leftButtonDown)
return;
@@ -134,7 +134,7 @@ void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
setSelectionBounds();
}
- QPoint position = getPosition(me);
+ TQPoint position = getPosition(me);
int diffX = position.x() - m_widget->getX();
int diffY = position.y() - m_widget->getY();
@@ -188,7 +188,7 @@ void UMLWidgetController::mouseMoveEvent(QMouseEvent* me) {
updateSelectionBounds(diffX, diffY);
}
-void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
+void UMLWidgetController::mouseReleaseEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton && me->button() != Qt::RightButton) {
if (m_middleButtonDown) {
m_middleButtonDown = false;
@@ -244,12 +244,12 @@ void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
showPopupMenu(me);
} else if (m_leftButtonDown) {
//Cancel move/edit
- QMouseEvent move(QMouseEvent::MouseMove,
- QPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
+ TQMouseEvent move(TQMouseEvent::MouseMove,
+ TQPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
Qt::LeftButton, Qt::NoButton);
mouseMoveEvent(&move);
- QMouseEvent release(QMouseEvent::MouseButtonRelease,
- QPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
+ TQMouseEvent release(TQMouseEvent::MouseButtonRelease,
+ TQPoint(m_oldX + m_pressOffsetX, m_oldY + m_pressOffsetY),
Qt::LeftButton, Qt::NoButton);
mouseReleaseEvent(&release);
}
@@ -266,7 +266,7 @@ void UMLWidgetController::mouseReleaseEvent(QMouseEvent *me) {
}
}
-void UMLWidgetController::mouseDoubleClickEvent(QMouseEvent *me) {
+void UMLWidgetController::mouseDoubleClickEvent(TQMouseEvent *me) {
if (me->button() != Qt::LeftButton) {
return;
}
@@ -276,7 +276,7 @@ void UMLWidgetController::mouseDoubleClickEvent(QMouseEvent *me) {
doMouseDoubleClick(me);
}
-bool UMLWidgetController::isInResizeArea(QMouseEvent *me) {
+bool UMLWidgetController::isInResizeArea(TQMouseEvent *me) {
const int m = 10;
if (m_widget->m_bResizable &&
@@ -290,7 +290,7 @@ bool UMLWidgetController::isInResizeArea(QMouseEvent *me) {
}
}
-QCursor UMLWidgetController::getResizeCursor() {
+TQCursor UMLWidgetController::getResizeCursor() {
return KCursor::sizeFDiagCursor();
}
@@ -306,7 +306,7 @@ void UMLWidgetController::moveWidgetBy(int diffX, int diffY) {
void UMLWidgetController::constrainMovementForAllWidgets(int &/*diffX*/, int &/*diffY*/) {
}
-void UMLWidgetController::doMouseDoubleClick(QMouseEvent *) {
+void UMLWidgetController::doMouseDoubleClick(TQMouseEvent *) {
if (!m_widget || !m_widget->m_pMenu)
return;
m_widget->slotMenuSelection(ListPopupMenu::mt_Properties);
@@ -320,7 +320,7 @@ void UMLWidgetController::resetSelection() {
m_wasSelected = false;
}
-void UMLWidgetController::selectSingle(QMouseEvent *me) {
+void UMLWidgetController::selectSingle(TQMouseEvent *me) {
m_widget->m_pView->clearSelected();
//Adds the widget to the selected widgets list, but as it has been cleared
@@ -328,7 +328,7 @@ void UMLWidgetController::selectSingle(QMouseEvent *me) {
selectMultiple(me);
}
-void UMLWidgetController::selectMultiple(QMouseEvent *me) {
+void UMLWidgetController::selectMultiple(TQMouseEvent *me) {
m_widget->m_bSelected = true;
m_widget->setSelected(m_widget->m_bSelected);
m_widget->m_pView->setSelected(m_widget, me);
@@ -336,14 +336,14 @@ void UMLWidgetController::selectMultiple(QMouseEvent *me) {
m_wasSelected = true;
}
-void UMLWidgetController::deselect(QMouseEvent *me) {
+void UMLWidgetController::deselect(TQMouseEvent *me) {
m_widget->m_bSelected = false;
m_widget->setSelected(m_widget->m_bSelected);
m_widget->m_pView->setSelected(m_widget, me);
//m_wasSelected is false implicitly, no need to set it again
}
-void UMLWidgetController::saveWidgetValues(QMouseEvent *me) {
+void UMLWidgetController::saveWidgetValues(TQMouseEvent *me) {
m_pressOffsetX = me->x() - m_widget->getX();
m_pressOffsetY = me->y() - m_widget->getY();
@@ -375,7 +375,7 @@ void UMLWidgetController::updateSelectionBounds(int diffX, int diffY) {
}
}
-void UMLWidgetController::resize(QMouseEvent *me) {
+void UMLWidgetController::resize(TQMouseEvent *me) {
UMLApp::app()->getDocument()->writeToStatusBar(i18n("Hold shift or ctrl to move in X axis. Hold shift and control to move in Y axis. Right button click to cancel resize."));
m_resized = true;
@@ -480,7 +480,7 @@ int UMLWidgetController::getBiggestY(const UMLWidgetList &widgetList) {
return biggestY;
}
-QPoint UMLWidgetController::getPosition(QMouseEvent* me) {
+TQPoint UMLWidgetController::getPosition(TQMouseEvent* me) {
/*
kDebug() << "UMLWidgetController::getPosition: me->x=" << me->x()
<< " m_widget->getX=" << m_widget->getX() << ", m_oldX=" << m_oldX
@@ -513,17 +513,17 @@ QPoint UMLWidgetController::getPosition(QMouseEvent* me) {
//kDebug() << "UMLWidgetController::getPosition: got into cond.4" << endl;
newY = maxY - (m_maxSelectedY - m_widget->getY());
}
- return QPoint(newX, newY);
+ return TQPoint(newX, newY);
}
-QPoint UMLWidgetController::getPositionDifference(QMouseEvent* me) {
- QPoint newPoint = getPosition(me);
+TQPoint UMLWidgetController::getPositionDifference(TQMouseEvent* me) {
+ TQPoint newPoint = getPosition(me);
const int diffX = newPoint.x() - m_widget->getX();
const int diffY = newPoint.y() - m_widget->getY();
- return QPoint(diffX, diffY);
+ return TQPoint(diffX, diffY);
}
-void UMLWidgetController::showPopupMenu(QMouseEvent *me) {
+void UMLWidgetController::showPopupMenu(TQMouseEvent *me) {
//TODO why this condition?
if (m_widget->m_pMenu) {
return;
diff --git a/umbrello/umbrello/umlwidgetcontroller.h b/umbrello/umbrello/umlwidgetcontroller.h
index 552ea174..a21ba930 100644
--- a/umbrello/umbrello/umlwidgetcontroller.h
+++ b/umbrello/umbrello/umlwidgetcontroller.h
@@ -13,7 +13,7 @@
#define UMLWIDGETCONTROLLER_H
// qt includes
-#include <qdatetime.h>
+#include <tqdatetime.h>
// app includes
#include "umlwidgetlist.h"
@@ -104,9 +104,9 @@ public:
* it's marked to be deselected when releasing the button (provided it wasn't
* moved or resized).
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mousePressEvent(QMouseEvent *me);
+ virtual void mousePressEvent(TQMouseEvent *me);
/**
* Handles a mouse move event.
@@ -137,9 +137,9 @@ public:
* not updated always to be easy on the CPU). Finally, the canvas is resized,
* and selection bounds updated.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseMoveEvent(QMouseEvent* me);
+ virtual void mouseMoveEvent(TQMouseEvent* me);
/**
* Handles a mouse release event.
@@ -162,9 +162,9 @@ public:
* event at the same position than the cursor was when pressed. Another left
* button release is also sent.
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseReleaseEvent(QMouseEvent * me);
+ virtual void mouseReleaseEvent(TQMouseEvent * me);
/**
* Handles a mouse double click event.
@@ -173,9 +173,9 @@ public:
* doMouseDoubleClick.
* @see doMouseDoubleClick
*
- * @param me The QMouseEvent event.
+ * @param me The TQMouseEvent event.
*/
- virtual void mouseDoubleClickEvent(QMouseEvent *me);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *me);
protected:
@@ -189,9 +189,9 @@ protected:
* resize begins. However, parent method (that is, this method) must be
* called in the overridden method.
*
- * @param me The QMouseEvent to get the offset from.
+ * @param me The TQMouseEvent to get the offset from.
*/
- virtual void saveWidgetValues(QMouseEvent *me);
+ virtual void saveWidgetValues(TQMouseEvent *me);
/**
* Checks if the mouse is in resize area (right bottom corner), and sets
@@ -201,7 +201,7 @@ protected:
* @param me The QMouseEVent to check.
* @return true if the mouse is in resize area, false otherwise.
*/
- virtual bool isInResizeArea(QMouseEvent *me);
+ virtual bool isInResizeArea(TQMouseEvent *me);
/**
* Returns the cursor to be shown when resizing the widget.
@@ -210,7 +210,7 @@ protected:
*
* @return The cursor to be shown when resizing the widget.
*/
- virtual QCursor getResizeCursor();
+ virtual TQCursor getResizeCursor();
/**
* Resizes the widget.
@@ -274,9 +274,9 @@ protected:
* don't have an UMLObject representation) there's no need to override
* the method, it simply does nothing.
*
- * @param me The QMouseEvent which triggered the double click event.
+ * @param me The TQMouseEvent which triggered the double click event.
*/
- virtual void doMouseDoubleClick(QMouseEvent *me);
+ virtual void doMouseDoubleClick(TQMouseEvent *me);
/**
* Clears the selection, resets the toolbar and deselects the widget.
@@ -286,23 +286,23 @@ protected:
/**
* Selects the widget and clears the other selected widgets, if any.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void selectSingle(QMouseEvent *me);
+ void selectSingle(TQMouseEvent *me);
/**
* Selects the widget and adds it to the list of selected widgets.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void selectMultiple(QMouseEvent *me);
+ void selectMultiple(TQMouseEvent *me);
/**
* Deselects the widget and removes it from the list of selected widgets.
*
- * @param me The QMouseEvent which made the selection.
+ * @param me The TQMouseEvent which made the selection.
*/
- void deselect(QMouseEvent *me);
+ void deselect(TQMouseEvent *me);
/**
* Fills m_selectedWidgetsList and sets the selection bounds ((m_min/m_max)X/Y attributes).
@@ -325,9 +325,9 @@ protected:
* in resize area when pressed.
* Resizing can be constrained to an specific axis using control and shift buttons.
*
- * @param me The QMouseEvent to get the values from.
+ * @param me The TQMouseEvent to get the values from.
*/
- void resize(QMouseEvent *me);
+ void resize(TQMouseEvent *me);
/**
* Returns the smallest X position of all the widgets in the list.
@@ -367,26 +367,26 @@ protected:
* m_widget->get{X,Y}(), the previous position m_old{X,Y}, and the
* mouse press offset m_pressOffset{X,Y}.
*
- * @param me The QMouseEvent for which to get the adjusted position.
- * @return A QPoint with the adjusted position.
+ * @param me The TQMouseEvent for which to get the adjusted position.
+ * @return A TQPoint with the adjusted position.
*/
- QPoint getPosition(QMouseEvent *me);
+ TQPoint getPosition(TQMouseEvent *me);
/**
- * Returns a QPoint with the new X and Y position difference of the mouse event
+ * Returns a TQPoint with the new X and Y position difference of the mouse event
* respect to the position of the widget.
*
- * @param me The QMouseEvent to get the position to compare.
- * @return A QPoint with the position difference.
+ * @param me The TQMouseEvent to get the position to compare.
+ * @return A TQPoint with the position difference.
*/
- QPoint getPositionDifference(QMouseEvent *me);
+ TQPoint getPositionDifference(TQMouseEvent *me);
/**
* Shows the widget popup menu where the mouse event points to.
*
- * @param me The QMouseEvent which triggered the showing.
+ * @param me The TQMouseEvent which triggered the showing.
*/
- void showPopupMenu(QMouseEvent *me);
+ void showPopupMenu(TQMouseEvent *me);
/**
* Checks if the size of the widget changed respect to the size that
@@ -412,7 +412,7 @@ protected:
/**
* Timer that prevents excessive updates (be easy on the CPU).
*/
- QTime lastUpdate;
+ TQTime lastUpdate;
/**
* A list containing the selected widgets.
@@ -426,7 +426,7 @@ protected:
/**
* The text in the status bar when the cursor was pressed.
*/
- QString m_oldStatusBarMsg;
+ TQString m_oldStatusBarMsg;
/**
* The X/Y offset from the position of the cursor when it was pressed to the
diff --git a/umbrello/umbrello/umlwidgetlist.h b/umbrello/umbrello/umlwidgetlist.h
index 45a9db6b..27670a8f 100644
--- a/umbrello/umbrello/umlwidgetlist.h
+++ b/umbrello/umbrello/umlwidgetlist.h
@@ -19,11 +19,11 @@
#ifndef UMLWIDGETLIST_H
#define UMLWIDGETLIST_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class UMLWidget;
-typedef QPtrList<UMLWidget> UMLWidgetList;
-typedef QPtrListIterator<UMLWidget> UMLWidgetListIt;
+typedef TQPtrList<UMLWidget> UMLWidgetList;
+typedef TQPtrListIterator<UMLWidget> UMLWidgetListIt;
#endif
diff --git a/umbrello/umbrello/usecase.cpp b/umbrello/umbrello/usecase.cpp
index 526f533b..3526720c 100644
--- a/umbrello/umbrello/usecase.cpp
+++ b/umbrello/umbrello/usecase.cpp
@@ -11,7 +11,7 @@
#include "usecase.h"
-UMLUseCase::UMLUseCase(const QString & name, Uml::IDType id)
+UMLUseCase::UMLUseCase(const TQString & name, Uml::IDType id)
: UMLCanvasObject(name, id) {
init();
}
@@ -28,12 +28,12 @@ UMLObject* UMLUseCase::clone() const {
return clone;
}
-void UMLUseCase::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement usecaseElement = UMLObject::save("UML:UseCase", qDoc);
+void UMLUseCase::saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement) {
+ TQDomElement usecaseElement = UMLObject::save("UML:UseCase", qDoc);
qElement.appendChild(usecaseElement);
}
-bool UMLUseCase::load(QDomElement& ) {
+bool UMLUseCase::load(TQDomElement& ) {
return true;
}
diff --git a/umbrello/umbrello/usecase.h b/umbrello/umbrello/usecase.h
index 5c262b10..41ca7306 100644
--- a/umbrello/umbrello/usecase.h
+++ b/umbrello/umbrello/usecase.h
@@ -31,7 +31,7 @@ public:
* @param name The name of the object.
* @param id The id of the object.
*/
- explicit UMLUseCase(const QString & name = "", Uml::IDType id = Uml::id_None);
+ explicit UMLUseCase(const TQString & name = "", Uml::IDType id = Uml::id_None);
/**
* Standard deconstructor
@@ -51,13 +51,13 @@ public:
/**
* Creates the <UML:UseCase> element.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
protected:
/**
* Loads the <UML:UseCase> element (empty.)
*/
- bool load( QDomElement & element );
+ bool load( TQDomElement & element );
};
#endif
diff --git a/umbrello/umbrello/usecasewidget.cpp b/umbrello/umbrello/usecasewidget.cpp
index f7564036..7eb8590a 100644
--- a/umbrello/umbrello/usecasewidget.cpp
+++ b/umbrello/umbrello/usecasewidget.cpp
@@ -12,7 +12,7 @@
// own header file
#include "usecasewidget.h"
// system includes
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
// local includes
#include "usecase.h"
@@ -27,16 +27,16 @@ UseCaseWidget::UseCaseWidget(UMLView * view, UMLUseCase *o) : UMLWidget(view, o)
UseCaseWidget::~UseCaseWidget() {}
-void UseCaseWidget::draw(QPainter & p, int offsetX, int offsetY) {
+void UseCaseWidget::draw(TQPainter & p, int offsetX, int offsetY) {
UMLWidget::setPen(p);
if ( UMLWidget::getUseFillColour() )
p.setBrush( UMLWidget::getFillColour() );
- QFont font = UMLWidget::getFont();
+ TQFont font = UMLWidget::getFont();
font.setUnderline(false);
font.setBold(false);
font.setItalic( m_pObject->getAbstract() );
p.setFont( font );
- const QFontMetrics &fm = getFontMetrics(FT_NORMAL);
+ const TQFontMetrics &fm = getFontMetrics(FT_NORMAL);
const int fontHeight = fm.lineSpacing();
const int w = width();
const int h = height();
@@ -51,9 +51,9 @@ void UseCaseWidget::draw(QPainter & p, int offsetX, int offsetY) {
drawSelected(&p, offsetX, offsetY);
}
-QSize UseCaseWidget::calculateSize() {
+TQSize UseCaseWidget::calculateSize() {
const UMLWidget::FontType ft = ( m_pObject->getAbstract() ? FT_BOLD_ITALIC : FT_BOLD );
- const QFontMetrics &fm = UMLWidget::getFontMetrics(ft);
+ const TQFontMetrics &fm = UMLWidget::getFontMetrics(ft);
const int fontHeight = fm.lineSpacing();
const int textWidth = fm.width(getName());
int width = textWidth > UC_WIDTH?textWidth:UC_WIDTH;
@@ -61,11 +61,11 @@ QSize UseCaseWidget::calculateSize() {
width += UC_MARGIN * 2;
- return QSize(width, height);
+ return TQSize(width, height);
}
-void UseCaseWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
- QDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
+void UseCaseWidget::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement ) {
+ TQDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
UMLWidget::saveToXMI( qDoc, usecaseElement );
qElement.appendChild( usecaseElement );
}
diff --git a/umbrello/umbrello/usecasewidget.h b/umbrello/umbrello/usecasewidget.h
index 509ff7a5..65613d1e 100644
--- a/umbrello/umbrello/usecasewidget.h
+++ b/umbrello/umbrello/usecasewidget.h
@@ -55,12 +55,12 @@ public:
/**
* Overrides the standard paint event.
*/
- void draw(QPainter & p, int offsetX, int offsetY);
+ void draw(TQPainter & p, int offsetX, int offsetY);
/**
* Saves this UseCase to file.
*/
- void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
// For loading we can use the loadFromXMI() inherited from UMLWidget.
@@ -68,7 +68,7 @@ protected:
/**
* Overrides method from UMLWidget
*/
- QSize calculateSize();
+ TQSize calculateSize();
};
#endif
diff --git a/umbrello/umbrello/widget_factory.cpp b/umbrello/umbrello/widget_factory.cpp
index 5bb8eeae..ea58e128 100644
--- a/umbrello/umbrello/widget_factory.cpp
+++ b/umbrello/umbrello/widget_factory.cpp
@@ -54,7 +54,7 @@
namespace Widget_Factory {
UMLWidget *createWidget(UMLView *view, UMLObject *o) {
- QPoint pos = view->getPos();
+ TQPoint pos = view->getPos();
int y = pos.y();
Uml::Diagram_Type diagramType = view->getType();
Uml::Object_Type type = o->getBaseType();
@@ -143,7 +143,7 @@ bool validateObjType(Uml::Object_Type expected, UMLObject* &o, Uml::IDType id) {
if (o == NULL) {
kDebug() << "Widget_Factory::validateObjType: creating new object of type "
<< expected << endl;
- QString artificialName = "LOST_" + ID2STR(id);
+ TQString artificialName = "LOST_" + ID2STR(id);
o = Object_Factory::createUMLObject(expected, artificialName, NULL, false);
if (o == NULL)
return false;
@@ -161,8 +161,8 @@ bool validateObjType(Uml::Object_Type expected, UMLObject* &o, Uml::IDType id) {
return false;
}
-UMLWidget* makeWidgetFromXMI(const QString& tag,
- const QString& idStr, UMLView *view) {
+UMLWidget* makeWidgetFromXMI(const TQString& tag,
+ const TQString& idStr, UMLView *view) {
UMLWidget *widget = NULL;
// Loading of widgets which do NOT represent any UMLObject,
diff --git a/umbrello/umbrello/widget_factory.h b/umbrello/umbrello/widget_factory.h
index ed8c30b7..bfdc93aa 100644
--- a/umbrello/umbrello/widget_factory.h
+++ b/umbrello/umbrello/widget_factory.h
@@ -12,7 +12,7 @@
#ifndef WIDGET_FACTORY_H
#define WIDGET_FACTORY_H
-#include <qstring.h>
+#include <tqstring.h>
// forward declarations
class UMLView;
@@ -33,8 +33,8 @@ namespace Widget_Factory {
/**
* Create a UMLWidget according to the given XMI tag.
*/
- UMLWidget* makeWidgetFromXMI(const QString& tag,
- const QString& idStr, UMLView *view);
+ UMLWidget* makeWidgetFromXMI(const TQString& tag,
+ const TQString& idStr, UMLView *view);
} // end namespace Widget_Factory
diff --git a/umbrello/umbrello/widget_utils.cpp b/umbrello/umbrello/widget_utils.cpp
index b022d828..9f363a62 100644
--- a/umbrello/umbrello/widget_utils.cpp
+++ b/umbrello/umbrello/widget_utils.cpp
@@ -13,9 +13,9 @@
#include "widget_utils.h"
// qt/kde includes
-#include <qcanvas.h>
-#include <qbrush.h>
-#include <qpen.h>
+#include <tqcanvas.h>
+#include <tqbrush.h>
+#include <tqpen.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -55,8 +55,8 @@ UMLWidget* findWidget(Uml::IDType id,
return NULL;
}
-QIconSet iconSet(Uml::Diagram_Type dt) {
- QIconSet diagramIconSet;
+TQIconSet iconSet(Uml::Diagram_Type dt) {
+ TQIconSet diagramIconSet;
switch (dt) {
case Uml::dt_UseCase:
diagramIconSet = BarIconSet("umbrello_diagram_usecase");
@@ -92,15 +92,15 @@ QIconSet iconSet(Uml::Diagram_Type dt) {
return diagramIconSet;
}
-QCanvasRectangle *decoratePoint(const QPoint& p) {
+TQCanvasRectangle *decoratePoint(const TQPoint& p) {
const int SIZE = 4;
UMLView *currentView = UMLApp::app()->getCurrentView();
- QCanvasRectangle *rect;
- rect = new QCanvasRectangle(p.x() - SIZE / 2,
+ TQCanvasRectangle *rect;
+ rect = new TQCanvasRectangle(p.x() - SIZE / 2,
p.y() - SIZE / 2,
SIZE, SIZE, currentView->canvas());
- rect->setBrush( QBrush(Qt::blue) );
- rect->setPen( QPen(Qt::blue) );
+ rect->setBrush( TQBrush(Qt::blue) );
+ rect->setPen( TQPen(Qt::blue) );
rect->setVisible(true);
return rect;
}
diff --git a/umbrello/umbrello/widget_utils.h b/umbrello/umbrello/widget_utils.h
index 419f9d99..d904d8d7 100644
--- a/umbrello/umbrello/widget_utils.h
+++ b/umbrello/umbrello/widget_utils.h
@@ -12,8 +12,8 @@
#ifndef WIDGET_UTILS_H
#define WIDGET_UTILS_H
-#include <qiconset.h>
-#include <qpoint.h>
+#include <tqiconset.h>
+#include <tqpoint.h>
#include "umlnamespace.h"
#include "umlwidgetlist.h"
#include "messagewidgetlist.h"
@@ -43,9 +43,9 @@ UMLWidget* findWidget(Uml::IDType id,
/**
* Return the icon corresponding to the given Diagram_Type.
*/
-QIconSet iconSet(Uml::Diagram_Type dt);
+TQIconSet iconSet(Uml::Diagram_Type dt);
-QCanvasRectangle *decoratePoint(const QPoint& p);
+TQCanvasRectangle *decoratePoint(const TQPoint& p);
}
diff --git a/umbrello/umbrello/widgetbase.cpp b/umbrello/umbrello/widgetbase.cpp
index 225f5848..9d94e3f1 100644
--- a/umbrello/umbrello/widgetbase.cpp
+++ b/umbrello/umbrello/widgetbase.cpp
@@ -16,7 +16,7 @@
#include "umlobject.h"
#include "optionstate.h"
-WidgetBase::WidgetBase(UMLView *view) : QObject(view) {
+WidgetBase::WidgetBase(UMLView *view) : TQObject(view) {
init(view);
}
@@ -34,7 +34,7 @@ void WidgetBase::init(UMLView *view, Uml::Widget_Type type /* = Uml::wt_UMLWidge
kError() << "WidgetBase constructor: SERIOUS PROBLEM - m_pView is NULL" << endl;
m_bUsesDiagramLineColour = false;
m_bUsesDiagramLineWidth = false;
- m_LineColour = QColor("black");
+ m_LineColour = TQColor("black");
m_LineWidth = 0; // initialize with 0 to have valid start condition
}
}
@@ -72,20 +72,20 @@ Uml::IDType WidgetBase::getID() const {
return m_nId;
}
-QString WidgetBase::getDoc() const {
+TQString WidgetBase::getDoc() const {
if (m_pObject != NULL)
return m_pObject->getDoc();
return m_Doc;
}
-void WidgetBase::setDoc( const QString &doc ) {
+void WidgetBase::setDoc( const TQString &doc ) {
if (m_pObject != NULL)
m_pObject->setDoc( doc );
else
m_Doc = doc;
}
-void WidgetBase::setLineColor(const QColor &colour) {
+void WidgetBase::setLineColor(const TQColor &colour) {
m_LineColour = colour;
m_bUsesDiagramLineColour = false;
}
@@ -95,7 +95,7 @@ void WidgetBase::setLineWidth(uint width) {
m_bUsesDiagramLineWidth = false;
}
-void WidgetBase::saveToXMI( QDomDocument & /*qDoc*/, QDomElement & qElement ) {
+void WidgetBase::saveToXMI( TQDomDocument & /*qDoc*/, TQDomElement & qElement ) {
if (m_bUsesDiagramLineColour) {
qElement.setAttribute( "linecolor", "none" );
} else {
@@ -108,16 +108,16 @@ void WidgetBase::saveToXMI( QDomDocument & /*qDoc*/, QDomElement & qElement ) {
}
}
-bool WidgetBase::loadFromXMI( QDomElement & qElement ) {
+bool WidgetBase::loadFromXMI( TQDomElement & qElement ) {
// first load from "linecolour" and then overwrite with the "linecolor"
// attribute if that one is present. The "linecolour" name was a "typo" in
// earlier versions of Umbrello
- QString lineColor = qElement.attribute( "linecolour", "none" );
+ TQString lineColor = qElement.attribute( "linecolour", "none" );
lineColor = qElement.attribute( "linecolor", lineColor );
- QString lineWidth = qElement.attribute( "linewidth", "none" );
+ TQString lineWidth = qElement.attribute( "linewidth", "none" );
if (lineColor != "none") {
- setLineColor( QColor(lineColor) );
+ setLineColor( TQColor(lineColor) );
m_bUsesDiagramLineColour = false;
} else if (m_Type != Uml::wt_Box && m_pView != NULL) {
setLineColor( m_pView->getLineColor() );
diff --git a/umbrello/umbrello/widgetbase.h b/umbrello/umbrello/widgetbase.h
index 5051418e..d9487964 100644
--- a/umbrello/umbrello/widgetbase.h
+++ b/umbrello/umbrello/widgetbase.h
@@ -12,9 +12,9 @@
#ifndef WIDGETBASE_H
#define WIDGETBASE_H
-#include <qobject.h>
-#include <qcolor.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqcolor.h>
+#include <tqdom.h>
#include "umlnamespace.h"
@@ -27,7 +27,7 @@ class UMLObject;
* @author Oliver Kellogg <okellogg@users.sourceforge.net>
* Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
*/
-class WidgetBase : public QObject {
+class WidgetBase : public TQObject {
Q_OBJECT
public:
/**
@@ -77,7 +77,7 @@ public:
*
* @return The documentation from the UMLObject (if m_pObject is set.)
*/
- virtual QString getDoc() const;
+ virtual TQString getDoc() const;
/**
* Used by some child classes to set documentation.
@@ -85,14 +85,14 @@ public:
* @param doc The documentation to be set in the UMLObject
* (if m_pObject is set.)
*/
- virtual void setDoc( const QString &doc );
+ virtual void setDoc( const TQString &doc );
/**
* Sets the line colour
*
* @param colour the new line colour
*/
- virtual void setLineColor(const QColor &colour);
+ virtual void setLineColor(const TQColor &colour);
/**
* Sets the line width
@@ -104,7 +104,7 @@ public:
/**
* Read property of m_LineColour.
*/
- QColor getLineColor() const {
+ TQColor getLineColor() const {
return m_LineColour;
}
@@ -153,9 +153,9 @@ public:
*/
Uml::IDType getID() const;
- virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
+ virtual void saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement );
- virtual bool loadFromXMI( QDomElement & qElement );
+ virtual bool loadFromXMI( TQDomElement & qElement );
protected:
/**
@@ -170,7 +170,7 @@ protected:
UMLView *m_pView;
UMLObject *m_pObject;
- QString m_Doc; ///< Only used if m_pObject is not set.
+ TQString m_Doc; ///< Only used if m_pObject is not set.
/**
* This ID is only used when the widget does not have a
@@ -182,7 +182,7 @@ protected:
/**
* Color of the lines of the widget. Is saved to XMI.
*/
- QColor m_LineColour;
+ TQColor m_LineColour;
/**
* Width of the lines of the widget. Is saved to XMI.
diff --git a/umbrello/umbrello/worktoolbar.cpp b/umbrello/umbrello/worktoolbar.cpp
index 0f27be80..ef648a49 100644
--- a/umbrello/umbrello/worktoolbar.cpp
+++ b/umbrello/umbrello/worktoolbar.cpp
@@ -13,7 +13,7 @@
#include "worktoolbar.h"
// qt/kde include files
-#include <qmainwindow.h>
+#include <tqmainwindow.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -26,7 +26,7 @@
#include "worktoolbar.h"
-WorkToolBar::WorkToolBar(QMainWindow *parentWindow, const char*name)
+WorkToolBar::WorkToolBar(TQMainWindow *parentWindow, const char*name)
: KToolBar(parentWindow,Qt::DockRight,false,name) {
m_CurrentButtonID = tbb_Undefined;
loadPixmaps();
@@ -44,11 +44,11 @@ WorkToolBar::WorkToolBar(QMainWindow *parentWindow, const char*name)
m_map.insert(Uml::dt_Undefined,tbb_Arrow);
slotCheckToolBar( Uml::dt_Undefined );
- connect( this, SIGNAL( released( int ) ), this, SLOT( buttonChanged (int ) ) );
+ connect( this, TQT_SIGNAL( released( int ) ), this, TQT_SLOT( buttonChanged (int ) ) );
}
WorkToolBar::~WorkToolBar() {
- disconnect(this, SIGNAL(released(int)),this,SLOT(buttonChanged(int)));
+ disconnect(this, TQT_SIGNAL(released(int)),this,TQT_SLOT(buttonChanged(int)));
}
void WorkToolBar::insertHotBtn(ToolBar_Buttons tbb) {
@@ -197,7 +197,7 @@ void WorkToolBar::buttonChanged(int b) {
view->setCursor( currentCursor() );
}
-QCursor WorkToolBar::currentCursor() {
+TQCursor WorkToolBar::currentCursor() {
return m_ToolButtons[m_CurrentButtonID].Cursor;
}
@@ -209,7 +209,7 @@ void WorkToolBar::slotResetToolBar() {
toggleButton(m_CurrentButtonID);
emit sigButtonChanged(m_CurrentButtonID);
- QCursor curs;
+ TQCursor curs;
curs.setShape(Qt::ArrowCursor);
UMLView* view = UMLApp::app()->getCurrentView();
@@ -230,8 +230,8 @@ void WorkToolBar::setDefaultTool() {
b -> animateClick();
}
-QPixmap WorkToolBar::load(const QString & fileName) {
- QPixmap pxm;
+TQPixmap WorkToolBar::load(const TQString & fileName) {
+ TQPixmap pxm;
pxm.load(fileName);
return pxm;
}
@@ -239,7 +239,7 @@ QPixmap WorkToolBar::load(const QString & fileName) {
void WorkToolBar::loadPixmaps() {
const struct ButtonInfo {
const ToolBar_Buttons tbb;
- const QString btnName;
+ const TQString btnName;
const char *pngName;
} buttonInfo[] = {
{ tbb_Object, i18n("Object"), "object.png" },
@@ -290,25 +290,25 @@ void WorkToolBar::loadPixmaps() {
{ tbb_Coll_Message, i18n("Message"), "message-asynchronous.png" }
};
KStandardDirs * dirs = KGlobal::dirs();
- QString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
+ TQString dataDir = dirs->findResourceDir( "data", "umbrello/pics/object.png" );
dataDir += "/umbrello/pics/";
const size_t n_buttonInfos = sizeof(buttonInfo) / sizeof(ButtonInfo);
m_ToolButtons.insert(tbb_Undefined,
ToolButton(i18n("UNDEFINED"),
0,
- QCursor()) );
+ TQCursor()) );
m_ToolButtons.insert(tbb_Arrow,
ToolButton(i18n("Select"),
load(dataDir + "arrow.png"),
- QCursor()) );
+ TQCursor()) );
kDebug() << "WorkToolBar::loadPixmaps: n_buttonInfos = " << n_buttonInfos << endl;
for (uint i = 0; i < n_buttonInfos; i++) {
const ButtonInfo& info = buttonInfo[i];
m_ToolButtons.insert(info.tbb,
ToolButton(info.btnName,
load(dataDir + info.pngName),
- QCursor(load(dataDir + "cursor-" + info.pngName), 9, 9)));
+ TQCursor(load(dataDir + "cursor-" + info.pngName), 9, 9)));
}
}
diff --git a/umbrello/umbrello/worktoolbar.h b/umbrello/umbrello/worktoolbar.h
index 92012dde..f5af5b2d 100644
--- a/umbrello/umbrello/worktoolbar.h
+++ b/umbrello/umbrello/worktoolbar.h
@@ -12,9 +12,9 @@
#ifndef WORKTOOLBAR_H
#define WORKTOOLBAR_H
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qcursor.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
#include <ktoolbar.h>
#include "umlnamespace.h"
@@ -48,7 +48,7 @@ public:
*
* @param parentWindow The parent of the toolbar.
*/
- WorkToolBar(QMainWindow *parentWindow, const char *name);
+ WorkToolBar(TQMainWindow *parentWindow, const char *name);
/**
* Standard deconstructor.
@@ -123,22 +123,22 @@ public:
private:
- typedef QMap<Uml::Diagram_Type,ToolBar_Buttons> OldToolMap;
+ typedef TQMap<Uml::Diagram_Type,ToolBar_Buttons> OldToolMap;
/**
* This inner class holds label, symbol, and cursor of a tool button.
*/
class ToolButton {
public:
- QString Label;
- QPixmap Symbol;
- QCursor Cursor;
- ToolButton() : Label(QString("?")), Symbol(QPixmap()), Cursor(QCursor()) { }
- ToolButton(const QString& lbl, const QPixmap& smb, const QCursor& cur) :
+ TQString Label;
+ TQPixmap Symbol;
+ TQCursor Cursor;
+ ToolButton() : Label(TQString("?")), Symbol(TQPixmap()), Cursor(TQCursor()) { }
+ ToolButton(const TQString& lbl, const TQPixmap& smb, const TQCursor& cur) :
Label(lbl), Symbol(smb), Cursor(cur) { }
};
- typedef QMap<ToolBar_Buttons, ToolButton> ToolButtonMap;
+ typedef TQMap<ToolBar_Buttons, ToolButton> ToolButtonMap;
ToolBar_Buttons m_CurrentButtonID;
OldToolMap m_map;
@@ -148,7 +148,7 @@ private:
/**
* Loads a pixmap from file
*/
- QPixmap load(const QString &fileName);
+ TQPixmap load(const TQString &fileName);
/**
* Loads toolbar icon and mouse cursor images from disk
@@ -158,7 +158,7 @@ private:
/**
* Returns the current cursor depending on m_CurrentButtonID
*/
- QCursor currentCursor();
+ TQCursor currentCursor();
/**
* Inserts the button corresponding to the tbb value given